From d22a9acc63b9f7c72e0d7ec81396b799af94e270 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:12:18 -0400 Subject: [PATCH] through sub_818E490 --- asm/lilycove_lady.s | 60 --------------------------------------------- include/global.h | 2 +- src/lilycove_lady.c | 23 +++++++++++++++++ 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 34b479c8a..b50218e48 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,66 +5,6 @@ .text - thumb_func_start sub_818E430 -sub_818E430: @ 818E430 - push {r4,r5,lr} - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - movs r2, 0 - adds r5, r1, 0 - adds r4, r5, 0 - ldr r0, =0x0000ffff - adds r3, r0, 0 -_0818E448: - ldr r1, [r4] - lsls r0, r2, 1 - adds r1, 0x2 - adds r1, r0 - ldrh r0, [r1] - orrs r0, r3 - strh r0, [r1] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x8 - bls _0818E448 - ldr r1, [r5] - ldr r0, =0x0000ffff - strh r0, [r1, 0x14] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E430 - - thumb_func_start sub_818E47C -sub_818E47C: @ 818E47C - push {lr} - ldr r1, =gSpecialVar_0x8004 - movs r0, 0x11 - strh r0, [r1] - bl easy_chat_input_maybe - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E47C - - thumb_func_start sub_818E490 -sub_818E490: @ 818E490 - push {lr} - ldr r0, =gScriptItemId - ldrh r0, [r0] - movs r1, 0x1 - bl RemoveBagItem - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E490 - thumb_func_start sub_818E4A4 sub_818E4A4: @ 818E4A4 push {r4-r6,lr} diff --git a/include/global.h b/include/global.h index 09dabf822..6fa8cb92d 100644 --- a/include/global.h +++ b/include/global.h @@ -712,7 +712,7 @@ typedef union // TODO struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[0x207]; + /*0x001*/ u8 filler_001[0x217]; } common; } LilycoveLady; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 65f6e2e10..a0482a28f 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -636,3 +636,26 @@ void sub_818E3EC(void) } sub_818DF00(); } + +void sub_818E430(void) +{ + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + for (i = 0; i < 9; i ++) + { + gUnknown_0203CD68->unk_002[i] = -1; + } + gUnknown_0203CD68->unk_014 = -1; +} + +void sub_818E47C(void) +{ + gSpecialVar_0x8004 = 0x11; + easy_chat_input_maybe(); +} + +void sub_818E490(void) +{ + RemoveBagItem(gScriptItemId, 1); +}