Another handful of favour lady functions

This commit is contained in:
scnorton 2017-09-19 17:04:17 -04:00
parent 4e8a2c6934
commit b8e733283e
2 changed files with 30 additions and 59 deletions

View file

@ -5,65 +5,6 @@
.text
thumb_func_start sub_818DBE8
sub_818DBE8: @ 818DBE8
push {lr}
ldr r1, =gUnknown_0203CD64
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00003b58
adds r0, r2
str r0, [r1]
ldrb r0, [r0, 0x1]
cmp r0, 0x2
bne _0818DC0C
movs r0, 0x2
b _0818DC16
.pool
_0818DC0C:
cmp r0, 0x1
beq _0818DC14
movs r0, 0
b _0818DC16
_0818DC14:
movs r0, 0x1
_0818DC16:
pop {r1}
bx r1
thumb_func_end sub_818DBE8
thumb_func_start sub_818DC1C
sub_818DC1C: @ 818DC1C
lsls r0, 24
ldr r1, =gUnknown_0860B224
lsrs r0, 22
adds r0, r1
ldr r0, [r0]
bx lr
.pool
thumb_func_end sub_818DC1C
thumb_func_start sub_818DC2C
sub_818DC2C: @ 818DC2C
push {r4,lr}
ldr r1, =gUnknown_0203CD64
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00003b58
adds r0, r2
str r0, [r1]
ldr r4, =gStringVar1
ldrb r0, [r0, 0xC]
bl sub_818DC1C
adds r1, r0, 0
adds r0, r4, 0
bl StringCopy
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_818DC2C
thumb_func_start sub_818DC60
sub_818DC60: @ 818DC60
push {r4,r5,lr}

View file

@ -6,6 +6,7 @@
#include "main.h"
#include "event_data.h"
#include "rng.h"
#include "string_util.h"
#include "lilycove_lady.h"
void SetLilycoveQuizLady(void);
@ -17,6 +18,7 @@ void sub_818E674(void);
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];
EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL;
@ -142,3 +144,31 @@ void sub_818DBC4(void)
gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR;
gUnknown_0203CD64->favour.unk_001 = 0;
}
u8 sub_818DBE8(void)
{
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
if (gUnknown_0203CD64->favour.unk_001 == 2)
{
return 2;
}
else if (gUnknown_0203CD64->favour.unk_001 == 1)
{
return 1;
}
else
{
return 0;
}
}
const u8 *sub_818DC1C(u8 idx)
{
return gUnknown_0860B224[idx];
}
void sub_818DC2C(void)
{
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
StringCopy(gStringVar1, sub_818DC1C(gUnknown_0203CD64->favour.unk_00c));
}