diff --git a/src/editor.c b/src/editor.c index 76756700b5..b13a79ab76 100644 --- a/src/editor.c +++ b/src/editor.c @@ -460,7 +460,7 @@ static int editor_read_s6(const char *path) MONEY(100,00) ); - RCT2_GLOBAL(0x013573DC, uint32) = min(RCT2_GLOBAL(0x013573DC, uint32), 100000); + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, uint32) = min(RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, uint32), 100000); finance_reset_cash_to_initial(); finance_update_loan_hash(); diff --git a/src/game.c b/src/game.c index af57ec2ba1..8d9df819fe 100644 --- a/src/game.c +++ b/src/game.c @@ -902,9 +902,9 @@ void game_load_init() mainWindow->viewport_target_sprite = -1; mainWindow->saved_view_x = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_X, sint16); mainWindow->saved_view_y = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_Y, sint16); - uint8 _cl = (RCT2_GLOBAL(0x0138869E, sint16) & 0xFF) - mainWindow->viewport->zoom; - mainWindow->viewport->zoom = RCT2_GLOBAL(0x0138869E, sint16) & 0xFF; - *((char*)(&RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, sint32))) = RCT2_GLOBAL(0x0138869E, sint16) >> 8; + uint8 _cl = (RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_ZOOM_AND_ROTATION, sint16) & 0xFF) - mainWindow->viewport->zoom; + mainWindow->viewport->zoom = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_ZOOM_AND_ROTATION, sint16) & 0xFF; + *((char*)(&RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, sint32))) = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_ZOOM_AND_ROTATION, sint16) >> 8; if (_cl != 0) { if (_cl < 0) { _cl = -_cl; diff --git a/src/input.c b/src/input.c index 65621f24c1..88fab3a384 100644 --- a/src/input.c +++ b/src/input.c @@ -1454,7 +1454,7 @@ static void sub_6EA2AA(rct_window *w, int widgetIndex, int x, int y, int edi) int numLines, fontHeight; gfx_wrap_string(buffer, width + 1, &numLines, &fontHeight); - RCT2_GLOBAL(0x01420044, uint16) = numLines; + RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_TEXT_HEIGHT, uint16) = numLines; tooltipWindow->widgets[0].right = width + 3; tooltipWindow->widgets[0].bottom = ((numLines + 1) * 10) + 4; diff --git a/src/interface/graph.c b/src/interface/graph.c index 53bc2fffb5..7e1fc5cb31 100644 --- a/src/interface/graph.c +++ b/src/interface/graph.c @@ -35,7 +35,7 @@ static void graph_draw_months_uint8(rct_drawpixelinfo *dpi, uint8 *history, int for (i = count - 1; i >= 0; i--) { if (history[i] != 0 && history[i] != 255 && yearOver32 % 4 == 0) { // Draw month text - RCT2_GLOBAL(0x013CE952, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR; gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, (void*)0x013CE952); // Draw month mark diff --git a/src/interface/screenshot.c b/src/interface/screenshot.c index 5f32a308d5..9ac0c16546 100644 --- a/src/interface/screenshot.c +++ b/src/interface/screenshot.c @@ -55,8 +55,8 @@ void screenshot_check() rct_string_id stringId = 3165; sprintf((char*)language_get_string(stringId), "SCR%d%s", screenshotIndex, _screenshot_format_extension[gConfigGeneral.screenshot_format]); - RCT2_GLOBAL(0x013CE952, uint16) = stringId; - // RCT2_GLOBAL(0x013CE952, uint16) = STR_SCR_BMP; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId; + // RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_SCR_BMP; // RCT2_GLOBAL(0x013CE952 + 2, uint16) = screenshotIndex; RCT2_GLOBAL(0x009A8C29, uint8) |= 1; @@ -83,7 +83,7 @@ static int screenshot_get_next_path(char *path, int format) int i; for (i = 1; i < 1000; i++) { - RCT2_GLOBAL(0x013CE952, uint16) = i; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = i; // Glue together path and filename sprintf(path, "%sSCR%d%s", screenshotPath, i, _screenshot_format_extension[format]); diff --git a/src/interface/viewport.c b/src/interface/viewport.c index 9de5abdec6..6b553866af 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1390,7 +1390,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma if (RCT2_ADDRESS(0x00999694, uint32)[trackType] & (1 << trackSequence)) { uint16 ax = RCT2_GLOBAL(0x0097D21A + (ride->type * 8), uint8); uint32 ebx = 0x20381689 + (height + 8) / 16; - ebx += RCT2_GLOBAL(0x009AACBD, uint16); + ebx += RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, uint16); ebx -= RCT2_GLOBAL(0x01359208, uint16); RCT2_GLOBAL(0x009DEA52, uint16) = 1000; RCT2_GLOBAL(0x009DEA54, uint16) = 1000; @@ -1411,7 +1411,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma RCT2_GLOBAL(0x00F441A4, uint32) = 0x21600000; } if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) { - uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[RCT2_GLOBAL(0x009AACBF, uint8)]; + uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)]; RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0; RCT2_GLOBAL(0x00F44198, uint32) = ghost_id; RCT2_GLOBAL(0x00F4419C, uint32) = ghost_id; diff --git a/src/interface/window.c b/src/interface/window.c index 53a42eecfb..e40ca34f86 100644 --- a/src/interface/window.c +++ b/src/interface/window.c @@ -2425,7 +2425,7 @@ void textinput_cancel() #else log_warning("there should be something called here (0x0040701D)"); #endif // _WIN32 - if (RCT2_GLOBAL(0x009DEB8C, uint8) != 255) { + if (RCT2_GLOBAL(RCT2_ADDRESS_TEXTINPUT_WINDOWCLASS, uint8) != 255) { RCT2_CALLPROC_EBPSAFE(0x006EE4E2); w = window_find_by_number( RCT2_GLOBAL(RCT2_ADDRESS_TEXTINPUT_WINDOWCLASS, rct_windowclass), diff --git a/src/management/finance.c b/src/management/finance.c index 17b474b64f..d8231779d9 100644 --- a/src/management/finance.c +++ b/src/management/finance.c @@ -171,7 +171,7 @@ void finance_init() { RCT2_GLOBAL(0x01358334, money32) = 0; RCT2_GLOBAL(0x01358338, uint16) = 0; - RCT2_GLOBAL(0x013573DC, money32) = MONEY(10000,00); // Cheat detection + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) = MONEY(10000,00); // Cheat detection RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32) = ENCRYPT_MONEY(MONEY(10000,00)); RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = MONEY(10000,00); @@ -317,7 +317,7 @@ void game_command_set_current_loan(int* eax, int* ebx, int* ecx, int* edx, int* finance_update_loan_hash(); window_invalidate_by_class(WC_FINANCES); - RCT2_GLOBAL(0x009A9804, uint16) |= 1; + RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint16) |= 1; } *ebx = 0; diff --git a/src/management/marketing.c b/src/management/marketing.c index 7a45392083..5eee2c627e 100644 --- a/src/management/marketing.c +++ b/src/management/marketing.c @@ -94,10 +94,10 @@ void marketing_update() // This sets the string parameters for the marketing types that have an argument. if (campaign == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign == ADVERTISING_CAMPAIGN_RIDE) { rct_ride* ride = GET_RIDE(campaignItem); - RCT2_GLOBAL(0x013CE952, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; } else if (campaign == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { - RCT2_GLOBAL(0x013CE952, uint16) = ShopItemStringIds[campaignItem].plural; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[campaignItem].plural; } news_item_add_to_queue(NEWS_ITEM_MONEY, STR_MARKETING_FINISHED_BASE + campaign, 0); diff --git a/src/management/news_item.c b/src/management/news_item.c index 7135785bf3..87e17cae15 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -122,18 +122,18 @@ void news_item_update_current() bx = 12; if (bx != RCT2_GLOBAL(0x009DEA6B, sint16) || ax != 1) { // loc_66E2AE - RCT2_GLOBAL(0x013573DC, sint32) -= 10000; - if (RCT2_GLOBAL(0x013573DC, sint32) >= 0) - RCT2_GLOBAL(0x013573DC, sint32) = -RCT2_GLOBAL(0x013573DC, sint32); + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) -= 10000; + if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) >= 0) + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) = -RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32); } } else { if (ax != RCT2_GLOBAL(0x009DEA69, sint16)) { ax--; if (ax != RCT2_GLOBAL(0x009DEA69, sint16)) { // loc_66E2AE - RCT2_GLOBAL(0x013573DC, sint32) -= 10000; - if (RCT2_GLOBAL(0x013573DC, sint32) >= 0) - RCT2_GLOBAL(0x013573DC, sint32) = -RCT2_GLOBAL(0x013573DC, sint32); + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) -= 10000; + if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) >= 0) + RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32) = -RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32); } } } diff --git a/src/management/research.c b/src/management/research.c index e84f2986e0..d8e3f0d116 100644 --- a/src/management/research.c +++ b/src/management/research.c @@ -200,7 +200,7 @@ void research_finish_item(sint32 entryIndex) // I don't think 0x009AC06C is ever not 0, so probably redundant if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) { - RCT2_GLOBAL(0x013CE952, rct_string_id) = ((rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME)) ? + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = ((rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME)) ? rideEntry->name : base_ride_type + 2; if (!gSilentResearch) news_item_add_to_queue(NEWS_ITEM_RESEARCH, 2249, entryIndex); @@ -217,7 +217,7 @@ void research_finish_item(sint32 entryIndex) // I don't think 0x009AC06C is ever not 0, so probably redundant if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) { - RCT2_GLOBAL(0x013CE952, rct_string_id) = scenerySetEntry->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = scenerySetEntry->name; if (!gSilentResearch) news_item_add_to_queue(NEWS_ITEM_RESEARCH, 2250, entryIndex); } diff --git a/src/rct1.c b/src/rct1.c index 0a3a454f41..b151ee507a 100644 --- a/src/rct1.c +++ b/src/rct1.c @@ -467,7 +467,7 @@ static void rct1_reset_research() researchItem++; researchItem->entryIndex = RESEARCHED_ITEMS_END_2; RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) = 0; - RCT2_GLOBAL(0x01357CF4, sint32) = -1; + RCT2_GLOBAL(RCT2_ADDRESS_LAST_RESEARCHED_ITEM_SUBJECT, sint32) = -1; news_item_init_queue(); } diff --git a/src/ride/ride.c b/src/ride/ride.c index b10bd7f000..879639c970 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -2867,7 +2867,7 @@ rct_ride_measurement *ride_get_measurement(int rideIndex, rct_string_id *message if (message != NULL) *message = 0; return measurement; } else { - RCT2_GLOBAL(0x013CE952, uint16) = RideNameConvention[ride->type].vehicle_name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RideNameConvention[ride->type].vehicle_name; RCT2_GLOBAL(0x013CE952 + 2, uint16) = RideNameConvention[ride->type].station_name; if (message != NULL) *message = STR_DATA_LOGGING_WILL_START_WHEN_NEXT_LEAVES; return NULL; @@ -3020,7 +3020,7 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx) continue; if (entrance != 0xFFFF && !ride_entrance_exit_is_reachable(entrance, ride, i)) { // name of ride is parameter of the format string - RCT2_GLOBAL(0x013CE952, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); ride->connected_message_throttle = 3; @@ -3028,7 +3028,7 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx) if (exit != 0xFFFF && !ride_entrance_exit_is_reachable(exit, ride, i)) { // name of ride is parameter of the format string - RCT2_GLOBAL(0x013CE952, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; news_item_add_to_queue(1, STR_EXIT_NOT_CONNECTED, ride_idx); ride->connected_message_throttle = 3; @@ -3094,7 +3094,7 @@ static void ride_shop_connected(rct_ride* ride, int ride_idx) } // Name of ride is parameter of the format string - RCT2_GLOBAL(0x013CE952, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); diff --git a/src/ride/ride.h b/src/ride/ride.h index 0734fedc7e..ccb0e32b94 100644 --- a/src/ride/ride.h +++ b/src/ride/ride.h @@ -858,7 +858,7 @@ extern const uint8 gRideClassifications[255]; #define _currentTrackBeginX RCT2_GLOBAL(0x00F440A8, uint16) #define _currentTrackBeginY RCT2_GLOBAL(0x00F440AA, uint16) #define _currentTrackBeginZ RCT2_GLOBAL(0x00F440AC, uint16) -#define _currentTrackPieceDirection RCT2_GLOBAL(0x00F440AE, uint8) +#define _currentTrackPieceDirection RCT2_GLOBAL(RCT2_ADDRESS_TRACK_PREVIEW_ROTATION, uint8) #define _currentTrackPieceType RCT2_GLOBAL(0x00F440AF, uint8) #define _currentTrackSelectionFlags RCT2_GLOBAL(0x00F440B0, uint8) #define _rideConstructionArrowPulseTime RCT2_GLOBAL(0x00F440B1, sint8) diff --git a/src/ride/track.c b/src/ride/track.c index 06fe6d5179..290bb7ae46 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -1197,7 +1197,7 @@ int track_place_scenery(rct_track_scenery* scenery_start, uint8 rideIndex, int o if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 0xE9; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0x80; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 1161; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_CANT_POSITION_THIS_HERE; cost = game_do_command( mapCoord.x, @@ -1256,7 +1256,7 @@ int track_place_scenery(rct_track_scenery* scenery_start, uint8 rideIndex, int o if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 105; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 1811; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_CANT_BUILD_PARK_ENTRANCE_HERE; cost = game_do_command( mapCoord.x, @@ -1296,7 +1296,7 @@ int track_place_scenery(rct_track_scenery* scenery_start, uint8 rideIndex, int o if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 105; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; cost = game_do_command(mapCoord.x, bl | (bh << 8), mapCoord.y, z | (entry_index << 8), GAME_COMMAND_PLACE_PATH_FROM_TRACK, 0, 0); } else{ @@ -1425,7 +1425,7 @@ int track_place_maze(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac rotation += maze->unk_2; rotation &= 3; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; bl = 1; if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 0x69; @@ -1444,7 +1444,7 @@ int track_place_maze(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac rotation += maze->unk_2; rotation &= 3; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; bl = 1; if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 0x69; @@ -1466,7 +1466,7 @@ int track_place_maze(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 0x69; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; cost = game_do_command(mapCoord.x, bl | (maze_entry & 0xFF) << 8, mapCoord.y, rideIndex | (maze_entry & 0xFF00), GAME_COMMAND_PLACE_MAZE_DESIGN, z, 0); break; @@ -1641,7 +1641,7 @@ int track_place_ride(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 105; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; money32 cost = game_do_command(x, bl | (rotation << 8), y, edx, GAME_COMMAND_PLACE_TRACK, edi, 0); RCT2_GLOBAL(0x00F440D5, money32) += cost; @@ -1847,7 +1847,7 @@ int track_place_ride(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac if (RCT2_GLOBAL(0x00F440D4, uint8) == 4)bl = 105; if (RCT2_GLOBAL(0x00F440D4, uint8) == 1)bl = 0; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; money32 cost = game_do_command(x, bl | (rotation << 8), y, rideIndex | (is_exit << 8), GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT, di, 0); RCT2_GLOBAL(0x00F440D5, money32) += cost; @@ -1866,7 +1866,7 @@ int track_place_ride(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac z += RCT2_GLOBAL(0x00F44146, sint16); z /= 16; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; money32 cost = game_do_command(x, 0 | (rotation << 8), y, z | (is_exit << 8), GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT, -1, 0); RCT2_GLOBAL(0x00F440D5, money32) += cost; diff --git a/src/scenario.c b/src/scenario.c index 45ba4b4244..d3a15000ab 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -306,8 +306,8 @@ void scenario_begin() RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, sint16) = calculate_park_rating(); RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_VALUE, money32) = calculate_park_value(); RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_COMPANY_VALUE, money32) = calculate_company_value(); - RCT2_GLOBAL(0x013587D0, money32) = RCT2_GLOBAL(0x013573DC, money32) - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32); - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32) = ENCRYPT_MONEY(RCT2_GLOBAL(0x013573DC, sint32)); + RCT2_GLOBAL(0x013587D0, money32) = RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32); + RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32) = ENCRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, sint32)); finance_update_loan_hash(); diff --git a/src/windows/cheats.c b/src/windows/cheats.c index 070a607f7b..161c607d16 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -1078,10 +1078,10 @@ static void window_cheats_invalidate(rct_window *w) switch (w->page) { case WINDOW_CHEATS_PAGE_MONEY: - RCT2_GLOBAL(0x013CE952, int) = 50000; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = 50000; break; case WINDOW_CHEATS_PAGE_GUESTS: - RCT2_GLOBAL(0x013CE952, int) = 10000; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = 10000; widget_set_checkbox_value(w, WIDX_GUEST_IGNORE_RIDE_INTENSITY, gConfigCheat.ignore_ride_intensity); widget_set_checkbox_value(w, WIDX_DISABLE_VANDALISM, gConfigCheat.disable_vandalism); break; diff --git a/src/windows/editor_inventions_list.c b/src/windows/editor_inventions_list.c index 396512b107..0a5975f1a6 100644 --- a/src/windows/editor_inventions_list.c +++ b/src/windows/editor_inventions_list.c @@ -675,7 +675,7 @@ static void window_editor_inventions_list_scrollmouseover(rct_window *w, int scr */ static void window_editor_inventions_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = 3159; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3159; } /** diff --git a/src/windows/editor_objective_options.c b/src/windows/editor_objective_options.c index 2ffbd5af0f..bf7f5a26b4 100644 --- a/src/windows/editor_objective_options.c +++ b/src/windows/editor_objective_options.c @@ -401,7 +401,7 @@ static void window_editor_objective_options_main_mouseup(rct_window *w, int widg window_editor_objective_options_set_page(w, widgetIndex - WIDX_TAB_1); break; case WIDX_PARK_NAME: - RCT2_GLOBAL(0x013CE962, uint32) = RCT2_GLOBAL(0x013573D8, uint32); + RCT2_GLOBAL(0x013CE962, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); window_text_input_open(w, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id), 0, 32); break; case WIDX_SCENARIO_NAME: diff --git a/src/windows/finances.c b/src/windows/finances.c index 3b74bd95c8..c809ff38f1 100644 --- a/src/windows/finances.c +++ b/src/windows/finances.c @@ -1182,7 +1182,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp continue; noCampaignsActive = 0; - RCT2_GLOBAL(0x013CE952, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); // Set special parameters @@ -1190,11 +1190,11 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp case ADVERTISING_CAMPAIGN_RIDE_FREE: case ADVERTISING_CAMPAIGN_RIDE: ride = GET_RIDE(gMarketingCampaignRideIndex[i]); - RCT2_GLOBAL(0x013CE952, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments; break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: - RCT2_GLOBAL(0x013CE952, uint16) = ShopItemStringIds[gMarketingCampaignRideIndex[i]].plural; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[gMarketingCampaignRideIndex[i]].plural; break; } diff --git a/src/windows/game_bottom_toolbar.c b/src/windows/game_bottom_toolbar.c index 5867e645f8..75abbaa634 100644 --- a/src/windows/game_bottom_toolbar.c +++ b/src/windows/game_bottom_toolbar.c @@ -216,17 +216,17 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, int widgetIndex, r switch (widgetIndex) { case WIDX_MONEY: - RCT2_GLOBAL(0x013CE952, int) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PROFIT, sint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PROFIT, sint32); RCT2_GLOBAL(0x013CE956, int) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_VALUE, sint32); break; case WIDX_PARK_RATING: - RCT2_GLOBAL(0x013CE952, short) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, sint16); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, sint16); break; case WIDX_DATE: month = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, sint16) & 7; day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_TICKS, uint16) * days_in_month[month]) >> 16) & 0xFF; - RCT2_GLOBAL(0x013CE952, short) = STR_DATE_DAY_1 + day; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = STR_DATE_DAY_1 + day; RCT2_GLOBAL(0x013CE954, short) = STR_MONTH_MARCH + month; break; } @@ -379,10 +379,10 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r // Draw money if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) { - RCT2_GLOBAL(0x013CE952, int) = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32)); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32)); gfx_draw_string_centred( dpi, - (RCT2_GLOBAL(0x013CE952, int) < 0 ? 1391 : 1390), + (RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) < 0 ? 1391 : 1390), x, y - 3, (RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WINDOWCLASS, rct_windowclass) == 2 && RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WIDGETINDEX, sint32) == WIDX_MONEY ? 2 : w->colours[0] & 0x7F), (void*)0x013CE952 @@ -454,7 +454,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, int day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_TICKS, uint16) * days_in_month[month]) >> 16) & 0xFF; rct_string_id stringId = DateFormatStringFormatIds[gConfigGeneral.date_format]; - RCT2_GLOBAL(0x013CE952, short) = STR_DATE_DAY_1 + day; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = STR_DATE_DAY_1 + day; RCT2_GLOBAL(0x013CE954, short) = month; RCT2_GLOBAL(0x013CE956, short) = year; gfx_draw_string_centred( @@ -476,7 +476,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, temperature = climate_celsius_to_fahrenheit(temperature); format = STR_FAHRENHEIT_VALUE; } - RCT2_GLOBAL(0x013CE952, short) = temperature; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = temperature; gfx_draw_string_left(dpi, format, (void*)0x013CE952, 0, x, y + 6); x += 30; diff --git a/src/windows/guest.c b/src/windows/guest.c index 8cdde252e3..f460e0329d 100644 --- a/src/windows/guest.c +++ b/src/windows/guest.c @@ -1534,7 +1534,7 @@ void window_guest_rides_update(rct_window *w) /* rct2: 0x697844 */ void window_guest_rides_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /* rct2: 0x69784E */ diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index 67d30bbddb..6302ff358c 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -545,7 +545,7 @@ static void window_guest_list_scrollmouseover(rct_window *w, int scrollIndex, in */ static void window_guest_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /** @@ -629,7 +629,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) if (_window_guest_list_selected_tab == PAGE_INDIVIDUAL) { x = w->x + 4; y = w->y + window_guest_list_widgets[WIDX_GUEST_LIST].bottom + 2; - RCT2_GLOBAL(0x013CE952, sint16) = w->var_492; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, sint16) = w->var_492; gfx_draw_string_left(dpi, (w->var_492 == 1 ? 1755 : 1754), (void*)0x013CE952, 0, x, y); } } @@ -681,7 +681,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, } // Guest name - RCT2_GLOBAL(0x013CE952, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; RCT2_GLOBAL(0x013CE954, uint32) = peep->id; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 113); @@ -698,7 +698,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, get_arguments_from_action(peep, &argument_1, &argument_2); - RCT2_GLOBAL(0x013CE952, uint32) = argument_1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1; RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 133, y - 1, 314); break; @@ -715,7 +715,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, get_arguments_from_thought(peep->thoughts[j], &argument_1, &argument_2); - RCT2_GLOBAL(0x013CE952, uint32) = argument_1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1; RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 118, y - 1, 329); break; @@ -753,7 +753,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, gfx_draw_sprite(dpi, _window_guest_list_groups_guest_faces[i * 56 + j] + 5486, j * 8, y + 9, 0); // Draw action - RCT2_GLOBAL(0x013CE952, uint32) = _window_guest_list_groups_argument_1[i]; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = _window_guest_list_groups_argument_1[i]; RCT2_GLOBAL(0x013CE952 + 4, uint32) = _window_guest_list_groups_argument_2[i]; RCT2_GLOBAL(0x013CE952 + 10, uint32) = numGuests; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 414); diff --git a/src/windows/land.c b/src/windows/land.c index 366c9f2a2f..066c435944 100644 --- a/src/windows/land.c +++ b/src/windows/land.c @@ -407,7 +407,7 @@ static void window_land_paint(rct_window *w, rct_drawpixelinfo *dpi) price += numTiles * 100; if (price != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) { - RCT2_GLOBAL(0x013CE952, sint32) = price; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, sint32) = price; gfx_draw_string_centred(dpi, 986, x, y, 0, (void*)0x013CE952); } } diff --git a/src/windows/loadsave.c b/src/windows/loadsave.c index e4e2bdf200..a5da1ea182 100644 --- a/src/windows/loadsave.c +++ b/src/windows/loadsave.c @@ -448,7 +448,7 @@ static void window_loadsave_textinput(rct_window *w, int widgetIndex, char *text static void window_loadsave_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } static void window_loadsave_invalidate(rct_window *w) diff --git a/src/windows/map.c b/src/windows/map.c index e69939c38d..13b7f1bf63 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -1603,7 +1603,7 @@ static void map_window_set_pixels(rct_window *w) uint16 colour, *destination; int x, y, dx, dy; - destination = (uint16*)((RCT2_GLOBAL(0x00F1AD6C, uint32) * 511) + RCT2_GLOBAL(0x00F1AD68, uint32) + 255); + destination = (uint16*)((RCT2_GLOBAL(0x00F1AD6C, uint32) * 511) + RCT2_GLOBAL(RCT2_ADDRESS_MAP_IMAGE_DATA, uint32) + 255); switch (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8)) { case 0: x = RCT2_GLOBAL(0x00F1AD6C, uint32) * 32; diff --git a/src/windows/new_campaign.c b/src/windows/new_campaign.c index 73aaa03bb2..611a8cb1f2 100644 --- a/src/windows/new_campaign.c +++ b/src/windows/new_campaign.c @@ -343,7 +343,7 @@ static void window_new_campaign_invalidate(rct_window *w) if (w->campaign.ride_id != SELECTED_RIDE_UNDEFINED) { rct_ride *ride = GET_RIDE(w->campaign.ride_id); window_new_campaign_widgets[WIDX_RIDE_DROPDOWN].image = ride->name; - RCT2_GLOBAL(0x013CE952, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = ride->name_arguments; } break; case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE: diff --git a/src/windows/new_ride.c b/src/windows/new_ride.c index b0fb38d021..739122f782 100644 --- a/src/windows/new_ride.c +++ b/src/windows/new_ride.c @@ -489,7 +489,7 @@ void window_new_ride_focus(ride_list_item rideItem) ride_list_item *listItem = (ride_list_item*)0x00F43523; while (listItem->type != RIDE_TYPE_NULL) { if (listItem->type == rideItem.type && listItem->entry_index == rideItem.entry_index) { - RCT2_GLOBAL(0x00F43825, uint8) = rideItem.type; + RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_HIGHLIGHTED_ITEM, uint8) = rideItem.type; RCT2_GLOBAL(0x00F43826, uint8) = rideItem.entry_index; w->new_ride.highlighted_ride_id = (rideItem.entry_index << 8) | rideItem.type; window_new_ride_scroll_to_focused_ride(w); @@ -720,7 +720,7 @@ static void window_new_ride_scrollmouseover(rct_window *w, int scrollIndex, int */ static void window_new_ride_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = 3159; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3159; } /** diff --git a/src/windows/news.c b/src/windows/news.c index 8e6b1677b5..25789b147d 100644 --- a/src/windows/news.c +++ b/src/windows/news.c @@ -249,7 +249,7 @@ static void window_news_scrollmousedown(rct_window *w, int scrollIndex, int x, i */ static void window_news_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = 3159; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3159; } /** @@ -290,7 +290,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s gfx_fill_rect_inset(dpi, -1, y, 383, y + 41, w->colours[1], 0x24); // Date text - RCT2_GLOBAL(0x013CE952, uint16) = STR_DATE_DAY_1 + newsItem->day - 1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_DATE_DAY_1 + newsItem->day - 1; RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_MONTH_MARCH + (newsItem->month_year % 8); gfx_draw_string_left(dpi, 2235, (void*)0x013CE952, 2, 4, y); diff --git a/src/windows/options.c b/src/windows/options.c index 8e354a556d..22527eb959 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -1195,13 +1195,13 @@ static void window_options_invalidate(rct_window *w) // sound devices if (currentSoundDevice == -1 || gAudioDeviceCount == 0) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_SOUND_NONE; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_SOUND_NONE; } else { if (currentSoundDevice == 0) - RCT2_GLOBAL(0x013CE952, uint16) = 5510; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 5510; else - RCT2_GLOBAL(0x013CE952, uint16) = 1170; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 1170; RCT2_GLOBAL(0x013CE952 + 2, uint32) = (uint32)gAudioDevices[currentSoundDevice].name; } diff --git a/src/windows/park.c b/src/windows/park.c index d456fab6db..94f27632cd 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -575,7 +575,7 @@ static void window_park_set_disabled_tabs(rct_window *w) static void window_park_prepare_window_title_text() { - RCT2_GLOBAL(0x013CE952, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); } @@ -645,7 +645,7 @@ static void window_park_entrance_mouseup(rct_window *w, int widgetIndex) window_scroll_to_viewport(w); break; case WIDX_RENAME: - RCT2_GLOBAL(0x013CE962, uint32) = RCT2_GLOBAL(0x013573D8, uint32); + RCT2_GLOBAL(0x013CE962, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); window_text_input_open(w, WIDX_RENAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id), 0, 32); break; case WIDX_CLOSE_LIGHT: @@ -948,7 +948,7 @@ static void window_park_entrance_invalidate(rct_window *w) window_park_set_pressed_tab(w); // Set open / close park button state - RCT2_GLOBAL(0x013CE952, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); window_park_entrance_widgets[WIDX_OPEN_OR_CLOSE].image = park_is_open() ? SPR_OPEN : SPR_CLOSED; window_park_entrance_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + !park_is_open() * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT); @@ -1032,7 +1032,7 @@ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Draw park closed / open label - RCT2_GLOBAL(0x013CE952, uint16) = park_is_open() ? STR_PARK_OPEN : STR_PARK_CLOSED; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = park_is_open() ? STR_PARK_OPEN : STR_PARK_CLOSED; labelWidget = &window_park_entrance_widgets[WIDX_STATUS]; gfx_draw_string_centred_clipped( @@ -1588,20 +1588,20 @@ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL; parkSize = squaredmetres_to_squaredfeet(parkSize); } - RCT2_GLOBAL(0x013CE952, uint32) = parkSize; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = parkSize; gfx_draw_string_left(dpi, stringIndex, (void*)0x013CE952, 0, x, y); y += 10; // Draw number of rides / attractions if (w->list_information_type != (uint16)-1) { - RCT2_GLOBAL(0x013CE952, uint32) = w->list_information_type; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = w->list_information_type; gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, (void*)0x013CE952, 0, x, y); } y += 10; // Draw number of staff if (w->var_48C != -1) { - RCT2_GLOBAL(0x013CE952, uint32) = w->var_48C; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = w->var_48C; gfx_draw_string_left(dpi, STR_STAFF_LABEL, (void*)0x013CE952, 0, x, y); } y += 10; @@ -1746,7 +1746,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) x = w->x + window_park_objective_widgets[WIDX_PAGE_BACKGROUND].left + 4; y = w->y + window_park_objective_widgets[WIDX_PAGE_BACKGROUND].top + 7; strcpy((char*)0x009BC677, RCT2_ADDRESS(RCT2_ADDRESS_SCENARIO_DETAILS, char)); - RCT2_GLOBAL(0x013CE952, short) = 3165; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = 3165; y += gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 222, 1191, 0); y += 5; @@ -1755,7 +1755,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) y += 10; // Objective - RCT2_GLOBAL(0x013CE952, short) = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_NUM_GUESTS, uint16); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_NUM_GUESTS, uint16); RCT2_GLOBAL(0x013CE954, short) = date_get_total_months(MONTH_OCTOBER, RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_YEAR, uint8)); RCT2_GLOBAL(0x013CE956, int) = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_CURRENCY, sint32); @@ -1769,7 +1769,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left_wrapped(dpi, NULL, x, y, 222, 2789, 0); } else { // Objective completed - RCT2_GLOBAL(0x013CE952, int) = RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, money32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, money32); gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 222, 2788, 0); } } diff --git a/src/windows/research.c b/src/windows/research.c index ff381a5fad..0c03911c09 100644 --- a/src/windows/research.c +++ b/src/windows/research.c @@ -340,7 +340,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_PROGRESS_LABEL, 0); y += 15; - RCT2_GLOBAL(0x013CE952, uint16) = STR_UNKNOWN; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_UNKNOWN; gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y); } else { // Research type @@ -368,11 +368,11 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp y += 15; // Expected - RCT2_GLOBAL(0x013CE952, uint16) = STR_UNKNOWN; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_UNKNOWN; if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != 0) { uint16 expectedDay = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_DAY, uint8); if (expectedDay != 255) { - RCT2_GLOBAL(0x013CE952, uint16) = 2289; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 2289; RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_DATE_DAY_1 + expectedDay; RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_MONTH_MARCH + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8); } diff --git a/src/windows/ride.c b/src/windows/ride.c index 72319b9613..879fa83f8b 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -1660,15 +1660,15 @@ static void window_ride_main_mouseup(rct_window *w, int widgetIndex) switch (widgetIndex - WIDX_CLOSE_LIGHT) { case 0: status = RIDE_STATUS_CLOSED; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1004; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CLOSE; break; case 1: status = RIDE_STATUS_TESTING; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1003; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_TEST; break; case 2: status = RIDE_STATUS_OPEN; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1002; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_OPEN; break; } @@ -1901,15 +1901,15 @@ static void window_ride_main_dropdown(rct_window *w, int widgetIndex, int dropdo switch (dropdownIndex) { case 0: status = RIDE_STATUS_CLOSED; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1004; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CLOSE; break; case 1: status = RIDE_STATUS_TESTING; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1003; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_TEST; break; case 2: status = RIDE_STATUS_OPEN; - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 1002; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_OPEN; break; } @@ -2236,7 +2236,7 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi) RCT2_GLOBAL(0x013CE952 + 2, uint16) = w->ride.view; } } - RCT2_GLOBAL(0x013CE952, uint16) = stringId; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId; widget = &window_ride_main_widgets[WIDX_VIEW]; gfx_draw_string_centred( @@ -5153,7 +5153,7 @@ static void window_ride_graphs_tooltip(rct_window* w, int widgetIndex, rct_strin rct_string_id message; if (widgetIndex == WIDX_GRAPH) { - RCT2_GLOBAL(0x013CE952, uint16) = 3158; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3158; measurement = ride_get_measurement(w->number, &message); if (measurement != NULL && (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING)) { RCT2_GLOBAL(0x013CE952 + 4, uint16) = measurement->vehicle_index + 1; diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 34d4cd9b2e..7ebe6f8527 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -2038,7 +2038,7 @@ static void window_ride_construction_invalidate(rct_window *w) if (stringId == STR_RAPIDS && ride->type == RIDE_TYPE_CAR_RIDE) stringId = STR_LOG_BUMPS; } - RCT2_GLOBAL(0x013CE952, uint16) = stringId; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId; if (RCT2_GLOBAL(0x00F440D3, uint8) == 1) RCT2_GLOBAL(0x013CE952 + 2, uint16) = ((RCT2_GLOBAL(0x00F440CD, uint8) * 9) >> 2) & 0xFFFF; @@ -3495,7 +3495,7 @@ void ride_construction_tooldown_construct(int screenX, int screenY) RCT2_GLOBAL(0x009A8C29, uint8) |= 1; - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; RCT2_GLOBAL(0x00F44074, money32) = game_do_command( _currentTrackBeginX, GAME_COMMAND_FLAG_APPLY | (4 << 8), @@ -3524,7 +3524,7 @@ void ride_construction_tooldown_construct(int screenX, int screenY) w = window_find_by_class(WC_RIDE_CONSTRUCTION); if (w != NULL){ tool_set(w, 23, 12); - RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); + RCT2_GLOBAL(RCT2_ADDRESS_INPUT_FLAGS, uint32) |= (1 << 6); RCT2_GLOBAL(0x00F44159, uint8) = 0; RCT2_GLOBAL(0x00F4415C, uint8) = 0; } diff --git a/src/windows/ride_list.c b/src/windows/ride_list.c index 27be37c6cb..92fd542508 100644 --- a/src/windows/ride_list.c +++ b/src/windows/ride_list.c @@ -364,7 +364,7 @@ static void window_ride_list_scrollmouseover(rct_window *w, int scrollIndex, int */ static void window_ride_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /** @@ -536,7 +536,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, if (formatSecondary == STR_BROKEN_DOWN || formatSecondary == STR_CRASHED) format = 1192; - RCT2_GLOBAL(0x013CE952, uint16) = formatSecondary; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = formatSecondary; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 160, y - 1, 157); y += 10; } diff --git a/src/windows/scenery.c b/src/windows/scenery.c index d189f02e41..dbba566335 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -822,7 +822,7 @@ void window_scenery_tooltip(rct_window* w, int widgetIndex, rct_string_id *strin { switch (widgetIndex) { case WIDX_SCENERY_LIST: - RCT2_GLOBAL(0x013CE952, uint16) = 3159; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3159; break; case WIDX_SCENERY_TAB_1: case WIDX_SCENERY_TAB_2: @@ -844,7 +844,7 @@ void window_scenery_tooltip(rct_window* w, int widgetIndex, rct_string_id *strin case WIDX_SCENERY_TAB_18: case WIDX_SCENERY_TAB_19: case WIDX_SCENERY_TAB_20: - RCT2_GLOBAL(0x013CE952, uint16) = g_scenerySetEntries[widgetIndex - WIDX_SCENERY_TAB_1]->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = g_scenerySetEntries[widgetIndex - WIDX_SCENERY_TAB_1]->name; break; } } @@ -1025,7 +1025,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) price = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_COST, uint32); } - RCT2_GLOBAL(0x013CE952, uint32) = price; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = price; if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) { // -14 @@ -1033,7 +1033,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) w->x + w->width - 0x1A, w->y + w->height - 13); } - RCT2_GLOBAL(0x013CE952, uint16) = sceneryEntry->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = sceneryEntry->name; gfx_draw_string_left_clipped(dpi, 0x4A7, (void*)0x013CE952, 0, w->x + 3, w->y + w->height - 13, w->width - 19); } diff --git a/src/windows/shortcut_keys.c b/src/windows/shortcut_keys.c index 5328e522d5..b96522bbde 100644 --- a/src/windows/shortcut_keys.c +++ b/src/windows/shortcut_keys.c @@ -194,7 +194,7 @@ static void window_shortcut_paint(rct_window *w, rct_drawpixelinfo *dpi) */ static void window_shortcut_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /** diff --git a/src/windows/staff_list.c b/src/windows/staff_list.c index da0fe1edf2..5156de4cf5 100644 --- a/src/windows/staff_list.c +++ b/src/windows/staff_list.c @@ -475,7 +475,7 @@ void window_staff_list_scrollmouseover(rct_window *w, int scrollIndex, int x, in */ void window_staff_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /** @@ -590,7 +590,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) } if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) { - RCT2_GLOBAL(0x013CE952, uint32) = RCT2_ADDRESS(0x00992A00, uint16)[selectedTab]; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = RCT2_ADDRESS(0x00992A00, uint16)[selectedTab]; gfx_draw_string_left(dpi, 1858, (void*)0x013CE952, 0, w->x + 0xA5, w->y + 0x20); } @@ -604,7 +604,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) staffTypeStringId += 4; } - RCT2_GLOBAL(0x013CE952, uint16) = _window_staff_list_selected_type_count; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = _window_staff_list_selected_type_count; RCT2_GLOBAL(0x013CE952 + 2, uint16) = staffTypeStringId; gfx_draw_string_left(dpi, STR_STAFF_LIST_COUNTER, (void*)0x013CE952, 0, w->x + 4, window_staff_list_widgets[WIDX_STAFF_LIST_LIST].bottom + w->y + 2); @@ -640,12 +640,12 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int sc format = (_quick_fire_mode ? 5299 : 1193); } - RCT2_GLOBAL(0x013CE952, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; RCT2_GLOBAL(0x013CE952 + 2, uint32) = peep->id; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 107); get_arguments_from_action(peep, &argument_1, &argument_2); - RCT2_GLOBAL(0x013CE952, uint32) = argument_1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1; RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2; gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 175, y - 1, 305); diff --git a/src/windows/themes.c b/src/windows/themes.c index ed65866a49..01cba5d5bc 100644 --- a/src/windows/themes.c +++ b/src/windows/themes.c @@ -727,7 +727,7 @@ static void window_themes_textinput(rct_window *w, int widgetIndex, char *text) void window_themes_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } void window_themes_invalidate(rct_window *w) diff --git a/src/windows/title_editor.c b/src/windows/title_editor.c index 78edd9a61c..e2631f5ade 100644 --- a/src/windows/title_editor.c +++ b/src/windows/title_editor.c @@ -740,7 +740,7 @@ static void window_title_editor_textinput(rct_window *w, int widgetIndex, char * void window_title_editor_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } void window_title_editor_invalidate(rct_window *w) diff --git a/src/windows/title_scenarioselect.c b/src/windows/title_scenarioselect.c index c370e6a373..079f766059 100644 --- a/src/windows/title_scenarioselect.c +++ b/src/windows/title_scenarioselect.c @@ -342,7 +342,7 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo * // Draw scenario name strcpy((char*)0x009BC677, scenario->name); - RCT2_GLOBAL(0x013CE952, short) = 3165; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = 3165; gfx_draw_string_centred(dpi, highlighted ? highlighted_format : unhighlighted_format, 210, y + 1, 0, (void*)0x013CE952); // Check if scenario is completed @@ -352,7 +352,7 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo * // Draw completion score strcpy((char*)0x009BC677, scenario->completed_by); - RCT2_GLOBAL(0x013CE952, short) = 2793; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = 2793; RCT2_GLOBAL(0x013CE954, short) = 3165; gfx_draw_string_centred(dpi, highlighted ? 1193 : 1191, 210, y + 11, 0, (void*)0x013CE952); } diff --git a/src/windows/track_list.c b/src/windows/track_list.c index fda1413675..d6ea9d5d1f 100644 --- a/src/windows/track_list.c +++ b/src/windows/track_list.c @@ -328,7 +328,7 @@ static void window_track_list_scrollmouseover(rct_window *w, int scrollIndex, in */ static void window_track_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) { - RCT2_GLOBAL(0x013CE952, uint16) = STR_LIST; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_LIST; } /** @@ -348,7 +348,7 @@ static void window_track_list_invalidate(rct_window *w) if (!(entry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME) || rideTypeShouldLoseSeparateFlag(entry)) stringId = _window_track_list_item.type + 2; - RCT2_GLOBAL(0x013CE952, uint16) = stringId; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId; if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) { window_track_list_widgets[WIDX_TITLE].image = STR_TRACK_DESIGNS; window_track_list_widgets[WIDX_TRACK_LIST].tooltip = STR_CLICK_ON_DESIGN_TO_RENAME_OR_DELETE_IT; diff --git a/src/world/climate.c b/src/world/climate.c index dd1316d117..eeae821230 100644 --- a/src/world/climate.c +++ b/src/world/climate.c @@ -51,12 +51,12 @@ typedef struct { // static int _climateNextWeatherGloom; // static int _climateNextRainLevel; -#define _climateCurrentWeatherEffect RCT2_GLOBAL(0x013CA74E, uint8) +#define _climateCurrentWeatherEffect RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_WEATHER_EFFECT, uint8) -#define _climateNextTemperature RCT2_GLOBAL(0x013CA74D, uint8) -#define _climateNextWeatherEffect RCT2_GLOBAL(0x013CA74F, uint8) -#define _climateNextWeatherGloom RCT2_GLOBAL(0x013CA751, uint8) -#define _climateNextRainLevel RCT2_GLOBAL(0x013CA753, uint8) +#define _climateNextTemperature RCT2_GLOBAL(RCT2_ADDRESS_NEXT_TEMPERATURE, uint8) +#define _climateNextWeatherEffect RCT2_GLOBAL(RCT2_ADDRESS_NEXT_WEATHER_EFFECT, uint8) +#define _climateNextWeatherGloom RCT2_GLOBAL(RCT2_ADDRESS_NEXT_WEATHER_GLOOM, uint8) +#define _climateNextRainLevel RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RAIN_LEVEL, uint8) static const rct_weather_transition* climate_transitions[4]; diff --git a/src/world/climate.h b/src/world/climate.h index 7acf000483..147b6445ac 100644 --- a/src/world/climate.h +++ b/src/world/climate.h @@ -49,7 +49,7 @@ typedef struct { // This still needs to be read / written when loading and saving // extern int gClimateNextWeather; -#define gClimateNextWeather RCT2_GLOBAL(0x013CA74B, uint8) +#define gClimateNextWeather RCT2_GLOBAL(RCT2_ADDRESS_NEXT_WEATHER, uint8) extern const rct_weather climate_weather_data[6]; diff --git a/src/world/map.c b/src/world/map.c index 15b2bfe78b..116bbc56ae 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -4558,10 +4558,10 @@ void map_clear_all_elements() money32 place_park_entrance(int flags, sint16 x, sint16 y, sint16 z, uint8 direction) { RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LAND_PURCHASE * 4; - RCT2_GLOBAL(0x009DEA5E, sint16) = x; - RCT2_GLOBAL(0x009DEA60, sint16) = y; + RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, sint16) = x; + RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, sint16) = y; // ?? - RCT2_GLOBAL(0x009DEA62, sint16) = (z & 0xFF) << 4; + RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, sint16) = (z & 0xFF) << 4; if (!sub_68B044()) { return MONEY32_UNDEFINED; diff --git a/src/world/park.c b/src/world/park.c index fa1310ac74..5f22410873 100644 --- a/src/world/park.c +++ b/src/world/park.c @@ -583,7 +583,7 @@ void park_update_histories() int guestsInPark = RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16); int lastGuestsInPark = RCT2_GLOBAL(RCT2_ADDRESS_LAST_GUESTS_IN_PARK, uint16); RCT2_GLOBAL(RCT2_ADDRESS_LAST_GUESTS_IN_PARK, uint16) = guestsInPark; - RCT2_GLOBAL(0x009A9804, uint16) |= 4; + RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint16) |= 4; int changeInGuestsInPark = guestsInPark - lastGuestsInPark; int guestChangeModifier = 1;