From 9f847ca8bb2452d5301ff1d9d0bc03665f9069db Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 17 Sep 2016 15:58:59 +0100 Subject: [PATCH] Remove old RCT2 compatibility from vehicle paint --- src/ride/gentle/mini_golf.c | 4 ++-- src/ride/vehicle_paint.c | 7 ++----- src/ride/vehicle_paint.h | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ride/gentle/mini_golf.c b/src/ride/gentle/mini_golf.c index 5b4c0b31a1..1f589bb68c 100644 --- a/src/ride/gentle/mini_golf.c +++ b/src/ride/gentle/mini_golf.c @@ -1021,7 +1021,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(int trackType, int direc /** * rct2: 0x006D42F0 */ -void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, int rct2VehiclePtrFormat) +void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rct_vehicle *vehicle) { if (vehicle->num_peeps == 0) { return; @@ -1050,7 +1050,7 @@ void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rc /** * rct2: 0x006D43C6 */ -void vehicle_visual_mini_golf_ball(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, int rct2VehiclePtrFormat) +void vehicle_visual_mini_golf_ball(int x, int imageDirection, int y, int z, rct_vehicle *vehicle) { if (vehicle->mini_golf_current_animation != 1) { return; diff --git a/src/ride/vehicle_paint.c b/src/ride/vehicle_paint.c index 7342b76dd4..57f2bc8b47 100644 --- a/src/ride/vehicle_paint.c +++ b/src/ride/vehicle_paint.c @@ -2322,7 +2322,6 @@ void vehicle_visual_splash_effect(int z, rct_vehicle *vehicle, const rct_ride_en */ void vehicle_visual_default(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry) { - //uint32 rct2VehiclePtrFormat = ((uint32)vehicleEntry) - offsetof(rct_ride_entry, vehicles); RCT2_CALLPROC_X(0x006D45F8, x, imageDirection, y, z, (int)vehicle, rct2VehiclePtrFormat, 0); return; assert(vehicle->vehicle_sprite_type < countof(vehicle_sprite_funcs)); if (vehicle->vehicle_sprite_type < countof(vehicle_sprite_funcs)) { vehicle_sprite_funcs[vehicle->vehicle_sprite_type](vehicle, imageDirection, z, vehicleEntry); @@ -2360,15 +2359,13 @@ void vehicle_paint(rct_vehicle *vehicle, int imageDirection) } } - uint32 rct2VehiclePtrFormat = (uint32)((uintptr_t)vehicleEntry - (uintptr_t)offsetof(rct_ride_entry, vehicles)); - RCT2_GLOBAL(0x00F64DFC, uint32) = rct2VehiclePtrFormat; switch (vehicleEntry->car_visual) { case VEHICLE_VISUAL_DEFAULT: vehicle_visual_default(x, imageDirection, y, z, vehicle, vehicleEntry); break; case VEHICLE_VISUAL_LAUNCHED_FREEFALL: vehicle_visual_launched_freefall(x, imageDirection, y, z, vehicle, vehicleEntry); break; case VEHICLE_VISUAL_OBSERVATION_TOWER: vehicle_visual_observation_tower(x, imageDirection, y, z, vehicle, vehicleEntry); break; case VEHICLE_VISUAL_RIVER_RAPIDS: vehicle_visual_river_rapids(x, imageDirection, y, z, vehicle, vehicleEntry); break; - case VEHICLE_VISUAL_MINI_GOLF_PLAYER: vehicle_visual_mini_golf_player(x, imageDirection, y, z, vehicle, rct2VehiclePtrFormat); break; - case VEHICLE_VISUAL_MINI_GOLF_BALL: vehicle_visual_mini_golf_ball(x, imageDirection, y, z, vehicle, rct2VehiclePtrFormat); break; + case VEHICLE_VISUAL_MINI_GOLF_PLAYER: vehicle_visual_mini_golf_player(x, imageDirection, y, z, vehicle); break; + case VEHICLE_VISUAL_MINI_GOLF_BALL: vehicle_visual_mini_golf_ball(x, imageDirection, y, z, vehicle); break; case VEHICLE_VISUAL_REVERSER: vehicle_visual_reverser(x, imageDirection, y, z, vehicle, vehicleEntry); break; case VEHICLE_VISUAL_SPLASH_BOATS_OR_WATER_COASTER: vehicle_visual_splash_boats_or_water_coaster(x, imageDirection, y, z, vehicle, vehicleEntry); break; case VEHICLE_VISUAL_ROTO_DROP: vehicle_visual_roto_drop(x, imageDirection, y, z, vehicle, vehicleEntry); break; diff --git a/src/ride/vehicle_paint.h b/src/ride/vehicle_paint.h index 99fe93de06..3f92d9138e 100644 --- a/src/ride/vehicle_paint.h +++ b/src/ride/vehicle_paint.h @@ -42,7 +42,7 @@ void vehicle_visual_launched_freefall(int x, int imageDirection, int y, int z, r void vehicle_visual_splash_effect(int z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); void vehicle_visual_virginia_reel(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); void vehicle_visual_submarine(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, int rct2VehiclePtrFormat); -void vehicle_visual_mini_golf_ball(int x, int imageDirection, int y, int z, rct_vehicle *vehicle, int rct2VehiclePtrFormat); +void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rct_vehicle *vehicle); +void vehicle_visual_mini_golf_ball(int x, int imageDirection, int y, int z, rct_vehicle *vehicle); #endif