sub_818E704
This commit is contained in:
parent
bf4319f25e
commit
25ffdf7342
2 changed files with 59 additions and 73 deletions
|
@ -5,78 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_818E704
|
||||
sub_818E704: @ 818E704
|
||||
push {r4,r5,lr}
|
||||
adds r2, r0, 0
|
||||
movs r3, 0
|
||||
movs r4, 0
|
||||
ldr r1, =gUnknown_0203CD6C
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r5, =0x00003b58
|
||||
adds r0, r5
|
||||
str r0, [r1]
|
||||
ldrb r0, [r0, 0xD]
|
||||
adds r5, r1, 0
|
||||
cmp r0, 0x4
|
||||
bhi _0818E76A
|
||||
lsls r0, 2
|
||||
ldr r1, =_0818E73C
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_0818E73C:
|
||||
.4byte _0818E750
|
||||
.4byte _0818E754
|
||||
.4byte _0818E758
|
||||
.4byte _0818E75C
|
||||
.4byte _0818E760
|
||||
_0818E750:
|
||||
ldrb r0, [r2, 0x1]
|
||||
b _0818E762
|
||||
_0818E754:
|
||||
ldrb r0, [r2, 0x2]
|
||||
b _0818E762
|
||||
_0818E758:
|
||||
ldrb r0, [r2, 0x3]
|
||||
b _0818E762
|
||||
_0818E75C:
|
||||
ldrb r0, [r2, 0x4]
|
||||
b _0818E762
|
||||
_0818E760:
|
||||
ldrb r0, [r2, 0x5]
|
||||
_0818E762:
|
||||
cmp r0, 0
|
||||
beq _0818E76A
|
||||
adds r3, r0, 0
|
||||
movs r4, 0x1
|
||||
_0818E76A:
|
||||
cmp r4, 0x1
|
||||
bne _0818E784
|
||||
adds r0, r3, 0
|
||||
bl sub_818E6B0
|
||||
ldr r0, =gUnknown_0203CD6C
|
||||
ldr r1, [r0]
|
||||
ldrb r0, [r1, 0x2]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1, 0x2]
|
||||
b _0818E78C
|
||||
.pool
|
||||
_0818E784:
|
||||
ldr r1, [r5]
|
||||
ldrb r0, [r1, 0x3]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1, 0x3]
|
||||
_0818E78C:
|
||||
adds r0, r4, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_818E704
|
||||
|
||||
thumb_func_start sub_818E794
|
||||
sub_818E794: @ 818E794
|
||||
push {r4,r5,lr}
|
||||
|
|
|
@ -755,4 +755,62 @@ void sub_818E6B0(u8 sheen)
|
|||
memcpy(gUnknown_0203CD6C->playerName, gSaveBlock2Ptr->playerName, sizeof(gUnknown_0203CD6C->playerName));
|
||||
gUnknown_0203CD6C->language = gGameLanguage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_818E704(struct Pokeblock *pokeblock)
|
||||
{
|
||||
u8 sheen;
|
||||
bool8 response;
|
||||
|
||||
sheen = 0;
|
||||
response = FALSE;
|
||||
gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||
switch (gUnknown_0203CD6C->category)
|
||||
{
|
||||
case 0:
|
||||
if (pokeblock->spicy != 0)
|
||||
{
|
||||
sheen = pokeblock->spicy;
|
||||
response = TRUE;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (pokeblock->dry != 0)
|
||||
{
|
||||
sheen = pokeblock->dry;
|
||||
response = TRUE;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (pokeblock->sweet != 0)
|
||||
{
|
||||
sheen = pokeblock->sweet;
|
||||
response = TRUE;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (pokeblock->bitter != 0)
|
||||
{
|
||||
sheen = pokeblock->bitter;
|
||||
response = TRUE;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (pokeblock->sour != 0)
|
||||
{
|
||||
sheen = pokeblock->sour;
|
||||
response = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (response == TRUE)
|
||||
{
|
||||
sub_818E6B0(sheen);
|
||||
gUnknown_0203CD6C->fave_pkblk ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_0203CD6C->other_pkblk ++;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue