Match sub_0802922C

This commit is contained in:
Tal Hayon 2022-03-28 09:56:31 +03:00
parent c86ada3e3d
commit 1147f99f9b
2 changed files with 9 additions and 36 deletions

View File

@ -1,30 +0,0 @@
.syntax unified
.text
push {r4, lr}
adds r4, r0, #0
movs r0, #0
movs r1, #6
strb r1, [r4, #0xc]
adds r1, r4, #0
adds r1, #0x81
strb r0, [r1]
ldr r0, [r4, #0x7c]
ldrb r0, [r0, #8]
cmp r0, #0x6c
beq _08029252
cmp r0, #0x6c
bgt _08029252
cmp r0, #0x1c
bne _08029252
movs r0, #0x5a
bl SetGlobalFlag
_08029252:
adds r0, r4, #0
movs r1, #3
bl sub_080290E0
pop {r4, pc}
.syntax divided

View File

@ -526,21 +526,24 @@ bool32 sub_080291DC(Entity* this) {
return FALSE;
}
NONMATCH("asm/non_matching/businessScrub/sub_0802922C.inc", void sub_0802922C(Entity* this)) {
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
void sub_0802922C(Entity* this) {
const struct SalesOffering* offer;
this->action = 6;
this->field_0x80.HALF.HI = 0;
offer = (const struct SalesOffering*)this->field_0x7c.WORD;
switch (offer->offeredItem) {
case ITEM_BOTTLE1:
SetGlobalFlag(AKINDO_BOTTLE_SELL);
// It only matters here that ITEM_BOMBS10 is here and some item that is higher
// Not sure about the original code
case ITEM_ARROWS10:
case ITEM_BOMBS10:
default:
sub_080290E0(this, 3);
break;
}
sub_080290E0(this, 3);
}
END_NONMATCH
void sub_0802925C(Entity* this) {
sub_08078784(this, sub_0801E99C(this));