diff --git a/src/cheats.c b/src/cheats.c index 52e30cc3aaae..8d26fe3fb011 100644 --- a/src/cheats.c +++ b/src/cheats.c @@ -125,7 +125,7 @@ static void cheat_remove_litter() continue; sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(it.element)); - if(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BIN) + if(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BIN) it.element->properties.path.addition_status = 0xFF; } while (map_element_iterator_next(&it)); diff --git a/src/peep/peep.c b/src/peep/peep.c index 43e3e24eeeee..ca40a45b4a38 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -232,7 +232,7 @@ static uint8 peep_assess_surroundings(sint16 center_x, sint16 center_y, sint16 c if (footpath_element_path_scenery_is_ghost(mapElement)) break; - if (scenery->path_bit.var_06 & + if (scenery->path_bit.flags & (PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER | PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW)){ num_fountains++; @@ -626,7 +626,7 @@ static void sub_68F41A(rct_peep *peep, int index) if (footpath_element_has_path_scenery(mapElement) && footpath_element_path_scenery_is_ghost(mapElement)){ uint8 pathSceneryIndex = footpath_element_get_path_scenery_index(mapElement); rct_scenery_entry *sceneryEntry = get_footpath_item_entry(pathSceneryIndex); - if (sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_QUEUE_MONITOR) { + if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_QUEUE_MONITOR) { found = 1; } } @@ -4272,7 +4272,7 @@ static void peep_update_emptying_bin(rct_peep* peep){ rct_scenery_entry* scenery_entry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); if ( - !(scenery_entry->path_bit.var_06 & PATH_BIT_FLAG_BIN) + !(scenery_entry->path_bit.flags & PATH_BIT_FLAG_BIN) || map_element->flags & (1 << 5) || footpath_element_path_scenery_is_ghost(map_element) ) { @@ -4532,7 +4532,7 @@ static int peep_update_walking_find_bench(rct_peep* peep){ if (!footpath_element_has_path_scenery(map_element)) return 0; rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BENCH))return 0; + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BENCH))return 0; if (map_element->flags & MAP_ELEMENT_FLAG_BROKEN)return 0; @@ -4607,7 +4607,7 @@ static int peep_update_walking_find_bin(rct_peep* peep){ if (!footpath_element_has_path_scenery(map_element)) return 0; rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BIN))return 0; + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BIN))return 0; if (map_element->flags & MAP_ELEMENT_FLAG_BROKEN)return 0; @@ -4688,7 +4688,7 @@ static void peep_update_walking_break_scenery(rct_peep* peep){ if (!footpath_element_has_path_scenery(map_element)) return; rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BREAKABLE))return; + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BREAKABLE))return; if (map_element->flags & MAP_ELEMENT_FLAG_BROKEN)return; @@ -4859,7 +4859,7 @@ static void peep_update_using_bin(rct_peep* peep){ } rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BIN)){ + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BIN)){ peep_state_reset(peep); return; } @@ -5256,7 +5256,7 @@ static int peep_update_patrolling_find_bin(rct_peep* peep){ if (!footpath_element_has_path_scenery(map_element)) return 0; rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BIN)) + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BIN)) return 0; if (map_element->flags & MAP_ELEMENT_FLAG_BROKEN) @@ -5560,7 +5560,7 @@ static void peep_update_walking(rct_peep* peep){ if (!footpath_element_path_scenery_is_ghost(map_element)) { rct_scenery_entry* sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); - if (!(sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_BENCH)) ebp = 9; + if (!(sceneryEntry->path_bit.flags & PATH_BIT_FLAG_BENCH)) ebp = 9; } } diff --git a/src/world/footpath.c b/src/world/footpath.c index d98366fd6328..de619134eb0a 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -226,7 +226,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement if (pathItemType != 0) { rct_scenery_entry* scenery_entry = get_footpath_item_entry(pathItemType - 1); - uint16 unk6 = scenery_entry->path_bit.var_06; + uint16 unk6 = scenery_entry->path_bit.flags; if ((unk6 & PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE) && footpath_element_is_sloped(mapElement)) { gGameCommandErrorText = STR_CANT_BUILD_THIS_ON_SLOPED_FOOTPATH; @@ -282,7 +282,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement mapElement->flags &= ~MAP_ELEMENT_FLAG_BROKEN; if (pathItemType != 0) { rct_scenery_entry* scenery_entry = get_footpath_item_entry(pathItemType - 1); - if (scenery_entry->path_bit.var_06 & PATH_BIT_FLAG_BIN) { + if (scenery_entry->path_bit.flags & PATH_BIT_FLAG_BIN) { mapElement->properties.path.addition_status = 255; } } diff --git a/src/world/fountain.c b/src/world/fountain.c index 2e83a88e6875..385121ead1cc 100644 --- a/src/world/fountain.c +++ b/src/world/fountain.c @@ -302,7 +302,7 @@ static bool is_jumping_fountain(int type, int x, int y, int z) uint8 additionIndex = footpath_element_get_path_scenery_index(mapElement); rct_scenery_entry *sceneryEntry = get_footpath_item_entry(additionIndex); - if (!(sceneryEntry->path_bit.var_06 & pathBitFlagMask)) + if (!(sceneryEntry->path_bit.flags & pathBitFlagMask)) continue; return true; diff --git a/src/world/scenery.c b/src/world/scenery.c index 08a620f8dbad..5ca5ed329e9e 100644 --- a/src/world/scenery.c +++ b/src/world/scenery.c @@ -82,9 +82,9 @@ void scenery_update_tile(int x, int y) if (footpath_element_has_path_scenery(mapElement) && !footpath_element_path_scenery_is_ghost(mapElement)) { rct_scenery_entry *sceneryEntry; sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(mapElement)); - if (sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER) { + if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER) { jumping_fountain_begin(JUMPING_FOUNTAIN_TYPE_WATER, x, y, mapElement); - } else if (sceneryEntry->path_bit.var_06 & PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW) { + } else if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW) { jumping_fountain_begin(JUMPING_FOUNTAIN_TYPE_SNOW, x, y, mapElement); } } diff --git a/src/world/scenery.h b/src/world/scenery.h index 0ba1cdb144cf..5d3da5de567c 100644 --- a/src/world/scenery.h +++ b/src/world/scenery.h @@ -127,7 +127,7 @@ typedef enum { } WALL_SCENERY_2_FLAGS; typedef struct rct_path_bit_scenery_entry { - uint16 var_06; + uint16 flags; // 0x06 uint8 pad_08; uint8 tool_id; // 0x09 sint16 price; // 0x0A