Nuke as many warnings as possible, and several globals as well

- Warnings completely suppressed for the included TinyXML and gzstream libraries
- Parentheses warnings are now errors, since there were several that looked like bugs
- Ditto for dangling else warnings

Some of these warnings were actually bugs:
- Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS
---> boe.monster.cpp, lines 105-137
- Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code)
---> boe.monsters.cpp, lines 345-359
- Display of damage blocked by armour appeared to be incorrect (needs verification)
---> boe.newgraph.cpp, line 1079
- Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons
This commit is contained in:
2014-12-04 06:16:40 -05:00
parent e7d8a6d848
commit 94d8717a0b
74 changed files with 611 additions and 637 deletions

View File

@@ -23,7 +23,7 @@ void drain_pc(short which_pc,short how_much);
short mage_lore_total();
bool poison_weapon( short pc_num, short how_much,short safe);
bool is_weapon(short pc_num,short item);
void cast_spell(short type,short situation);
void cast_spell(short type);
bool repeat_cast_ok(short type);
void give_party_spell(short which);
void do_mage_spell(short pc_num,short spell_num);
@@ -34,7 +34,7 @@ void crumble_wall(location where);
void do_mindduel(short pc_num,cCreature *monst);
void dispel_fields(short i,short j,short mode);
bool pc_can_cast_spell(short pc_num,short type,short spell_num);
short pick_spell(short pc_num,short type,short situation) ;
short pick_spell(short pc_num,short type);
short stat_adj(short pc_num,short which);
void set_town_spell(short s_num,short who_c);
void do_alchemy();