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

@@ -716,8 +716,7 @@ location end_town_mode(short switching_level,location destination) // returns n
}
// actually, entry_dir is non zero is town is dead - kludge!
void handle_town_specials(short town_number, short entry_dir,location start_loc)
{
void handle_town_specials(short /*town_number*/, short entry_dir,location /*start_loc*/) {
//if (entry_dir > 0)
// run_special(5,2,univ.town.town.spec_on_entry_if_dead,start_loc,&s1,&s2,&s3);
@@ -731,8 +730,7 @@ void handle_town_specials(short town_number, short entry_dir,location start_loc)
special_queue[0].trigger_time = univ.party.age; // TODO: Simply pushing into slot 0 seems like a bad idea
}
void handle_leave_town_specials(short town_number, short which_spec,location start_loc)
{
void handle_leave_town_specials(short /*town_number*/, short which_spec,location /*start_loc*/) {
//run_special(6,2,which_spec,start_loc,&s1,&s2,&s3);
special_queue[1].spec = which_spec;
@@ -883,7 +881,7 @@ void create_town_combat_terrain()
combat_terrain[where.x][where.y] = univ.town->terrain(where.x,where.y);
}
void create_out_combat_terrain(short type,short num_walls,short spec_code)
void create_out_combat_terrain(short type,short num_walls,short /*spec_code*/)
// spec_code is encounter's spec_code
{
short i,j,k,r1,ter_type;