From 270ed12126feb679f5fc818d33da56f65ae9fa98 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 15 Oct 2017 14:01:09 -0400 Subject: sub_8123EB8 --- src/scene/cable_car.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src') diff --git a/src/scene/cable_car.c b/src/scene/cable_car.c index 30002bb47..ee26d730b 100644 --- a/src/scene/cable_car.c +++ b/src/scene/cable_car.c @@ -513,3 +513,39 @@ void sub_8123D98(struct Sprite *sprite) } } } + +void sub_8123EB8(struct Sprite *sprite) +{ + if (sprite->data0 == 0) + { + sprite->pos1.x += 2 * sprite->centerToCornerVecX; + sprite->pos1.y += 16 + sprite->centerToCornerVecY; + } + if (++ sprite->data0 >= sprite->data2) + { + switch (sprite->data1) + { + case 0: + sprite->pos1.x ++; + if ((sprite->data0 % 4) == 0) + { + sprite->pos1.y ++; + } + break; + case 1: + if ((sprite->data0 % 2) != 0) + { + sprite->pos1.x ++; + if ((sprite->pos1.x % 4) == 0) + { + sprite->pos1.y ++; + } + } + break; + } + if (sprite->pos1.y > 0xa0) + { + DestroySprite(sprite); + } + } +} -- cgit v1.2.3