|
28 | 28 | #include <sstream> |
29 | 29 | #include <fstream> |
30 | 30 | #include <algorithm> |
31 | | -#include <climits> |
32 | 31 | #include <yaml-cpp/yaml.h> |
33 | 32 | #include "Exception.h" |
34 | 33 | #include "Logger.h" |
@@ -139,46 +138,46 @@ void createDefault() |
139 | 138 | setInt("NewBattleCraft", 0); |
140 | 139 |
|
141 | 140 | // new battle loadout data |
142 | | - setInt("NewBattle_STR_AC_AP_AMMO", 1); |
143 | | - setInt("NewBattle_STR_AC_HE_AMMO", 1); |
144 | | - setInt("NewBattle_STR_AC_I_AMMO", 1); |
145 | | - setInt("NewBattle_STR_ALIEN_GRENADE", 1); |
146 | | - setInt("NewBattle_STR_AUTO_CANNON", 1); |
147 | | - setInt("NewBattle_STR_BLASTER_BOMB", 1); |
148 | | - setInt("NewBattle_STR_BLASTER_LAUNCHER", 1); |
149 | | - setInt("NewBattle_STR_ELECTRO_FLARE", 1); |
150 | | - setInt("NewBattle_STR_GRENADE", 1); |
151 | | - setInt("NewBattle_STR_HC_AP_AMMO", 1); |
152 | | - setInt("NewBattle_STR_HC_HE_AMMO", 1); |
153 | | - setInt("NewBattle_STR_HC_I_AMMO", 1); |
154 | | - setInt("NewBattle_STR_HEAVY_CANNON", 1); |
155 | | - setInt("NewBattle_STR_HEAVY_LASER", 1); |
156 | | - setInt("NewBattle_STR_HEAVY_PLASMA", 1); |
157 | | - setInt("NewBattle_STR_HEAVY_PLASMA_CLIP", 1); |
158 | | - setInt("NewBattle_STR_HIGH_EXPLOSIVE", 1); |
159 | | - setInt("NewBattle_STR_INCENDIARY_ROCKET", 1); |
160 | | - setInt("NewBattle_STR_LARGE_ROCKET", 1); |
161 | | - setInt("NewBattle_STR_LASER_PISTOL", 1); |
162 | | - setInt("NewBattle_STR_LASER_RIFLE", 1); |
163 | | - setInt("NewBattle_STR_MEDI_KIT", 1); |
164 | | - setInt("NewBattle_STR_MIND_PROBE", 1); |
165 | | - setInt("NewBattle_STR_MOTION_SCANNER", 1); |
166 | | - setInt("NewBattle_STR_PISTOL", 1); |
167 | | - setInt("NewBattle_STR_PISTOL_CLIP", 1); |
168 | | - setInt("NewBattle_STR_PLASMA_PISTOL", 1); |
169 | | - setInt("NewBattle_STR_PLASMA_PISTOL_CLIP", 1); |
170 | | - setInt("NewBattle_STR_PLASMA_RIFLE", 1); |
171 | | - setInt("NewBattle_STR_PLASMA_RIFLE_CLIP", 1); |
172 | | - setInt("NewBattle_STR_PROXIMITY_GRENADE", 1); |
173 | | - setInt("NewBattle_STR_PSI_AMP", 1); |
174 | | - setInt("NewBattle_STR_RIFLE", 1); |
175 | | - setInt("NewBattle_STR_RIFLE_CLIP", 1); |
176 | | - setInt("NewBattle_STR_ROCKET_LAUNCHER", 1); |
177 | | - setInt("NewBattle_STR_SMALL_LAUNCHER", 1); |
178 | | - setInt("NewBattle_STR_SMALL_ROCKET", 1); |
179 | | - setInt("NewBattle_STR_SMOKE_GRENADE", 1); |
180 | | - setInt("NewBattle_STR_STUN_BOMB", 1); |
181 | | - setInt("NewBattle_STR_STUN_ROD", 1); |
| 141 | + setInt("NewBattle_STR_AC_AP_AMMO", 0); |
| 142 | + setInt("NewBattle_STR_AC_HE_AMMO", 0); |
| 143 | + setInt("NewBattle_STR_AC_I_AMMO", 0); |
| 144 | + setInt("NewBattle_STR_ALIEN_GRENADE", 0); |
| 145 | + setInt("NewBattle_STR_AUTO_CANNON", 0); |
| 146 | + setInt("NewBattle_STR_BLASTER_BOMB", 0); |
| 147 | + setInt("NewBattle_STR_BLASTER_LAUNCHER", 0); |
| 148 | + setInt("NewBattle_STR_ELECTRO_FLARE", 0); |
| 149 | + setInt("NewBattle_STR_GRENADE", 0); |
| 150 | + setInt("NewBattle_STR_HC_AP_AMMO", 0); |
| 151 | + setInt("NewBattle_STR_HC_HE_AMMO", 0); |
| 152 | + setInt("NewBattle_STR_HC_I_AMMO", 0); |
| 153 | + setInt("NewBattle_STR_HEAVY_CANNON", 0); |
| 154 | + setInt("NewBattle_STR_HEAVY_LASER", 0); |
| 155 | + setInt("NewBattle_STR_HEAVY_PLASMA", 0); |
| 156 | + setInt("NewBattle_STR_HEAVY_PLASMA_CLIP", 0); |
| 157 | + setInt("NewBattle_STR_HIGH_EXPLOSIVE", 0); |
| 158 | + setInt("NewBattle_STR_INCENDIARY_ROCKET", 0); |
| 159 | + setInt("NewBattle_STR_LARGE_ROCKET", 0); |
| 160 | + setInt("NewBattle_STR_LASER_PISTOL", 0); |
| 161 | + setInt("NewBattle_STR_LASER_RIFLE", 0); |
| 162 | + setInt("NewBattle_STR_MEDI_KIT", 0); |
| 163 | + setInt("NewBattle_STR_MIND_PROBE", 0); |
| 164 | + setInt("NewBattle_STR_MOTION_SCANNER", 0); |
| 165 | + setInt("NewBattle_STR_PISTOL", 0); |
| 166 | + setInt("NewBattle_STR_PISTOL_CLIP", 0); |
| 167 | + setInt("NewBattle_STR_PLASMA_PISTOL", 0); |
| 168 | + setInt("NewBattle_STR_PLASMA_PISTOL_CLIP", 0); |
| 169 | + setInt("NewBattle_STR_PLASMA_RIFLE", 0); |
| 170 | + setInt("NewBattle_STR_PLASMA_RIFLE_CLIP", 0); |
| 171 | + setInt("NewBattle_STR_PROXIMITY_GRENADE", 0); |
| 172 | + setInt("NewBattle_STR_PSI_AMP", 0); |
| 173 | + setInt("NewBattle_STR_RIFLE", 0); |
| 174 | + setInt("NewBattle_STR_RIFLE_CLIP", 0); |
| 175 | + setInt("NewBattle_STR_ROCKET_LAUNCHER", 0); |
| 176 | + setInt("NewBattle_STR_SMALL_LAUNCHER", 0); |
| 177 | + setInt("NewBattle_STR_SMALL_ROCKET", 0); |
| 178 | + setInt("NewBattle_STR_SMOKE_GRENADE", 0); |
| 179 | + setInt("NewBattle_STR_STUN_BOMB", 0); |
| 180 | + setInt("NewBattle_STR_STUN_ROD", 0); |
182 | 181 |
|
183 | 182 | // controls |
184 | 183 | setInt("keyOk", SDLK_RETURN); |
@@ -545,7 +544,7 @@ std::string getString(const std::string& id) |
545 | 544 | int getInt(const std::string& id) |
546 | 545 | { |
547 | 546 | std::stringstream ss; |
548 | | - int value = INT_MAX; |
| 547 | + int value = 0; |
549 | 548 | if (_options.find(id) != _options.end()) |
550 | 549 | { |
551 | 550 | ss << std::dec << _options[id]; |
|
0 commit comments