Merge pull request #308 from hatal175/enemy66

This commit is contained in:
notyourav 2022-01-21 11:09:21 -08:00 committed by GitHub
commit aa5150f360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 52 deletions

View File

@ -1,30 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Enemy66
Enemy66: @ 0x08049CAC
push {lr}
adds r2, r0, #0
ldr r1, _08049CC8 @ =gUnk_080D2ABC
ldrb r0, [r2, #0xf]
lsls r0, r0, #2
adds r0, r0, r1
ldr r1, [r0]
cmp r1, #0
beq _08049CCC
adds r0, r2, #0
bl _call_via_r1
b _08049CD0
.align 2, 0
_08049CC8: .4byte gUnk_080D2ABC
_08049CCC:
bl DeleteThisEntity
_08049CD0:
pop {pc}
.align 2, 0

View File

@ -29335,16 +29335,6 @@
"start": 862648,
"size": 8
},
{
"path": "enemy66/gUnk_080D2ABC.bin",
"start": 862908,
"size": 88
},
{
"path": "enemy66/gUnk_080D2ABC_1.bin",
"start": 863000,
"size": 320
},
{
"path": "data_080D3D94/gUnk_080D3D94.bin",
"start": 867732,

View File

@ -1,10 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_080D2ABC:: @ 080D2ABC
.incbin "enemy66/gUnk_080D2ABC.bin"
.4byte sub_08029270
.incbin "enemy66/gUnk_080D2ABC_1.bin"

View File

@ -425,7 +425,7 @@ SECTIONS {
src/enemy/gyorgFemaleMouth.o(.text);
asm/enemy/enemy64.o(.text);
src/enemy/treeItem.o(.text);
asm/enemy/enemy66.o(.text);
src/enemy/enemy66.o(.text);
/* END enemies */
src/code_08049CD4.o(.text); /* enemyUtils.c */
asm/code_08049D30.o(.text);
@ -1117,7 +1117,7 @@ SECTIONS {
data/animations/enemy/gyorgFemaleMouth.o(.rodata);
data/const/enemy/enemy64.o(.rodata);
src/enemy/treeItem.o(.rodata);
data/const/enemy/enemy66.o(.rodata);
src/enemy/enemy66.o(.rodata);
src/enemy.o(.rodata);
data/data_080D3D94.o(.rodata);
data/map/entity_headers.o(.rodata);

16
src/enemy/enemy66.c Normal file
View File

@ -0,0 +1,16 @@
#include "entity.h"
void (*const gUnk_080D2ABC[])(Entity*);
extern void sub_08029270(Entity* this);
void Enemy66(Entity* this) {
if (gUnk_080D2ABC[this->field_0xf]) {
gUnk_080D2ABC[this->field_0xf](this);
} else {
DeleteThisEntity();
}
}
void (*const gUnk_080D2ABC[103])(Entity*) = {
[22] = sub_08029270,
};