summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKDSKardabox <bollygame94@gmail.com>2018-12-08 15:15:52 +0530
committerKDSKardabox <bollygame94@gmail.com>2018-12-08 15:15:52 +0530
commit0f82e5caf7461f797c376da8e2ce375ed3947c3d (patch)
tree86c4e700055b7e5006cac57728313314e611859f
parent6068495619364c8e0ccae15ad036a1b5a9eef171 (diff)
Intial commit for decomp fire
-rw-r--r--asm/fire.s29
-rw-r--r--ld_script.txt1
-rw-r--r--src/fire.c14
3 files changed, 15 insertions, 29 deletions
diff --git a/asm/fire.s b/asm/fire.s
index cd0339b9b..29c226403 100644
--- a/asm/fire.s
+++ b/asm/fire.s
@@ -5,35 +5,6 @@
.text
- thumb_func_start sub_8108EC8
-sub_8108EC8: @ 8108EC8
- push {r4,lr}
- adds r4, r0, 0
- ldr r0, =gBattleAnimArgs
- ldrh r0, [r0]
- strh r0, [r4, 0x2E]
- movs r0, 0x3C
- strh r0, [r4, 0x30]
- movs r0, 0x9
- strh r0, [r4, 0x32]
- movs r0, 0x1E
- strh r0, [r4, 0x34]
- movs r0, 0xFE
- lsls r0, 8
- strh r0, [r4, 0x36]
- ldr r1, =DestroyAnimSprite
- adds r0, r4, 0
- bl StoreSpriteCallbackInData6
- ldr r1, =sub_80A634C
- str r1, [r4, 0x1C]
- adds r0, r4, 0
- bl _call_via_r1
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8108EC8
-
thumb_func_start sub_8108F08
sub_8108F08: @ 8108F08
push {r4,r5,lr}
diff --git a/ld_script.txt b/ld_script.txt
index ddafe6ecf..8137574d1 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -158,6 +158,7 @@ SECTIONS {
asm/battle_anim_effects_1.o(.text);
asm/battle_anim_effects_2.o(.text);
asm/water.o(.text);
+ src/fire.o(.text);
asm/fire.o(.text);
asm/electric.o(.text);
asm/ice.o(.text);
diff --git a/src/fire.c b/src/fire.c
index 02c0db81c..09bdd8d02 100644
--- a/src/fire.c
+++ b/src/fire.c
@@ -436,3 +436,17 @@ const s8 gUnknown_08595694[16] =
{
-1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1,
};
+
+void sub_8108EC8(struct Sprite *sprite)
+{
+ sprite->data[0] = gBattleAnimArgs[0];
+ sprite->data[1] = 0x3C;
+ sprite->data[2] = 0x9;
+ sprite->data[3] = 0x1E;
+ sprite->data[4] = 0xFE00;
+
+ StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
+
+ sprite->callback = sub_80A634C;
+ sprite->callback(sprite);
+} \ No newline at end of file