diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-12-19 12:00:05 -0600 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2017-12-19 12:00:05 -0600 |
commit | 5cdafb90dda83aa270b8fcf34051478da9ec82d9 (patch) | |
tree | 3a23a37a59aa5fbbd1d299d008a0d4711c99f168 | |
parent | 652ea061a1795b78e9b066381df33a53292c8d9a (diff) |
Decompile battle_anim sunlight
-rwxr-xr-x | asm/sunlight.s | 33 | ||||
-rw-r--r-- | ld_script.txt | 2 | ||||
-rw-r--r-- | src/battle/anim/sunlight.c | 17 |
3 files changed, 18 insertions, 34 deletions
diff --git a/asm/sunlight.s b/asm/sunlight.s deleted file mode 100755 index 07895e1b9..000000000 --- a/asm/sunlight.s +++ /dev/null @@ -1,33 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ sunlight - - thumb_func_start sub_80D517C -sub_80D517C: @ 80D517C - push {lr} - movs r1, 0 - strh r1, [r0, 0x20] - strh r1, [r0, 0x22] - movs r1, 0x3C - strh r1, [r0, 0x2E] - movs r1, 0x8C - strh r1, [r0, 0x32] - movs r1, 0x50 - strh r1, [r0, 0x36] - ldr r1, _080D51A0 @ =sub_8078B34 - str r1, [r0, 0x1C] - ldr r1, _080D51A4 @ =move_anim_8072740 - bl StoreSpriteCallbackInData - pop {r0} - bx r0 - .align 2, 0 -_080D51A0: .4byte sub_8078B34 -_080D51A4: .4byte move_anim_8072740 - thumb_func_end sub_80D517C - - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index 440490a69..4c71810d9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -279,7 +279,7 @@ SECTIONS { src/battle/anim/water.o(.text); asm/water.o(.text); asm/fire.o(.text); - asm/sunlight.o(.text); + src/battle/anim/sunlight.o(.text); asm/fire_2.o(.text); asm/heated_rock.o(.text); asm/wisp_orb.o(.text); diff --git a/src/battle/anim/sunlight.c b/src/battle/anim/sunlight.c new file mode 100644 index 000000000..f6cb8a077 --- /dev/null +++ b/src/battle/anim/sunlight.c @@ -0,0 +1,17 @@ +#include "global.h" +#include "battle_anim.h" +#include "rom_8077ABC.h" + +// sunlight (creates sunlight orbs) +// Used in Sunny Day + +void sub_80D517C(struct Sprite *sprite) +{ + sprite->pos1.x = 0; + sprite->pos1.y = 0; + sprite->data[0] = 60; + sprite->data[2] = 140; + sprite->data[4] = 80; + sprite->callback = sub_8078B34; + StoreSpriteCallbackInData(sprite, move_anim_8072740); +} |