Strictify the terrain trim enum
This commit is contained in:
@@ -35,19 +35,19 @@ cOutdoors& cOutdoors::operator = (legacy::outdoor_record_type& old){
|
||||
if(old.terrain[i][j] == 81 && i > 0 && i < 47 && j > 0 && j < 47) {
|
||||
if(old.terrain[i+1][j] == 81) {
|
||||
ter_num_t connect = old.terrain[i-1][j];
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == TRIM_CITY)
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == eTrimType::CITY)
|
||||
terrain[i][j] = 44;
|
||||
} else if(old.terrain[i-1][j] == 81) {
|
||||
ter_num_t connect = old.terrain[i+1][j];
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == TRIM_CITY)
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == eTrimType::CITY)
|
||||
terrain[i][j] = 40;
|
||||
} else if(old.terrain[i][j+1] == 81) {
|
||||
ter_num_t connect = old.terrain[i][j-1];
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == TRIM_CITY)
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == eTrimType::CITY)
|
||||
terrain[i][j] = 42;
|
||||
} else if(old.terrain[i][j-1] == 81) {
|
||||
ter_num_t connect = old.terrain[i][j+1];
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == TRIM_CITY)
|
||||
if(connect == 80 || scenario.ter_types[connect].trim_type == eTrimType::CITY)
|
||||
terrain[i][j] = 38;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,16 +228,16 @@ enum eTerSpec {
|
||||
// 24. Bridge - if the party boats over it, they get the option to land. (Unused, Unused, Unused)
|
||||
};
|
||||
|
||||
enum eTrimType {
|
||||
TRIM_NONE = 0,
|
||||
TRIM_WALL = 1, // not a trim, but trims will conform to it as if it's the same ground type (eg stone wall)
|
||||
TRIM_S, TRIM_SE, TRIM_E, TRIM_NE, TRIM_N, TRIM_NW, TRIM_W, TRIM_SW,
|
||||
TRIM_NE_INNER, TRIM_SE_INNER, TRIM_SW_INNER, TRIM_NW_INNER,
|
||||
TRIM_FRILLS = 14, // like on lava and underground water; no trim_ter required
|
||||
TRIM_ROAD = 15, // the game will treat it like a road space and draw roads; no trim_ter required
|
||||
TRIM_WALKWAY = 16, // the game will draw walkway corners; trim_ter is base terrain to draw on
|
||||
TRIM_WATERFALL = 17, // special case for waterfalls
|
||||
TRIM_CITY = 18, // the game will join roads up to this space but not draw roads on the space
|
||||
enum class eTrimType {
|
||||
NONE = 0,
|
||||
WALL = 1, // not a trim, but trims will conform to it as if it's the same ground type (eg stone wall)
|
||||
S, SE, E, NE, N, NW, W, SW,
|
||||
NE_INNER, SE_INNER, SW_INNER, NW_INNER,
|
||||
FRILLS = 14, // like on lava and underground water; no trim_ter required
|
||||
ROAD = 15, // the game will treat it like a road space and draw roads; no trim_ter required
|
||||
WALKWAY = 16, // the game will draw walkway corners; trim_ter is base terrain to draw on
|
||||
WATERFALL = 17, // special case for waterfalls
|
||||
CITY = 18, // the game will join roads up to this space but not draw roads on the space
|
||||
};
|
||||
|
||||
/* terrain type blockage */
|
||||
|
||||
@@ -109,7 +109,7 @@ cTerrain& cTerrain::operator = (legacy::terrain_type_type& old){
|
||||
}else{
|
||||
combat_arena = 1;
|
||||
ground_type = 255;
|
||||
trim_type = TRIM_NONE;
|
||||
trim_type = eTrimType::NONE;
|
||||
trim_ter = 0;
|
||||
}
|
||||
if(trim_ter == 99) trim_ter = 0;
|
||||
|
||||
Reference in New Issue
Block a user