Decompile objectb6

This commit is contained in:
Tal Hayon 2022-03-15 01:38:49 +02:00
parent e4cd697f54
commit c09173448f
3 changed files with 17 additions and 43 deletions

View File

@ -1,42 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start ObjectB6
ObjectB6: @ 0x080A0E54
push {r4, lr}
adds r4, r0, #0
ldr r0, [r4, #0x50]
ldrb r0, [r0, #0xd]
cmp r0, #3
bls _080A0E64
bl DeleteThisEntity
_080A0E64:
ldrb r0, [r4, #0xc]
cmp r0, #0
bne _080A0E76
movs r0, #1
strb r0, [r4, #0xc]
ldrb r1, [r4, #0xa]
adds r0, r4, #0
bl InitializeAnimation
_080A0E76:
ldr r0, [r4, #0x50]
ldrb r3, [r4, #0xa]
adds r1, r4, #0
movs r2, #0
bl sub_0806FA90
adds r2, r4, #0
adds r2, #0x63
ldrb r0, [r2]
ldrb r1, [r4, #0xa]
subs r0, r0, r1
strb r0, [r2]
adds r0, r4, #0
bl GetNextFrame
pop {r4, pc}
.align 2, 0

View File

@ -806,7 +806,7 @@ SECTIONS {
src/object/objectB3.o(.text);
asm/object/objectB4.o(.text);
src/object/objectB5.o(.text);
asm/object/objectB6.o(.text);
src/object/objectB6.o(.text);
src/object/well.o(.text);
src/object/windTribeTeleporter.o(.text);
asm/object/objectB9.o(.text);

16
src/object/objectB6.c Normal file
View File

@ -0,0 +1,16 @@
#define NENT_DEPRECATED
#include "entity.h"
#include "coord.h"
void ObjectB6(Entity* this) {
if (this->parent->subAction > 3) {
DeleteThisEntity();
}
if (this->action == 0) {
this->action = 1;
InitializeAnimation(this, this->type);
}
sub_0806FA90(this->parent, this, 0, this->type);
this->spriteOffsetY = this->spriteOffsetY - this->type;
GetNextFrame(this);
}