summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-10-15 14:01:09 -0400
committerscnorton <scnorton@biociphers.org>2017-10-15 14:01:09 -0400
commit270ed12126feb679f5fc818d33da56f65ae9fa98 (patch)
tree05c20ea635c3b1c206db860366929fd55a670ff5 /src
parentfaea6fd64a4dc8332f6b6171f52c6055e21c3e27 (diff)
sub_8123EB8
Diffstat (limited to 'src')
-rw-r--r--src/scene/cable_car.c36
1 files changed, 36 insertions, 0 deletions
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);
+ }
+ }
+}