Match sub_08054A60

This commit is contained in:
hatal175 2022-01-09 10:49:00 +01:00
parent 7b87141d9b
commit b26882d9b5
2 changed files with 2 additions and 53 deletions

View File

@ -1,50 +0,0 @@
.syntax unified
push {r4, lr}
adds r4, r0, #0
ldrb r1, [r4, #0x10]
movs r0, #0xa0
orrs r0, r1
strb r0, [r4, #0x10]
movs r0, #1
strb r0, [r4, #0xc]
movs r0, #4
strb r0, [r4, #0xe]
movs r0, #0xff
strb r0, [r4, #0x1e]
ldrb r1, [r4, #0x11]
movs r0, #0x10
rsbs r0, r0, #0
ands r0, r1
movs r1, #6
orrs r0, r1
strb r0, [r4, #0x11]
adds r1, r4, #0
adds r1, #0x3c
movs r0, #7
strb r0, [r1]
subs r1, #1
movs r0, #0x80
strb r0, [r1]
ldr r0, _08054AC4 @ =gPlayerEntity
ldrb r1, [r0, #0x14]
movs r0, #0xe
ands r0, r1
strb r0, [r4, #0x14]
adds r0, r4, #0
bl AllocMutableHitbox
cmp r0, #0
bne _08054AAC
bl DeleteThisEntity
_08054AAC:
adds r0, r4, #0
bl sub_0801766C
adds r0, r4, #0
movs r1, #1
movs r2, #3
bl LoadSwapGFX
adds r0, r4, #0
bl sub_08054AC8
pop {r4, pc}
.align 2, 0
_08054AC4: .4byte gPlayerEntity
.syntax divided

View File

@ -12,13 +12,13 @@ void PlayerItemLantern(Entity* this) {
this->bitfield = 0;
}
NONMATCH("asm/non_matching/playerItemLantern/sub_08054A60.inc", void sub_08054A60(Entity* this)) {
void sub_08054A60(Entity* this) {
this->flags |= 0xa0;
this->action = 0x01;
this->actionDelay = 0x04;
this->frameIndex = -1;
// TODO regalloc and mov 6 too early
this->updatePriority = (this->updatePriority & 0xf0) | 6;
this->updatePriority = 6;
this->field_0x3c = 7;
this->flags2 = -0x80;
this->animationState = gPlayerEntity.animationState & 0xe;
@ -29,6 +29,5 @@ NONMATCH("asm/non_matching/playerItemLantern/sub_08054A60.inc", void sub_08054A6
LoadSwapGFX(this, 1, 3);
sub_08054AC8(this);
}
END_NONMATCH
ASM_FUNC("asm/non_matching/playerItemLantern/sub_08054AC8.inc", void sub_08054AC8(Entity* this))