summaryrefslogtreecommitdiff
path: root/src/anim/drum.c
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-25 02:42:34 -0500
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-25 02:42:34 -0500
commitbd45e6acb85fe854f58db5aa99f4004379765513 (patch)
treea4d58cc8ab37dec959602bb5e08a29c22ac7091f /src/anim/drum.c
parent75cef1d9b80094ef5b875efac3ae0f0cb1ada165 (diff)
split battle_anim_80CA710.c (todo: split asm)
Diffstat (limited to 'src/anim/drum.c')
-rwxr-xr-xsrc/anim/drum.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/anim/drum.c b/src/anim/drum.c
new file mode 100755
index 000000000..60cb2acc1
--- /dev/null
+++ b/src/anim/drum.c
@@ -0,0 +1,32 @@
+#include "global.h"
+#include "rom_8077ABC.h"
+#include "trig.h"
+#include "battle_anim.h"
+#include "sound.h"
+
+extern s16 gBattleAnimArgs[];
+extern u8 gBattleAnimBankAttacker;
+extern u8 gBattleAnimBankTarget;
+
+// drum (using hands to slap the Pokemon's belly in a rhythm.)
+// Used in Belly Drum.
+
+void sub_80CEDF0(struct Sprite* sprite)
+{
+ s16 a;
+ if (gBattleAnimArgs[0] == 1)
+ {
+ sprite->oam.matrixNum = 8;
+ a = 16;
+ }
+ else
+ {
+ a = -16;
+ }
+
+ sprite->pos1.x = sub_8077ABC(gBattleAnimBankAttacker, 2) + a;
+ sprite->pos1.y = sub_8077ABC(gBattleAnimBankAttacker, 3) + 8;
+ sprite->data[0] = 8;
+ sprite->callback = sub_80782D8;
+ StoreSpriteCallbackInData(sprite, move_anim_8072740);
+}