summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xasm/sunlight.s33
-rw-r--r--ld_script.txt2
-rw-r--r--src/battle/anim/sunlight.c17
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);
+}