mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 19:02:04 -05:00
integrate ScenerySubTileOffsets
This commit is contained in:
parent
f04fa3ca4f
commit
1c5a73db54
4 changed files with 14 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue