Match keaton/sub_08032574

This commit is contained in:
Marcus Huderle 2020-08-08 09:06:54 -05:00
parent 10819392f7
commit 2c0b39832e
2 changed files with 13 additions and 67 deletions

View File

@ -1,50 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
push {r4, r5, lr}
adds r4, r0, #0
ldr r0, [r4, #0x54]
cmp r0, #0
beq _0803258A
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x80
ands r0, r1
cmp r0, #0
bne _080325A4
_0803258A:
adds r5, r4, #0
adds r5, #0x76
ldrh r0, [r5]
subs r0, #1
strh r0, [r5]
lsls r0, r0, #0x10
cmp r0, #0
beq _080325A4
adds r0, r4, #0
bl sub_080AEFE0
cmp r0, #0
bne _080325AC
_080325A4:
adds r0, r4, #0
bl sub_0803275C
b _080325C2
_080325AC:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
ldrh r1, [r5]
movs r0, #7
ands r0, r1
cmp r0, #0
bne _080325C2
adds r0, r4, #0
bl sub_08032794
_080325C2:
pop {r4, r5, pc}
.align 2, 0
.syntax divided

View File

@ -115,26 +115,22 @@ void sub_080324FC(Entity* this) {
}
}
#if NON_MATCHING // r4-r5 register swap
void sub_08032574(Entity* this) {
if (this->attachedEntity == NULL || !(this->attachedEntity->bitfield & 0x80)) {
(this->field_0x76)--;
if ((this->field_0x76 == 0) || (sub_080AEFE0(this) == 0)) {
sub_0803275C(this);
} else {
UpdateAnimationSingleFrame(this);
if (!(this->field_0x76 & 0x7)) {
sub_08032794(this);
}
}
if (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)) {
sub_0803275C(this);
return;
}
if (--this->field_0x76 == 0 || !sub_080AEFE0(this)) {
sub_0803275C(this);
return;
}
UpdateAnimationSingleFrame(this);
if ((this->field_0x76 & 0x7) == 0) {
sub_08032794(this);
}
}
#else
NAKED
void sub_08032574(Entity* this) {
asm(".include \"asm/non_matching/keaton/sub_08032574.inc\"");
}
#endif
void sub_080325C4(Entity* this) {
this->actionDelay--;