From bd45e6acb85fe854f58db5aa99f4004379765513 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 25 Nov 2017 02:42:34 -0500 Subject: split battle_anim_80CA710.c (todo: split asm) --- src/anim/sword.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 src/anim/sword.c (limited to 'src/anim/sword.c') diff --git a/src/anim/sword.c b/src/anim/sword.c new file mode 100755 index 000000000..536f89b26 --- /dev/null +++ b/src/anim/sword.c @@ -0,0 +1,30 @@ +#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; + +static void sub_80CF6B4(struct Sprite* sprite); + +// sword (sword appears and floats upward.) +// Used in Swords Dance. + +void sub_80CF690(struct Sprite* sprite) +{ + sub_80787B0(sprite, 0); + sprite->callback = sub_80785E4; + StoreSpriteCallbackInData(sprite, sub_80CF6B4); +} + +void sub_80CF6B4(struct Sprite* sprite) +{ + sprite->data[0] = 6; + sprite->data[2] = sprite->pos1.x; + sprite->data[4] = sprite->pos1.y - 32; + sprite->callback = sub_8078B34; + StoreSpriteCallbackInData(sprite, move_anim_8072740); +} -- cgit v1.2.3