mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #1835 from medsouz/cleanupscenery
Add names for all memory addresses in world/scenery.c
This commit is contained in:
commit
6a88ca17d0
|
@ -349,12 +349,24 @@
|
|||
|
||||
#define RCT2_ADDRESS_TRACK_LIST 0x00F441EC
|
||||
|
||||
#define RCT2_ADDRESS_SCENERY_COST 0x00F64EB4
|
||||
#define RCT2_ADDRESS_SCENERY_MAP_ELEMENT 0x00F64EBC
|
||||
#define RCT2_ADDRESS_SCENERY_ROTATION 0x00F64EC0
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_X 0x00F64EC4
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_Y 0x00F64EC6
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_Z 0x00F64F09
|
||||
#define RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE 0x00F64F0C
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_TYPE 0x00F64F0D
|
||||
#define RCT2_ADDRESS_SCENERY_TARGET_PATH_INCLINE 0x00F64F0F
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_PATH_OBJECT_TYPE 0x00F64EAC
|
||||
#define RCT2_ADDRESS_CTRL_PRESS_Z_COORDINATE 0x00F64ECC
|
||||
#define RCT2_ADDRESS_SHIFT_PRESS_X_COORDINATE 0x00F64ECE
|
||||
#define RCT2_ADDRESS_SHIFT_PRESS_Y_COORDINATE 0x00F64ED0
|
||||
#define RCT2_ADDRESS_SHIFT_PRESS_Z_VECTOR 0x00F64ED2
|
||||
#define RCT2_ADDRESS_SCENERY_Z_COORDINATE 0x00F64ED4
|
||||
|
||||
#define RCT2_ADDRESS_SCENERY_SELECTED_OBJECT 0x00F64EDA
|
||||
#define RCT2_ADDRESS_SCENERY_TARGET_PATH_TYPE 0x00F64F10
|
||||
#define RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION 0x00F64F11
|
||||
#define RCT2_ADDRESS_SCENERY_TOOL_CTRL_PRESSED 0x00F64F12
|
||||
#define RCT2_ADDRESS_SCENERY_TOOL_SHIFT_PRESSED 0x00F64F13
|
||||
|
||||
|
|
|
@ -470,9 +470,9 @@ void window_scenery_open()
|
|||
window->scenery.selected_scenery_id = -1;
|
||||
window->scenery.hover_counter = 0;
|
||||
window_push_others_below(window);
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(0x00F64EC0, uint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint16) = 0;
|
||||
window_scenery_is_repaint_scenery_tool_on = 0; // repaint colored scenery tool state
|
||||
window_scenery_is_build_cluster_tool_on = 0; // build cluster tool state
|
||||
|
||||
|
@ -639,7 +639,7 @@ static void window_scenery_mousedown(int widgetIndex, rct_window* w, rct_widget*
|
|||
if (widgetIndex >= WIDX_SCENERY_TAB_1 && widgetIndex <= WIDX_SCENERY_TAB_20) {
|
||||
window_scenery_active_tab_index = widgetIndex - WIDX_SCENERY_TAB_1;
|
||||
window_invalidate(w);
|
||||
RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32) = MONEY32_UNDEFINED;
|
||||
window_scenery_update_scroll(w);
|
||||
}
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ void window_scenery_scrollmousedown(rct_window *w, int scrollIndex, int x, int y
|
|||
window_scenery_is_repaint_scenery_tool_on &= 0xFE;
|
||||
sound_play_panned(4, (w->width >> 1) + w->x, 0, 0, 0);
|
||||
w->scenery.hover_counter = -16;
|
||||
RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32) = MONEY32_UNDEFINED;
|
||||
window_invalidate(w);
|
||||
}
|
||||
|
||||
|
@ -1021,8 +1021,8 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
price = sceneryEntry->small_scenery.price * 10;
|
||||
}
|
||||
|
||||
if (w->scenery.selected_scenery_id == -1 && RCT2_GLOBAL(0x00F64EB4, uint32) != MONEY32_UNDEFINED) {
|
||||
price = RCT2_GLOBAL(0x00F64EB4, uint32);
|
||||
if (w->scenery.selected_scenery_id == -1 && RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32) != MONEY32_UNDEFINED) {
|
||||
price = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x013CE952, uint32) = price;
|
||||
|
|
|
@ -1447,8 +1447,8 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
|
|||
cur_grid_y += ((scenario_rand() % 16) - 8) * 32;
|
||||
|
||||
if (!(scenery->small_scenery.flags & SMALL_SCENERY_FLAG4)){
|
||||
RCT2_GLOBAL(0x00F64EC0, uint16)++;
|
||||
RCT2_GLOBAL(0x00F64EC0, uint16) &= 3;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint16)++;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint16) &= 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1473,7 +1473,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
|
|||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
|
||||
|
||||
int cost = game_do_command(cur_grid_x, ebx, cur_grid_y, parameter_2, GAME_COMMAND_PLACE_SCENERY, RCT2_GLOBAL(0x00F64EC0, uint8) | (parameter_3 & 0xFFFF0000), RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16));
|
||||
int cost = game_do_command(cur_grid_x, ebx, cur_grid_y, parameter_2, GAME_COMMAND_PLACE_SCENERY, RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) | (parameter_3 & 0xFFFF0000), RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16));
|
||||
|
||||
|
||||
RCT2_GLOBAL(0x009A8C29, uint8) &= ~1;
|
||||
|
@ -2096,19 +2096,19 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
parameter_2,
|
||||
GAME_COMMAND_PLACE_SCENERY,
|
||||
parameter_3,
|
||||
RCT2_GLOBAL(0x00F64ED4, sint16));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16));
|
||||
|
||||
if (cost == MONEY32_UNDEFINED)
|
||||
return cost;
|
||||
|
||||
RCT2_GLOBAL(0x00F64EC4, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(0x00F64EC6, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(0x00F64EC0, uint16) = (uint16)(parameter_3 & 0xFFFF);
|
||||
RCT2_GLOBAL(0x00F64EDA, sint16) = selected_tab;
|
||||
|
||||
mapElement = RCT2_GLOBAL(0x00F64EBC, rct_map_element*);
|
||||
RCT2_GLOBAL(0x00F64F09, uint8) = mapElement->base_height;
|
||||
RCT2_GLOBAL(0x00F64F0C, uint8) = mapElement->type;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint16) = (uint16)(parameter_3 & 0xFFFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, sint16) = selected_tab;
|
||||
|
||||
mapElement = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE, uint8) = mapElement->type;
|
||||
if (RCT2_GLOBAL(0x00F64F14, uint8) & (1 << 1)){
|
||||
viewport_set_visibility(4);
|
||||
}
|
||||
|
@ -2116,7 +2116,7 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
viewport_set_visibility(5);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) |= (1 << 0);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) |= (1 << 0);
|
||||
break;
|
||||
case 1:
|
||||
// Path Bits
|
||||
|
@ -2133,14 +2133,14 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
if (cost == MONEY32_UNDEFINED)
|
||||
return cost;
|
||||
|
||||
RCT2_GLOBAL(0x00F64EC4, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(0x00F64EC6, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(0x00F64F09, uint8) = (parameter_2 & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64F0F, uint8) = ((parameter_1 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64F10, uint8) = ((parameter_2 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64EAC, uint32) = parameter_3;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = (parameter_2 & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_TARGET_PATH_INCLINE, uint8) = ((parameter_1 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_TARGET_PATH_TYPE, uint8) = ((parameter_2 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_PATH_OBJECT_TYPE, uint32) = parameter_3;
|
||||
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) |= (1 << 1);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) |= (1 << 1);
|
||||
break;
|
||||
case 2:
|
||||
// Walls
|
||||
|
@ -2151,20 +2151,20 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
map_tile.y,
|
||||
parameter_2,
|
||||
GAME_COMMAND_PLACE_FENCE,
|
||||
RCT2_GLOBAL(0x00F64ED4, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, uint16),
|
||||
RCT2_GLOBAL(0x00F64F15, uint16));
|
||||
|
||||
if (cost == MONEY32_UNDEFINED)
|
||||
return cost;
|
||||
|
||||
RCT2_GLOBAL(0x00F64EC4, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(0x00F64EC6, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(0x00F64F11, uint8) = (parameter_2 & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION, uint8) = (parameter_2 & 0xFF);
|
||||
|
||||
mapElement = RCT2_GLOBAL(0x00F64EBC, rct_map_element*);
|
||||
RCT2_GLOBAL(0x00F64F09, uint8) = mapElement->base_height;
|
||||
mapElement = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height;
|
||||
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) |= (1 << 2);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) |= (1 << 2);
|
||||
break;
|
||||
case 3:
|
||||
// Large Scenery
|
||||
|
@ -2176,17 +2176,17 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
parameter_2,
|
||||
GAME_COMMAND_PLACE_LARGE_SCENERY,
|
||||
parameter_3,
|
||||
RCT2_GLOBAL(0x00F64ED4, uint16));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, uint16));
|
||||
|
||||
if (cost == MONEY32_UNDEFINED)
|
||||
return cost;
|
||||
|
||||
RCT2_GLOBAL(0x00F64EC4, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(0x00F64EC6, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(0x00F64EC0, uint8) = ((parameter_1 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) = ((parameter_1 >> 8) & 0xFF);
|
||||
|
||||
mapElement = RCT2_GLOBAL(0x00F64EBC, rct_map_element*);
|
||||
RCT2_GLOBAL(0x00F64F09, uint8) = mapElement->base_height;
|
||||
mapElement = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height;
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F14, uint8) & (1 << 1)){
|
||||
viewport_set_visibility(4);
|
||||
|
@ -2195,7 +2195,7 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
viewport_set_visibility(5);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) |= (1 << 3);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) |= (1 << 3);
|
||||
break;
|
||||
case 4:
|
||||
// Banners
|
||||
|
@ -2212,11 +2212,11 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
|||
if (cost == MONEY32_UNDEFINED)
|
||||
return cost;
|
||||
|
||||
RCT2_GLOBAL(0x00F64EC4, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(0x00F64EC6, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(0x00F64F09, uint8) = (parameter_2 & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64EC0, uint8) = ((parameter_2 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) |= (1 << 4);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = (parameter_2 & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) = ((parameter_2 >> 8) & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) |= (1 << 4);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2277,12 +2277,12 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
map_invalidate_selection_rect();
|
||||
|
||||
// If no change in ghost placement
|
||||
if ((RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 0)) &&
|
||||
mapTile.x == RCT2_GLOBAL(0x00F64EC4, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(0x00F64EC6, sint16) &&
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 0)) &&
|
||||
mapTile.x == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(0x00F64F0E, uint8)&&
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) == RCT2_GLOBAL(0x00F64F0A, sint16) &&
|
||||
RCT2_GLOBAL(0x00F64EDA, uint16) == selected_tab){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint16) == selected_tab){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2310,7 +2310,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) += 8;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64EB4, money32) = cost;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, money32) = cost;
|
||||
break;
|
||||
case 1:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 0);
|
||||
|
@ -2323,10 +2323,10 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
map_invalidate_selection_rect();
|
||||
|
||||
// If no change in ghost placement
|
||||
if ((RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 1)) &&
|
||||
mapTile.x == RCT2_GLOBAL(0x00F64EC4, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(0x00F64EC6, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(0x00F64F09, uint8)){
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 1)) &&
|
||||
mapTile.x == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2339,7 +2339,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
parameter3,
|
||||
selected_tab);
|
||||
|
||||
RCT2_GLOBAL(0x00F64EB4, money32) = cost;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, money32) = cost;
|
||||
break;
|
||||
case 2:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 0);
|
||||
|
@ -2352,10 +2352,10 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
map_invalidate_selection_rect();
|
||||
|
||||
// If no change in ghost placement
|
||||
if ((RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 2)) &&
|
||||
mapTile.x == RCT2_GLOBAL(0x00F64EC4, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(0x00F64EC6, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(0x00F64F11, uint8) &&
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 2)) &&
|
||||
mapTile.x == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION, uint8) &&
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) == RCT2_GLOBAL(0x00F64F0A, sint16)
|
||||
){
|
||||
return;
|
||||
|
@ -2363,7 +2363,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
|
||||
scenery_remove_ghost_tool_placement();
|
||||
|
||||
RCT2_GLOBAL(0x00F64F11, uint8) = (parameter2 & 0xFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION, uint8) = (parameter2 & 0xFF);
|
||||
RCT2_GLOBAL(0x00F64F0A, sint16) = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16);
|
||||
|
||||
bl = 1;
|
||||
|
@ -2386,7 +2386,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) += 8;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64EB4, money32) = cost;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, money32) = cost;
|
||||
break;
|
||||
case 3:
|
||||
scenery = g_largeSceneryEntries[selected_scenery];
|
||||
|
@ -2413,17 +2413,17 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
map_invalidate_map_selection_tiles();
|
||||
|
||||
// If no change in ghost placement
|
||||
if ((RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 3)) &&
|
||||
mapTile.x == RCT2_GLOBAL(0x00F64EC4, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(0x00F64EC6, sint16) &&
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 3)) &&
|
||||
mapTile.x == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) &&
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) == RCT2_GLOBAL(0x00F64F0A, sint16) &&
|
||||
(parameter3 & 0xFFFF) == RCT2_GLOBAL(0x00F64EDA, uint16)){
|
||||
(parameter3 & 0xFFFF) == RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint16)){
|
||||
return;
|
||||
}
|
||||
|
||||
scenery_remove_ghost_tool_placement();
|
||||
|
||||
RCT2_GLOBAL(0x00F64EDA, uint16) = (parameter3 & 0xFFFF);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint16) = (parameter3 & 0xFFFF);
|
||||
RCT2_GLOBAL(0x00F64F0A, sint16) = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16);
|
||||
|
||||
bl = 1;
|
||||
|
@ -2446,7 +2446,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) += 8;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64EB4, money32) = cost;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, money32) = cost;
|
||||
break;
|
||||
case 4:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 0);
|
||||
|
@ -2459,11 +2459,11 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
map_invalidate_selection_rect();
|
||||
|
||||
// If no change in ghost placement
|
||||
if ((RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 4)) &&
|
||||
mapTile.x == RCT2_GLOBAL(0x00F64EC4, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(0x00F64EC6, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(0x00F64F09, uint8) &&
|
||||
((parameter2 >> 8) & 0xFF) == RCT2_GLOBAL(0x00F64EC0, uint8)){
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 4)) &&
|
||||
mapTile.x == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) &&
|
||||
mapTile.y == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) &&
|
||||
(parameter2 & 0xFF) == RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) &&
|
||||
((parameter2 >> 8) & 0xFF) == RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2476,7 +2476,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){
|
|||
parameter3,
|
||||
selected_tab);
|
||||
|
||||
RCT2_GLOBAL(0x00F64EB4, money32) = cost;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, money32) = cost;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2384,7 +2384,7 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|||
if(*ebx & GAME_COMMAND_FLAG_APPLY){
|
||||
int flags = (bl & 0xf);
|
||||
rct_map_element* new_map_element = map_element_insert(x / 32, y / 32, zLow, flags);
|
||||
RCT2_GLOBAL(0x00F64EBC, rct_map_element*) = new_map_element;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*) = new_map_element;
|
||||
uint8 type = quadrant << 6;
|
||||
type |= MAP_ELEMENT_TYPE_SCENERY;
|
||||
type |= rotation;
|
||||
|
@ -2682,7 +2682,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|||
map_element->flags |= MAP_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F64EBC, rct_map_element*) = map_element;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*) = map_element;
|
||||
map_invalidate_tile_zoom1(position.x, position.y, map_element->base_height * 8, map_element->base_height * 8 + 72);
|
||||
}
|
||||
|
||||
|
@ -2898,7 +2898,7 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in
|
|||
new_map_element->flags |= MAP_ELEMENT_FLAG_GHOST;
|
||||
}
|
||||
if(tile_num == 0){
|
||||
RCT2_GLOBAL(0x00F64EBC, rct_map_element*) = new_map_element;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*) = new_map_element;
|
||||
}
|
||||
map_invalidate_tile_full(x2, y2);
|
||||
}
|
||||
|
|
|
@ -111,31 +111,31 @@ void scenery_increase_age(int x, int y, rct_map_element *mapElement)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* 0x006E2712 */
|
||||
/*
|
||||
*
|
||||
* rct2: 0x006E2712
|
||||
*/
|
||||
void scenery_remove_ghost_tool_placement(){
|
||||
sint16 x, y, z;
|
||||
|
||||
x = RCT2_GLOBAL(0x00F64EC4, sint16);
|
||||
y = RCT2_GLOBAL(0x00F64EC6, sint16);
|
||||
z = RCT2_GLOBAL(0x00F64F09, uint8);
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 0)){
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) &= ~(1 << 0);
|
||||
x = RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16);
|
||||
y = RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16);
|
||||
z = RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 0)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 0);
|
||||
game_do_command(
|
||||
x,
|
||||
105 | (RCT2_GLOBAL(0x00F64F0C, uint8) << 8),
|
||||
105 | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE, uint8) << 8),
|
||||
y,
|
||||
z | (RCT2_GLOBAL(0x00F64EDA, uint8) << 8),
|
||||
z | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint8) << 8),
|
||||
GAME_COMMAND_REMOVE_SCENERY,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 1)){
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) &= ~(1 << 1);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 1)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 1);
|
||||
rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32);
|
||||
|
||||
do{
|
||||
|
@ -147,35 +147,33 @@ void scenery_remove_ghost_tool_placement(){
|
|||
|
||||
game_do_command(
|
||||
x,
|
||||
233 | (RCT2_GLOBAL(0x00F64F0F, uint8) << 8),
|
||||
233 | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_TARGET_PATH_INCLINE, uint8) << 8),
|
||||
y,
|
||||
z | (RCT2_GLOBAL(0x00F64F10, uint8) << 8),
|
||||
z | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_TARGET_PATH_TYPE, uint8) << 8),
|
||||
GAME_COMMAND_PLACE_PATH,
|
||||
RCT2_GLOBAL(0x00F64EAC, uint32) & 0xFFFF0000,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_PATH_OBJECT_TYPE, uint32) & 0xFFFF0000,
|
||||
0);
|
||||
break;
|
||||
} while (!map_element_is_last_for_tile(map_element++));
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 2)){
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) &= ~(1 << 2);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 2)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 2);
|
||||
game_do_command(
|
||||
x,
|
||||
105 | (RCT2_GLOBAL(0x00F64F0C, uint8) << 8),
|
||||
105 | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE, uint8) << 8),
|
||||
y,
|
||||
RCT2_GLOBAL(0x00F64F11, uint8) |(z << 8),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION, uint8) |(z << 8),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 3)){
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) &= ~(1 << 3);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 3)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 3);
|
||||
game_do_command(
|
||||
x,
|
||||
105 | (RCT2_GLOBAL(0x00F64EC0, uint8) << 8),
|
||||
105 | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) << 8),
|
||||
y,
|
||||
z,
|
||||
GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
||||
|
@ -183,14 +181,13 @@ void scenery_remove_ghost_tool_placement(){
|
|||
0);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F64F0D, uint8) & (1 << 4)){
|
||||
RCT2_GLOBAL(0x00F64F0D, uint8) &= ~(1 << 4);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 4)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 4);
|
||||
game_do_command(
|
||||
x,
|
||||
105,
|
||||
y,
|
||||
z | (RCT2_GLOBAL(0x00F64EC0, uint8) << 8),
|
||||
z | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_ROTATION, uint8) << 8),
|
||||
GAME_COMMAND_REMOVE_BANNER,
|
||||
0,
|
||||
0);
|
||||
|
|
Loading…
Reference in New Issue