Match sub_080347B4

This commit is contained in:
hatal175 2022-01-11 21:02:27 +01:00
parent 688508b1af
commit 8ae5153cef
2 changed files with 3 additions and 46 deletions

View File

@ -1,40 +0,0 @@
.syntax unified
push {r4, r5, lr}
adds r2, r0, #0
ldr r0, _080347D8 @ =gPlayerEntity
movs r1, #0x2e
ldrsh r3, [r0, r1]
ldr r0, _080347DC @ =gRoomControls
ldrh r4, [r0, #6]
subs r0, r3, #4
movs r5, #0x2e
ldrsh r1, [r2, r5]
cmp r0, r1
bls _080347E0
adds r0, r4, #0
adds r0, #0xe0
cmp r0, r1
blo _080347F8
movs r0, #8
b _080347F0
.align 2, 0
_080347D8: .4byte gPlayerEntity
_080347DC: .4byte gRoomControls
_080347E0:
adds r0, r3, #4
cmp r0, r1
bhs _080347F8
adds r0, r4, #0
adds r0, #0x90
cmp r0, r1
bhi _080347F8
movs r0, #0x18
_080347F0:
strb r0, [r2, #0x15]
adds r0, r2, #0
bl LinearMoveUpdate
_080347F8:
pop {r4, r5, pc}
.align 2, 0
.syntax divided

View File

@ -571,15 +571,14 @@ NONMATCH("asm/non_matching/mazaal/sub_0803473C.inc", void sub_0803473C(Entity* t
}
END_NONMATCH
NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* this)) {
u32 direction;
void sub_080347B4(Entity* this) {
u32 playerX = gPlayerEntity.x.HALF.HI;
u32 roomX = gRoomControls.origin_x;
if (playerX - 4 > this->x.HALF.HI) {
if (roomX + 0xe0 < this->x.HALF.HI) {
return;
}
direction = 8;
this->direction = 8;
} else {
if (playerX + 4 >= this->x.HALF.HI) {
return;
@ -587,12 +586,10 @@ NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* t
if (roomX + 0x90 > this->x.HALF.HI) {
return;
}
direction = 0x18;
this->direction = 0x18;
}
this->direction = direction;
LinearMoveUpdate(this);
}
END_NONMATCH
void sub_080347FC(Entity* this) {
if ((this->field_0x7c.BYTES.byte1 & 0x10) != 0) {