Merge pull request #278 from nonmatch/patch-12

Match sub_0806265C
This commit is contained in:
notyourav 2022-01-11 19:44:51 -08:00 committed by GitHub
commit 5c3dc144ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 36 deletions

View File

@ -1,33 +0,0 @@
.syntax unified
.text
push {lr}
adds r2, r0, #0
ldr r3, _08062674 @ =gSave
ldrb r0, [r3, #8]
cmp r0, #0
bne _08062678
movs r0, #0
adds r1, r2, #0
bl MessageNoOverlap
b _08062690
.align 2, 0
_08062674: .4byte gSave
_08062678:
ldrb r0, [r2, #0xa]
lsls r1, r0, #3
adds r1, r1, r0
lsls r1, r1, #3
ldr r0, _08062694 @ =gUnk_0810BE10
adds r1, r1, r0
ldrb r0, [r3, #8]
lsls r0, r0, #3
adds r1, r1, r0
adds r0, r2, #0
bl ShowNPCDialogue
_08062690:
pop {pc}
.align 2, 0
_08062694: .4byte gUnk_0810BE10
.syntax divided

View File

@ -198,14 +198,15 @@ void sub_08062634(Entity* this) {
MessageNoOverlap(gUnk_0810BDE8[a][b], this);
}
NONMATCH("asm/non_matching/kid/sub_0806265C.inc", void sub_0806265C(Entity* this, ScriptExecutionContext* context)) {
void sub_0806265C(Entity* this, ScriptExecutionContext* context) {
if (gSave.global_progress == 0) {
MessageNoOverlap(0, this);
} else {
ShowNPCDialogue(this, &gUnk_0810BE10[this->type * 9 + gSave.global_progress]);
Dialog* pDialog = &gUnk_0810BE10[this->type * 9];
pDialog += gSave.global_progress;
ShowNPCDialogue(this, pDialog);
}
}
END_NONMATCH
void sub_08062698(Entity* this) {
this->speed = (Random() & 0x3f) + 0xc0;