diff --git a/src/drawing/scrolling_text.c b/src/drawing/scrolling_text.c index 72a7293d7f..65dfe1974e 100644 --- a/src/drawing/scrolling_text.c +++ b/src/drawing/scrolling_text.c @@ -76,7 +76,7 @@ static int scrolling_text_get_matching_or_oldest(rct_string_id stringId, uint16 if ( scrollText->string_id == stringId && scrollText->string_args_0 == RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) && - scrollText->string_args_1 == RCT2_GLOBAL(0x13CE956, uint32) && + scrollText->string_args_1 == RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) && scrollText->position == scroll && scrollText->mode == scrollingMode ) { @@ -152,7 +152,7 @@ int scrolling_text_setup(rct_string_id stringId, uint16 scroll, uint16 scrolling void scrolling_text_set_bitmap_for_sprite(utf8 *text, int scroll, uint8 *bitmap, sint16 *scrollPositionOffsets) { - uint8 characterColour = scrolling_text_get_colour(RCT2_GLOBAL(0x013CE959, uint8)); + uint8 characterColour = scrolling_text_get_colour(RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 7, uint8)); utf8 *ch = text; while (true) { @@ -228,7 +228,7 @@ void scrolling_text_set_bitmap_for_ttf(utf8 *text, int scroll, uint8 *bitmap, si *dstCh = 0; if (colour == 0) { - colour = scrolling_text_get_colour(RCT2_GLOBAL(0x013CE959, uint8)); + colour = scrolling_text_get_colour(RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 7, uint8)); } else { colour = RCT2_GLOBAL(0x009FF048, uint8*)[(colour - FORMAT_COLOUR_CODE_START) * 4]; } diff --git a/src/interface/viewport.c b/src/interface/viewport.c index f1c13955ae..fa48b2e15a 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1350,7 +1350,7 @@ void viewport_ride_entrance_exit_paint_setup(uint8 direction, int height, rct_ma map_element->properties.entrance.ride_index != 0xFF){ RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = 0; - RCT2_GLOBAL(0x13CE956, uint32) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = 0; rct_string_id string_id = STR_RIDE_ENTRANCE_CLOSED; @@ -1453,12 +1453,12 @@ void viewport_park_entrance_paint_setup(uint8 direction, int height, rct_map_ele break; rct_string_id park_text_id = 1730; - RCT2_GLOBAL(0x0013CE952, uint32) = 0; - RCT2_GLOBAL(0x0013CE956, uint32) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = 0; if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN){ - RCT2_GLOBAL(0x0013CE952, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); - RCT2_GLOBAL(0x0013CE954, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, rct_string_id); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, rct_string_id); park_text_id = 1731; } @@ -1710,7 +1710,7 @@ void viewport_banner_paint_setup(uint8 direction, int height, rct_map_element* m scrollingMode += direction; RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = 0; - RCT2_GLOBAL(0x13CE956, uint32_t) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32_t) = 0; rct_string_id string_id = STR_NO_ENTRY; if (!(gBanners[map_element->properties.banner.index].flags & BANNER_FLAG_NO_ENTRY)) diff --git a/src/localisation/localisation.c b/src/localisation/localisation.c index 103d569516..c6c8566c73 100644 --- a/src/localisation/localisation.c +++ b/src/localisation/localisation.c @@ -838,7 +838,7 @@ void error_string_quit(int error, rct_string_id format) RCT2_GLOBAL(0x9E2DA0, uint32) = 1; char* error_string = RCT2_ADDRESS(0x1424080, char); - void* args = RCT2_ADDRESS(0x13CE952, void); + void* args = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_FORMAT_ARGS, void); *error_string = 0; if (format != 0xFFFF){ diff --git a/src/management/marketing.c b/src/management/marketing.c index 55cf24c521..91586e64e5 100644 --- a/src/management/marketing.c +++ b/src/management/marketing.c @@ -96,7 +96,7 @@ void marketing_update() if (campaign == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign == ADVERTISING_CAMPAIGN_RIDE) { rct_ride* ride = GET_RIDE(campaignItem); RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; - RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; } else if (campaign == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[campaignItem].plural; } diff --git a/src/object_list.c b/src/object_list.c index 4a62fe98fc..88631f9d82 100644 --- a/src/object_list.c +++ b/src/object_list.c @@ -488,7 +488,7 @@ void set_load_objects_fail_reason() { rct_string_id expansionNameId; - rct_object_entry* object = RCT2_ADDRESS(0x13CE952, rct_object_entry); + rct_object_entry* object = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_object_entry); int expansion = (object->flags & 0xFF) >> 4; if (expansion == 0 @@ -560,7 +560,7 @@ int object_read_and_load_entries(SDL_RWops* rw) // Load the obect if (!object_load_chunk(entryGroupIndex, &entries[i], NULL)) { log_error("failed to load entry: %.8s", entries[i].name); - memcpy((char*)0x13CE952, &entries[i], sizeof(rct_object_entry)); + memcpy((char*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, &entries[i], sizeof(rct_object_entry)); load_fail = 1; } } diff --git a/src/peep/peep.c b/src/peep/peep.c index 9a114fc845..bb3e9c5265 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -1341,8 +1341,8 @@ void peep_update_falling(rct_peep* peep){ if (peep->action == PEEP_ACTION_DROWNING) return; if (gConfigNotifications.guest_died) { - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, peep->x | (peep->y << 16)); } @@ -2127,10 +2127,10 @@ static void peep_update_ride_sub_state_2_enter_ride(rct_peep* peep, rct_ride* ri } if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; - RCT2_GLOBAL(0x13CE958, uint16) = ride->name; - RCT2_GLOBAL(0x13CE95A, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments; rct_string_id msg_string; if (RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride->type * 2] & RIDE_TYPE_FLAG_IN_RIDE) @@ -3180,10 +3180,10 @@ static void peep_update_ride_sub_state_18(rct_peep* peep){ peep_on_enter_or_exit_ride(peep, peep->current_ride, 1); if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; - RCT2_GLOBAL(0x13CE958, uint16) = ride->name; - RCT2_GLOBAL(0x13CE95A, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments; if (gConfigNotifications.guest_left_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_RIDE_X, peep->sprite_index); @@ -6316,10 +6316,10 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m peep->sub_state = 11; peep->time_in_queue = 0; if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx; - RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; - RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; - RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, rct_string_id) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments; if (gConfigNotifications.guest_queuing_for_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); } @@ -6362,8 +6362,8 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m peep->var_37 = 0; if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx; - RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; if (gConfigNotifications.guest_left_park) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_PARK, peep->sprite_index); } @@ -6697,10 +6697,10 @@ static int peep_interact_with_path(rct_peep* peep, sint16 x, sint16 y, rct_map_e peep->destination_tolerence = 2; peep->time_in_queue = 0; if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx; - RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; - RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; - RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, rct_string_id) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments; if (gConfigNotifications.guest_queuing_for_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); } @@ -6770,10 +6770,10 @@ static int peep_interact_with_shop(rct_peep* peep, sint16 x, sint16 y, rct_map_e peep->time_on_ride = 0; ride->cur_num_customers++; if (peep->flags & PEEP_FLAGS_TRACKING){ - RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx; - RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; - RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; - RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, rct_string_id) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments; rct_string_id string_id = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? STR_PEEP_TRACKING_PEEP_IS_IN_X : STR_PEEP_TRACKING_PEEP_IS_ON_X; if (gConfigNotifications.guest_used_facility) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, string_id, peep->sprite_index); @@ -8366,9 +8366,9 @@ loc_69B221: peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY; peep_update_sprite_type(peep); if (peep->flags & PEEP_FLAGS_TRACKING) { - RCT2_GLOBAL(0x13CE952,uint16) = peep->name_string_idx; - RCT2_GLOBAL((0x13CE952 + 2), uint32) = peep->id; - RCT2_GLOBAL((0x13CE956 + 2), uint16) = (shopItem >= 32 ? STR_SHOP_ITEM_INDEFINITE_PHOTO2 + (shopItem - 32) : STR_SHOP_ITEM_INDEFINITE_BALLOON + shopItem); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS,uint16) = peep->name_string_idx; + RCT2_GLOBAL((RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2), uint32) = peep->id; + RCT2_GLOBAL((RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6), uint16) = (shopItem >= 32 ? STR_SHOP_ITEM_INDEFINITE_PHOTO2 + (shopItem - 32) : STR_SHOP_ITEM_INDEFINITE_BALLOON + shopItem); if (gConfigNotifications.guest_bought_item) { news_item_add_to_queue(2, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, peep->sprite_index); } @@ -9325,10 +9325,10 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1, return 0; rct_peep* peep = GET_PEEP(sprite_index); - RCT2_GLOBAL(0x0013CE952, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = peep->id; utf8* curName = RCT2_ADDRESS(0x00141ED68, utf8); rct_string_id curId = peep->name_string_idx; - format_string(curName, curId, RCT2_ADDRESS(0x0013CE952, void)); + format_string(curName, curId, RCT2_ADDRESS(RCT2_ADDRESS_COMMON_FORMAT_ARGS, void)); if (strcmp(curName, fullText) == 0) return 0; diff --git a/src/ride/ride.c b/src/ride/ride.c index 28d04e22ff..64b92c5d61 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -2277,8 +2277,8 @@ void ride_breakdown_add_news_item(int rideIndex) { rct_ride *ride = GET_RIDE(rideIndex); - RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name; - RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; if (gConfigNotifications.ride_broken_down) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_BROKEN_DOWN, rideIndex); } @@ -2303,8 +2303,8 @@ static void ride_breakdown_status_update(int rideIndex) ride->mechanic_status != RIDE_MECHANIC_STATUS_FIXING && ride->mechanic_status != RIDE_MECHANIC_STATUS_4 ) { - RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name; - RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_STILL_NOT_FIXED, rideIndex); } @@ -3039,7 +3039,7 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx) if (entrance != 0xFFFF && !ride_entrance_exit_is_reachable(entrance, ride, i)) { // name of ride is parameter of the format string RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; - RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); } @@ -3049,7 +3049,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(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; - RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_EXIT_NOT_CONNECTED, ride_idx); } @@ -3117,7 +3117,7 @@ static void ride_shop_connected(rct_ride* ride, int ride_idx) // Name of ride is parameter of the format string RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; - RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); } diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index afe238067c..a18253b8fa 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -2429,7 +2429,7 @@ static void vehicle_check_if_missing(rct_vehicle* vehicle) { ride->lifecycle_flags |= RIDE_LIFECYCLE_11; - RCT2_GLOBAL(0x0013CE952, rct_string_id) + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = RCT2_ADDRESS(0x0097C98E, rct_string_id)[ride->type * 4] + 6; uint8 vehicleIndex = 0; @@ -2437,10 +2437,10 @@ static void vehicle_check_if_missing(rct_vehicle* vehicle) { if (ride->vehicles[vehicleIndex] == vehicle->sprite_index) break; vehicleIndex++; - RCT2_GLOBAL(0x0013CE954, uint16) = vehicleIndex; - RCT2_GLOBAL(0x0013CE956, rct_string_id) = ride->name; - RCT2_GLOBAL(0x0013CE958, uint32) = ride->name_arguments; - RCT2_GLOBAL(0x0013CE95C, rct_string_id) = + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = vehicleIndex; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, rct_string_id) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, rct_string_id) = RCT2_ADDRESS(0x0097C98E, rct_string_id)[ride->type * 4 + 2]; news_item_add_to_queue(NEWS_ITEM_RIDE, 2218, vehicle->ride); diff --git a/src/windows/cheats.c b/src/windows/cheats.c index 5a9a635b85..494ace1666 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -1124,8 +1124,8 @@ static void window_cheats_paint(rct_window *w, rct_drawpixelinfo *dpi) window_cheats_draw_tab_images(dpi, w); if (w->page == WINDOW_CHEATS_PAGE_MONEY){ - RCT2_GLOBAL(0x0013CE952, money32) = CHEATS_MONEY_INCREMENT; - gfx_draw_string_left(dpi, STR_CHEAT_TIP_5K_MONEY, (void*)0x0013CE952, 0, w->x + XPL(0) + TXTO, w->y + YPL(0) + TXTO); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = CHEATS_MONEY_INCREMENT; + gfx_draw_string_left(dpi, STR_CHEAT_TIP_5K_MONEY, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + XPL(0) + TXTO, w->y + YPL(0) + TXTO); gfx_draw_string_left(dpi, STR_CHEAT_TIP_CLEAR_LOAN, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(4) + TXTO); } else if(w->page == WINDOW_CHEATS_PAGE_MISC){ diff --git a/src/windows/demolish_ride_prompt.c b/src/windows/demolish_ride_prompt.c index 0f95dd8269..fcf780590a 100644 --- a/src/windows/demolish_ride_prompt.c +++ b/src/windows/demolish_ride_prompt.c @@ -136,11 +136,11 @@ static void window_ride_demolish_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_ride* ride = GET_RIDE(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = ride->name; - RCT2_GLOBAL(0x13CE954, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; int x = w->x + WW / 2; int y = w->y + (WH / 2) - 3; - gfx_draw_string_centred_wrapped(dpi, (void*)0x13CE952, x, y, WW - 4, STR_DEMOLISH_RIDE_ID, 0); + gfx_draw_string_centred_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, WW - 4, STR_DEMOLISH_RIDE_ID, 0); } diff --git a/src/windows/editor_object_selection.c b/src/windows/editor_object_selection.c index c44c68d93e..e5c531c35e 100644 --- a/src/windows/editor_object_selection.c +++ b/src/windows/editor_object_selection.c @@ -1884,7 +1884,7 @@ static int window_editor_object_selection_select_object(uint8 bh, int flags, rct } if (bh != 0 && !(flags&(1 << 1))){ - uint32* arguments = RCT2_ADDRESS(0x0013CE952, uint32); + uint32* arguments = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32); object_create_identifier_name((char*)0x009BC95A, installedObject); *arguments = (uint32)0x009BC95A; set_object_selection_error(bh, 3172); diff --git a/src/windows/editor_objective_options.c b/src/windows/editor_objective_options.c index aa7861c59e..88b43c6b8f 100644 --- a/src/windows/editor_objective_options.c +++ b/src/windows/editor_objective_options.c @@ -402,7 +402,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(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, 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/error.c b/src/windows/error.c index 6900e7ec74..ee2bf178d7 100644 --- a/src/windows/error.c +++ b/src/windows/error.c @@ -87,7 +87,7 @@ void window_error_open(rct_string_id title, rct_string_id message) window_close_by_class(WC_ERROR); dst = _window_error_text; - args = (char*)0x0013CE952; + args = (char*)RCT2_ADDRESS_COMMON_FORMAT_ARGS; // Format the title dst = utf8_write_codepoint(dst, FORMAT_BLACK); diff --git a/src/windows/finances.c b/src/windows/finances.c index 9730663d07..37142e4a86 100644 --- a/src/windows/finances.c +++ b/src/windows/finances.c @@ -682,12 +682,12 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) continue; // Month heading - RCT2_GLOBAL(0x0013CE952, uint16) = STR_FINANCES_SUMMARY_MONTH_HEADING; - RCT2_GLOBAL(0x0013CE952 + 2, uint16) = monthyear; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_FINANCES_SUMMARY_MONTH_HEADING; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = monthyear; draw_string_right_underline( dpi, monthyear == currentMonthYear ? 1193 : 1191, - (void*)0x0013CE952, + (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x + 80, y - 1 @@ -734,12 +734,12 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) // Loan and interest rate gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_LOAN, NULL, 0, w->x + 4, w->y + 229); - RCT2_GLOBAL(0x0013CE952, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, uint8); - gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, (void*)0x0013CE952, 0, w->x + 156, w->y + 229); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, uint8); + gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + 156, w->y + 229); // Current cash - RCT2_GLOBAL(0x0013CE952, money32) = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32)); - gfx_draw_string_left(dpi, STR_CASH_LABEL, (void*)0x0013CE952, 0, w->x + 4, w->y + 244); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32)); + gfx_draw_string_left(dpi, STR_CASH_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + 4, w->y + 244); // Objective related financial information if (RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8) == OBJECTIVE_MONTHLY_FOOD_INCOME) { @@ -751,8 +751,8 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) lastMonthProfit += RCT2_GLOBAL(0x013578A0, money32); lastMonthProfit += RCT2_GLOBAL(0x013578A4, money32); } - RCT2_GLOBAL(0x0013CE952, money32) = lastMonthProfit; - gfx_draw_string_left(dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, (void*)0x0013CE952, 0, w->x + 280, w->y + 229); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = lastMonthProfit; + gfx_draw_string_left(dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + 280, w->y + 229); } else { // Park value and company value gfx_draw_string_left(dpi, STR_PARK_VALUE_LABEL, (void*)RCT2_ADDRESS_CURRENT_PARK_VALUE, 0, w->x + 280, w->y + 229); diff --git a/src/windows/game_bottom_toolbar.c b/src/windows/game_bottom_toolbar.c index ad46d30815..9a9c8970b2 100644 --- a/src/windows/game_bottom_toolbar.c +++ b/src/windows/game_bottom_toolbar.c @@ -220,7 +220,7 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, int widgetIndex, r switch (widgetIndex) { case WIDX_MONEY: 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); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, int) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_VALUE, sint32); break; case WIDX_PARK_RATING: RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, sint16); @@ -230,7 +230,7 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, int widgetIndex, r day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_TICKS, uint16) * days_in_month[month]) >> 16) & 0xFF; RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = STR_DATE_DAY_1 + day; - RCT2_GLOBAL(0x013CE954, short) = STR_MONTH_MARCH + month; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, short) = STR_MONTH_MARCH + month; break; } } @@ -456,8 +456,8 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, rct_string_id stringId = DateFormatStringFormatIds[gConfigGeneral.date_format]; RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = STR_DATE_DAY_1 + day; - RCT2_GLOBAL(0x013CE954, short) = month; - RCT2_GLOBAL(0x013CE956, short) = year; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, short) = month; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, short) = year; gfx_draw_string_centred( dpi, stringId, diff --git a/src/windows/guest.c b/src/windows/guest.c index cc1782d4c2..8771fe5c9d 100644 --- a/src/windows/guest.c +++ b/src/windows/guest.c @@ -1002,13 +1002,13 @@ void window_guest_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) uint32 argument1, argument2; rct_peep* peep = GET_PEEP(w->number); get_arguments_from_action(peep, &argument1, &argument2); - RCT2_GLOBAL(0x13CE952, uint32) = argument1; - RCT2_GLOBAL(0x13CE952 + 4, uint32) = argument2; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument2; rct_widget* widget = &w->widgets[WIDX_ACTION_LBL]; int x = (widget->left + widget->right) / 2 + w->x; int y = w->y + widget->top - 1; int width = widget->right - widget->left; - gfx_draw_string_centred_clipped(dpi, 1191, (void*)0x13CE952, 0, x, y, width); + gfx_draw_string_centred_clipped(dpi, 1191, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width); // Draw the marquee thought widget = &w->widgets[WIDX_MARQUEE]; @@ -1038,12 +1038,12 @@ void window_guest_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) get_arguments_from_thought(peep->thoughts[i], &argument1, &argument2); - RCT2_GLOBAL(0x13CE952, uint32) = argument1; - RCT2_GLOBAL(0x13CE952 + 4, uint32) = argument2; - RCT2_GLOBAL(0x13CE952 + 8, uint16) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument2; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint16) = 0; x = widget->right - widget->left - w->list_information_type; - gfx_draw_string_left(dpi_marquee, 1193, (void*)0x13CE952, 0, x, 0); + gfx_draw_string_left(dpi_marquee, 1193, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, 0); rct2_free(dpi_marquee); } @@ -1065,8 +1065,8 @@ void window_guest_overview_invalidate(rct_window *w) w->pressed_widgets |= 1ULL << (w->page + WIDX_TAB_1); rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952,uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954,uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS,uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2,uint32) = peep->id; w->pressed_widgets &= ~(1<flags & 0x8){ @@ -1366,8 +1366,8 @@ void window_guest_stats_invalidate(rct_window *w) w->pressed_widgets |= 1ULL << (w->page + WIDX_TAB_1); rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_guest_stats_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_stats_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1432,7 +1432,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) int y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 4; //Happiness - gfx_draw_string_left(dpi, 1662, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1662, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int happiness = peep->happiness; if (happiness < 10)happiness = 10; @@ -1444,7 +1444,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) //Energy y += 10; - gfx_draw_string_left(dpi, 1664, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1664, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int energy = ((peep->energy - 32) * 85) / 32; ebp = 14; @@ -1456,7 +1456,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) //Hunger y += 10; - gfx_draw_string_left(dpi, 1665, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1665, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int hunger = peep->hunger; if (hunger > 190) hunger = 190; @@ -1475,7 +1475,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) //Thirst y += 10; - gfx_draw_string_left(dpi, 1666, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1666, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int thirst = peep->thirst; if (thirst > 190) thirst = 190; @@ -1494,7 +1494,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) //Nausea y += 10; - gfx_draw_string_left(dpi, 1663, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1663, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int nausea = peep->nausea - 32; @@ -1510,7 +1510,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) //Bathroom y += 10; - gfx_draw_string_left(dpi, 1667, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 1667, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); int bathroom = peep->bathroom - 32; if (bathroom > 210) bathroom = 210; @@ -1532,8 +1532,8 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) int eax = RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32); eax -= peep->time_in_park; eax >>= 11; - RCT2_GLOBAL(0x13CE952, uint16) = eax & 0xFFFF; - gfx_draw_string_left(dpi, 1458, (void*)0x13CE952, 0, x, y); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = eax & 0xFFFF; + gfx_draw_string_left(dpi, 1458, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } y += 19; @@ -1545,22 +1545,22 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) // Intensity int intensity = peep->intensity / 16; - RCT2_GLOBAL(0x13CE952, uint16) = intensity; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = intensity; int string_id = 1658; if (peep->intensity & 0xF){ - RCT2_GLOBAL(0x13CE952, uint16) = peep->intensity & 0xF; - RCT2_GLOBAL(0x13CE954, uint16) = intensity; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->intensity & 0xF; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = intensity; string_id = 1659; if (intensity == 15) string_id = 1660; } - gfx_draw_string_left(dpi, string_id, (void*)0x13CE952, 0, x + 4, y); + gfx_draw_string_left(dpi, string_id, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x + 4, y); // Nausea tolerance y += 10; int nausea_tolerance = peep->nausea_tolerance & 0x3; - RCT2_GLOBAL(0x13CE952, uint16) = nausea_tolerance + 2368; - gfx_draw_string_left(dpi, 1661, (void*)0x13CE952, 0, x, y); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = nausea_tolerance + 2368; + gfx_draw_string_left(dpi, 1661, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } /** @@ -1691,8 +1691,8 @@ void window_guest_rides_invalidate(rct_window *w) w->pressed_widgets |= 1ULL << (w->page + WIDX_TAB_1); rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_guest_rides_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_rides_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1743,10 +1743,10 @@ void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi) ride_string_arguments = ride->name_arguments; ride_string_id = ride->name; } - RCT2_GLOBAL(0x13CE952, uint16) = ride_string_id; - RCT2_GLOBAL(0x13CE954, uint32) = ride_string_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride_string_id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride_string_arguments; - gfx_draw_string_left_clipped(dpi, 3093, (void*)0x13CE952, 0, x, y, w->width - 14); + gfx_draw_string_left_clipped(dpi, 3093, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, w->width - 14); } /** @@ -1818,8 +1818,8 @@ void window_guest_finance_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_guest_finance_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_finance_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -1857,63 +1857,63 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi) int y = w->y + window_guest_finance_widgets[WIDX_PAGE_BACKGROUND].top + 4; // Cash in pocket - RCT2_GLOBAL(0x13CE952, money32) = peep->cash_in_pocket; - gfx_draw_string_left(dpi, 1457, (void*)0x13CE952, 0, x, y); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->cash_in_pocket; + gfx_draw_string_left(dpi, 1457, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); // Cash spent y += 10; - RCT2_GLOBAL(0x13CE952, money32) = peep->cash_spent; - gfx_draw_string_left(dpi, 1456, (void*)0x13CE952, 0, x, y); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->cash_spent; + gfx_draw_string_left(dpi, 1456, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); y += 20; gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], 32); // Paid to enter - RCT2_GLOBAL(0x13CE952, money32) = peep->paid_to_enter; - gfx_draw_string_left(dpi, 2296, (void*)0x13CE952, 0, x, y); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->paid_to_enter; + gfx_draw_string_left(dpi, 2296, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); // Paid on rides y += 10; - RCT2_GLOBAL(0x13CE952, money32) = peep->paid_on_rides; - RCT2_GLOBAL(0x13CE956, uint16) = peep->no_of_rides; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->paid_on_rides; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = peep->no_of_rides; if (peep->no_of_rides != 1){ - gfx_draw_string_left(dpi, 2298, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2298, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } else{ - gfx_draw_string_left(dpi, 2297, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2297, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } // Paid on food y += 10; - RCT2_GLOBAL(0x13CE952, money32) = peep->paid_on_food; - RCT2_GLOBAL(0x13CE956, uint16) = peep->no_of_food; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->paid_on_food; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = peep->no_of_food; if (peep->no_of_food != 1){ - gfx_draw_string_left(dpi, 2300, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2300, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } else{ - gfx_draw_string_left(dpi, 2299, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2299, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } // Paid on drinks y += 10; - RCT2_GLOBAL(0x13CE952, money32) = peep->paid_on_drink; - RCT2_GLOBAL(0x13CE956, uint16) = peep->no_of_drinks; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->paid_on_drink; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = peep->no_of_drinks; if (peep->no_of_drinks != 1){ - gfx_draw_string_left(dpi, 2302, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2302, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } else{ - gfx_draw_string_left(dpi, 2301, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2301, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } // Paid on souvenirs y += 10; - RCT2_GLOBAL(0x13CE952, money32) = peep->paid_on_souvenirs; - RCT2_GLOBAL(0x13CE956, uint16) = peep->no_of_souvenirs; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, money32) = peep->paid_on_souvenirs; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = peep->no_of_souvenirs; if (peep->no_of_souvenirs != 1){ - gfx_draw_string_left(dpi, 2304, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2304, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } else{ - gfx_draw_string_left(dpi, 2303, (void*)0x13CE952, 0, x, y); + gfx_draw_string_left(dpi, 2303, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y); } } @@ -1961,8 +1961,8 @@ void window_guest_thoughts_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_guest_thoughts_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_thoughts_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -2008,14 +2008,14 @@ void window_guest_thoughts_paint(rct_window *w, rct_drawpixelinfo *dpi) uint32 argument1, argument2; get_arguments_from_thought(*thought, &argument1, &argument2); - RCT2_GLOBAL(0x13CE952, uint32) = argument1; - RCT2_GLOBAL(0x13CE956, uint32) = argument2; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument2; int width = window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].right - window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].left - 8; - y += gfx_draw_string_left_wrapped(dpi, (void*)0x13CE952, x, y, width, 1191, 0); + y += gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, width, 1191, 0); // If this is the last visable line end drawing. if (y > w->y + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].bottom - 32) return; @@ -2067,8 +2067,8 @@ void window_guest_inventory_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_guest_inventory_widgets[WIDX_BACKGROUND].right = w->width - 1; window_guest_inventory_widgets[WIDX_BACKGROUND].bottom = w->height - 1; diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index 46c3aa4cd1..3d08b1ec64 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -683,7 +683,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, // Guest name RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x013CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1, 113); switch (_window_guest_list_selected_view) { @@ -760,8 +760,8 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1, 414); // Draw guest count - RCT2_GLOBAL(0x013CE95A, uint16) = STR_GUESTS_COUNT_COMMA_SEP; - gfx_draw_string_right(dpi, format, (void*)0x0013CE95A, 0, 326, y - 1); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint16) = STR_GUESTS_COUNT_COMMA_SEP; + gfx_draw_string_right(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, 0, 326, y - 1); } y += 21; } @@ -797,8 +797,8 @@ static int window_guest_list_is_peep_in_filter(rct_peep* peep) * Calculates a hash value (arguments) for comparing peep actions/thoughts * rct2: 0x0069B7EA * peep (esi) - * argument_1 (0x013CE952) - * argument_2 (0x013CE954) + * argument_1 (0x013CE952) (RCT2_ADDRESS_COMMON_FORMAT_ARGS) + * argument_2 (0x013CE954) (RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2) */ static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* argument_2) { diff --git a/src/windows/maze_construction.c b/src/windows/maze_construction.c index 992eea20b0..5eec5c5312 100644 --- a/src/windows/maze_construction.c +++ b/src/windows/maze_construction.c @@ -416,8 +416,8 @@ static void window_maze_construction_invalidate(rct_window *w) rct_ride *ride = GET_RIDE(_currentRideIndex); // Set window title arguments - RCT2_GLOBAL(0x013CE956, rct_string_id) = ride->name; - RCT2_GLOBAL(0x013CE958, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, rct_string_id) = ride->name; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint32) = ride->name_arguments; } /** diff --git a/src/windows/park.c b/src/windows/park.c index 51ad8cb281..beb9208c33 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -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(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, 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: @@ -1757,8 +1757,8 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) // Objective 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); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, short) = date_get_total_months(MONTH_OCTOBER, RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_YEAR, uint8)); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, int) = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_CURRENCY, sint32); y += gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 221, 2385 + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8), 0); y += 5; diff --git a/src/windows/ride.c b/src/windows/ride.c index 940d1eccdc..c8c7473bf7 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -1613,7 +1613,7 @@ static void window_ride_rename(rct_window *w) rct_ride *ride; ride = GET_RIDE(w->number); - RCT2_GLOBAL(0x013CE962, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, uint32) = ride->name_arguments; window_text_input_open(w, WIDX_RENAME, STR_RIDE_ATTRACTION_NAME, STR_ENTER_NEW_NAME_FOR_THIS_RIDE_ATTRACTION, ride->name, ride->name_arguments, 32); } @@ -3053,7 +3053,7 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED].type = WWT_SPINNER; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_INCREASE].type = WWT_DROPDOWN_BUTTON; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_DECREASE].type = WWT_DROPDOWN_BUTTON; - RCT2_GLOBAL(0x013CE966, uint16) = ride->lift_hill_speed; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 20, uint16) = ride->lift_hill_speed; } else { window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED_LABEL].type = WWT_EMPTY; window_ride_operating_widgets[WIDX_LIFT_HILL_SPEED].type = WWT_EMPTY; @@ -3067,7 +3067,7 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS].type = WWT_SPINNER; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE].type = WWT_DROPDOWN_BUTTON; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE].type = WWT_DROPDOWN_BUTTON; - RCT2_GLOBAL(0x013CE968, uint16) = ride->num_circuits; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 22, uint16) = ride->num_circuits; } else { window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_LABEL].type = WWT_EMPTY; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS].type = WWT_EMPTY; @@ -3121,9 +3121,9 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_MAXIMUM_LENGTH_DECREASE].type = WWT_DROPDOWN_BUTTON; RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, uint16) = 1217; - RCT2_GLOBAL(0x013CE95E, uint16) = ride->min_waiting_time; - RCT2_GLOBAL(0x013CE960, uint16) = 1217; - RCT2_GLOBAL(0x013CE962, uint16) = ride->max_waiting_time; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 12, uint16) = ride->min_waiting_time; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 14, uint16) = 1217; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, uint16) = ride->max_waiting_time; if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD) w->pressed_widgets |= (1 << WIDX_LOAD_CHECKBOX); @@ -3153,25 +3153,25 @@ static void window_ride_operating_invalidate(rct_window *w) w->pressed_widgets |= (1 << WIDX_MAXIMUM_LENGTH_CHECKBOX); // Mode specific functionality - RCT2_GLOBAL(0x013CE964, uint16) = ride->operation_option; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = ride->operation_option; switch (ride->mode) { case RIDE_MODE_POWERED_LAUNCH_PASSTROUGH: case RIDE_MODE_POWERED_LAUNCH: case RIDE_MODE_UPWARD_LAUNCH: case RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED: - RCT2_GLOBAL(0x013CE964, uint16) = (ride->launch_speed * 9) / 4; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = (ride->launch_speed * 9) / 4; format = 1331; caption = STR_LAUNCH_SPEED; tooltip = STR_LAUNCH_SPEED_TIP; break; case RIDE_MODE_STATION_TO_STATION: - RCT2_GLOBAL(0x013CE964, uint16) = (ride->speed * 9) / 4; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = (ride->speed * 9) / 4; format = 1331; caption = STR_SPEED; tooltip = STR_SPEED_TIP; break; case RIDE_MODE_RACE: - RCT2_GLOBAL(0x013CE964, uint16) = ride->num_laps; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = ride->num_laps; format = 1736; caption = STR_NUMBER_OF_LAPS; tooltip = STR_NUMBER_OF_LAPS_TIP; @@ -3204,7 +3204,7 @@ static void window_ride_operating_invalidate(rct_window *w) if (format != 0) { if (ride->type == RIDE_TYPE_TWIST) - RCT2_GLOBAL(0x013CE964, uint16) *= 3; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) *= 3; window_ride_operating_widgets[WIDX_MODE_TWEAK_LABEL].type = WWT_24; window_ride_operating_widgets[WIDX_MODE_TWEAK_LABEL].image = caption; @@ -4196,7 +4196,7 @@ static void window_ride_colour_invalidate(rct_window *w) window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].type = WWT_EMPTY; } - RCT2_GLOBAL(0x013CE960, uint16) = STR_MAIN_COLOUR_SCHEME + colourScheme; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 140, uint16) = STR_MAIN_COLOUR_SCHEME + colourScheme; window_ride_anchor_border_widgets(w); window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); diff --git a/src/windows/server_start.c b/src/windows/server_start.c index a158d3a84e..beed1ed29b 100644 --- a/src/windows/server_start.c +++ b/src/windows/server_start.c @@ -252,7 +252,7 @@ static void window_server_start_textinput(rct_window *w, int widgetIndex, char * static void window_server_start_invalidate(rct_window *w) { widget_set_checkbox_value(w, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.advertise); - RCT2_GLOBAL(0x013CE964, uint16) = gConfigNetwork.maxplayers; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = gConfigNetwork.maxplayers; } static void window_server_start_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/windows/shortcut_key_change.c b/src/windows/shortcut_key_change.c index d47841433b..a5cb94bcac 100644 --- a/src/windows/shortcut_key_change.c +++ b/src/windows/shortcut_key_change.c @@ -121,6 +121,6 @@ static void window_shortcut_change_paint(rct_window *w, rct_drawpixelinfo *dpi) int x = w->x + 125; int y = w->y + 30; - RCT2_GLOBAL(0x13CE952, uint16) = ShortcutStringIds[RCT2_GLOBAL(0x009DE511, uint8)]; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShortcutStringIds[RCT2_GLOBAL(0x009DE511, uint8)]; gfx_draw_string_centred_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 242, 2785, RCT2_GLOBAL(0x9DEB8D, uint8)); } diff --git a/src/windows/shortcut_keys.c b/src/windows/shortcut_keys.c index db3db113e1..5650cf6651 100644 --- a/src/windows/shortcut_keys.c +++ b/src/windows/shortcut_keys.c @@ -258,9 +258,9 @@ static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i char *templateString = (char*)language_get_string(templateStringId); keyboard_shortcut_format_string(templateString, gShortcutKeys[i]); - RCT2_GLOBAL(0x13CE952, uint16) = STR_SHORTCUT_ENTRY_FORMAT; - RCT2_GLOBAL(0x13CE954, uint16) = ShortcutStringIds[i]; - RCT2_GLOBAL(0x13CE956, uint16) = templateStringId; - gfx_draw_string_left(dpi, format, (void*)0x13CE952, 0, 0, y - 1); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_SHORTCUT_ENTRY_FORMAT; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ShortcutStringIds[i]; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = templateStringId; + gfx_draw_string_left(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1); } } diff --git a/src/windows/sign.c b/src/windows/sign.c index 0fc58a5508..9d2dc42b48 100644 --- a/src/windows/sign.c +++ b/src/windows/sign.c @@ -258,7 +258,7 @@ static void window_sign_mouseup(rct_window *w, int widgetIndex) case WIDX_SIGN_TEXT: if (banner->flags&BANNER_FLAG_2){ rct_ride* ride = GET_RIDE(banner->colour); - RCT2_GLOBAL(0x13CE962, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, uint32) = ride->name_arguments; string_id = ride->name; } else @@ -522,7 +522,7 @@ static void window_sign_small_mouseup(rct_window *w, int widgetIndex) case WIDX_SIGN_TEXT: if (banner->flags&BANNER_FLAG_2){ rct_ride* ride = GET_RIDE(banner->colour); - RCT2_GLOBAL(0x13CE962, uint32) = ride->name_arguments; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, uint32) = ride->name_arguments; string_id = ride->name; } else diff --git a/src/windows/staff.c b/src/windows/staff.c index 9bf5e7c81a..f20f4c7cb3 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -736,8 +736,8 @@ void window_staff_stats_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_staff_stats_widgets[WIDX_BACKGROUND].right = w->width - 1; window_staff_stats_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -771,8 +771,8 @@ void window_staff_options_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; switch (peep->staff_type){ case STAFF_TYPE_ENTERTAINER: @@ -846,8 +846,8 @@ void window_staff_overview_invalidate(rct_window *w) rct_peep* peep = GET_PEEP(w->number); - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; window_staff_overview_widgets[WIDX_BACKGROUND].right = w->width - 1; window_staff_overview_widgets[WIDX_BACKGROUND].bottom = w->height - 1; @@ -910,13 +910,13 @@ void window_staff_overview_paint(rct_window *w, rct_drawpixelinfo *dpi) uint32 argument1, argument2; rct_peep* peep = GET_PEEP(w->number); get_arguments_from_action(peep, &argument1, &argument2); - RCT2_GLOBAL(0x13CE952, uint32) = argument1; - RCT2_GLOBAL(0x13CE952 + 4, uint32) = argument2; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument1; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument2; rct_widget* widget = &w->widgets[WIDX_BTM_LABEL]; int x = (widget->left + widget->right) / 2 + w->x; int y = w->y + widget->top; int width = widget->right - widget->left; - gfx_draw_string_centred_clipped(dpi, 1191, (void*)0x13CE952, 0, x, y, width); + gfx_draw_string_centred_clipped(dpi, 1191, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width); } /** @@ -1054,7 +1054,7 @@ void window_staff_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)){ - RCT2_GLOBAL(0x13CE952,uint32) = RCT2_ADDRESS(0x992A00,uint16)[peep->staff_type]; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS,uint32) = RCT2_ADDRESS(0x992A00,uint16)[peep->staff_type]; gfx_draw_string_left(dpi, 2349, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,x, y); y += 10; diff --git a/src/windows/staff_fire_prompt.c b/src/windows/staff_fire_prompt.c index 564888159c..1384e206f0 100644 --- a/src/windows/staff_fire_prompt.c +++ b/src/windows/staff_fire_prompt.c @@ -138,11 +138,11 @@ static void window_staff_fire_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_peep* peep = &g_sprite_list[w->number].peep; - RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; - RCT2_GLOBAL(0x13CE954, uint32) = peep->id; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx; + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id; int x = w->x + WW / 2; int y = w->y + (WH / 2) - 3; - gfx_draw_string_centred_wrapped(dpi, (void*)0x13CE952, x, y, WW - 4, STR_FIRE_STAFF_ID, 0); + gfx_draw_string_centred_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, WW - 4, STR_FIRE_STAFF_ID, 0); }