diff --git a/asm/miniFireballGuy.s b/asm/miniFireballGuy.s deleted file mode 100644 index d72b24f6..00000000 --- a/asm/miniFireballGuy.s +++ /dev/null @@ -1,55 +0,0 @@ - .include "asm/macros.inc" - - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_08045678 -sub_08045678: @ 0x08045678 - push {r4, r5, lr} - adds r5, r0, #0 - movs r0, #0xe0 - lsls r0, r0, #9 - str r0, [r5, #0x20] - ldrb r0, [r5, #0xe] - cmp r0, #0 - beq _0804568E - subs r0, #1 - strb r0, [r5, #0xe] - b _080456D4 -_0804568E: - bl Random - movs r1, #3 - ands r0, r1 - strb r0, [r5, #0xe] - adds r0, r5, #0 - bl sub_08049FA0 - cmp r0, #0 - bne _080456CA - bl Random - movs r1, #3 - ands r1, r0 - cmp r1, #0 - beq _080456CA - adds r0, r5, #0 - bl sub_08049EE4 - adds r4, r0, #0 - bl Random - movs r1, #8 - ands r0, r1 - adds r0, #0xfc - adds r4, r4, r0 - movs r0, #0x18 - ands r4, r0 - strb r4, [r5, #0x15] - b _080456D4 -_080456CA: - bl Random - movs r1, #0x18 - ands r0, r1 - strb r0, [r5, #0x15] -_080456D4: - pop {r4, r5, pc} - .align 2, 0 diff --git a/linker.ld b/linker.ld index f701aa1a..47e9a0ab 100644 --- a/linker.ld +++ b/linker.ld @@ -315,7 +315,7 @@ SECTIONS { asm/drawHealth.o(.text); asm/sub_0801C824.o(.text); asm/code_0801C85C.o(.text); - src/ezloReminder.o(.text); + src/ezloNag.o(.text); asm/code_0801CEC0.o(.text); src/dma.o(.text); asm/sub_0801D66C.o(.text); @@ -418,7 +418,6 @@ SECTIONS { asm/miniSlime.o(.text); asm/fireballGuy.o(.text); src/enemy/miniFireballGuy.o(.text); - asm/miniFireballGuy.o(.text); asm/enemy5A.o(.text); asm/businessScrubPrologue.o(.text); asm/gyorgFemale.o(.text); diff --git a/src/enemy/miniFireballGuy.c b/src/enemy/miniFireballGuy.c index a4c169d7..9ca6ad24 100644 --- a/src/enemy/miniFireballGuy.c +++ b/src/enemy/miniFireballGuy.c @@ -56,4 +56,21 @@ void sub_08045654(Entity *this) if (sub_08003FC4(this, 0x1800) == 0) { sub_08045678(this); } +} + +void sub_08045678(Entity *this) +{ + + this->field_0x20 = 0x1c000; + if (this->actionDelay != 0) { + this->actionDelay--; + } else { + this->actionDelay = Random() & 3; + if ((sub_08049FA0(this) == 0) && (Random() & 3)) { + this->direction = (sub_08049EE4(this) - 4 + (Random() & 8)) & 0x18; + } + else { + this->direction = Random() & 0x18; + } + } } \ No newline at end of file