mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
sub_818E6B0
This commit is contained in:
parent
7c8cbc6b88
commit
bf4319f25e
@ -5,72 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_818E674
|
||||
sub_818E674: @ 818E674
|
||||
push {lr}
|
||||
ldr r2, =gUnknown_0203CD6C
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00003b58
|
||||
adds r0, r1
|
||||
str r0, [r2]
|
||||
movs r3, 0
|
||||
movs r1, 0x2
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
strb r3, [r0, 0x1]
|
||||
ldr r2, [r2]
|
||||
ldrb r0, [r2, 0x2]
|
||||
cmp r0, 0x5
|
||||
beq _0818E69A
|
||||
ldrb r0, [r2, 0x3]
|
||||
cmp r0, 0x5
|
||||
bne _0818E69E
|
||||
_0818E69A:
|
||||
bl sub_818E604
|
||||
_0818E69E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_818E674
|
||||
|
||||
thumb_func_start sub_818E6B0
|
||||
sub_818E6B0: @ 818E6B0
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
ldr r4, =gUnknown_0203CD6C
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r3, =0x00003b58
|
||||
adds r1, r0, r3
|
||||
str r1, [r4]
|
||||
ldrb r0, [r1, 0xC]
|
||||
cmp r0, r2
|
||||
bhi _0818E6EA
|
||||
strb r2, [r1, 0xC]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
movs r1, 0xFF
|
||||
movs r2, 0x8
|
||||
bl memset
|
||||
ldr r1, [r4]
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
adds r1, 0x4
|
||||
ldr r0, [r0]
|
||||
ldm r0!, {r2,r3}
|
||||
stm r1!, {r2,r3}
|
||||
ldr r1, [r4]
|
||||
ldr r0, =gGameLanguage
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r1, 0xE]
|
||||
_0818E6EA:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_818E6B0
|
||||
|
||||
thumb_func_start sub_818E704
|
||||
sub_818E704: @ 818E704
|
||||
push {r4,r5,lr}
|
||||
|
@ -733,3 +733,26 @@ void SetLilycoveContestLady(void)
|
||||
sub_818E604();
|
||||
gUnknown_0203CD6C->language = gGameLanguage;
|
||||
}
|
||||
|
||||
void sub_818E674(void)
|
||||
{
|
||||
gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||
gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST;
|
||||
gUnknown_0203CD6C->phase = 0;
|
||||
if (gUnknown_0203CD6C->fave_pkblk == 5 || gUnknown_0203CD6C->other_pkblk == 5)
|
||||
{
|
||||
sub_818E604();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_818E6B0(u8 sheen)
|
||||
{
|
||||
gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||
if (gUnknown_0203CD6C->max_sheen <= sheen)
|
||||
{
|
||||
gUnknown_0203CD6C->max_sheen = sheen;
|
||||
memset(gUnknown_0203CD6C->playerName, EOS, sizeof(gUnknown_0203CD6C->playerName));
|
||||
memcpy(gUnknown_0203CD6C->playerName, gSaveBlock2Ptr->playerName, sizeof(gUnknown_0203CD6C->playerName));
|
||||
gUnknown_0203CD6C->language = gGameLanguage;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user