mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Replace address references with named constant
This commit is contained in:
@@ -57,7 +57,7 @@ void editor_load()
|
||||
RCT2_CALLPROC_EBPSAFE(0x006BD39C);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
RCT2_GLOBAL(0x013573E4, uint32) |= 16;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) |= 16;
|
||||
RCT2_CALLPROC_EBPSAFE(0x006ACA58);
|
||||
RCT2_GLOBAL(0x0141F571, uint8) = 4;
|
||||
viewport_init_all();
|
||||
|
||||
@@ -54,7 +54,7 @@ int calculate_park_rating()
|
||||
int result;
|
||||
|
||||
result = 1150;
|
||||
if (RCT2_GLOBAL(0x013573E4, uint32) & 0x4000)
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) & 0x4000)
|
||||
result = 1050;
|
||||
|
||||
// Guests
|
||||
|
||||
@@ -445,9 +445,9 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
|
||||
RCT2_GLOBAL(0x00F663B0, sint32) = RCT2_GLOBAL(0x009AA0F0, sint32);
|
||||
RCT2_GLOBAL(0x00F663B4, sint32) = RCT2_GLOBAL(0x009AA0F4, sint32);
|
||||
RCT2_GLOBAL(0x009DEB7C, sint16) = 0;
|
||||
RCT2_GLOBAL(0x013573E4, sint32) &= 0xFFFFF7FF;
|
||||
if (RCT2_GLOBAL(0x013573E4, sint32) & 0x20000)
|
||||
RCT2_GLOBAL(0x013573E4, sint32) |= 0x800;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, sint32) &= 0xFFFFF7FF;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, sint32) & 0x20000)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, sint32) |= 0x800;
|
||||
RCT2_CALLPROC_EBPSAFE(0x00684AC3);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006DFEE4);
|
||||
news_item_init_queue();
|
||||
|
||||
@@ -151,7 +151,7 @@ static void window_game_bottom_toolbar_mouseup()
|
||||
switch (widgetIndex) {
|
||||
case WIDX_LEFT_OUTSET:
|
||||
case WIDX_MONEY:
|
||||
if (!(RCT2_GLOBAL(0x013573E4, uint32) & 0x800))
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) & 0x800))
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069DDF1);
|
||||
break;
|
||||
case WIDX_GUESTS:
|
||||
@@ -292,7 +292,7 @@ static void window_game_bottom_toolbar_invalidate()
|
||||
}
|
||||
|
||||
// Hide money if there is no money
|
||||
if (RCT2_GLOBAL(0x013573E4, uint32) & 0x800) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) & 0x800) {
|
||||
window_game_bottom_toolbar_widgets[WIDX_MONEY].type = WWT_EMPTY;
|
||||
window_game_bottom_toolbar_widgets[WIDX_GUESTS].top = 1;
|
||||
window_game_bottom_toolbar_widgets[WIDX_GUESTS].bottom = 17;
|
||||
|
||||
@@ -1710,7 +1710,7 @@ static void window_park_objective_invalidate()
|
||||
*((short*)0x013CE954) = RCT2_GLOBAL(0x013573D8, uint32);
|
||||
|
||||
//
|
||||
if (RCT2_GLOBAL(0x013573E4, uint32) & 0x02)
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_FLAGS, uint32) & 0x02)
|
||||
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_DROPDOWN_BUTTON;
|
||||
else
|
||||
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_EMPTY;
|
||||
|
||||
Reference in New Issue
Block a user