From e4cd697f54cc1a56890eb89ef205e31ac3712681 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Tue, 15 Mar 2022 01:36:01 +0200 Subject: [PATCH] Decompile objectA7 --- asm/object/objectA7.s | 34 ---------------------------------- linker.ld | 2 +- src/object/objectA7.c | 11 +++++++++++ 3 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 asm/object/objectA7.s create mode 100644 src/object/objectA7.c diff --git a/asm/object/objectA7.s b/asm/object/objectA7.s deleted file mode 100644 index 32d19498..00000000 --- a/asm/object/objectA7.s +++ /dev/null @@ -1,34 +0,0 @@ - .include "asm/macros.inc" - - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start ObjectA7 -ObjectA7: @ 0x0809F9AC - push {r4, lr} - adds r4, r0, #0 - ldrb r0, [r4, #0xc] - cmp r0, #0 - bne _0809F9D2 - movs r0, #1 - strb r0, [r4, #0xc] - adds r2, r4, #0 - adds r2, #0x29 - ldrb r1, [r2] - subs r0, #9 - ands r0, r1 - movs r1, #6 - orrs r0, r1 - strb r0, [r2] - adds r0, r4, #0 - movs r1, #0 - bl InitializeAnimation -_0809F9D2: - adds r0, r4, #0 - bl GetNextFrame - pop {r4, pc} - .align 2, 0 diff --git a/linker.ld b/linker.ld index ba0ed04e..95ee0a28 100644 --- a/linker.ld +++ b/linker.ld @@ -791,7 +791,7 @@ SECTIONS { src/object/minishLight.o(.text); asm/object/fireballChain.o(.text); asm/object/objectA6.o(.text); - asm/object/objectA7.o(.text); + src/object/objectA7.o(.text); src/object/objectA8.o(.text); asm/object/objectA9.o(.text); src/object/waterfallOpening.o(.text); diff --git a/src/object/objectA7.c b/src/object/objectA7.c new file mode 100644 index 00000000..bfcd80ab --- /dev/null +++ b/src/object/objectA7.c @@ -0,0 +1,11 @@ +#define NENT_DEPRECATED +#include "entity.h" + +void ObjectA7(Entity* this) { + if (this->action == 0) { + this->action = 1; + this->spritePriority.b0 = 6; + InitializeAnimation(this, 0); + } + GetNextFrame(this); +}