mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
SetLilycoveFavourLady
This commit is contained in:
parent
b26eb6713b
commit
4e8a2c6934
@ -5,55 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start SetLilycoveFavourLady
|
||||
SetLilycoveFavourLady: @ 818DB7C
|
||||
push {lr}
|
||||
ldr r2, =gUnknown_0203CD64
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00003b58
|
||||
adds r0, r1
|
||||
str r0, [r2]
|
||||
movs r3, 0
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
strb r3, [r0, 0x1]
|
||||
ldr r1, [r2]
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1, 0x4]
|
||||
ldr r0, [r2]
|
||||
strb r3, [r0, 0x2]
|
||||
ldr r0, [r2]
|
||||
strb r3, [r0, 0x3]
|
||||
ldr r1, [r2]
|
||||
strh r3, [r1, 0xE]
|
||||
ldr r0, =gGameLanguage
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r1, 0x12]
|
||||
bl sub_818DB20
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end SetLilycoveFavourLady
|
||||
|
||||
thumb_func_start sub_818DBC4
|
||||
sub_818DBC4: @ 818DBC4
|
||||
ldr r3, =gUnknown_0203CD64
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00003b58
|
||||
adds r0, r1
|
||||
str r0, [r3]
|
||||
movs r2, 0
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
ldr r0, [r3]
|
||||
strb r2, [r0, 0x1]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_818DBC4
|
||||
|
||||
thumb_func_start sub_818DBE8
|
||||
sub_818DBE8: @ 818DBE8
|
||||
push {lr}
|
||||
|
@ -672,10 +672,16 @@ typedef union // TODO
|
||||
struct
|
||||
{
|
||||
/*0x000*/ u8 id;
|
||||
/*0x001*/ u8 filler_001[11];
|
||||
/*0x001*/ u8 unk_001;
|
||||
/*0x002*/ u8 unk_002;
|
||||
/*0x003*/ u8 unk_003;
|
||||
/*0x004*/ u8 unk_004;
|
||||
/*0x005*/ u8 filler_005[7];
|
||||
/*0x00c*/ u8 unk_00c;
|
||||
/*0x00d*/ u8 filler_00d[3];
|
||||
/*0x00d*/ u8 filler_00d;
|
||||
/*0x00e*/ u16 unk_00e;
|
||||
/*0x010*/ u16 unk_010;
|
||||
/*0x012*/ u8 language;
|
||||
} favour;
|
||||
|
||||
struct
|
||||
|
@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "event_data.h"
|
||||
#include "rng.h"
|
||||
#include "lilycove_lady.h"
|
||||
@ -121,3 +122,23 @@ void sub_818DB20(void)
|
||||
idx = Random() % size;
|
||||
gUnknown_0203CD64->favour.unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][idx];
|
||||
}
|
||||
|
||||
void SetLilycoveFavourLady(void)
|
||||
{
|
||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
|
||||
gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR;
|
||||
gUnknown_0203CD64->favour.unk_001 = 0;
|
||||
gUnknown_0203CD64->favour.unk_004 = 0xFF;
|
||||
gUnknown_0203CD64->favour.unk_002 = 0;
|
||||
gUnknown_0203CD64->favour.unk_003= 0;
|
||||
gUnknown_0203CD64->favour.unk_00e = 0;
|
||||
gUnknown_0203CD64->favour.language = gGameLanguage;
|
||||
sub_818DB20();
|
||||
}
|
||||
|
||||
void sub_818DBC4(void)
|
||||
{
|
||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady;
|
||||
gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR;
|
||||
gUnknown_0203CD64->favour.unk_001 = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user