summaryrefslogtreecommitdiff
path: root/src/trade.c
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-09-03 15:02:47 -0400
committerscnorton <scnorton@biociphers.org>2017-09-03 15:02:47 -0400
commitc3c645ceac878cf7f5c1a3d47b01770bb61cfe19 (patch)
treed097a497b0fc039d549532eec04a3cbe165cb238 /src/trade.c
parentfc135f6e97ff780f1aba4c5ce8d22f450a5cf5c4 (diff)
sub_804D6BC
Diffstat (limited to 'src/trade.c')
-rw-r--r--src/trade.c21
1 files changed, 21 insertions, 0 deletions
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];