diff --git a/src/input.c b/src/input.c index deaea3528d..11460cd048 100644 --- a/src/input.c +++ b/src/input.c @@ -397,7 +397,7 @@ static void game_handle_input_mouse(int x, int y, int state) break; case MOUSE_STATE_LEFT_RELEASE: gInputState = INPUT_STATE_RESET; - if (RCT2_GLOBAL(0x009DE52E, rct_windownumber) == w->number) { + if (RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_WINDOWNUMBER, rct_windownumber) == w->number) { if ((gInputFlags & INPUT_FLAG_TOOL_ACTIVE)) { w = window_find_by_number( RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass), diff --git a/src/interface/viewport.c b/src/interface/viewport.c index fa48b2e15a..04bb6117d4 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1276,7 +1276,7 @@ void viewport_ride_entrance_exit_paint_setup(uint8 direction, int height, rct_ma if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){ RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; - image_id = RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(0x9AACBF, uint8)]; + image_id = RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)]; RCT2_GLOBAL(0x009E32BC, uint32) = image_id; if (transparant_image_id) transparant_image_id = image_id; @@ -1417,7 +1417,7 @@ void viewport_park_entrance_paint_setup(uint8 direction, int height, rct_map_ele uint32 image_id, ghost_id = 0; if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){ RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; - ghost_id = RCT2_ADDRESS(0x993CC4, uint32)[RCT2_GLOBAL(0x9AACBF, uint8)]; + ghost_id = RCT2_ADDRESS(0x993CC4, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)]; RCT2_GLOBAL(0x009E32BC, uint32) = ghost_id; } @@ -1686,7 +1686,7 @@ void viewport_banner_paint_setup(uint8 direction, int height, rct_map_element* m if (map_element->flags & MAP_ELEMENT_FLAG_GHOST)//if being placed { RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_NONE; - image_id |= RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(0x9AACBF, uint8)]; + image_id |= RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)]; } else{ image_id |= diff --git a/src/management/finance.c b/src/management/finance.c index 4f10fa63d6..324fae0d1e 100644 --- a/src/management/finance.c +++ b/src/management/finance.c @@ -54,7 +54,7 @@ money32 *gParkValueHistory = RCT2_ADDRESS(RCT2_ADDRESS_PARK_VALUE_HISTORY, money * Pay an amount of money. * rct2: 0x069C674 * @param amount (eax) - * @param type passed via global var 0x0141F56C, our type is that var/4. + * @param type passed via global var 0x0141F56C (RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE), our type is that var/4. */ void finance_payment(money32 amount, rct_expenditure_type type) { diff --git a/src/object_list.c b/src/object_list.c index 791c9c2751..ce5c972b43 100644 --- a/src/object_list.c +++ b/src/object_list.c @@ -493,7 +493,7 @@ void set_load_objects_fail_reason() if (expansion == 0 || expansion == 8 - || RCT2_GLOBAL(0x9AB4C0, uint16) & (1 << expansion)){ + || RCT2_GLOBAL(RCT2_ADDRESS_EXPANSION_FLAGS, uint16) & (1 << expansion)){ char* string_buffer = RCT2_ADDRESS(0x9BC677, char); diff --git a/src/peep/peep.c b/src/peep/peep.c index 735b9377ab..7e8a5b043d 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -6101,13 +6101,13 @@ static void peep_stop_purchase_thought(rct_peep* peep, uint8 ride_type){ uint8 thought_type = PEEP_THOUGHT_TYPE_HUNGRY; - if (!(RCT2_ADDRESS(0x97CF40, uint32)[ride_type * 2] & 0x800000)){ + if (!(RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride_type * 2] & 0x800000)){ thought_type = PEEP_THOUGHT_TYPE_THIRSTY; - if (!(RCT2_ADDRESS(0x97CF40, uint32)[ride_type * 2] & 0x1000000)){ + if (!(RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride_type * 2] & 0x1000000)){ thought_type = PEEP_THOUGHT_RUNNING_OUT; if (ride_type != RIDE_TYPE_CASH_MACHINE){ thought_type = PEEP_THOUGHT_TYPE_BATHROOM; - if (!(RCT2_ADDRESS(0x97CF40, uint32)[ride_type * 2] & 0x2000000)){ + if (!(RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride_type * 2] & 0x2000000)){ return; } } @@ -7001,7 +7001,7 @@ static uint8 loc_6949B9( if (z != mapElement->base_height) continue; int rideIndex = inputMapElement->properties.path.ride_index; rct_ride *ride = GET_RIDE(rideIndex); - if (RCT2_GLOBAL(0x0097CF40 + (ride->type * 8), uint32) & 0x20000) { + if (RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8), uint32) & 0x20000) { *outRideIndex = rideIndex; return PATH_SEARCH_RIDE_ENTRANCE; } @@ -8060,7 +8060,7 @@ static void peep_update_ride_nausea_growth(rct_peep *peep, rct_ride *ride) static bool peep_should_go_on_ride_again(rct_peep *peep, rct_ride *ride) { - if (!(RCT2_GLOBAL(0x0097CF40 + (ride->type * 8), uint32) & 0x100000)) return false; + if (!(RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8), uint32) & 0x100000)) return false; if (ride->excitement == (ride_rating)0xFFFF) return false; if (ride->intensity > RIDE_RATING(10,00) && !gConfigCheat.ignore_ride_intensity) return false; if (peep->happiness < 180) return false; @@ -9326,7 +9326,7 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1, rct_peep* peep = GET_PEEP(sprite_index); RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = peep->id; - utf8* curName = RCT2_ADDRESS(0x00141ED68, utf8); + utf8* curName = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, utf8); rct_string_id curId = peep->name_string_idx; format_string(curName, curId, RCT2_ADDRESS(RCT2_ADDRESS_COMMON_FORMAT_ARGS, void)); @@ -9334,7 +9334,7 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1, return 0; if (*fullText == '\0') { - RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1455; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 1455; return MONEY32_UNDEFINED; } diff --git a/src/rct1.c b/src/rct1.c index 8ae952df68..11a0f34066 100644 --- a/src/rct1.c +++ b/src/rct1.c @@ -612,7 +612,7 @@ static void rct1_clear_extra_tile_entries() *tilePointer++ = nextFreeMapElement++; } - RCT2_GLOBAL(0x0140E9A4, rct_map_element*) = nextFreeMapElement; + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, rct_map_element*) = nextFreeMapElement; } /** @@ -661,7 +661,7 @@ static void rct1_fix_colours() } mapElement = gMapElements; - while (mapElement < RCT2_GLOBAL(0x0140E9A4, rct_map_element*)) { + while (mapElement < RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, rct_map_element*)) { if (mapElement->base_height != 255) { switch (map_element_get_type(mapElement)) { case MAP_ELEMENT_TYPE_SCENERY: @@ -745,7 +745,7 @@ static void rct1_fix_z() } mapElement = gMapElements; - while (mapElement < RCT2_GLOBAL(0x0140E9A4, rct_map_element*)) { + while (mapElement < RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, rct_map_element*)) { if (mapElement->base_height != 255) { mapElement->base_height /= 2; mapElement->clearance_height /= 2; @@ -765,7 +765,7 @@ static void rct1_fix_paths() int pathType, secondaryType, additions; mapElement = gMapElements; - while (mapElement < RCT2_GLOBAL(0x0140E9A4, rct_map_element*)) { + while (mapElement < RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, rct_map_element*)) { switch (map_element_get_type(mapElement)) { case MAP_ELEMENT_TYPE_PATH: // Type diff --git a/src/rct2.c b/src/rct2.c index 4deeac2fa6..0e82756bbf 100644 --- a/src/rct2.c +++ b/src/rct2.c @@ -550,7 +550,7 @@ void get_system_info() } RCT2_GLOBAL(0x01423C1C, uint32) = (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_BPP, sint32) >= 8); - if (RCT2_GLOBAL(RCT2_ADDRESS_OS_MAJOR_VERSION, uint32) < 4 || RCT2_GLOBAL(0x1423C10, sint32) < 4) + if (RCT2_GLOBAL(RCT2_ADDRESS_OS_MAJOR_VERSION, uint32) < 4 || RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_BPP, sint32) < 4) RCT2_GLOBAL(0x1423C18, sint32) = 0; else RCT2_GLOBAL(0x1423C18, sint32) = 1; diff --git a/src/ride/ride.c b/src/ride/ride.c index 0edeb0fae6..ab7ec01b75 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -5429,10 +5429,10 @@ foundRideEntry: ride->music = RCT2_ADDRESS(0x0097D4F4, uint8)[ride->type * 8]; ride->operation_option = ( - RCT2_GLOBAL(0x0097CF40 + 4 + (ride->type * 8), uint8) + - RCT2_GLOBAL(0x0097CF40 + 4 + (ride->type * 8), uint8) + - RCT2_GLOBAL(0x0097CF40 + 4 + (ride->type * 8), uint8) + - RCT2_GLOBAL(0x0097CF40 + 5 + (ride->type * 8), uint8) + RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) + + RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) + + RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) + + RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 5 + (ride->type * 8), uint8) ) / 4; ride->lift_hill_speed = RideLiftData[ride->type].minimum_speed; diff --git a/src/ride/ride.h b/src/ride/ride.h index 9cda2a0f20..96982016e1 100644 --- a/src/ride/ride.h +++ b/src/ride/ride.h @@ -889,7 +889,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 69fe5d59f3..2b9f7b4f61 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -720,7 +720,7 @@ int backup_map(){ memcpy(RCT2_GLOBAL(0xF440F1, uint32*), tile_map_pointers, 0x40000); uint8* backup_info = RCT2_GLOBAL(0xF440F5, uint8*); - *(uint32*)backup_info = RCT2_GLOBAL(0x0140E9A4, uint32); + *(uint32*)backup_info = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, uint32); *(uint16*)(backup_info + 4) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16); *(uint16*)(backup_info + 6) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, uint16); *(uint16*)(backup_info + 8) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16); @@ -740,7 +740,7 @@ void reload_map_backup(){ memcpy(tile_map_pointers, RCT2_GLOBAL(0xF440F1, uint32*), 0x40000); uint8* backup_info = RCT2_GLOBAL(0xF440F5, uint8*); - RCT2_GLOBAL(0x0140E9A4, uint32) = *(uint32*)backup_info; + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_FREE_MAP_ELEMENT, uint32) = *(uint32*)backup_info; RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, uint16) = *(uint16*)(backup_info + 4); RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, uint16) = *(uint16*)(backup_info + 6); RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) = *(uint16*)(backup_info + 8); @@ -1229,7 +1229,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) = STR_CANT_POSITION_THIS_HERE; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE; cost = game_do_command( mapCoord.x, @@ -1288,7 +1288,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) = STR_CANT_BUILD_PARK_ENTRANCE_HERE; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_BUILD_PARK_ENTRANCE_HERE; cost = game_do_command( mapCoord.x, @@ -3077,7 +3077,7 @@ int save_track_design(uint8 rideIndex){ substitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_TRACKS_PATH, char), track_name); // Save track design - format_string(RCT2_ADDRESS(0x141ED68, char), 2306, NULL); + format_string(RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char), 2306, NULL); // Track design files format_string(RCT2_ADDRESS(0x141EE68, char), 2305, NULL); @@ -3086,7 +3086,7 @@ int save_track_design(uint8 rideIndex){ int result = platform_open_common_file_dialog( 0, - RCT2_ADDRESS(0x141ED68, char), + RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char), path, "*.TD?", RCT2_ADDRESS(0x141EE68, char)); @@ -3977,7 +3977,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in enabledTrackPieces |= rideEntry->enabledTrackPiecesB & RCT2_ADDRESS(0x01357644, uint32)[ride->type]; enabledTrackPieces <<= 32; enabledTrackPieces |= rideEntry->enabledTrackPiecesA & RCT2_ADDRESS(0x01357444, uint32)[ride->type]; - uint32 rideTypeFlags = RCT2_GLOBAL(0x0097CF40 + (ride->type * 8), uint32); + uint32 rideTypeFlags = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8), uint32); RCT2_GLOBAL(0x00F44068, uint32) = rideTypeFlags; if ((ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) && type == 1) { @@ -4481,7 +4481,7 @@ static bool sub_6C494B(int x, int y, int z, int direction, int rideIndex, int fl } money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY, sint16 originZ, uint8 rotation, uint8 flags){ - RCT2_GLOBAL(0x00141F56C, uint8) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 0; RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, sint16) = originX + 16; RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, sint16) = originY + 16; RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, sint16) = originZ; diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 7f0f1f6a26..6b607d9c27 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -6886,7 +6886,7 @@ loc_6DAEB9: if ((trackType == TRACK_ELEM_FLAT && ride->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) || (trackType == TRACK_ELEM_POWERED_LIFT) ) { - vehicle->acceleration = RCT2_GLOBAL(0x0097CF40 + (ride->type * 8) + 7, uint8) << 16; + vehicle->acceleration = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8) + 7, uint8) << 16; } if (trackType == TRACK_ELEM_BRAKE_FOR_DROP) { if (!vehicle->is_child) { diff --git a/src/windows/editor_object_selection.c b/src/windows/editor_object_selection.c index 910867533c..56e8316b2f 100644 --- a/src/windows/editor_object_selection.c +++ b/src/windows/editor_object_selection.c @@ -1479,7 +1479,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi x = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 15; - char *bufferWithColour = (char*)0x0141ED68; + char *bufferWithColour = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER; char *buffer = utf8_write_codepoint(bufferWithColour, colour); if (*listItem->flags & OBJECT_SELECTION_FLAG_6) { colour = w->colours[1] & 0x7F; diff --git a/src/windows/editor_objective_options.c b/src/windows/editor_objective_options.c index 88b43c6b8f..4d05be9f85 100644 --- a/src/windows/editor_objective_options.c +++ b/src/windows/editor_objective_options.c @@ -992,7 +992,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi } else { RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id); } - RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); gfx_draw_string_left_clipped(dpi, 3298, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width); // Scenario name @@ -1006,7 +1006,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi safe_strncpy((char*)0x009BC677, s6Info->name, 64); RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 3165; } - RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); gfx_draw_string_left_clipped(dpi, 3300, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width); // Scenario details label @@ -1025,7 +1025,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi safe_strncpy((char*)0x009BC677, s6Info->details, 256); RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 3165; } - RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32); + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32); gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, width, 1191, 0); // Scenario category label diff --git a/src/windows/guest.c b/src/windows/guest.c index a4ce16054d..d31a9e134f 100644 --- a/src/windows/guest.c +++ b/src/windows/guest.c @@ -1263,7 +1263,7 @@ void window_guest_overview_tool_down(rct_window* w, int widgetIndex, int x, int sub_693B58(peep); tool_cancel(); - RCT2_GLOBAL(0x9DE550, sint32) = -1; + RCT2_GLOBAL(RCT2_ADDRESS_PICKEDUP_PEEP_IMAGE, sint32) = -1; } /** diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index 692b4bc4f2..fb7e0b2af9 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -217,7 +217,7 @@ void window_guest_list_open_with_filter(int type, int index) eax = (eax << 16) + 1435; - if ((RCT2_GLOBAL(0x97CF40 + ride->type * 8, uint32) & 0x400000) != 0) + if ((RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride->type * 8, uint32) & 0x400000) != 0) eax++; RCT2_GLOBAL(0x00F1EDF6, uint32) = eax; diff --git a/src/windows/map.c b/src/windows/map.c index ffc74fa61b..8f1e6d74a7 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -318,7 +318,7 @@ static void window_map_mouseup(rct_window *w, int widgetIndex) if (tool_set(w, widgetIndex, 2)) break; - RCT2_GLOBAL(0x9E32D2, sint8) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_GHOST_EXISTS, sint8) = 0; gInputFlags |= INPUT_FLAG_6; show_gridlines(); diff --git a/src/windows/maze_construction.c b/src/windows/maze_construction.c index 5eec5c5312..e0fb89fb36 100644 --- a/src/windows/maze_construction.c +++ b/src/windows/maze_construction.c @@ -357,7 +357,7 @@ static void window_maze_construction_entrance_tooldown(int x, int y, rct_window* uint8 rideIndex = RCT2_GLOBAL(0x00F44192, uint8); uint8 is_exit = RCT2_GLOBAL(0x00F44191, uint8); - RCT2_GLOBAL(0x00141E9AE, rct_string_id) = is_exit ? 1144 : 1145; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = is_exit ? 1144 : 1145; money32 cost = game_do_command( x, diff --git a/src/windows/ride.c b/src/windows/ride.c index 4aee22f1c2..969d0cd616 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -1123,23 +1123,23 @@ void window_ride_disable_tabs(rct_window *w) uint8 ride_type = ride->type; // ecx - if ((RCT2_GLOBAL(0x97CF40 + ride_type * 8, uint32) & 0x200) == 0) + if ((RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride_type * 8, uint32) & 0x200) == 0) disabled_tabs |= (1 << WIDX_TAB_8); // 0x800 if (ride_type == RIDE_TYPE_MINI_GOLF) disabled_tabs |= (1 << WIDX_TAB_2 | 1 << WIDX_TAB_3 | 1 << WIDX_TAB_4); // 0xE0 - if ((RCT2_GLOBAL(0x97CF40 + ride_type * 8, uint32) & 0x2000) != 0) + if ((RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride_type * 8, uint32) & 0x2000) != 0) disabled_tabs |= (1 << WIDX_TAB_2); // 0x20 if ( - !(RCT2_GLOBAL(0x97CF40 + ride_type * 8, uint32) & 0x4000007) && + !(RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride_type * 8, uint32) & 0x4000007) && !(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_ENTRANCE_EXIT) ) { disabled_tabs |= (1 << WIDX_TAB_5); // 0x100 } - if ((RCT2_GLOBAL(0x97CF40 + ride_type * 8, uint32) & 0x20000) != 0) + if ((RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride_type * 8, uint32) & 0x20000) != 0) disabled_tabs |= (1 << WIDX_TAB_3 | 1 << WIDX_TAB_4 | 1 << WIDX_TAB_7); // 0x4C0 if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_ALLOW_MUSIC)) { diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 125052dad0..89cab44973 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -1455,7 +1455,7 @@ static void window_ride_construction_mousedown(int widgetIndex, rct_window *w, r uint8 maxBrakesSpeed = 30; if (RCT2_GLOBAL(0x00F440D3, uint8) != 1) { brakesSpeedPtr = (uint8*)0x00F440CE; - maxBrakesSpeed = RCT2_GLOBAL(0x0097CF40 + 6 + (ride->type * 8), uint8); + maxBrakesSpeed = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 6 + (ride->type * 8), uint8); } uint8 brakesSpeed = *brakesSpeedPtr + 2; if (brakesSpeed <= maxBrakesSpeed) { diff --git a/src/windows/staff.c b/src/windows/staff.c index e7289bd010..74f38650e5 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -1172,7 +1172,7 @@ void window_staff_overview_tool_down(rct_window* w, int widgetIndex, int x, int peep->var_C4 = 0; tool_cancel(); - RCT2_GLOBAL(0x9DE550, sint32) = -1; + RCT2_GLOBAL(RCT2_ADDRESS_PICKEDUP_PEEP_IMAGE, sint32) = -1; } else if (widgetIndex == WIDX_PATROL){ int dest_x, dest_y; diff --git a/src/world/map.c b/src/world/map.c index 3bf67de3f0..41bc4c5dd6 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -4657,7 +4657,7 @@ money32 place_park_entrance(int flags, sint16 x, sint16 y, sint16 z, uint8 direc } if (x <= 32 || y <= 32 || x >= (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) - 32) || y >= (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) - 32)) { - RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3215; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 3215; return MONEY32_UNDEFINED; } @@ -4670,7 +4670,7 @@ money32 place_park_entrance(int flags, sint16 x, sint16 y, sint16 z, uint8 direc } if (entranceNum == -1) { - RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3227; + RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = 3227; return MONEY32_UNDEFINED; } diff --git a/src/world/sprite.c b/src/world/sprite.c index 7758041618..f993e054e7 100644 --- a/src/world/sprite.c +++ b/src/world/sprite.c @@ -87,7 +87,7 @@ void invalidate_sprite_2(rct_sprite *sprite) * rct2: 0x0069EB13 */ void reset_sprite_list(){ - RCT2_GLOBAL(0x1388698, uint16) = 0; + RCT2_GLOBAL(RCT2_ADDRESS_SAVED_AGE, uint16) = 0; memset(g_sprite_list, 0, sizeof(rct_sprite) * MAX_SPRITES); for (int i = 0; i < 6; ++i){ @@ -186,7 +186,7 @@ rct_sprite *create_sprite(uint8 bl) if ((bl & 2) != 0) { // 69EC96; - uint16 cx = 0x12C - RCT2_GLOBAL(0x13573CE, uint16); + uint16 cx = 0x12C - RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_COUNT_MISC, uint16); if (cx >= RCT2_GLOBAL(0x13573C8, uint16)) { return NULL;