Strictify the terrain trim enum

This commit is contained in:
2014-12-01 20:04:30 -05:00
parent d900c7edef
commit e86362d294
9 changed files with 56 additions and 55 deletions

View File

@@ -1795,18 +1795,18 @@ bool terrain_matches(unsigned char x, unsigned char y, ter_num_t ter){
if(ter2 == ter) return true;
if(scenario.ter_types[ter2].ground_type != scenario.ter_types[ter].ground_type)
return false;
if(scenario.ter_types[ter].trim_type == TRIM_NONE &&
scenario.ter_types[ter2].trim_type >= TRIM_S &&
scenario.ter_types[ter2].trim_type <= TRIM_NW_INNER)
if(scenario.ter_types[ter].trim_type == eTrimType::NONE &&
scenario.ter_types[ter2].trim_type >= eTrimType::S &&
scenario.ter_types[ter2].trim_type <= eTrimType::NW_INNER)
return ter == get_ground_from_ter(ter);
if(scenario.ter_types[ter2].trim_type == TRIM_NONE &&
scenario.ter_types[ter].trim_type >= TRIM_S &&
scenario.ter_types[ter].trim_type <= TRIM_NW_INNER)
if(scenario.ter_types[ter2].trim_type == eTrimType::NONE &&
scenario.ter_types[ter].trim_type >= eTrimType::S &&
scenario.ter_types[ter].trim_type <= eTrimType::NW_INNER)
return ter2 == get_ground_from_ter(ter2);
if(scenario.ter_types[ter2].trim_type >= TRIM_S &&
scenario.ter_types[ter2].trim_type <= TRIM_NW_INNER &&
scenario.ter_types[ter].trim_type >= TRIM_S &&
scenario.ter_types[ter].trim_type <= TRIM_NW_INNER)
if(scenario.ter_types[ter2].trim_type >= eTrimType::S &&
scenario.ter_types[ter2].trim_type <= eTrimType::NW_INNER &&
scenario.ter_types[ter].trim_type >= eTrimType::S &&
scenario.ter_types[ter].trim_type <= eTrimType::NW_INNER)
return true;
return false;
}