diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 1580d9595..65cc3b41a 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,53 +5,6 @@ .text - thumb_func_start sub_818E274 -sub_818E274: @ 818E274 - push {r4,lr} - ldr r4, =gStringVar1 - ldr r0, =gUnknown_0203CD68 - ldr r0, [r0] - ldrh r0, [r0, 0x28] - bl ItemId_GetItem - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E274 - - thumb_func_start sub_818E298 -sub_818E298: @ 818E298 - push {r4,lr} - ldr r4, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r4] - bl sub_818E13C - lsls r0, 24 - cmp r0, 0 - beq _0818E2C0 - movs r0, 0 - b _0818E2CC - .pool -_0818E2C0: - ldr r0, [r4] - ldr r1, =gGameLanguage - ldrb r1, [r1] - adds r0, 0x2D - strb r1, [r0] - movs r0, 0x1 -_0818E2CC: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E298 - thumb_func_start sub_818E2D8 sub_818E2D8: @ 818E2D8 ldr r2, =gUnknown_0203CD68 diff --git a/include/global.h b/include/global.h index 569345355..09dabf822 100644 --- a/include/global.h +++ b/include/global.h @@ -676,7 +676,7 @@ struct LilycoveLadyQuiz /*0x016*/ u16 unk_016; /*0x018*/ u8 playerName[8]; /*0x020*/ u16 playerTrainerId[4]; - /*0x028*/ u16 unk_028; + /*0x028*/ u16 itemId; /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; /*0x02c*/ u8 unk_02c; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 564b089a6..976ed4d88 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -320,7 +320,7 @@ void sub_818DF00(void) gUnknown_0203CD68->unk_002[i] = gUnknown_0860B1A4[v0][i]; } gUnknown_0203CD68->unk_014 = gUnknown_0860B1E4[v0]; - gUnknown_0203CD68->unk_028 = gUnknown_0860B204[v0]; + gUnknown_0203CD68->itemId = gUnknown_0860B204[v0]; gUnknown_0203CD68->unk_02b = v0; gUnknown_0203CD68->playerName[0] = EOS; } @@ -342,7 +342,7 @@ void SetLilycoveQuizLady(void) { gUnknown_0203CD68->playerTrainerId[i] = 0; } - gUnknown_0203CD68->unk_028 = 0; + gUnknown_0203CD68->itemId = ITEM_NONE; gUnknown_0203CD68->unk_02a = 0; gUnknown_0203CD68->unk_02c = 0x10; gUnknown_0203CD68->language = gGameLanguage; @@ -398,7 +398,7 @@ u8 sub_818E06C(void) quiz->unk_002[j] = gUnknown_0860B1A4[i][j]; } quiz->unk_014 = gUnknown_0860B1E4[i]; - quiz->unk_028 = gUnknown_0860B204[i]; + quiz->itemId = gUnknown_0860B204[i]; quiz->unk_02b = i; quiz->playerName[0] = EOS; } @@ -533,16 +533,16 @@ __attribute__((naked)) u8 sub_818E13C(void) u8 sub_818E1F4(void) { - u8 response; + bool8 response; u8 i; gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; - response = 0; + response = FALSE; for (i = 0; i < 4; i ++) { if (gUnknown_0203CD68->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i]) { - response = 1; + response = TRUE; break; } } @@ -557,3 +557,19 @@ u8 sub_818E258(const u8 *str) for (len = 0, ptr = str; *ptr != EOS; len ++, ptr ++); return len; } + +void sub_818E274(void) +{ + StringCopy(gStringVar1, ItemId_GetItem(gUnknown_0203CD68->itemId)->name); +} + +bool8 sub_818E298(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (!sub_818E13C()) + { + gUnknown_0203CD68->language = gGameLanguage; + return TRUE; + } + return FALSE; +}