summaryrefslogtreecommitdiff
path: root/src/battle/anim/thrashing.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-04-30 13:42:55 -0700
committerGitHub <noreply@github.com>2018-04-30 13:42:55 -0700
commit74f9ec9464e5346ae277c9c929ef4b965276fc02 (patch)
tree6e12c5e3f456ad444d37853f0bb8e0a03bd85003 /src/battle/anim/thrashing.c
parente437b10eee6f843e1898ce9b0302afb17f8b81e9 (diff)
parentd68e8b09eecd136fc0dcc32c1e08b946b8981adc (diff)
Merge pull request #608 from huderlem/anim_rodata
Move battle anim .rodata
Diffstat (limited to 'src/battle/anim/thrashing.c')
-rw-r--r--src/battle/anim/thrashing.c18
1 files changed, 13 insertions, 5 deletions
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)