Merge pull request #279 from nonmatch/patch-13

Match sub_08068190
This commit is contained in:
notyourav 2022-01-11 19:46:38 -08:00 committed by GitHub
commit 410ea3871a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 93 deletions

View File

@ -1,84 +0,0 @@
.syntax unified
push {r4, r5, lr}
adds r4, r0, #0
ldrb r1, [r4, #0x10]
movs r0, #2
ands r0, r1
cmp r0, #0
bne _08064ABC
ldr r0, _08064AB8 @ =gUnk_0810FA44
ldrb r1, [r4, #0xc]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
adds r0, r4, #0
bl sub_0806ED78
b _08064B42
.align 2, 0
_08064AB8: .4byte gUnk_0810FA44
_08064ABC:
ldrb r1, [r4, #0xc]
adds r5, r1, #0
cmp r5, #0
bne _08064AE4
ldr r1, _08064AE0 @ =gUnk_0810FA38
adds r0, r4, #0
bl LoadExtraSpriteData
cmp r0, #0
beq _08064B42
movs r0, #1
strb r0, [r4, #0xc]
strb r5, [r4, #0xe]
adds r0, r4, #0
bl sub_0807DD50
b _08064B42
.align 2, 0
_08064AE0: .4byte gUnk_0810FA38
_08064AE4:
movs r0, #0x80
ands r0, r1
lsls r0, r0, #0x18
lsrs r3, r0, #0x18
cmp r3, #0
beq _08064B00
adds r0, r4, #0
bl UpdateFuseInteraction
cmp r0, #0
beq _08064B42
movs r0, #1
strb r0, [r4, #0xc]
b _08064B42
_08064B00:
adds r2, r4, #0
adds r2, #0x39
movs r0, #0
ldrsb r0, [r2, r0]
cmp r0, #2
bne _08064B34
movs r0, #0xff
orrs r0, r1
strb r0, [r4, #0xc]
strb r3, [r2]
ldr r1, _08064B30 @ =gPlayerEntity
adds r0, r4, #0
bl GetFacingDirection
bl sub_0806F5A4
adds r1, r0, #0
adds r0, r4, #0
bl InitAnimationForceUpdate
adds r0, r4, #0
bl sub_0806F118
b _08064B42
.align 2, 0
_08064B30: .4byte gPlayerEntity
_08064B34:
adds r0, r4, #0
movs r1, #0
bl sub_0807DD94
adds r0, r4, #0
bl sub_08064C9C
_08064B42:
pop {r4, r5, pc}
.syntax divided

View File

@ -13,29 +13,27 @@ void sub_08064CC0(Entity* this);
extern void (*const gUnk_0810FA44[])(Entity*);
void sub_08064C9C(Entity* this);
NONMATCH("asm/non_matching/sturgeon/Sturgeon.inc", void Sturgeon(Entity* this)) {
u8 uVar2;
void Sturgeon(Entity* this) {
if ((this->flags & 2) == 0) {
gUnk_0810FA44[this->action](this);
sub_0806ED78(this);
} else {
uVar2 = this->action;
if (uVar2 == 0) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810FA38) != 0) {
this->action = 1;
this->actionDelay = 0;
sub_0807DD50(this);
}
} else {
if ((uVar2 & 0x80) != 0) {
u32 tmp = this->action & 0x80;
if (tmp) {
if (UpdateFuseInteraction(this) != 0) {
this->action = 1;
}
} else {
if (this->interactType == 2) {
this->action = 0xff;
this->interactType = uVar2 & 0x80;
this->action = this->action | 0xff;
this->interactType = tmp;
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
sub_0806F118(this);
} else {
@ -46,7 +44,6 @@ NONMATCH("asm/non_matching/sturgeon/Sturgeon.inc", void Sturgeon(Entity* this))
}
}
}
END_NONMATCH
void sub_08064B44(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_0810FA38) != 0) {