From c88cf196af0f099f4daa7cbc06b9b0df9a31c60c Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 29 Apr 2018 12:52:21 -0700 Subject: Move another chunk of battle anim .rodata --- src/battle/anim/thrashing.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/battle/anim/thrashing.c') diff --git a/src/battle/anim/thrashing.c b/src/battle/anim/thrashing.c index bc1fc4842..38dccb83f 100644 --- a/src/battle/anim/thrashing.c +++ b/src/battle/anim/thrashing.c @@ -8,14 +8,22 @@ extern s16 gBattleAnimArgs[]; extern u8 gAnimBankAttacker; extern u8 gAnimBankTarget; -extern struct AffineAnimFrameCmd gUnknown_083D77B0; - static void sub_80D0A8C(u8 taskId); static void sub_80D0B3C(u8 taskId); // thrashing (the movement of the Pokemon left/right repeatedly, with up/down movements below.) // Used by Thrash. +const union AffineAnimCmd gSpriteAffineAnim_83D77B0[] = +{ + AFFINEANIMCMD_FRAME(-10, 9, 0, 7), + AFFINEANIMCMD_FRAME(20, -20, 0, 7), + AFFINEANIMCMD_FRAME(-20, 20, 0, 7), + AFFINEANIMCMD_FRAME(10, -9, 0, 7), + AFFINEANIMCMD_LOOP(2), + AFFINEANIMCMD_END, +}; + // left/right movements void sub_80D0A4C(u8 taskId) { @@ -23,11 +31,11 @@ void sub_80D0A4C(u8 taskId) u8 spriteId = GetAnimBattlerSpriteId(0); task->data[0] = spriteId; task->data[1] = 0; - sub_80798F4(task, spriteId, &gUnknown_083D77B0); + sub_80798F4(task, spriteId, &gSpriteAffineAnim_83D77B0); task->func = sub_80D0A8C; } -void sub_80D0A8C(u8 taskId) +static void sub_80D0A8C(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!sub_807992C(task)) @@ -54,7 +62,7 @@ void sub_80D0AB8(u8 taskId) task->func = sub_80D0B3C; } -void sub_80D0B3C(u8 taskId) +static void sub_80D0B3C(u8 taskId) { struct Task* task = &gTasks[taskId]; if (++task->data[7] > 2) -- cgit v1.2.3