From 9127a672291c832f5a763a9dda9227b29726d709 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 14 Aug 2016 00:45:56 +0200 Subject: [PATCH] Integrate data for peep_update_ride_sub_state_15 0x00981F0C, 0x00981F0E, 0x00981F1C, 0x00981F1E --- src/peep/peep.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index 4094fb3ffc..5c6a10db66 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -3407,6 +3407,22 @@ static void peep_update_ride_sub_state_14(rct_peep* peep){ peep->destination_y = y; } +/** rct2: 0x00981F0C, 0x00981F0E */ +static const rct_xy16 _981F0C[] = { + {25, 56}, + {56, 7}, + {7, -24}, + {-24, 25}, +}; + +/** rct2: 0x00981F1C, 0x00981F1E */ +static const rct_xy16 _981F1C[] = { + {8, 56}, + {56, 24}, + {24, -24}, + {-24, 8}, +}; + /** * * rct2: 0x00692D83 @@ -3445,14 +3461,14 @@ static void peep_update_ride_sub_state_15(rct_peep* peep){ y *= 32; uint8 direction = (peep->var_37 / 4) & 3; - sint16 dest_x = x + RCT2_ADDRESS(0x981F1C, sint16)[direction * 2]; - sint16 dest_y = y + RCT2_ADDRESS(0x981F1E, sint16)[direction * 2]; + sint16 dest_x = x + _981F1C[direction].x; + sint16 dest_y = y + _981F1C[direction].y; peep->destination_x = dest_x; peep->destination_y = dest_y; - x += RCT2_ADDRESS(0x981F0C, sint16)[direction * 2]; - y += RCT2_ADDRESS(0x981F0E, sint16)[direction * 2]; + x += _981F0C[direction].x; + y += _981F0C[direction].y; sprite_move(x, y, peep->z, (rct_sprite*)peep);