SetLilycoveContestLady
This commit is contained in:
parent
44e75e1f03
commit
7c8cbc6b88
3 changed files with 43 additions and 76 deletions
|
@ -5,58 +5,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_818E604
|
|
||||||
sub_818E604: @ 818E604
|
|
||||||
push {r4,lr}
|
|
||||||
ldr r4, =gUnknown_0203CD6C
|
|
||||||
ldr r1, [r4]
|
|
||||||
movs r0, 0xFF
|
|
||||||
strb r0, [r1, 0x4]
|
|
||||||
ldr r0, [r4]
|
|
||||||
movs r1, 0
|
|
||||||
strb r1, [r0, 0x2]
|
|
||||||
ldr r0, [r4]
|
|
||||||
strb r1, [r0, 0x3]
|
|
||||||
ldr r0, [r4]
|
|
||||||
strb r1, [r0, 0xC]
|
|
||||||
bl Random
|
|
||||||
ldr r4, [r4]
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
movs r1, 0x5
|
|
||||||
bl __umodsi3
|
|
||||||
strb r0, [r4, 0xD]
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_818E604
|
|
||||||
|
|
||||||
thumb_func_start SetLilycoveContestLady
|
|
||||||
SetLilycoveContestLady: @ 818E638
|
|
||||||
push {r4,lr}
|
|
||||||
ldr r4, =gUnknown_0203CD6C
|
|
||||||
ldr r0, =gSaveBlock1Ptr
|
|
||||||
ldr r0, [r0]
|
|
||||||
ldr r1, =0x00003b58
|
|
||||||
adds r0, r1
|
|
||||||
str r0, [r4]
|
|
||||||
movs r2, 0
|
|
||||||
movs r1, 0x2
|
|
||||||
strb r1, [r0]
|
|
||||||
ldr r0, [r4]
|
|
||||||
strb r2, [r0, 0x1]
|
|
||||||
bl sub_818E604
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r0, =gGameLanguage
|
|
||||||
ldrb r0, [r0]
|
|
||||||
strb r0, [r1, 0xE]
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end SetLilycoveContestLady
|
|
||||||
|
|
||||||
thumb_func_start sub_818E674
|
thumb_func_start sub_818E674
|
||||||
sub_818E674: @ 818E674
|
sub_818E674: @ 818E674
|
||||||
push {lr}
|
push {lr}
|
||||||
|
|
|
@ -670,7 +670,7 @@ enum {
|
||||||
struct LilycoveLadyQuiz
|
struct LilycoveLadyQuiz
|
||||||
{
|
{
|
||||||
/*0x000*/ u8 id;
|
/*0x000*/ u8 id;
|
||||||
/*0x001*/ u8 unk_001;
|
/*0x001*/ u8 phase;
|
||||||
/*0x002*/ u16 unk_002[9];
|
/*0x002*/ u16 unk_002[9];
|
||||||
/*0x014*/ u16 unk_014;
|
/*0x014*/ u16 unk_014;
|
||||||
/*0x016*/ u16 unk_016;
|
/*0x016*/ u16 unk_016;
|
||||||
|
@ -686,7 +686,7 @@ struct LilycoveLadyQuiz
|
||||||
struct LilycoveLadyFavour
|
struct LilycoveLadyFavour
|
||||||
{
|
{
|
||||||
/*0x000*/ u8 id;
|
/*0x000*/ u8 id;
|
||||||
/*0x001*/ u8 unk_001;
|
/*0x001*/ u8 phase;
|
||||||
/*0x002*/ u8 unk_002;
|
/*0x002*/ u8 unk_002;
|
||||||
/*0x003*/ u8 unk_003;
|
/*0x003*/ u8 unk_003;
|
||||||
/*0x004*/ u8 playerName[8];
|
/*0x004*/ u8 playerName[8];
|
||||||
|
@ -699,8 +699,13 @@ struct LilycoveLadyFavour
|
||||||
struct LilycoveLadyContest
|
struct LilycoveLadyContest
|
||||||
{
|
{
|
||||||
/*0x000*/ u8 id;
|
/*0x000*/ u8 id;
|
||||||
/*0x001*/ u8 filler_001[12];
|
/*0x001*/ u8 phase;
|
||||||
/*0x00d*/ u8 category; // maybe?
|
/*0x002*/ u8 fave_pkblk;
|
||||||
|
/*0x003*/ u8 other_pkblk;
|
||||||
|
/*0x004*/ u8 playerName[8];
|
||||||
|
/*0x00c*/ u8 max_sheen;
|
||||||
|
/*0x00d*/ u8 category;
|
||||||
|
/*0x00e*/ u8 language;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union // TODO
|
typedef union // TODO
|
||||||
|
@ -708,12 +713,7 @@ typedef union // TODO
|
||||||
struct LilycoveLadyQuiz quiz;
|
struct LilycoveLadyQuiz quiz;
|
||||||
struct LilycoveLadyFavour favour;
|
struct LilycoveLadyFavour favour;
|
||||||
struct LilycoveLadyContest contest;
|
struct LilycoveLadyContest contest;
|
||||||
|
u8 id;
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0x000*/ u8 id;
|
|
||||||
/*0x001*/ u8 filler_001[0x217];
|
|
||||||
} common;
|
|
||||||
} LilycoveLady;
|
} LilycoveLady;
|
||||||
|
|
||||||
struct SaveBlock1
|
struct SaveBlock1
|
||||||
|
@ -800,6 +800,7 @@ struct SaveBlock1
|
||||||
/*0x3B14*/ struct RecordMixingGift recordMixingGift;
|
/*0x3B14*/ struct RecordMixingGift recordMixingGift;
|
||||||
/*0x3B24*/ u8 seen2[52];
|
/*0x3B24*/ u8 seen2[52];
|
||||||
/*0x3B58*/ LilycoveLady lilycoveLady;
|
/*0x3B58*/ LilycoveLady lilycoveLady;
|
||||||
|
/*0x3B88*/ u8 filler_3B88[0x1E8];
|
||||||
/*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct
|
/*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct
|
||||||
// sizeof: 0x3D88
|
// sizeof: 0x3D88
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,7 +44,7 @@ extern EWRAM_DATA u16 gScriptItemId;
|
||||||
|
|
||||||
u8 GetLilycoveLadyId(void)
|
u8 GetLilycoveLadyId(void)
|
||||||
{
|
{
|
||||||
return gSaveBlock1Ptr->lilycoveLady.common.id;
|
return gSaveBlock1Ptr->lilycoveLady.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818D9C0(void)
|
void sub_818D9C0(void)
|
||||||
|
@ -148,7 +148,7 @@ void SetLilycoveFavourLady(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
||||||
gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR;
|
gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR;
|
||||||
gUnknown_0203CD64->unk_001 = 0;
|
gUnknown_0203CD64->phase = 0;
|
||||||
gUnknown_0203CD64->playerName[0] = EOS;
|
gUnknown_0203CD64->playerName[0] = EOS;
|
||||||
gUnknown_0203CD64->unk_002 = 0;
|
gUnknown_0203CD64->unk_002 = 0;
|
||||||
gUnknown_0203CD64->unk_003= 0;
|
gUnknown_0203CD64->unk_003= 0;
|
||||||
|
@ -161,17 +161,17 @@ void sub_818DBC4(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
||||||
gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR;
|
gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR;
|
||||||
gUnknown_0203CD64->unk_001 = 0;
|
gUnknown_0203CD64->phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_818DBE8(void)
|
u8 sub_818DBE8(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
||||||
if (gUnknown_0203CD64->unk_001 == 2)
|
if (gUnknown_0203CD64->phase == 2)
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else if (gUnknown_0203CD64->unk_001 == 1)
|
else if (gUnknown_0203CD64->phase == 1)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ bool8 sub_818DD84(u16 itemId)
|
||||||
|
|
||||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
||||||
len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c]);
|
len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c]);
|
||||||
gUnknown_0203CD64->unk_001 = 1;
|
gUnknown_0203CD64->phase = 1;
|
||||||
sub_818DCAC(gStringVar2, itemId);
|
sub_818DCAC(gStringVar2, itemId);
|
||||||
gUnknown_0203CD64->itemId = itemId;
|
gUnknown_0203CD64->itemId = itemId;
|
||||||
sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->playerName);
|
sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->playerName);
|
||||||
|
@ -297,14 +297,14 @@ u16 sub_818DEA0(void)
|
||||||
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour;
|
||||||
itemId = gUnknown_0860B304[gUnknown_0203CD64->unk_00c];
|
itemId = gUnknown_0860B304[gUnknown_0203CD64->unk_00c];
|
||||||
sub_818DE88(itemId);
|
sub_818DE88(itemId);
|
||||||
gUnknown_0203CD64->unk_001 = 2;
|
gUnknown_0203CD64->phase = 2;
|
||||||
return itemId;
|
return itemId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818DEDC(void)
|
void sub_818DEDC(void)
|
||||||
{
|
{
|
||||||
SetLilycoveFavourLady();
|
SetLilycoveFavourLady();
|
||||||
gUnknown_0203CD64->unk_001 = 1;
|
gUnknown_0203CD64->phase = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818DEF4(void)
|
void sub_818DEF4(void)
|
||||||
|
@ -334,7 +334,7 @@ void SetLilycoveQuizLady(void)
|
||||||
|
|
||||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ;
|
gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ;
|
||||||
gUnknown_0203CD68->unk_001 = 0;
|
gUnknown_0203CD68->phase = 0;
|
||||||
for (i = 0; i < 9; i ++)
|
for (i = 0; i < 9; i ++)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD68->unk_002[i] = -1;
|
gUnknown_0203CD68->unk_002[i] = -1;
|
||||||
|
@ -356,7 +356,7 @@ void sub_818E004(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ;
|
gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ;
|
||||||
gUnknown_0203CD68->unk_001 = 0;
|
gUnknown_0203CD68->phase = 0;
|
||||||
gUnknown_0203CD68->unk_02a = 0;
|
gUnknown_0203CD68->unk_02a = 0;
|
||||||
gUnknown_0203CD68->unk_016 = -1;
|
gUnknown_0203CD68->unk_016 = -1;
|
||||||
}
|
}
|
||||||
|
@ -364,11 +364,11 @@ void sub_818E004(void)
|
||||||
u8 sub_818E038(void)
|
u8 sub_818E038(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
if (gUnknown_0203CD68->unk_001 == 2)
|
if (gUnknown_0203CD68->phase == 2)
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else if (gUnknown_0203CD68->unk_001 == 1)
|
else if (gUnknown_0203CD68->phase == 1)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -605,13 +605,13 @@ void sub_818E358(void)
|
||||||
void sub_818E37C(void)
|
void sub_818E37C(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
gUnknown_0203CD68->unk_001 = 1;
|
gUnknown_0203CD68->phase = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818E39C(void)
|
void sub_818E39C(void)
|
||||||
{
|
{
|
||||||
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
|
||||||
gUnknown_0203CD68->unk_001 = 2;
|
gUnknown_0203CD68->phase = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_818E3BC(void)
|
void sub_818E3BC(void)
|
||||||
|
@ -715,3 +715,21 @@ void sub_818E570(const struct LilycoveLadyQuiz *quiz)
|
||||||
gUnknown_0203CD68->unk_02c = quiz->unk_02c;
|
gUnknown_0203CD68->unk_02c = quiz->unk_02c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sub_818E604(void)
|
||||||
|
{
|
||||||
|
gUnknown_0203CD6C->playerName[0] = EOS;
|
||||||
|
gUnknown_0203CD6C->fave_pkblk = 0;
|
||||||
|
gUnknown_0203CD6C->other_pkblk = 0;
|
||||||
|
gUnknown_0203CD6C->max_sheen = 0;
|
||||||
|
gUnknown_0203CD6C->category = Random() % 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLilycoveContestLady(void)
|
||||||
|
{
|
||||||
|
gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest;
|
||||||
|
gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST;
|
||||||
|
gUnknown_0203CD6C->phase = 0;
|
||||||
|
sub_818E604();
|
||||||
|
gUnknown_0203CD6C->language = gGameLanguage;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue