Decompile object76

This commit is contained in:
Tal Hayon 2022-03-14 11:59:31 +02:00
parent 5035a3cc39
commit 34453788ab
4 changed files with 16 additions and 32 deletions

View File

@ -1,21 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Object76
Object76: @ 0x0808C94C
push {lr}
ldr r2, _0808C960 @ =gUnk_08121678
ldrb r1, [r0, #0xc]
lsls r1, r1, #2
adds r1, r1, r2
ldr r1, [r1]
bl _call_via_r1
pop {pc}
.align 2, 0
_0808C960: .4byte gUnk_08121678

View File

@ -1,9 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08121678:: @ 08121678
.4byte sub_0808C964
.4byte sub_0808CA10

View File

@ -681,7 +681,7 @@ SECTIONS {
src/object/object3A.o(.text);
src/object/macroMushroomStalks.o(.text);
src/object/object75.o(.text); /* 75 and 76 are mislocated in object table */
asm/object/object76.o(.text);
src/object/object76.o(.text);
asm/object/code_0808C964.o(.text);
src/object/macroPlayer.o(.text);
src/object/object3D.o(.text);
@ -1414,7 +1414,7 @@ SECTIONS {
src/object/object3A.o(.rodata);
src/object/macroMushroomStalks.o(.rodata);
src/object/object75.o(.rodata);
data/const/object/object76.o(.rodata);
src/object/object76.o(.rodata);
src/object/macroPlayer.o(.rodata);
src/object/object3D.o(.rodata);
src/object/object3E.o(.rodata);

14
src/object/object76.c Normal file
View File

@ -0,0 +1,14 @@
#define NENT_DEPRECATED
#include "entity.h"
extern void sub_0808C964(Entity*);
extern void sub_0808CA10(Entity*);
void Object76(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_0808C964,
sub_0808CA10,
};
actionFuncs[this->action](this);
}