mirror of https://github.com/OpenRCT2/OpenRCT2.git
Replace raw addresses of `RIDE_ENTRIES`
This commit is contained in:
parent
9c648e01bc
commit
6eadf824ea
|
@ -76,17 +76,17 @@ int object_entry_group_encoding[] = {
|
|||
|
||||
// 0x98D97C chunk address', 0x98D980 object_entries
|
||||
rct_object_entry_group object_entry_groups[] = {
|
||||
(uint8**)(0x009ACFA4 ), (rct_object_entry_extended*)(0x00F3F03C ), // rides
|
||||
(uint8**)(0x009ACFA4 + (128 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (128 * 20)), // small scenery 0x009AD1A4, 0xF2FA3C
|
||||
(uint8**)(0x009ACFA4 + (380 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (380 * 20)), // large scenery 0x009AD594, 0xF40DEC
|
||||
(uint8**)(0x009ACFA4 + (508 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (508 * 20)), // walls 0x009AD794, 0xF417EC
|
||||
(uint8**)(0x009ACFA4 + (636 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (636 * 20)), // banners 0x009AD994, 0xF421EC
|
||||
(uint8**)(0x009ACFA4 + (668 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (668 * 20)), // paths 0x009ADA14, 0xF4246C
|
||||
(uint8**)(0x009ACFA4 + (684 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (684 * 20)), // path bits 0x009ADA54, 0xF425AC
|
||||
(uint8**)(0x009ACFA4 + (699 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (699 * 20)), // scenery sets 0x009ADA90, 0xF426D8
|
||||
(uint8**)(0x009ACFA4 + (718 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (718 * 20)), // park entrance 0x009ADADC, 0xF42854
|
||||
(uint8**)(0x009ACFA4 + (719 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (719 * 20)), // water 0x009ADAE0, 0xF42868
|
||||
(uint8**)(0x009ACFA4 + (720 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (720 * 20)) // scenario text 0x009ADAE4, 0xF4287C
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES ), (rct_object_entry_extended*)(0x00F3F03C ), // rides
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (128 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (128 * 20)), // small scenery 0x009AD1A4, 0xF2FA3C
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (380 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (380 * 20)), // large scenery 0x009AD594, 0xF40DEC
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (508 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (508 * 20)), // walls 0x009AD794, 0xF417EC
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (636 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (636 * 20)), // banners 0x009AD994, 0xF421EC
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (668 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (668 * 20)), // paths 0x009ADA14, 0xF4246C
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (684 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (684 * 20)), // path bits 0x009ADA54, 0xF425AC
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (699 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (699 * 20)), // scenery sets 0x009ADA90, 0xF426D8
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (718 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (718 * 20)), // park entrance 0x009ADADC, 0xF42854
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (719 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (719 * 20)), // water 0x009ADAE0, 0xF42868
|
||||
(uint8**)(RCT2_ADDRESS_RIDE_ENTRIES + (720 * 4)), (rct_object_entry_extended*)(0x00F3F03C + (720 * 20)) // scenario text 0x009ADAE4, 0xF4287C
|
||||
};
|
||||
|
||||
static int object_list_cache_load(int totalFiles, uint64 totalFileSize, int fileDateModifiedChecksum);
|
||||
|
|
|
@ -850,7 +850,7 @@ enum {
|
|||
#define TURN_MASK_3_ELEMENTS 0x0700
|
||||
#define TURN_MASK_4_PLUS_ELEMENTS 0xF800
|
||||
|
||||
// rct2: 0x009ACFA4
|
||||
// rct2: 0x009ACFA4 (RCT2_ADDRESS_RIDE_ENTRIES)
|
||||
extern rct_ride_type **gRideTypeList;
|
||||
|
||||
// rct2: 0x013628F8
|
||||
|
|
|
@ -290,7 +290,7 @@ static void window_new_ride_populate_list()
|
|||
|
||||
uint8 currentCategory = _window_new_ride_current_tab;
|
||||
ride_list_item *nextListItem = (ride_list_item*)0x00F43523;
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)0x009ACFA4;
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)RCT2_ADDRESS_RIDE_ENTRIES;
|
||||
|
||||
// For each ride type in the view order list
|
||||
for (i = 0; i < countof(RideTypeViewOrder); i++) {
|
||||
|
@ -773,7 +773,7 @@ static void window_new_ride_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
*/
|
||||
static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex)
|
||||
{
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)0x009ACFA4;
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)RCT2_ADDRESS_RIDE_ENTRIES;
|
||||
|
||||
if (_window_new_ride_current_tab == WINDOW_NEW_RIDE_PAGE_RESEARCH)
|
||||
return;
|
||||
|
@ -863,7 +863,7 @@ static int get_num_track_designs(ride_list_item item)
|
|||
*/
|
||||
static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixelinfo *dpi, ride_list_item item, int x, int y, int width)
|
||||
{
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)0x009ACFA4;
|
||||
rct_ride_type **rideEntries = (rct_ride_type**)RCT2_ADDRESS_RIDE_ENTRIES;
|
||||
rct_ride_type *rideEntry = rideEntries[item.entry_index];
|
||||
|
||||
// Ride name and description
|
||||
|
|
|
@ -350,7 +350,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp
|
|||
if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != RESEARCH_STAGE_DESIGNING) {
|
||||
uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32);
|
||||
if (typeId >= 0x10000) {
|
||||
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
|
||||
rct_ride_type *rideEntry = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_ENTRIES + (typeId & 0xFF) * 4, rct_ride_type*);
|
||||
stringId = (rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME) ?
|
||||
rideEntry->name :
|
||||
((typeId >> 8) & 0xFF) + 2;
|
||||
|
@ -388,7 +388,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp
|
|||
int lastDevelopmentFormat;
|
||||
if (typeId != 0xFFFFFFFF) {
|
||||
if (typeId >= 0x10000) {
|
||||
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
|
||||
rct_ride_type *rideEntry = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_ENTRIES + (typeId & 0xFF) * 4, rct_ride_type*);
|
||||
stringId = (rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME) ?
|
||||
rideEntry->name :
|
||||
((typeId >> 8) & 0xFF) + 2;
|
||||
|
|
Loading…
Reference in New Issue