diff --git a/src/ride/cable_lift.c b/src/ride/cable_lift.c index 7bad947319..065d6b4ae9 100644 --- a/src/ride/cable_lift.c +++ b/src/ride/cable_lift.c @@ -19,6 +19,7 @@ #include "ride.h" #include "track.h" #include "ride_data.h" +#include "vehicle_data.h" static void cable_lift_update_moving_to_end_of_station(rct_vehicle *vehicle); static void cable_lift_update_waiting_to_depart(rct_vehicle *vehicle); @@ -287,7 +288,7 @@ static bool sub_6DF01A_loop(rct_vehicle* vehicle) { if (unk.z != unk_F64E20->z) bx |= (1 << 2); - vehicle->remaining_distance -= RCT2_ADDRESS(0x009A2930, sint32)[bx]; + vehicle->remaining_distance -= dword_9A2930[bx]; unk_F64E20->x = unk.x; unk_F64E20->y = unk.y; unk_F64E20->z = unk.z; @@ -373,7 +374,7 @@ static bool sub_6DF21B_loop(rct_vehicle* vehicle) { if (unk.z != unk_F64E20->z) bx |= (1 << 2); - vehicle->remaining_distance += RCT2_ADDRESS(0x009A2930, sint32)[bx]; + vehicle->remaining_distance += dword_9A2930[bx]; unk_F64E20->x = unk.x; unk_F64E20->y = unk.y; unk_F64E20->z = unk.z; diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 84ded8b34f..d1dbdc1492 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -7315,7 +7315,7 @@ loc_6DAEB9: } // loc_6DB8A5 - regs.ebx = RCT2_ADDRESS(0x009A2930, sint32)[regs.ebx]; + regs.ebx = dword_9A2930[regs.ebx]; vehicle->remaining_distance -= regs.ebx; unk_F64E20->x = x; unk_F64E20->y = y; @@ -7591,7 +7591,7 @@ loc_6DBA33:; if (x != unk_F64E20->x) { regs.ebx |= 1; } if (y != unk_F64E20->y) { regs.ebx |= 2; } if (z != unk_F64E20->z) { regs.ebx |= 4; } - vehicle->remaining_distance += RCT2_ADDRESS(0x009A2930, sint32)[regs.ebx]; + vehicle->remaining_distance += dword_9A2930[regs.ebx]; unk_F64E20->x = x; unk_F64E20->y = y; diff --git a/src/ride/vehicle_data.c b/src/ride/vehicle_data.c index 8de601ac40..85613274a3 100644 --- a/src/ride/vehicle_data.c +++ b/src/ride/vehicle_data.c @@ -798,3 +798,23 @@ const uint8 MotionSimulatorTimeToSpriteMap[] = { }; const int MotionSimulatorTimeToSpriteMapCount = countof(MotionSimulatorTimeToSpriteMap); + +/** rct2: 0x009A2930 */ +const sint32 dword_9A2930[] = { + 0, // 0000 + 8716, // 0001 + 8716, // 0010 + 12327, // 0011 + 6554, // 0100 + 10905, // 0101 + 10905, // 0110 + 13961, // 0111 + 0, // 1000 + 21790, // 1001 + 21790, // 1010 + 30817, // 1011 + 16385, // 1100 + 27262, // 1101 + 27262, // 1110 + 34902, // 1111 +}; diff --git a/src/ride/vehicle_data.h b/src/ride/vehicle_data.h index 759b72d66e..48bb80c3b8 100644 --- a/src/ride/vehicle_data.h +++ b/src/ride/vehicle_data.h @@ -33,4 +33,6 @@ extern const top_spin_time_to_sprite_map * TopSpinTimeToSpriteMaps[]; extern const uint8 MotionSimulatorTimeToSpriteMap[]; extern const int MotionSimulatorTimeToSpriteMapCount; +extern const sint32 dword_9A2930[]; + #endif