Matched sub_080322E8

By @ShantyTown#6258 in discord.
This commit is contained in:
Ibot02 2020-08-18 11:14:37 +02:00
parent 624dfdb282
commit 68ea79b8fc
2 changed files with 10 additions and 59 deletions

View File

@ -1,48 +0,0 @@
.syntax unified
.text
push {lr}
adds r3, r0, #0
adds r2, r3, #0
adds r2, #0x78
ldrb r0, [r2]
cmp r0, #0
beq _08032316
subs r0, #1
strb r0, [r2]
lsls r0, r0, #0x18
cmp r0, #0
bne _08032334
ldrb r2, [r3, #0x18]
lsls r1, r2, #0x19
lsrs r1, r1, #0x1f
movs r0, #1
eors r1, r0
lsls r1, r1, #6
subs r0, #0x42
ands r0, r2
orrs r0, r1
strb r0, [r3, #0x18]
b _08032334
_08032316:
ldrb r1, [r3, #0x15]
movs r0, #0xf
ands r0, r1
cmp r0, #0
beq _08032334
lsrs r1, r1, #4
movs r0, #1
eors r1, r0
ldrb r0, [r3, #0x18]
lsls r0, r0, #0x19
lsrs r0, r0, #0x1f
cmp r1, r0
beq _08032334
movs r0, #6
strb r0, [r2]
_08032334:
pop {pc}
.align 2, 0
.syntax divided

View File

@ -545,25 +545,24 @@ u32 sub_080322A4(Entity* this) {
return 0; return 0;
} }
#if NON_MATCHING
void sub_080322E8(Entity* this) { void sub_080322E8(Entity* this) {
u8 tmp;
if (this->field_0x78.HALF.LO) { if (this->field_0x78.HALF.LO) {
if (--this->field_0x78.HALF.LO == 0) { if (--this->field_0x78.HALF.LO == 0) {
this->spriteSettings.b.flipX = this->spriteOrientation.flipX; u32 flipX = this->spriteSettings.b.flipX;
this->spriteSettings.b.flipX = flipX ^ 1;
} }
} else { } else {
if ((this->direction & 0xf) && tmp = this->direction;
((this->direction >> 4 ^ 1) != -((int)((u32)this->spriteSettings.raw << 0x19) >> 0x1f))) { if (tmp & 0xF) {
this->field_0x78.HALF.LO = 6; tmp >>= 4;
tmp ^= 1;
if (tmp != this->spriteSettings.b.flipX) {
this->field_0x78.HALF.LO = 6;
}
} }
} }
} }
#else
NAKED
void sub_080322E8(Entity* this) {
asm(".include \"asm/non_matching/acroBandits/sub_080322E8.inc\"");
}
#endif
void sub_08032338(Entity *this) { void sub_08032338(Entity *this) {
if ((((Entity*)this->field_0x7c.WORD)->actionDelay += 15) != 80) if ((((Entity*)this->field_0x7c.WORD)->actionDelay += 15) != 80)