summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-09-03 14:19:14 -0400
committerscnorton <scnorton@biociphers.org>2017-09-03 14:19:14 -0400
commit168cfdab081db37a7b27ed1a2dee88983c84e13b (patch)
tree01067340ec60d98727a2687844a48cee6cb6f20b /src
parent1512aee2335dc7f47a4cbb822791f27351b6f1ef (diff)
sub_804D80C
Diffstat (limited to 'src')
-rw-r--r--src/trade.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/trade.c b/src/trade.c
index 960a1b6bc..efafe278c 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -3171,6 +3171,31 @@ static bool8 sub_804ABF8(void)
asm(".section .text.sub_804DAD4");
+void sub_804D80C(struct Sprite *sprite)
+{
+ if (sprite->data2 == 0)
+ {
+ if ((sprite->pos1.y += 4) > sprite->data3)
+ {
+ sprite->data2 ++;
+ sprite->data0 = 0x16;
+ PlaySE(SE_KON);
+ }
+ }
+ else
+ {
+ if (sprite->data0 == 0x42)
+ PlaySE(SE_KON2);
+ if (sprite->data0 == 0x5c)
+ PlaySE(SE_KON3);
+ if (sprite->data0 == 0x6b)
+ PlaySE(SE_KON4);
+ sprite->pos2.y += gTradeBallVerticalVelocityTable[sprite->data0];
+ if (++sprite->data0 == 0x6c)
+ sprite->callback = SpriteCallbackDummy;
+ }
+}
+
u16 sub_804D89C(void)
{
const struct InGameTrade *inGameTrade = &gIngameTrades[gSpecialVar_0x8004];