From c3c645ceac878cf7f5c1a3d47b01770bb61cfe19 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 3 Sep 2017 15:02:47 -0400 Subject: sub_804D6BC --- src/trade.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/trade.c b/src/trade.c index f48a5d902..84640fbf0 100644 --- a/src/trade.c +++ b/src/trade.c @@ -3172,6 +3172,27 @@ static bool8 sub_804ABF8(void) asm(".section .text.sub_804DAD4"); +void sub_804D6BC(struct Sprite *sprite) +{ + sprite->pos1.y += sprite->data0 / 10; + sprite->data5 += sprite->data1; + sprite->pos1.x = sprite->data5 / 10; + if (sprite->pos1.y > 0x4c) + { + sprite->pos1.y = 0x4c; + sprite->data0 = -(sprite->data0 * sprite->data2) / 100; + sprite->data3 ++; + } + if (sprite->pos1.x == 0x78) + sprite->data1 = 0; + sprite->data0 += sprite->data4; + if (sprite->data3 == 4) + { + sprite->data7 = 1; + sprite->callback = SpriteCallbackDummy; + } +} + void sub_804D738(struct Sprite *sprite) { sprite->pos2.y += gTradeBallVerticalVelocityTable[sprite->data0]; -- cgit v1.2.3