diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-25 02:42:34 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-25 02:42:34 -0500 |
commit | bd45e6acb85fe854f58db5aa99f4004379765513 (patch) | |
tree | a4d58cc8ab37dec959602bb5e08a29c22ac7091f /src/anim/sword.c | |
parent | 75cef1d9b80094ef5b875efac3ae0f0cb1ada165 (diff) |
split battle_anim_80CA710.c (todo: split asm)
Diffstat (limited to 'src/anim/sword.c')
-rwxr-xr-x | src/anim/sword.c | 30 |
1 files changed, 30 insertions, 0 deletions
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); +} |