diff --git a/src/paint/map_element/scenery.c b/src/paint/map_element/scenery.c index 87519f5ec0..2f3a7ee8d4 100644 --- a/src/paint/map_element/scenery.c +++ b/src/paint/map_element/scenery.c @@ -83,8 +83,8 @@ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) { } else { // 6DFFC2: uint32 ecx = ((mapElement->type >> 6) + get_current_rotation()) & 3; - x_offset = RCT2_ADDRESS(0x009A3E74, sint8)[ecx * 2]; - y_offset = RCT2_ADDRESS(0x009A3E75, sint8)[ecx * 2]; + x_offset = ScenerySubTileOffsets[ecx].x; + y_offset = ScenerySubTileOffsets[ecx].y; } // 6E0074: boxoffset.x = x_offset; diff --git a/src/world/map.c b/src/world/map.c index ddbd7e43da..65e0dc74e1 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -2959,8 +2959,8 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi x2 += 16; y2 += 16; }else{ - x2 += RCT2_ADDRESS(0x009A3E74, uint8)[(quadrant & 3) * 2] - 1; - y2 += RCT2_ADDRESS(0x009A3E75, uint8)[(quadrant & 3) * 2] - 1; + x2 += ScenerySubTileOffsets[quadrant & 3].x - 1; + y2 += ScenerySubTileOffsets[quadrant & 3].y - 1; } int base_height2 = map_element_height(x2, y2); if(base_height2 & 0xFFFF0000){ diff --git a/src/world/scenery.c b/src/world/scenery.c index 49dff01266..9e28b3e21f 100644 --- a/src/world/scenery.c +++ b/src/world/scenery.c @@ -60,6 +60,14 @@ sint16 gSceneryCtrlPressZ; uint8 gSceneryGroundFlags; +// rct2: 0x009A3E74 +const rct_xy8 ScenerySubTileOffsets[] = { + { 7, 7 }, + { 7, 23 }, + { 23, 23 }, + { 23, 7 } +}; + void scenery_increase_age(int x, int y, rct_map_element *mapElement); void scenery_update_tile(int x, int y) diff --git a/src/world/scenery.h b/src/world/scenery.h index 0cdc474b25..3984dff5fa 100644 --- a/src/world/scenery.h +++ b/src/world/scenery.h @@ -223,6 +223,8 @@ extern sint16 gSceneryCtrlPressZ; extern uint8 gSceneryGroundFlags; +extern const rct_xy8 ScenerySubTileOffsets[]; + extern sint16 window_scenery_tab_entries[20][SCENERY_ENTRIES_BY_TAB + 1]; void init_scenery();