mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
through sub_818DEF4
This commit is contained in:
parent
534dd2c4b0
commit
83a420400c
@ -5,100 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_818DE44
|
||||
sub_818DE44: @ 818DE44
|
||||
push {lr}
|
||||
ldr r0, =gScriptItemId
|
||||
ldrh r0, [r0]
|
||||
bl sub_818DD84
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_818DE44
|
||||
|
||||
thumb_func_start sub_818DE5C
|
||||
sub_818DE5C: @ 818DE5C
|
||||
push {lr}
|
||||
ldr r1, =gUnknown_0203CD64
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r2, =0x00003b58
|
||||
adds r0, r2
|
||||
str r0, [r1]
|
||||
ldrb r0, [r0, 0x3]
|
||||
movs r1, 0
|
||||
cmp r0, 0x4
|
||||
bls _0818DE74
|
||||
movs r1, 0x1
|
||||
_0818DE74:
|
||||
adds r0, r1, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_818DE5C
|
||||
|
||||
thumb_func_start sub_818DE88
|
||||
sub_818DE88: @ 818DE88
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
ldr r0, =gStringVar2
|
||||
bl sub_818DCAC
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_818DE88
|
||||
|
||||
thumb_func_start sub_818DEA0
|
||||
sub_818DEA0: @ 818DEA0
|
||||
push {r4,r5,lr}
|
||||
ldr r5, =gUnknown_0203CD64
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00003b58
|
||||
adds r0, r1
|
||||
str r0, [r5]
|
||||
ldr r1, =gUnknown_0860B304
|
||||
ldrb r0, [r0, 0xC]
|
||||
lsls r0, 1
|
||||
adds r0, r1
|
||||
ldrh r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl sub_818DE88
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x2
|
||||
strb r0, [r1, 0x1]
|
||||
adds r0, r4, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_818DEA0
|
||||
|
||||
thumb_func_start sub_818DEDC
|
||||
sub_818DEDC: @ 818DEDC
|
||||
push {lr}
|
||||
bl SetLilycoveFavourLady
|
||||
ldr r0, =gUnknown_0203CD64
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x1
|
||||
strb r0, [r1, 0x1]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_818DEDC
|
||||
|
||||
thumb_func_start sub_818DEF4
|
||||
sub_818DEF4: @ 818DEF4
|
||||
push {lr}
|
||||
bl EnableBothScriptContexts
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_818DEF4
|
||||
|
||||
thumb_func_start sub_818DF00
|
||||
sub_818DF00: @ 818DF00
|
||||
push {r4-r7,lr}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "event_data.h"
|
||||
#include "script.h"
|
||||
#include "rng.h"
|
||||
#include "string_util.h"
|
||||
#include "item.h"
|
||||
@ -24,8 +25,10 @@ extern const u16 gUnknown_0860B074[5];
|
||||
extern const u16 gUnknown_0860B07E[3];
|
||||
extern const u8 *const gUnknown_0860B224[];
|
||||
extern const u16 *const gUnknown_0860B2EC[6];
|
||||
extern const u16 gUnknown_0860B304[6];
|
||||
|
||||
EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL;
|
||||
extern EWRAM_DATA u16 gScriptItemId;
|
||||
|
||||
u8 GetLilycoveLadyId(void)
|
||||
{
|
||||
@ -255,3 +258,44 @@ bool8 sub_818DD84(u16 itemId)
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
bool8 sub_818DE44(void)
|
||||
{
|
||||
return sub_818DD84(gScriptItemId);
|
||||
}
|
||||
|
||||
bool8 sub_818DE5C(void)
|
||||
{
|
||||
u8 checkval;
|
||||
|
||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
|
||||
checkval = gUnknown_0203CD64->favour.unk_003;
|
||||
return checkval < 5 ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
void sub_818DE88(u16 itemId)
|
||||
{
|
||||
sub_818DCAC(gStringVar2, itemId);
|
||||
}
|
||||
|
||||
u16 sub_818DEA0(void)
|
||||
{
|
||||
u16 itemId;
|
||||
|
||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
|
||||
itemId = gUnknown_0860B304[gUnknown_0203CD64->favour.unk_00c];
|
||||
sub_818DE88(itemId);
|
||||
gUnknown_0203CD64->favour.unk_001 = 2;
|
||||
return itemId;
|
||||
}
|
||||
|
||||
void sub_818DEDC(void)
|
||||
{
|
||||
SetLilycoveFavourLady();
|
||||
gUnknown_0203CD64->favour.unk_001 = 1;
|
||||
}
|
||||
|
||||
void sub_818DEF4(void)
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user