From 853b1c79b2abdcc9682c36acf3368f674fc62f29 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 20 Aug 2016 22:59:59 +0200 Subject: [PATCH] Integrate stru_9A3AC4 --- src/ride/vehicle.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 87efd57abe..512c69e9a8 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -2841,6 +2841,26 @@ static void vehicle_update_collision_setup(rct_vehicle* vehicle) { vehicle->velocity = 0; } +/** rct2: 0x009A3AC4, 0x009A3AC6 */ +static const rct_xy16 stru_9A3AC4[] = { + { -256, 0 }, + { -236, 98 }, + { -181, 181 }, + { -98, 236 }, + { 0, 256 }, + { 98, 236 }, + { 181, 181 }, + { 236, 98 }, + { 256, 0 }, + { 236, -98 }, + { 181, -181 }, + { 98, -236 }, + { 0, -256 }, + { -98, -236 }, + { -181, -181 }, + { -236, -98 }, +}; + /** * * rct2: 0x006D9EFE @@ -2868,8 +2888,8 @@ static void vehicle_update_crash_setup(rct_vehicle* vehicle) { lastVehicle = trainVehicle; trainVehicle->sub_state = 0; - int x = RCT2_ADDRESS(0x009A3AC4, sint16)[trainVehicle->sprite_direction & 0xFE]; - int y = RCT2_ADDRESS(0x009A3AC6, sint16)[trainVehicle->sprite_direction & 0xFE]; + int x = stru_9A3AC4[trainVehicle->sprite_direction / 2].x; + int y = stru_9A3AC4[trainVehicle->sprite_direction / 2].y; int ecx = RCT2_ADDRESS(0x009A37E4, sint32)[trainVehicle->vehicle_sprite_type] >> 15; x *= ecx;