From 213fef604247d31f6981bd83c703bb1d3e1bbd31 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:44:20 -0400 Subject: [PATCH] through sub_818E308 --- asm/lilycove_lady.s | 56 --------------------------------------------- include/easy_chat.h | 2 ++ src/lilycove_lady.c | 20 ++++++++++++++++ 3 files changed, 22 insertions(+), 56 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 65cc3b41a..0c46932cf 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,62 +5,6 @@ .text - thumb_func_start sub_818E2D8 -sub_818E2D8: @ 818E2D8 - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r3, =0x00003b58 - adds r1, r0, r3 - str r1, [r2] - ldr r1, =0x00003b82 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_818E2D8 - - thumb_func_start sub_818E2FC -sub_818E2FC: @ 818E2FC - push {lr} - bl easy_chat_input_maybe - pop {r0} - bx r0 - thumb_func_end sub_818E2FC - - thumb_func_start sub_818E308 -sub_818E308: @ 818E308 - push {r4-r6,lr} - ldr r5, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r5] - ldr r6, =gStringVar1 - ldrh r1, [r0, 0x14] - adds r0, r6, 0 - bl CopyEasyChatWord - ldr r4, =gStringVar2 - ldr r0, [r5] - ldrh r1, [r0, 0x16] - adds r0, r4, 0 - bl CopyEasyChatWord - adds r0, r6, 0 - adds r1, r4, 0 - bl StringCompare - movs r1, 0 - cmp r0, 0 - bne _0818E33C - movs r1, 0x1 -_0818E33C: - adds r0, r1, 0 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E308 - thumb_func_start sub_818E358 sub_818E358: @ 818E358 ldr r1, =gUnknown_0203CD68 diff --git a/include/easy_chat.h b/include/easy_chat.h index 5143aa39c..d7dc72410 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -29,5 +29,7 @@ enum }; void InitEasyChatPhrases(void); +void easy_chat_input_maybe(void); +void CopyEasyChatWord(u8 *, u16); #endif // GUARD_EASYCHAT_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 976ed4d88..485a0c9d4 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -12,6 +12,7 @@ #include "items.h" #include "item_menu.h" #include "text.h" +#include "easy_chat.h" #include "lilycove_lady.h" void SetLilycoveQuizLady(void); @@ -573,3 +574,22 @@ bool8 sub_818E298(void) } return FALSE; } + +u8 sub_818E2D8(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + return gUnknown_0203CD68->unk_02a; +} + +void sub_818E2FC(void) +{ + easy_chat_input_maybe(); +} + +bool8 sub_818E308(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + CopyEasyChatWord(gStringVar1, gUnknown_0203CD68->unk_014); + CopyEasyChatWord(gStringVar2, gUnknown_0203CD68->unk_016); + return StringCompare(gStringVar1, gStringVar2) ? FALSE : TRUE; +}