1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Remove old RCT2 compatibility from vehicle paint

This commit is contained in:
Ted John
2016-09-17 15:58:59 +01:00
parent c2ca1316e8
commit 9f847ca8bb
3 changed files with 6 additions and 9 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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