diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-04-30 13:42:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 13:42:55 -0700 |
commit | 74f9ec9464e5346ae277c9c929ef4b965276fc02 (patch) | |
tree | 6e12c5e3f456ad444d37853f0bb8e0a03bd85003 /src/battle/anim/cube.c | |
parent | e437b10eee6f843e1898ce9b0302afb17f8b81e9 (diff) | |
parent | d68e8b09eecd136fc0dcc32c1e08b946b8981adc (diff) |
Merge pull request #608 from huderlem/anim_rodata
Move battle anim .rodata
Diffstat (limited to 'src/battle/anim/cube.c')
-rw-r--r-- | src/battle/anim/cube.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/battle/anim/cube.c b/src/battle/anim/cube.c index 6fef2de69..9d713ba46 100644 --- a/src/battle/anim/cube.c +++ b/src/battle/anim/cube.c @@ -9,11 +9,47 @@ extern s16 gBattleAnimArgs[]; extern u8 gAnimBankAttacker; extern u8 gAnimBankTarget; +void sub_80CDFB0(struct Sprite* sprite); static void sub_80CE000(struct Sprite* sprite); // cube (shows a sphere sharpening into a cube.) // Used in Sharpen. +const union AnimCmd gSpriteAnim_83D6EB0[] = +{ + ANIMCMD_FRAME(0, 18), + ANIMCMD_FRAME(0, 6), + ANIMCMD_FRAME(16, 18), + ANIMCMD_FRAME(0, 6), + ANIMCMD_FRAME(16, 6), + ANIMCMD_FRAME(32, 18), + ANIMCMD_FRAME(16, 6), + ANIMCMD_FRAME(32, 6), + ANIMCMD_FRAME(48, 18), + ANIMCMD_FRAME(32, 6), + ANIMCMD_FRAME(48, 6), + ANIMCMD_FRAME(64, 18), + ANIMCMD_FRAME(48, 6), + ANIMCMD_FRAME(64, 54), + ANIMCMD_END, +}; + +const union AnimCmd *const gSpriteAnimTable_83D6EEC[] = +{ + gSpriteAnim_83D6EB0, +}; + +const struct SpriteTemplate gBattleAnimSpriteTemplate_83D6EF0 = +{ + .tileTag = 10185, + .paletteTag = 10185, + .oam = &gOamData_837DF34, + .anims = gSpriteAnimTable_83D6EEC, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80CDFB0, +}; + void sub_80CDFB0(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gAnimBankAttacker, 2); @@ -27,7 +63,7 @@ void sub_80CDFB0(struct Sprite* sprite) sprite->callback = sub_80CE000; } -void sub_80CE000(struct Sprite* sprite) +static void sub_80CE000(struct Sprite* sprite) { if (++sprite->data[0] >= sprite->data[1]) { |