From 283084cce49b0bdb65916f35e55654a3b365f452 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 24 Oct 2019 20:49:10 -0400 Subject: script_menu through task_yes_no_maybe --- asm/script_menu.s | 728 ------------------------------------------------- common_syms/scrcmd.txt | 1 + ld_script.txt | 1 + src/scrcmd.c | 18 +- src/script_menu.c | 263 ++++++++++++++++++ sym_common.txt | 3 +- sym_ewram.txt | 5 +- 7 files changed, 278 insertions(+), 741 deletions(-) create mode 100644 common_syms/scrcmd.txt create mode 100644 src/script_menu.c diff --git a/asm/script_menu.s b/asm/script_menu.s index 56781a953..bf7819eb1 100644 --- a/asm/script_menu.s +++ b/asm/script_menu.s @@ -5,734 +5,6 @@ .text - thumb_func_start sub_809C954 -sub_809C954: @ 809C954 - push {lr} - adds r1, r0, 0 - movs r0, 0x1 - movs r2, 0 - bl GetStringWidth - adds r1, r0, 0 - adds r0, r1, 0x7 - cmp r0, 0 - bge _0809C96A - adds r0, 0x7 -_0809C96A: - lsls r0, 13 - lsrs r0, 16 - pop {r1} - bx r1 - thumb_func_end sub_809C954 - - thumb_func_start sub_809C974 -sub_809C974: @ 809C974 - push {r4-r7,lr} - adds r7, r0, 0 - lsls r4, r1, 24 - lsrs r4, 24 - ldr r0, [r7] - bl sub_809C954 - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0x1 - cmp r5, r4 - bcs _0809C9AA -_0809C98C: - lsls r0, r5, 3 - adds r0, r7 - ldr r0, [r0] - bl sub_809C954 - lsls r0, 24 - lsrs r0, 24 - cmp r6, r0 - bcs _0809C9A0 - adds r6, r0, 0 -_0809C9A0: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, r4 - bcc _0809C98C -_0809C9AA: - adds r0, r6, 0 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_809C974 - - thumb_func_start ScriptMenu_Multichoice -ScriptMenu_Multichoice: @ 809C9B4 - push {r4-r7,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r7, r0, 24 - lsls r1, 24 - lsrs r6, r1, 24 - lsls r2, 24 - lsrs r5, r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - ldr r0, _0809C9F0 @ =sub_809CC98 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809C9F8 - ldr r0, _0809C9F4 @ =gSpecialVar_Result - movs r1, 0xFF - strh r1, [r0] - movs r0, 0 - str r0, [sp] - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl sub_809CA64 - movs r0, 0x1 - b _0809C9FA - .align 2, 0 -_0809C9F0: .4byte sub_809CC98 -_0809C9F4: .4byte gSpecialVar_Result -_0809C9F8: - movs r0, 0 -_0809C9FA: - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ScriptMenu_Multichoice - - thumb_func_start ScriptMenu_MultichoiceWithDefault -ScriptMenu_MultichoiceWithDefault: @ 809CA04 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - ldr r4, [sp, 0x1C] - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r1, 24 - lsrs r7, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - lsls r3, 24 - lsrs r5, r3, 24 - lsls r4, 24 - lsrs r4, 24 - ldr r0, _0809CA4C @ =sub_809CC98 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809CA54 - ldr r1, _0809CA50 @ =gSpecialVar_Result - movs r0, 0xFF - strh r0, [r1] - str r4, [sp] - mov r0, r8 - adds r1, r7, 0 - adds r2, r6, 0 - adds r3, r5, 0 - bl sub_809CA64 - movs r0, 0x1 - b _0809CA56 - .align 2, 0 -_0809CA4C: .4byte sub_809CC98 -_0809CA50: .4byte gSpecialVar_Result -_0809CA54: - movs r0, 0 -_0809CA56: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ScriptMenu_MultichoiceWithDefault - - thumb_func_start sub_809CA64 -sub_809CA64: @ 809CA64 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - ldr r4, [sp, 0x40] - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x14] - lsls r2, 24 - lsrs r2, 24 - mov r10, r2 - lsls r3, 24 - lsrs r3, 24 - str r3, [sp, 0x18] - lsls r4, 24 - lsrs r4, 24 - str r4, [sp, 0x1C] - movs r0, 0x2 - ands r0, r3 - cmp r0, 0 - bne _0809CAA6 - ldr r0, _0809CB54 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809CBA2 -_0809CAA6: - movs r0, 0x1 - ldr r1, [sp, 0x18] - ands r1, r0 - str r1, [sp, 0x18] - ldr r1, _0809CB58 @ =gUnknown_83E04B0 - mov r2, r10 - lsls r0, r2, 3 - adds r0, r1 - ldrb r7, [r0, 0x4] - ldr r0, [r0] - mov r8, r0 - movs r6, 0 - cmp r6, r7 - bge _0809CADE - mov r5, r8 - adds r4, r7, 0 -_0809CAC6: - ldr r1, [r5] - movs r0, 0x2 - movs r2, 0 - bl GetStringWidth - cmp r0, r6 - ble _0809CAD6 - adds r6, r0, 0 -_0809CAD6: - adds r5, 0x8 - subs r4, 0x1 - cmp r4, 0 - bne _0809CAC6 -_0809CADE: - adds r0, r6, 0 - adds r0, 0x9 - cmp r0, 0 - bge _0809CAE8 - adds r0, 0x7 -_0809CAE8: - asrs r0, 3 - adds r0, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - mov r1, r9 - adds r0, r1, r5 - cmp r0, 0x1C - ble _0809CB02 - movs r0, 0x1C - subs r0, r5 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0809CB02: - adds r0, r7, 0 - bl sub_809CBB4 - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - mov r0, r9 - ldr r1, [sp, 0x14] - adds r2, r5, 0 - bl CreateWindowFromRect - lsls r0, 24 - lsrs r5, r0, 24 - adds r0, r5, 0 - movs r1, 0 - bl SetStdWindowBorderStyle - mov r2, r10 - cmp r2, 0x1E - beq _0809CB32 - cmp r2, 0xD - beq _0809CB32 - cmp r2, 0x29 - bne _0809CB5C -_0809CB32: - movs r0, 0xE - str r0, [sp] - str r7, [sp, 0x4] - mov r0, r8 - str r0, [sp, 0x8] - movs r0, 0 - str r0, [sp, 0xC] - movs r0, 0x2 - str r0, [sp, 0x10] - adds r0, r5, 0 - movs r1, 0x2 - movs r2, 0x8 - movs r3, 0x2 - bl MultichoiceList_PrintItems - b _0809CB7A - .align 2, 0 -_0809CB54: .4byte sub_809D6D4 -_0809CB58: .4byte gUnknown_83E04B0 -_0809CB5C: - movs r0, 0xE - str r0, [sp] - str r7, [sp, 0x4] - mov r1, r8 - str r1, [sp, 0x8] - movs r0, 0 - str r0, [sp, 0xC] - movs r0, 0x2 - str r0, [sp, 0x10] - adds r0, r5, 0 - movs r1, 0x2 - movs r2, 0x8 - movs r3, 0x2 - bl MultichoiceList_PrintItems -_0809CB7A: - movs r0, 0xE - str r0, [sp] - str r7, [sp, 0x4] - ldr r2, [sp, 0x1C] - str r2, [sp, 0x8] - adds r0, r5, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl Menu_InitCursor - ldr r0, [sp, 0x18] - adds r1, r7, 0 - adds r2, r5, 0 - mov r3, r10 - bl sub_809CC18 - movs r0, 0 - bl ScheduleBgCopyTilemapToVram -_0809CBA2: - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_809CA64 - - thumb_func_start sub_809CBB4 -sub_809CBB4: @ 809CBB4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8 - bhi _0809CC10 - lsls r0, 2 - ldr r1, _0809CBC8 @ =_0809CBCC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0809CBC8: .4byte _0809CBCC - .align 2, 0 -_0809CBCC: - .4byte _0809CC10 - .4byte _0809CBF0 - .4byte _0809CBF4 - .4byte _0809CBF8 - .4byte _0809CBFC - .4byte _0809CC00 - .4byte _0809CC04 - .4byte _0809CC08 - .4byte _0809CC0C -_0809CBF0: - movs r0, 0x2 - b _0809CC12 -_0809CBF4: - movs r0, 0x4 - b _0809CC12 -_0809CBF8: - movs r0, 0x6 - b _0809CC12 -_0809CBFC: - movs r0, 0x7 - b _0809CC12 -_0809CC00: - movs r0, 0x9 - b _0809CC12 -_0809CC04: - movs r0, 0xB - b _0809CC12 -_0809CC08: - movs r0, 0xD - b _0809CC12 -_0809CC0C: - movs r0, 0xE - b _0809CC12 -_0809CC10: - movs r0, 0x1 -_0809CC12: - pop {r1} - bx r1 - thumb_func_end sub_809CBB4 - - thumb_func_start sub_809CC18 -sub_809CC18: @ 809CC18 - push {r4-r7,lr} - lsls r0, 24 - lsrs r6, r0, 24 - lsls r1, 24 - lsrs r5, r1, 24 - lsls r2, 24 - lsrs r7, r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - cmp r4, 0x27 - beq _0809CC36 - cmp r4, 0x2F - beq _0809CC36 - cmp r4, 0x32 - bne _0809CC40 -_0809CC36: - ldr r1, _0809CC3C @ =gUnknown_2039988 - movs r0, 0xC - b _0809CC44 - .align 2, 0 -_0809CC3C: .4byte gUnknown_2039988 -_0809CC40: - ldr r1, _0809CC68 @ =gUnknown_2039988 - movs r0, 0 -_0809CC44: - strb r0, [r1] - ldr r0, _0809CC6C @ =sub_809CC98 - movs r1, 0x50 - bl CreateTask - lsls r0, 24 - lsrs r2, r0, 24 - ldr r1, _0809CC70 @ =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r1, r0, r1 - strh r6, [r1, 0x10] - cmp r5, 0x3 - bls _0809CC74 - movs r0, 0x1 - b _0809CC76 - .align 2, 0 -_0809CC68: .4byte gUnknown_2039988 -_0809CC6C: .4byte sub_809CC98 -_0809CC70: .4byte gTasks -_0809CC74: - movs r0, 0 -_0809CC76: - strh r0, [r1, 0x12] - ldr r1, _0809CC94 @ =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - strh r7, [r0, 0x14] - strh r4, [r0, 0x16] - adds r0, r4, 0 - bl sub_809CD48 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0809CC94: .4byte gTasks - thumb_func_end sub_809CC18 - - thumb_func_start sub_809CC98 -sub_809CC98: @ 809CC98 - push {r4-r6,lr} - lsls r0, 24 - lsrs r6, r0, 24 - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - ldr r1, _0809CCC4 @ =gTasks+0x8 - adds r5, r0, r1 - ldr r0, _0809CCC8 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0809CD3C - ldr r1, _0809CCCC @ =gUnknown_2039988 - ldrb r0, [r1] - cmp r0, 0 - beq _0809CCD0 - subs r0, 0x1 - strb r0, [r1] - b _0809CD3C - .align 2, 0 -_0809CCC4: .4byte gTasks+0x8 -_0809CCC8: .4byte gPaletteFade -_0809CCCC: .4byte gUnknown_2039988 -_0809CCD0: - movs r1, 0xA - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _0809CCDE - bl Menu_ProcessInputNoWrapAround - b _0809CCE2 -_0809CCDE: - bl Menu_ProcessInput -_0809CCE2: - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _0809CD20 @ =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0xC0 - ands r0, r1 - cmp r0, 0 - beq _0809CCF8 - ldrb r0, [r5, 0xE] - bl sub_809CD48 -_0809CCF8: - lsls r0, r4, 24 - asrs r1, r0, 24 - movs r0, 0x2 - negs r0, r0 - cmp r1, r0 - beq _0809CD3C - adds r0, 0x1 - cmp r1, r0 - bne _0809CD28 - movs r1, 0x8 - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _0809CD3C - movs r0, 0x5 - bl PlaySE - ldr r1, _0809CD24 @ =gSpecialVar_Result - movs r0, 0x7F - strh r0, [r1] - b _0809CD2C - .align 2, 0 -_0809CD20: .4byte gMain -_0809CD24: .4byte gSpecialVar_Result -_0809CD28: - ldr r0, _0809CD44 @ =gSpecialVar_Result - strh r1, [r0] -_0809CD2C: - ldrb r0, [r5, 0xC] - bl sub_809D6B0 - adds r0, r6, 0 - bl DestroyTask - bl EnableBothScriptContexts -_0809CD3C: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0809CD44: .4byte gSpecialVar_Result - thumb_func_end sub_809CC98 - - thumb_func_start sub_809CD48 -sub_809CD48: @ 809CD48 - push {r4,lr} - sub sp, 0x10 - lsls r0, 24 - lsrs r0, 24 - adds r1, r0, 0 - cmp r0, 0x2F - beq _0809CD78 - cmp r0, 0x2F - bgt _0809CD60 - cmp r0, 0x27 - beq _0809CD66 - b _0809CDE0 -_0809CD60: - cmp r1, 0x32 - beq _0809CDB0 - b _0809CDE0 -_0809CD66: - movs r0, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r4, _0809CD74 @ =gUnknown_83E072C - b _0809CD82 - .align 2, 0 -_0809CD74: .4byte gUnknown_83E072C -_0809CD78: - movs r0, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r4, _0809CDAC @ =gUnknown_83E0738 -_0809CD82: - bl Menu_GetCursorPos - lsls r0, 24 - lsrs r0, 22 - adds r0, r4 - ldr r2, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x2 - movs r3, 0 - bl AddTextPrinterParameterized2 - b _0809CDE0 - .align 2, 0 -_0809CDAC: .4byte gUnknown_83E0738 -_0809CDB0: - movs r0, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r4, _0809CDE8 @ =gUnknown_83E0748 - bl Menu_GetCursorPos - lsls r0, 24 - lsrs r0, 22 - adds r0, r4 - ldr r2, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x2 - movs r3, 0 - bl AddTextPrinterParameterized2 -_0809CDE0: - add sp, 0x10 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0809CDE8: .4byte gUnknown_83E0748 - thumb_func_end sub_809CD48 - - thumb_func_start ScriptMenu_YesNo -ScriptMenu_YesNo: @ 809CDEC - push {r4,lr} - ldr r4, _0809CE04 @ =task_yes_no_maybe - adds r0, r4, 0 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0809CE08 - movs r0, 0 - b _0809CE28 - .align 2, 0 -_0809CE04: .4byte task_yes_no_maybe -_0809CE08: - ldr r1, _0809CE30 @ =gSpecialVar_Result - movs r0, 0xFF - strh r0, [r1] - ldr r0, _0809CE34 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - cmp r0, 0 - bne _0809CE26 - bl DisplayYesNoMenuDefaultYes - adds r0, r4, 0 - movs r1, 0x50 - bl CreateTask -_0809CE26: - movs r0, 0x1 -_0809CE28: - pop {r4} - pop {r1} - bx r1 - .align 2, 0 -_0809CE30: .4byte gSpecialVar_Result -_0809CE34: .4byte sub_809D6D4 - thumb_func_end ScriptMenu_YesNo - - thumb_func_start sub_809CE38 -sub_809CE38: @ 809CE38 - push {lr} - ldr r0, _0809CE48 @ =gSpecialVar_Result - ldrh r0, [r0] - cmp r0, 0xFF - beq _0809CE4C - movs r0, 0x1 - b _0809CE4E - .align 2, 0 -_0809CE48: .4byte gSpecialVar_Result -_0809CE4C: - movs r0, 0 -_0809CE4E: - pop {r1} - bx r1 - thumb_func_end sub_809CE38 - - thumb_func_start task_yes_no_maybe -task_yes_no_maybe: @ 809CE54 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, _0809CE74 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r1, r0, r1 - ldrh r2, [r1, 0xC] - movs r3, 0xC - ldrsh r0, [r1, r3] - cmp r0, 0x4 - bgt _0809CE78 - adds r0, r2, 0x1 - strh r0, [r1, 0xC] - b _0809CEBC - .align 2, 0 -_0809CE74: .4byte gTasks -_0809CE78: - bl Menu_ProcessInputNoWrapClearOnChoose - lsls r0, 24 - asrs r1, r0, 24 - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _0809CE9C - cmp r1, r0 - bgt _0809CE94 - subs r0, 0x1 - cmp r1, r0 - beq _0809CEBC - b _0809CEB2 -_0809CE94: - cmp r1, 0 - beq _0809CEAC - cmp r1, 0x1 - bne _0809CEB2 -_0809CE9C: - movs r0, 0x5 - bl PlaySE - ldr r1, _0809CEA8 @ =gSpecialVar_Result - movs r0, 0 - b _0809CEB0 - .align 2, 0 -_0809CEA8: .4byte gSpecialVar_Result -_0809CEAC: - ldr r1, _0809CEC4 @ =gSpecialVar_Result - movs r0, 0x1 -_0809CEB0: - strh r0, [r1] -_0809CEB2: - adds r0, r4, 0 - bl DestroyTask - bl EnableBothScriptContexts -_0809CEBC: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0809CEC4: .4byte gSpecialVar_Result - thumb_func_end task_yes_no_maybe - thumb_func_start ScriptMenu_MultichoiceGrid ScriptMenu_MultichoiceGrid: @ 809CEC8 push {r4-r7,lr} diff --git a/common_syms/scrcmd.txt b/common_syms/scrcmd.txt new file mode 100644 index 000000000..7fb0245af --- /dev/null +++ b/common_syms/scrcmd.txt @@ -0,0 +1 @@ +gUnknown_3005070 diff --git a/ld_script.txt b/ld_script.txt index 6f0b839cb..584d283a0 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -141,6 +141,7 @@ SECTIONS { src/item.o(.text); asm/shop.o(.text); src/berry.o(.text); + src/script_menu.o(.text); asm/script_menu.o(.text); asm/naming_screen.o(.text); src/money.o(.text); diff --git a/src/scrcmd.c b/src/scrcmd.c index 7a70d09c7..2a6aff709 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -50,15 +50,15 @@ extern const u8 *const gStdScriptsEnd[]; static bool8 sub_806B93C(struct ScriptContext * ctx); static u8 sub_806B96C(struct ScriptContext * ctx); -EWRAM_DATA ptrdiff_t gVScriptOffset = 0; -EWRAM_DATA u8 gUnknown_20370AC = 0; -EWRAM_DATA u16 sPauseCounter = 0; -EWRAM_DATA u16 sMovingNpcId = 0; -EWRAM_DATA u16 sMovingNpcMapBank = 0; -EWRAM_DATA u16 sMovingNpcMapId = 0; -EWRAM_DATA u16 sFieldEffectScriptId = 0; - -IWRAM_DATA struct ScriptContext * gUnknown_3005070; +static EWRAM_DATA ptrdiff_t gVScriptOffset = 0; +static EWRAM_DATA u8 gUnknown_20370AC = 0; +static EWRAM_DATA u16 sPauseCounter = 0; +static EWRAM_DATA u16 sMovingNpcId = 0; +static EWRAM_DATA u16 sMovingNpcMapBank = 0; +static EWRAM_DATA u16 sMovingNpcMapId = 0; +static EWRAM_DATA u16 sFieldEffectScriptId = 0; + +struct ScriptContext * gUnknown_3005070; extern u8 gSelectedEventObject; diff --git a/src/script_menu.c b/src/script_menu.c new file mode 100644 index 000000000..d375ece08 --- /dev/null +++ b/src/script_menu.c @@ -0,0 +1,263 @@ +#include "global.h" +#include "palette.h" +#include "text.h" +#include "list_menu.h" +#include "menu.h" +#include "task.h" +#include "sound.h" +#include "script_menu.h" +#include "quest_log.h" +#include "window.h" +#include "new_menu_helpers.h" +#include "event_data.h" +#include "script.h" +#include "constants/songs.h" + +struct MultichoiceListStruct +{ + const struct MenuAction *list; + u8 count; +}; + +EWRAM_DATA u8 gUnknown_2039988 = 0; + +void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); +u8 sub_809CBB4(u8 count); +void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); +void sub_809CC98(u8 taskId); +void sub_809CD48(u8 mcId); +void task_yes_no_maybe(u8 taskId); +void sub_809D6B0(u8 windowId); +u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); + +extern const u8 *const gUnknown_83E072C[]; +extern const u8 *const gUnknown_83E0738[]; +extern const u8 *const gUnknown_83E0748[]; +extern const struct MultichoiceListStruct gUnknown_83E04B0[]; + +u16 sub_809C954(const u8 *str) +{ + return (GetStringWidth(1, str, 0) + 7) / 8; +} + +u8 sub_809C974(const struct ListMenuItem * items, u8 count) +{ + u16 i; + u8 width = sub_809C954(items[0].label); + u8 tmp; + + for (i = 1; i < count; i++) + { + tmp = sub_809C954(items[i].label); + if (width < tmp) + width = tmp; + } + return width; +} + +bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 mcId, u8 ignoreBpress) +{ + if (FuncIsActiveTask(sub_809CC98) == TRUE) + return FALSE; + gSpecialVar_Result = 0xFF; + sub_809CA64(left, top, mcId, ignoreBpress, 0); + return TRUE; +} + +bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 cursorPos) +{ + if (FuncIsActiveTask(sub_809CC98) == TRUE) + return FALSE; + gSpecialVar_Result = 0xFF; + sub_809CA64(left, top, mcId, ignoreBpress, cursorPos); + return TRUE; +} + +void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) +{ + s32 i; + s32 strWidth; + s32 tmp; + u8 width; + u8 height; + u8 count; + u8 windowId; + const struct MenuAction * list; + + if ((ignoreBpress & 2) || sub_81119D4(sub_809D6D4) != TRUE) + { + ignoreBpress &= 1; + count = gUnknown_83E04B0[mcId].count; + list = gUnknown_83E04B0[mcId].list; + strWidth = 0; + for (i = 0; i < count; i++) + { + tmp = GetStringWidth(2, list[i].text, 0); + if (tmp > strWidth) + strWidth = tmp; + } + width = (strWidth + 9) / 8 + 1; + if (left + width > 28) + left = 28 - width; + height = sub_809CBB4(count); + windowId = CreateWindowFromRect(left, top, width, height); + SetStdWindowBorderStyle(windowId, FALSE); + if (mcId == 30 || mcId == 13 || mcId == 41) + MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); + else + MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); + Menu_InitCursor(windowId, 2, 0, 2, 14, count, initPos); + sub_809CC18(ignoreBpress, count, windowId, mcId); + ScheduleBgCopyTilemapToVram(0); + } +} + +u8 sub_809CBB4(u8 count) +{ + switch (count) + { + case 0: + return 1; + case 1: + return 2; + case 2: + return 4; + case 3: + return 6; + case 4: + return 7; + case 5: + return 9; + case 6: + return 11; + case 7: + return 13; + case 8: + return 14; + default: + return 1; + } +} + +void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) +{ + u8 taskId; + if (mcId == 39 || mcId == 47 || mcId == 50) + gUnknown_2039988 = 12; + else + gUnknown_2039988 = 0; + taskId = CreateTask(sub_809CC98, 80); + gTasks[taskId].data[4] = ignoreBpress; + if (count > 3) + gTasks[taskId].data[5] = TRUE; + else + gTasks[taskId].data[5] = FALSE; + gTasks[taskId].data[6] = windowId; + gTasks[taskId].data[7] = mcId; + sub_809CD48(mcId); +} + +void sub_809CC98(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s8 input; + if (!gPaletteFade.active) + { + if (gUnknown_2039988 != 0) + gUnknown_2039988--; + else + { + if (data[5] == FALSE) + input = Menu_ProcessInputNoWrapAround(); + else + input = Menu_ProcessInput(); + if (JOY_NEW(DPAD_UP | DPAD_DOWN)) + sub_809CD48(data[7]); + switch (input) + { + case -2: + return; + case -1: + if (data[4]) + return; + PlaySE(SE_SELECT); + gSpecialVar_Result = 127; + break; + default: + gSpecialVar_Result = input; + break; + } + sub_809D6B0(data[6]); + DestroyTask(taskId); + EnableBothScriptContexts(); + } + } +} + +void sub_809CD48(u8 mcId) +{ + switch (mcId) + { + case 39: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, gUnknown_83E072C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + case 47: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, gUnknown_83E0738[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + case 50: + FillWindowPixelBuffer(0, PIXEL_FILL(1)); + AddTextPrinterParameterized2(0, 2, gUnknown_83E0748[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + break; + } +} + +bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) +{ + if (FuncIsActiveTask(task_yes_no_maybe) == TRUE) + return FALSE; + gSpecialVar_Result = 255; + if (!sub_81119D4(sub_809D6D4)) + { + DisplayYesNoMenuDefaultYes(); + CreateTask(task_yes_no_maybe, 80); + } + return TRUE; +} + +bool8 sub_809CE38(void) +{ + if (gSpecialVar_Result == 255) + return FALSE; + else + return TRUE; +} + +void task_yes_no_maybe(u8 taskId) +{ + s8 input; + if (gTasks[taskId].data[2] < 5) + { + gTasks[taskId].data[2]++; + } + else + { + input = Menu_ProcessInputNoWrapClearOnChoose(); + switch (input) + { + case -2: + return; + case -1: + case 1: + PlaySE(SE_SELECT); + gSpecialVar_Result = FALSE; + break; + case 0: + gSpecialVar_Result = TRUE; + break; + } + DestroyTask(taskId); + EnableBothScriptContexts(); + } +} diff --git a/sym_common.txt b/sym_common.txt index 96ac36e1c..d9f2b1586 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -74,8 +74,7 @@ gUnknown_3005068: @ 3005068 gUnknown_300506C: @ 300506C .space 0x4 -gUnknown_3005070: @ 3005070 - .space 0x4 + .include "scrcmd.o" gSelectedEventObject: @ 3005074 .space 0x4 diff --git a/sym_ewram.txt b/sym_ewram.txt index 1d7f2aaec..55df8793e 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -781,9 +781,10 @@ gUnknown_203996C: @ 203996C gUnknown_2039984: @ 2039984 .space 0x4 -gUnknown_2039988: @ 2039988 - .space 0x4 + .align 2 + .include "src/script_menu.o" + .align 2 gUnknown_203998C: @ 203998C .space 0x4 -- cgit v1.2.3 From 0a440d658b2d4a311381b1d297872e7eece7486f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 11:10:08 -0400 Subject: Finish script_menu code decomp --- asm/script_menu.s | 1330 ---------------------------- data/data_835B488.s | 20 +- data/maps/PewterCity_Museum_1F/scripts.inc | 8 +- data/specials.inc | 4 +- include/event_scripts.h | 3 + include/field_effect.h | 2 + include/quest_log.h | 2 +- include/script_menu.h | 2 +- include/strings.h | 10 + ld_script.txt | 1 - src/berry_powder.c | 2 +- src/field_specials.c | 4 +- src/quest_log.c | 674 +++++++------- src/scrcmd.c | 4 +- src/script_menu.c | 428 ++++++++- 15 files changed, 800 insertions(+), 1694 deletions(-) delete mode 100644 asm/script_menu.s diff --git a/asm/script_menu.s b/asm/script_menu.s deleted file mode 100644 index bf7819eb1..000000000 --- a/asm/script_menu.s +++ /dev/null @@ -1,1330 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start ScriptMenu_MultichoiceGrid -ScriptMenu_MultichoiceGrid: @ 809CEC8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x18 - ldr r4, [sp, 0x38] - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x10] - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x14] - lsls r2, 24 - lsrs r5, r2, 24 - lsls r3, 24 - lsrs r3, 24 - mov r10, r3 - lsls r4, 24 - lsrs r7, r4, 24 - ldr r0, _0809CF04 @ =sub_809CFDC - mov r9, r0 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0809CF08 - movs r0, 0 - b _0809CFBA - .align 2, 0 -_0809CF04: .4byte sub_809CFDC -_0809CF08: - ldr r1, _0809CFCC @ =gSpecialVar_Result - movs r0, 0xFF - strh r0, [r1] - ldr r0, _0809CFD0 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809CFB8 - ldr r1, _0809CFD4 @ =gUnknown_83E04B0 - lsls r0, r5, 3 - adds r0, r1 - ldr r1, [r0] - mov r8, r1 - ldrb r4, [r0, 0x4] - mov r0, r8 - adds r1, r4, 0 - bl sub_809C974 - adds r5, r0, 0 - adds r5, 0x1 - lsls r5, 24 - lsrs r5, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl __udivsi3 - adds r6, r0, 0 - lsls r6, 24 - lsrs r6, 24 - mov r0, r9 - movs r1, 0x50 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r1, _0809CFD8 @ =gTasks - lsls r4, r0, 2 - adds r4, r0 - lsls r4, 3 - adds r4, r1 - movs r0, 0 - mov r9, r0 - mov r1, r10 - strh r1, [r4, 0x10] - adds r2, r5, 0 - muls r2, r7 - lsls r2, 24 - lsrs r2, 24 - lsls r3, r6, 25 - lsrs r3, 24 - ldr r0, [sp, 0x10] - ldr r1, [sp, 0x14] - bl CreateWindowFromRect - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x14] - movs r1, 0 - bl SetStdWindowBorderStyle - ldrb r0, [r4, 0x14] - lsls r5, 27 - lsrs r5, 24 - str r7, [sp] - str r6, [sp, 0x4] - mov r1, r8 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r5, 0 - movs r3, 0x10 - bl MultichoiceGrid_PrintItems - ldrb r0, [r4, 0x14] - str r5, [sp] - str r7, [sp, 0x4] - str r6, [sp, 0x8] - mov r1, r9 - str r1, [sp, 0xC] - movs r1, 0x1 - movs r2, 0 - movs r3, 0x1 - bl MultichoiceGrid_InitCursor - movs r0, 0 - bl ScheduleBgCopyTilemapToVram -_0809CFB8: - movs r0, 0x1 -_0809CFBA: - add sp, 0x18 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0809CFCC: .4byte gSpecialVar_Result -_0809CFD0: .4byte sub_809D6D4 -_0809CFD4: .4byte gUnknown_83E04B0 -_0809CFD8: .4byte gTasks - thumb_func_end ScriptMenu_MultichoiceGrid - - thumb_func_start sub_809CFDC -sub_809CFDC: @ 809CFDC - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, _0809D018 @ =gTasks+0x8 - adds r5, r0, r1 - bl Menu_ProcessInputGridLayout - lsls r0, 24 - asrs r1, r0, 24 - movs r0, 0x2 - negs r0, r0 - cmp r1, r0 - beq _0809D034 - adds r0, 0x1 - cmp r1, r0 - bne _0809D020 - movs r1, 0x8 - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _0809D034 - movs r0, 0x5 - bl PlaySE - ldr r1, _0809D01C @ =gSpecialVar_Result - movs r0, 0x7F - strh r0, [r1] - b _0809D024 - .align 2, 0 -_0809D018: .4byte gTasks+0x8 -_0809D01C: .4byte gSpecialVar_Result -_0809D020: - ldr r0, _0809D03C @ =gSpecialVar_Result - strh r1, [r0] -_0809D024: - ldrb r0, [r5, 0xC] - bl sub_809D6B0 - adds r0, r4, 0 - bl DestroyTask - bl EnableBothScriptContexts -_0809D034: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0809D03C: .4byte gSpecialVar_Result - thumb_func_end sub_809CFDC - - thumb_func_start ScrSpecial_CreatePCMenu -ScrSpecial_CreatePCMenu: @ 809D040 - push {lr} - ldr r0, _0809D060 @ =sub_809CC98 - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809D068 - ldr r1, _0809D064 @ =gSpecialVar_Result - movs r0, 0xFF - strh r0, [r1] - bl sub_809D070 - movs r0, 0x1 - b _0809D06A - .align 2, 0 -_0809D060: .4byte sub_809CC98 -_0809D064: .4byte gSpecialVar_Result -_0809D068: - movs r0, 0 -_0809D06A: - pop {r1} - bx r1 - thumb_func_end ScrSpecial_CreatePCMenu - - thumb_func_start sub_809D070 -sub_809D070: @ 809D070 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0xC - movs r0, 0x2 - movs r1, 0 - bl GetMenuCursorDimensionByFont - lsls r0, 24 - lsrs r7, r0, 24 - movs r0, 0x2 - movs r1, 0x1 - bl GetFontAttribute - ldr r0, _0809D11C @ =gUnknown_8417BB6 - bl sub_809C954 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xA - bgt _0809D0A0 - cmp r0, 0x9 - bge _0809D0AE -_0809D0A0: - ldr r0, _0809D120 @ =0x00000829 - bl FlagGet - lsls r0, 24 - movs r4, 0xD - cmp r0, 0 - beq _0809D0B0 -_0809D0AE: - movs r4, 0xE -_0809D0B0: - ldr r0, _0809D124 @ =0x0000082c - bl FlagGet - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0 - beq _0809D134 - movs r0, 0x5 - mov r9, r0 - movs r0, 0 - movs r1, 0 - adds r2, r4, 0 - movs r3, 0xA - bl CreateWindowFromRect - lsls r0, 24 - lsrs r6, r0, 24 - adds r0, r6, 0 - movs r1, 0 - bl SetStdWindowBorderStyle - ldr r2, _0809D128 @ =gUnknown_8417BD3 - movs r0, 0x22 - str r0, [sp] - movs r5, 0xFF - str r5, [sp, 0x4] - movs r4, 0 - str r4, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized - ldr r2, _0809D12C @ =gUnknown_8417BBE - movs r0, 0x32 - str r0, [sp] - str r5, [sp, 0x4] - str r4, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized - ldr r2, _0809D130 @ =gUnknown_8417BCB - movs r0, 0x42 - str r0, [sp] - str r5, [sp, 0x4] - str r4, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized - b _0809D1A8 - .align 2, 0 -_0809D11C: .4byte gUnknown_8417BB6 -_0809D120: .4byte 0x00000829 -_0809D124: .4byte 0x0000082c -_0809D128: .4byte gUnknown_8417BD3 -_0809D12C: .4byte gUnknown_8417BBE -_0809D130: .4byte gUnknown_8417BCB -_0809D134: - ldr r1, _0809D1D0 @ =0x00000829 - mov r8, r1 - mov r0, r8 - bl FlagGet - lsls r0, 24 - movs r1, 0x3 - mov r9, r1 - cmp r0, 0 - beq _0809D14C - movs r0, 0x4 - mov r9, r0 -_0809D14C: - mov r1, r9 - lsls r3, r1, 1 - movs r0, 0 - movs r1, 0 - adds r2, r4, 0 - bl CreateWindowFromRect - lsls r0, 24 - lsrs r6, r0, 24 - adds r0, r6, 0 - movs r1, 0 - bl SetStdWindowBorderStyle - mov r0, r8 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _0809D188 - ldr r2, _0809D1D4 @ =gUnknown_8417BD3 - movs r0, 0x22 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - str r5, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized -_0809D188: - ldr r2, _0809D1D8 @ =gUnknown_8417BCB - mov r0, r9 - subs r0, 0x1 - lsls r0, 4 - adds r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - str r5, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized -_0809D1A8: - ldr r0, _0809D1DC @ =0x00000834 - bl FlagGet - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _0809D1E4 - ldr r2, _0809D1E0 @ =gUnknown_8417BAC - movs r0, 0x2 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized - b _0809D1FA - .align 2, 0 -_0809D1D0: .4byte 0x00000829 -_0809D1D4: .4byte gUnknown_8417BD3 -_0809D1D8: .4byte gUnknown_8417BCB -_0809D1DC: .4byte 0x00000834 -_0809D1E0: .4byte gUnknown_8417BAC -_0809D1E4: - ldr r2, _0809D248 @ =gUnknown_8417B9F - movs r0, 0x2 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - str r1, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r3, r7, 0 - bl AddTextPrinterParameterized -_0809D1FA: - ldr r4, _0809D24C @ =gStringVar4 - ldr r1, _0809D250 @ =gUnknown_8417BB6 - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r6, 0 - adds r1, r4, 0 - adds r2, r7, 0 - movs r3, 0x12 - bl Menu_PrintFormatIntlPlayerName - movs r0, 0x10 - str r0, [sp] - mov r0, r9 - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl Menu_InitCursor - movs r0, 0 - mov r1, r9 - adds r2, r6, 0 - movs r3, 0xFF - bl sub_809CC18 - movs r0, 0 - bl ScheduleBgCopyTilemapToVram - add sp, 0xC - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0809D248: .4byte gUnknown_8417B9F -_0809D24C: .4byte gStringVar4 -_0809D250: .4byte gUnknown_8417BB6 - thumb_func_end sub_809D070 - - thumb_func_start ScriptMenu_DisplayPCStartupPrompt -ScriptMenu_DisplayPCStartupPrompt: @ 809D254 - push {lr} - sub sp, 0x10 - movs r0, 0 - movs r1, 0x1 - bl sub_80F7768 - ldr r2, _0809D284 @ =gUnknown_81A508A - movs r0, 0 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x2 - movs r3, 0 - bl AddTextPrinterParameterized2 - add sp, 0x10 - pop {r0} - bx r0 - .align 2, 0 -_0809D284: .4byte gUnknown_81A508A - thumb_func_end ScriptMenu_DisplayPCStartupPrompt - - thumb_func_start sub_809D288 -sub_809D288: @ 809D288 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, _0809D2AC @ =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - beq _0809D2E8 - cmp r0, 0x1 - bgt _0809D2B0 - cmp r0, 0 - beq _0809D2CE - b _0809D2E8 - .align 2, 0 -_0809D2AC: .4byte gTasks -_0809D2B0: - cmp r0, 0x2 - beq _0809D2BA - cmp r0, 0x3 - beq _0809D2DC - b _0809D2E8 -_0809D2BA: - movs r0, 0xC - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _0809D2D8 @ =gSprites - adds r0, r1 - ldrb r1, [r4, 0xC] - bl sub_8083A5C -_0809D2CE: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _0809D2E8 - .align 2, 0 -_0809D2D8: .4byte gSprites -_0809D2DC: - ldrb r0, [r4, 0x12] - bl sub_809D6B0 - adds r0, r5, 0 - bl DestroyTask -_0809D2E8: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_809D288 - - thumb_func_start ScriptMenu_ShowPokemonPic -ScriptMenu_ShowPokemonPic: @ 809D2F0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - lsls r1, 24 - lsrs r7, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r0, _0809D318 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0809D31C - movs r0, 0x1 - b _0809D3C2 - .align 2, 0 -_0809D318: .4byte sub_809D6D4 -_0809D31C: - ldr r4, _0809D3B0 @ =sub_809D288 - adds r0, r4, 0 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _0809D3C0 - lsls r1, r7, 19 - movs r0, 0xA0 - lsls r0, 14 - adds r1, r0 - asrs r1, 16 - lsls r2, r6, 19 - adds r2, r0 - asrs r2, 16 - mov r0, r8 - movs r3, 0 - bl sub_8083970 - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - adds r0, r4, 0 - movs r1, 0x50 - bl CreateTask - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r7, 0 - adds r1, r6, 0 - movs r2, 0x8 - movs r3, 0x8 - bl CreateWindowFromRect - ldr r1, _0809D3B4 @ =gTasks - lsls r3, r4, 2 - adds r3, r4 - lsls r3, 3 - adds r3, r1 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - strh r0, [r3, 0x12] - strh r1, [r3, 0x8] - mov r0, r8 - strh r0, [r3, 0xA] - strh r5, [r3, 0xC] - ldr r4, _0809D3B8 @ =gSprites - lsls r1, r5, 4 - adds r1, r5 - lsls r1, 2 - adds r0, r4, 0 - adds r0, 0x1C - adds r0, r1, r0 - ldr r2, _0809D3BC @ =SpriteCallbackDummy - str r2, [r0] - adds r1, r4 - ldrb r2, [r1, 0x5] - movs r0, 0xD - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0x5] - ldrb r0, [r3, 0x12] - movs r1, 0x1 - bl SetStdWindowBorderStyle - movs r0, 0 - bl ScheduleBgCopyTilemapToVram - movs r0, 0x1 - b _0809D3C2 - .align 2, 0 -_0809D3B0: .4byte sub_809D288 -_0809D3B4: .4byte gTasks -_0809D3B8: .4byte gSprites -_0809D3BC: .4byte SpriteCallbackDummy -_0809D3C0: - movs r0, 0 -_0809D3C2: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end ScriptMenu_ShowPokemonPic - - thumb_func_start ScriptMenu_GetPicboxWaitFunc -ScriptMenu_GetPicboxWaitFunc: @ 809D3CC - push {lr} - ldr r0, _0809D3F0 @ =sub_809D288 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xFF - beq _0809D3FC - ldr r0, _0809D3F4 @ =gTasks - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 3 - adds r1, r0 - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - ldr r0, _0809D3F8 @ =sub_809D404 - b _0809D3FE - .align 2, 0 -_0809D3F0: .4byte sub_809D288 -_0809D3F4: .4byte gTasks -_0809D3F8: .4byte sub_809D404 -_0809D3FC: - movs r0, 0 -_0809D3FE: - pop {r1} - bx r1 - thumb_func_end ScriptMenu_GetPicboxWaitFunc - - thumb_func_start sub_809D404 -sub_809D404: @ 809D404 - push {lr} - ldr r0, _0809D418 @ =sub_809D288 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _0809D41C - movs r0, 0 - b _0809D41E - .align 2, 0 -_0809D418: .4byte sub_809D288 -_0809D41C: - movs r0, 0x1 -_0809D41E: - pop {r1} - bx r1 - thumb_func_end sub_809D404 - - thumb_func_start sub_809D424 -sub_809D424: @ 809D424 - push {r4,r5,lr} - ldr r0, _0809D450 @ =sub_809D288 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xFF - beq _0809D48C - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, _0809D454 @ =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0 - blt _0809D48C - cmp r0, 0x2 - ble _0809D458 - cmp r0, 0x3 - beq _0809D480 - b _0809D48C - .align 2, 0 -_0809D450: .4byte sub_809D288 -_0809D454: .4byte gTasks -_0809D458: - movs r0, 0xC - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _0809D47C @ =gSprites - adds r0, r1 - ldrb r1, [r4, 0xC] - bl sub_8083A5C - ldrb r0, [r4, 0x12] - bl sub_809D6B0 - adds r0, r5, 0 - bl DestroyTask - b _0809D48C - .align 2, 0 -_0809D47C: .4byte gSprites -_0809D480: - ldrb r0, [r4, 0x12] - bl sub_809D6B0 - adds r0, r5, 0 - bl DestroyTask -_0809D48C: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_809D424 - - thumb_func_start sub_809D494 -sub_809D494: @ 809D494 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, _0809D4B8 @ =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - beq _0809D4FC - cmp r0, 0x1 - bgt _0809D4BC - cmp r0, 0 - beq _0809D4DE - b _0809D4FC - .align 2, 0 -_0809D4B8: .4byte gTasks -_0809D4BC: - cmp r0, 0x2 - beq _0809D4C6 - cmp r0, 0x3 - beq _0809D4F0 - b _0809D4FC -_0809D4C6: - movs r0, 0xC - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _0809D4E8 @ =gSprites - adds r0, r1 - bl DestroySprite - ldr r0, _0809D4EC @ =0x00001b58 - bl FreeSpriteTilesByTag -_0809D4DE: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _0809D4FC - .align 2, 0 -_0809D4E8: .4byte gSprites -_0809D4EC: .4byte 0x00001b58 -_0809D4F0: - ldrb r0, [r4, 0x12] - bl sub_809D6B0 - adds r0, r5, 0 - bl DestroyTask -_0809D4FC: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_809D494 - - thumb_func_start sub_809D504 -sub_809D504: @ 809D504 - push {r4-r6,lr} - mov r6, r8 - push {r6} - ldr r0, _0809D544 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0809D5F2 - ldr r0, _0809D548 @ =sub_809D494 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _0809D55C - ldr r0, _0809D54C @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x8D - bne _0809D558 - ldr r0, _0809D550 @ =gUnknown_83E17C0 - bl LoadSpriteSheets - ldr r0, _0809D554 @ =gUnknown_83E17A0 - movs r1, 0xE8 - lsls r1, 1 - movs r2, 0x20 - bl LoadPalette - b _0809D572 - .align 2, 0 -_0809D544: .4byte sub_809D6D4 -_0809D548: .4byte sub_809D494 -_0809D54C: .4byte gSpecialVar_0x8004 -_0809D550: .4byte gUnknown_83E17C0 -_0809D554: .4byte gUnknown_83E17A0 -_0809D558: - cmp r0, 0x8E - beq _0809D560 -_0809D55C: - movs r0, 0 - b _0809D5F4 -_0809D560: - ldr r0, _0809D600 @ =gUnknown_83E17D0 - bl LoadSpriteSheets - ldr r0, _0809D604 @ =gUnknown_83E0F80 - movs r1, 0xE8 - lsls r1, 1 - movs r2, 0x20 - bl LoadPalette -_0809D572: - ldr r0, _0809D608 @ =gUnknown_83E0768 - ldr r1, _0809D60C @ =gSpecialVar_0x8005 - mov r8, r1 - ldrh r1, [r1] - lsls r1, 19 - movs r2, 0xA0 - lsls r2, 14 - adds r1, r2 - asrs r1, 16 - ldr r6, _0809D610 @ =gSpecialVar_0x8006 - ldrh r2, [r6] - lsls r2, 19 - movs r3, 0xA0 - lsls r3, 14 - adds r2, r3 - asrs r2, 16 - movs r3, 0 - bl CreateSprite - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - ldr r1, _0809D614 @ =gSprites - lsls r0, r5, 4 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r2, [r0, 0x5] - movs r1, 0xF - ands r1, r2 - movs r2, 0xD0 - orrs r1, r2 - strb r1, [r0, 0x5] - ldr r0, _0809D618 @ =sub_809D494 - movs r1, 0x50 - bl CreateTask - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - mov r1, r8 - ldrb r0, [r1] - ldrb r1, [r6] - movs r2, 0x8 - movs r3, 0x8 - bl CreateWindowFromRect - ldr r2, _0809D61C @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r2 - lsls r0, 24 - lsrs r0, 24 - movs r2, 0 - strh r0, [r1, 0x12] - strh r2, [r1, 0x8] - strh r5, [r1, 0xC] - movs r1, 0x1 - bl SetStdWindowBorderStyle - movs r0, 0 - bl ScheduleBgCopyTilemapToVram -_0809D5F2: - movs r0, 0x1 -_0809D5F4: - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_0809D600: .4byte gUnknown_83E17D0 -_0809D604: .4byte gUnknown_83E0F80 -_0809D608: .4byte gUnknown_83E0768 -_0809D60C: .4byte gSpecialVar_0x8005 -_0809D610: .4byte gSpecialVar_0x8006 -_0809D614: .4byte gSprites -_0809D618: .4byte sub_809D494 -_0809D61C: .4byte gTasks - thumb_func_end sub_809D504 - - thumb_func_start sub_809D620 -sub_809D620: @ 809D620 - push {lr} - ldr r0, _0809D644 @ =sub_809D494 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xFF - beq _0809D64C - ldr r0, _0809D648 @ =gTasks - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 3 - adds r1, r0 - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - movs r0, 0x1 - b _0809D64E - .align 2, 0 -_0809D644: .4byte sub_809D494 -_0809D648: .4byte gTasks -_0809D64C: - movs r0, 0 -_0809D64E: - pop {r1} - bx r1 - thumb_func_end sub_809D620 - - thumb_func_start CreateWindowFromRect -CreateWindowFromRect: @ 809D654 - push {r4,r5,lr} - sub sp, 0x20 - adds r4, r0, 0 - adds r5, r1, 0 - lsls r4, 24 - lsls r5, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x80 - lsls r0, 17 - adds r4, r0 - lsrs r4, 24 - adds r5, r0 - lsrs r5, 24 - str r2, [sp] - str r3, [sp, 0x4] - movs r0, 0xF - str r0, [sp, 0x8] - movs r0, 0x38 - str r0, [sp, 0xC] - add r0, sp, 0x10 - movs r1, 0 - adds r2, r4, 0 - adds r3, r5, 0 - bl SetWindowTemplateFields - ldr r0, [sp, 0x10] - ldr r1, [sp, 0x14] - str r0, [sp, 0x18] - str r1, [sp, 0x1C] - add r0, sp, 0x18 - bl AddWindow - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r4, 0 - bl PutWindowTilemap - adds r0, r4, 0 - add sp, 0x20 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end CreateWindowFromRect - - thumb_func_start sub_809D6B0 -sub_809D6B0: @ 809D6B0 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r4, 0 - bl ClearWindowTilemap - adds r0, r4, 0 - movs r1, 0x1 - bl ClearStdWindowAndFrameToTransparent - adds r0, r4, 0 - bl RemoveWindow - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_809D6B0 - - thumb_func_start sub_809D6D4 -sub_809D6D4: @ 809D6D4 - push {lr} - ldr r0, _0809D74C @ =EventScript_1A7AE0 - bl ScriptContext1_SetupScript - ldr r0, _0809D750 @ =sub_809D288 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xFF - beq _0809D710 - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - ldr r1, _0809D754 @ =gTasks+0x8 - adds r2, r0, r1 - movs r1, 0 - ldrsh r0, [r2, r1] - cmp r0, 0x1 - bgt _0809D710 - movs r0, 0x4 - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _0809D758 @ =gSprites - adds r0, r1 - ldrb r1, [r2, 0x4] - bl sub_8083A5C -_0809D710: - ldr r0, _0809D75C @ =sub_809D494 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xFF - beq _0809D748 - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - ldr r1, _0809D754 @ =gTasks+0x8 - adds r2, r0, r1 - movs r1, 0 - ldrsh r0, [r2, r1] - cmp r0, 0x1 - bgt _0809D748 - movs r0, 0x4 - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _0809D758 @ =gSprites - adds r0, r1 - bl DestroySprite - ldr r0, _0809D760 @ =0x00001b58 - bl FreeSpriteTilesByTag -_0809D748: - pop {r0} - bx r0 - .align 2, 0 -_0809D74C: .4byte EventScript_1A7AE0 -_0809D750: .4byte sub_809D288 -_0809D754: .4byte gTasks+0x8 -_0809D758: .4byte gSprites -_0809D75C: .4byte sub_809D494 -_0809D760: .4byte 0x00001b58 - thumb_func_end sub_809D6D4 - - thumb_func_start sub_809D764 -sub_809D764: @ 809D764 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0xC - ldr r1, _0809D7A0 @ =gSpecialVar_Result - movs r0, 0xFF - strh r0, [r1] - ldr r0, _0809D7A4 @ =sub_809D6D4 - bl sub_81119D4 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0809D784 - b _0809D8A8 -_0809D784: - ldr r0, _0809D7A8 @ =gSpecialVar_0x8005 - ldrh r0, [r0] - cmp r0, 0x1 - bne _0809D7B0 - ldr r0, _0809D7AC @ =gSpecialVar_0x8004 - ldrh r0, [r0] - movs r4, 0x4 - cmp r0, 0x4 - bhi _0809D798 - movs r4, 0x5 -_0809D798: - movs r0, 0x5 - mov r9, r0 - movs r5, 0x2 - b _0809D7B8 - .align 2, 0 -_0809D7A0: .4byte gSpecialVar_Result -_0809D7A4: .4byte sub_809D6D4 -_0809D7A8: .4byte gSpecialVar_0x8005 -_0809D7AC: .4byte gSpecialVar_0x8004 -_0809D7B0: - movs r4, 0 - movs r0, 0x6 - mov r9, r0 - movs r5, 0 -_0809D7B8: - movs r0, 0x2 - movs r1, 0 - bl GetMenuCursorDimensionByFont - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - movs r0, 0x2 - movs r1, 0x1 - bl GetFontAttribute - mov r0, r9 - lsls r3, r0, 1 - movs r0, 0x11 - adds r1, r5, 0 - movs r2, 0xB - bl CreateWindowFromRect - lsls r0, 24 - lsrs r7, r0, 24 - adds r0, r7, 0 - movs r1, 0 - bl SetStdWindowBorderStyle - movs r6, 0 - mov r5, r9 - subs r5, 0x2 - cmp r6, r5 - bge _0809D844 -_0809D7F2: - ldr r0, _0809D820 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r4, r0 - beq _0809D828 - ldr r1, _0809D824 @ =gUnknown_83E17E0 - lsls r0, r4, 2 - adds r0, r1 - ldr r2, [r0] - lsls r0, r6, 4 - adds r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x2 - mov r3, r8 - bl AddTextPrinterParameterized - b _0809D82E - .align 2, 0 -_0809D820: .4byte gSpecialVar_0x8004 -_0809D824: .4byte gUnknown_83E17E0 -_0809D828: - subs r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0809D82E: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x8 - bne _0809D83A - movs r4, 0 -_0809D83A: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, r5 - blt _0809D7F2 -_0809D844: - ldr r2, _0809D8B8 @ =gUnknown_8417DED - lsls r0, r6, 4 - adds r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - movs r5, 0xFF - str r5, [sp, 0x4] - movs r4, 0 - str r4, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x2 - mov r3, r8 - bl AddTextPrinterParameterized - adds r0, r6, 0x1 - lsls r0, 24 - ldr r2, _0809D8BC @ =gOtherText_Exit - lsrs r0, 20 - adds r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - str r5, [sp, 0x4] - str r4, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x2 - mov r3, r8 - bl AddTextPrinterParameterized - movs r0, 0x10 - str r0, [sp] - mov r0, r9 - str r0, [sp, 0x4] - str r4, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl Menu_InitCursor - movs r0, 0 - mov r1, r9 - adds r2, r7, 0 - movs r3, 0xFF - bl sub_809CC18 - movs r0, 0 - bl ScheduleBgCopyTilemapToVram -_0809D8A8: - add sp, 0xC - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0809D8B8: .4byte gUnknown_8417DED -_0809D8BC: .4byte gOtherText_Exit - thumb_func_end sub_809D764 - - thumb_func_start sub_809D8C0 -sub_809D8C0: @ 809D8C0 - push {lr} - ldr r3, _0809D8EC @ =gSpecialVar_Result - ldrh r2, [r3] - adds r1, r2, 0 - cmp r1, 0x7F - beq _0809D930 - ldr r0, _0809D8F0 @ =gSpecialVar_0x8005 - ldrh r0, [r0] - cmp r0, 0x1 - bne _0809D924 - cmp r1, 0x3 - beq _0809D928 - cmp r1, 0x4 - beq _0809D930 - cmp r1, 0 - bne _0809D8F8 - ldr r0, _0809D8F4 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x4 - bls _0809D904 - movs r0, 0x4 - b _0809D94E - .align 2, 0 -_0809D8EC: .4byte gSpecialVar_Result -_0809D8F0: .4byte gSpecialVar_0x8005 -_0809D8F4: .4byte gSpecialVar_0x8004 -_0809D8F8: - cmp r1, 0x1 - bne _0809D90C - ldr r0, _0809D908 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x5 - bls _0809D918 -_0809D904: - movs r0, 0x5 - b _0809D94E - .align 2, 0 -_0809D908: .4byte gSpecialVar_0x8004 -_0809D90C: - cmp r1, 0x2 - bne _0809D94C - ldr r0, _0809D91C @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r0, 0x6 - bls _0809D920 -_0809D918: - movs r0, 0x6 - b _0809D94E - .align 2, 0 -_0809D91C: .4byte gSpecialVar_0x8004 -_0809D920: - movs r0, 0x7 - b _0809D94E -_0809D924: - cmp r1, 0x4 - bne _0809D92C -_0809D928: - movs r0, 0xFE - b _0809D94E -_0809D92C: - cmp r1, 0x5 - bne _0809D934 -_0809D930: - movs r0, 0x7F - b _0809D94E -_0809D934: - ldr r0, _0809D944 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - cmp r1, r0 - bcc _0809D948 - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r0, 16 - b _0809D94E - .align 2, 0 -_0809D944: .4byte gSpecialVar_0x8004 -_0809D948: - ldrh r0, [r3] - b _0809D94E -_0809D94C: - movs r0, 0 -_0809D94E: - pop {r1} - bx r1 - thumb_func_end sub_809D8C0 - - .align 2, 0 @ Don't pad with nop. diff --git a/data/data_835B488.s b/data/data_835B488.s index e49b310a6..a909cfbff 100644 --- a/data/data_835B488.s +++ b/data/data_835B488.s @@ -1033,19 +1033,25 @@ gUnknown_83E0738:: @ 83E0738 gUnknown_83E0748:: @ 83E0748 .incbin "baserom.gba", 0x3E0748, 0x20 -gUnknown_83E0768:: @ 83E0768 - .incbin "baserom.gba", 0x3E0768, 0x818 +sMuseumFossilSprTemplate:: @ 83E0768 + .incbin "baserom.gba", 0x3E0768, 0x18 -gUnknown_83E0F80:: @ 83E0F80 - .incbin "baserom.gba", 0x3E0F80, 0x820 +gUnknown_83E7080:: + .incbin "baserom.gba", 0x3E0780, 0x800 -gUnknown_83E17A0:: @ 83E17A0 +sMuseumAerodactylSprPalette:: @ 83E0F80 + .incbin "baserom.gba", 0x3E0F80, 0x20 + +gUnknown_83E0FA0:: + .incbin "baserom.gba", 0x3E0FA0, 0x800 + +sMuseumKabutopsSprPalette:: @ 83E17A0 .incbin "baserom.gba", 0x3E17A0, 0x20 -gUnknown_83E17C0:: @ 83E17C0 +sMuseumKabutopsSprSheets:: @ 83E17C0 .incbin "baserom.gba", 0x3E17C0, 0x10 -gUnknown_83E17D0:: @ 83E17D0 +sMuseumAerodactylSprSheets:: @ 83E17D0 .incbin "baserom.gba", 0x3E17D0, 0x10 gUnknown_83E17E0:: @ 83E17E0 diff --git a/data/maps/PewterCity_Museum_1F/scripts.inc b/data/maps/PewterCity_Museum_1F/scripts.inc index 8a3bdd640..8d4f9dc6d 100644 --- a/data/maps/PewterCity_Museum_1F/scripts.inc +++ b/data/maps/PewterCity_Museum_1F/scripts.inc @@ -190,9 +190,9 @@ PewterCity_Museum_1F_EventScript_16A512:: @ 816A512 setvar VAR_0x8004, SPECIES_AERODACTYL setvar VAR_0x8005, 10 setvar VAR_0x8006, 3 - special sub_809D504 + special Special_OpenMuseumFossilPic msgbox gUnknown_8190945 - special sub_809D620 + special Special_CloseMuseumFossilPic releaseall end @@ -201,8 +201,8 @@ PewterCity_Museum_1F_EventScript_16A532:: @ 816A532 setvar VAR_0x8004, SPECIES_KABUTOPS setvar VAR_0x8005, 10 setvar VAR_0x8006, 3 - special sub_809D504 + special Special_OpenMuseumFossilPic msgbox gUnknown_8190975 - special sub_809D620 + special Special_CloseMuseumFossilPic releaseall end diff --git a/data/specials.inc b/data/specials.inc index 96d997597..ac15812e3 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -403,8 +403,8 @@ gSpecials:: @ 815FD60 def_special sub_8112364 def_special Special_GetMENewsJisanItemAndState def_special get_unknown_box_id - def_special sub_809D504 - def_special sub_809D620 + def_special Special_OpenMuseumFossilPic + def_special Special_CloseMuseumFossilPic def_special sub_812781C def_special sub_8127888 def_special sub_80803FC diff --git a/include/event_scripts.h b/include/event_scripts.h index 99b453c85..28058af81 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1168,4 +1168,7 @@ extern const u8 gText_SavingDontTurnOffThePower[]; extern const u8 gText_PlayerSavedTheGame[]; extern const u8 gText_DifferentGameFile[]; +// script_menu +extern const u8 EventScript_1A7AE0[]; + #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_effect.h b/include/field_effect.h index 70398313b..4afc5cace 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -21,5 +21,7 @@ void sub_8084784(u8 a0, u8 a1); void sub_8084F2C(u8 a0); void sub_80853CC(u8 a0); void sub_8083598(u8 a0); +void sub_8083A5C(struct Sprite * sprite, u8 spriteId); +u8 sub_8083970(u16 species, s16 x, s16 y, bool8 unused); #endif //GUARD_FIELD_EFFECTS_H diff --git a/include/quest_log.h b/include/quest_log.h index f5fd820b0..b7dcec871 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -25,7 +25,7 @@ void sub_8113550(u16, const u16 *); void sub_811539C(void); void sub_8115748(u16); u8 sub_8112CAC(void); -bool8 sub_81119D4(void (*func)(void)); +bool8 QuestLog_ScheduleRoutineIfNotInPlaybackMode(void (*func)(void)); void sub_8111F38(u16, u16); void sub_8111134(void); void DestroyHelpMessageWindow(u8 a0); diff --git a/include/script_menu.h b/include/script_menu.h index d3d04c65d..95eb30d74 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -10,7 +10,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 va bool8 ScriptMenu_YesNo(u8 var1, u8 var2); bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); -bool32 ScrSpecial_CreatePCMenu(void); +bool8 ScrSpecial_CreatePCMenu(void); void ScriptMenu_DisplayPCStartupPrompt(void); bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); diff --git a/include/strings.h b/include/strings.h index ee7536d9b..121a577a2 100644 --- a/include/strings.h +++ b/include/strings.h @@ -521,4 +521,14 @@ extern const u8 gUnknown_8418142[]; extern const u8 gUnknown_8418152[]; extern const u8 gUnknown_8418163[]; +// script_menu +extern const u8 gUnknown_8417B9F[]; +extern const u8 gUnknown_8417BAC[]; +extern const u8 gUnknown_8417BB6[]; +extern const u8 gUnknown_8417BBE[]; +extern const u8 gUnknown_8417BCB[]; +extern const u8 gUnknown_8417BD3[]; +extern const u8 gUnknown_8417DED[]; +extern const u8 gUnknown_81A508A[]; + #endif //GUARD_STRINGS_H diff --git a/ld_script.txt b/ld_script.txt index 584d283a0..5c3c5ccb7 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -142,7 +142,6 @@ SECTIONS { asm/shop.o(.text); src/berry.o(.text); src/script_menu.o(.text); - asm/script_menu.o(.text); asm/naming_screen.o(.text); src/money.o(.text); asm/script_pokemon_util_80A0058.o(.text); diff --git a/src/berry_powder.c b/src/berry_powder.c index 992e82522..6adf4a4f9 100644 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -111,7 +111,7 @@ void sub_815F094(void) { struct WindowTemplate template; - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) { template = SetWindowTemplateFields(0, 1, 1, 8, 3, 15, 32); gUnknown_203F464 = AddWindow(&template); diff --git a/src/field_specials.c b/src/field_specials.c index 867df4b94..d701a9145 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1064,7 +1064,7 @@ void Special_DrawElevatorCurrentFloorWindow(void) { const u8 *floorname; u32 strwidth; - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) { sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate); TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0); @@ -1137,7 +1137,7 @@ void Special_ListMenu(void) { u8 taskId; struct Task * task; - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) { taskId = CreateTask(Task_CreateScriptListMenu, 8); task = &gTasks[taskId]; diff --git a/src/quest_log.c b/src/quest_log.c index ffced87ee..b5e333688 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -813,13 +813,13 @@ static bool8 sub_8110E68(struct UnkStruct_203AE98 * a0) return FALSE; switch (a0[i].unk_6) { - case 0: - case 1: - gUnknown_203AE08 = sub_8113D48(gUnknown_203AE08, &a0[i]); - break; - default: - gUnknown_203AE08 = sub_8113CC8(gUnknown_203AE08, &a0[i]); - break; + case 0: + case 1: + gUnknown_203AE08 = sub_8113D48(gUnknown_203AE08, &a0[i]); + break; + default: + gUnknown_203AE08 = sub_8113CC8(gUnknown_203AE08, &a0[i]); + break; } if (gUnknown_203AE08 == NULL) { @@ -1176,29 +1176,29 @@ static void sub_811175C(u8 a0, struct UnkStruct_203AE98 * a1) { switch (r4[0] & 0xFFF) { - case 0: - r4 = sub_8113D08(r4, &a1[r6]); - r6++; - break; - case 1: - case 2: - r4 = sub_8113D94(r4, &a1[r6]); - r6++; - break; - case 39: - r4 = sub_8113C20(r4, &a1[r6]); - r6++; - break; - case 41: - r4 = sub_8113C8C(r4, &a1[r6]); - r6++; - break; - default: - r4 = sub_8113A78(r4, &gUnknown_203AE0C[r9]); - if (r9 == 0) - sub_8113ABC(gUnknown_203AE0C[0]); - r9++; - break; + case 0: + r4 = sub_8113D08(r4, &a1[r6]); + r6++; + break; + case 1: + case 2: + r4 = sub_8113D94(r4, &a1[r6]); + r6++; + break; + case 39: + r4 = sub_8113C20(r4, &a1[r6]); + r6++; + break; + case 41: + r4 = sub_8113C8C(r4, &a1[r6]); + r6++; + break; + default: + r4 = sub_8113A78(r4, &gUnknown_203AE0C[r9]); + if (r9 == 0) + sub_8113ABC(gUnknown_203AE0C[0]); + r9++; + break; } if (r4 == NULL) break; @@ -1246,7 +1246,7 @@ void sub_81119C8(void) sub_8111914(); } -bool8 sub_81119D4(void (*a0)(void)) +bool8 QuestLog_ScheduleRoutineIfNotInPlaybackMode(void (*a0)(void)) { u8 taskId; @@ -1260,7 +1260,7 @@ bool8 sub_81119D4(void (*a0)(void)) taskId = CreateTask(sub_8111A34, 80); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; - SetWordTaskArg(taskId, 14, (u32)a0); + SetWordTaskArg(taskId, 14, (uintptr_t)a0); return TRUE; } return FALSE; @@ -1273,25 +1273,25 @@ static void sub_8111A34(u8 taskId) switch (data[1]) { - case 0: - if (++data[0] == 0x7F) - { - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); - gUnknown_203AE94.unk_0_6 = 2; - data[1]++; - } - break; - case 1: - if (!gPaletteFade.active) - { - gUnknown_3005E88 = 0; - routine = (void (*)(void)) GetWordTaskArg(taskId, 14); - if (routine != NULL) - routine(); - DestroyTask(taskId); - gUnknown_203AE8C = sub_8111914; - } - break; + case 0: + if (++data[0] == 0x7F) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + gUnknown_203AE94.unk_0_6 = 2; + data[1]++; + } + break; + case 1: + if (!gPaletteFade.active) + { + gUnknown_3005E88 = 0; + routine = (void (*)(void)) GetWordTaskArg(taskId, 14); + if (routine != NULL) + routine(); + DestroyTask(taskId); + gUnknown_203AE8C = sub_8111914; + } + break; } } @@ -1431,15 +1431,15 @@ static void sub_8111D90(u8 a0) { switch (i) { - default: - y = 1; - break; - case 0: - y = 0; - break; - case 5: - y = 2; - break; + default: + y = 1; + break; + case 0: + y = 0; + break; + case 5: + y = 2; + break; } // r6 = y * 32 @@ -1563,46 +1563,46 @@ static void sub_81120AC(u8 taskId) switch (data[0]) { - case 0: - gDisableMapMusicChangeOnMapLoad = 0; - Overworld_PlaySpecialMapMusic(); - sub_811229C(); - FillWindowPixelRect(gUnknown_203ADFE[0], 0xF, 0, 0, gUnknown_845661C[0].width * 8, gUnknown_845661C[0].height * 8); - data[0]++; - break; - case 1: - if (sub_81121D8(taskId)) + case 0: + gDisableMapMusicChangeOnMapLoad = 0; + Overworld_PlaySpecialMapMusic(); + sub_811229C(); + FillWindowPixelRect(gUnknown_203ADFE[0], 0xF, 0, 0, gUnknown_845661C[0].width * 8, gUnknown_845661C[0].height * 8); + data[0]++; + break; + case 1: + if (sub_81121D8(taskId)) + { + for (i = 0; i < 3; i++) { - for (i = 0; i < 3; i++) - { - ClearWindowTilemap(gUnknown_203ADFE[i]); - CopyWindowToVram(gUnknown_203ADFE[i], 1); - RemoveWindow(gUnknown_203ADFE[i]); - } - data[1] = 0; - data[0]++; + ClearWindowTilemap(gUnknown_203ADFE[i]); + CopyWindowToVram(gUnknown_203ADFE[i], 1); + RemoveWindow(gUnknown_203ADFE[i]); } - break; - case 2: - if (data[1] < 32) - data[1]++; - else - data[0]++; - break; - default: - if (gUnknown_203AE94.unk_0_6 == 1) - sub_8098110(1); - CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400); - Free(gUnknown_203AE90); - gUnknown_203AE94 = (struct UnkStruct_203AE94){}; - sub_80696C0(); - ScriptContext2_Disable(); - gTextFlags.autoScroll = FALSE; - gUnknown_2036E28 = 0; - sub_8082740(0); - gHelpSystemEnabled = TRUE; - DestroyTask(taskId); - break; + data[1] = 0; + data[0]++; + } + break; + case 2: + if (data[1] < 32) + data[1]++; + else + data[0]++; + break; + default: + if (gUnknown_203AE94.unk_0_6 == 1) + sub_8098110(1); + CpuCopy16(gUnknown_203AE90, gPlttBufferUnfaded, 0x400); + Free(gUnknown_203AE90); + gUnknown_203AE94 = (struct UnkStruct_203AE94){}; + sub_80696C0(); + ScriptContext2_Disable(); + gTextFlags.autoScroll = FALSE; + gUnknown_2036E28 = 0; + sub_8082740(0); + gHelpSystemEnabled = TRUE; + DestroyTask(taskId); + break; } } @@ -1834,14 +1834,14 @@ static void sub_8112888(u8 a0) { switch (a0) { - case 1: - if (gUnknown_3005E88 == 1) - gUnknown_3005E88 = 3; - break; - case 2: - if (gUnknown_3005E88 == 3) - gUnknown_3005E88 = 1; - break; + case 1: + if (gUnknown_3005E88 == 1) + gUnknown_3005E88 = 3; + break; + case 2: + if (gUnknown_3005E88 == 3) + gUnknown_3005E88 = 1; + break; } } @@ -1851,24 +1851,24 @@ void sub_81128BC(u8 a0) switch (a0) { - case 1: - if (r1 == 1) - gUnknown_3005E88 = 3; - else if (r1 == 2) - { - gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; - gUnknown_3005E94[sQuestLogIdx].unk_6 = 3; - sQuestLogIdx++; - gUnknown_203B01A = 0; - gUnknown_3005E88 = 4; - } - break; - case 2: - if (r1 == 1) - gUnknown_3005E88 = 1; - else if (r1 == 2) - gUnknown_3005E88 = 2; - break; + case 1: + if (r1 == 1) + gUnknown_3005E88 = 3; + else if (r1 == 2) + { + gUnknown_3005E94[sQuestLogIdx].unk_4 = gUnknown_203B01A; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 3; + sQuestLogIdx++; + gUnknown_203B01A = 0; + gUnknown_3005E88 = 4; + } + break; + case 2: + if (r1 == 1) + gUnknown_3005E88 = 1; + else if (r1 == 2) + gUnknown_3005E88 = 2; + break; } } @@ -1878,64 +1878,64 @@ static void sub_8112940(u8 a0, struct UnkStruct_203AE98 *a1, u16 a2) switch (a0) { - default: - gUnknown_3005E88 = 0; - break; + default: + gUnknown_3005E88 = 0; + break; + case 1: + gUnknown_3005E94 = a1; + sNumQuestLogs = a2 / 8; + for (i = 0; i < 0x40; i++) + { + gUnknown_203AF9A[i][0] |= 0xFF; + gUnknown_203AF9A[i][1] |= 0xFF; + } + sQuestLogIdx = 0; + gUnknown_203B01C = 0; + gUnknown_3005E90 = (struct UnkStruct_3005E90){}; + gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; + gUnknown_203AF9A[0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + gUnknown_203AF9A[0][1] = 0xFF; + gUnknown_3005E88 = 1; + break; + case 2: + gUnknown_3005E94 = a1; + sNumQuestLogs = a2 / 8; + for (i = 0; i < sNumQuestLogs; i++) + { + gUnknown_3005E94[i] = (struct UnkStruct_203AE98){ 0, 0, 0, 0, 0xFFFF, 0xFF }; + } + sQuestLogIdx = 0; + gUnknown_203B01A = 0; + gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + switch (GetPlayerFacingDirection()) + { + case 0: case 1: - gUnknown_3005E94 = a1; - sNumQuestLogs = a2 / 8; - for (i = 0; i < 0x40; i++) - { - gUnknown_203AF9A[i][0] |= 0xFF; - gUnknown_203AF9A[i][1] |= 0xFF; - } - sQuestLogIdx = 0; - gUnknown_203B01C = 0; - gUnknown_3005E90 = (struct UnkStruct_3005E90){}; - gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; - gUnknown_203AF9A[0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; - gUnknown_203AF9A[0][1] = 0xFF; - gUnknown_3005E88 = 1; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; + break; + case 4: + gUnknown_3005E94[sQuestLogIdx].unk_3 = 3; break; case 2: - gUnknown_3005E94 = a1; - sNumQuestLogs = a2 / 8; - for (i = 0; i < sNumQuestLogs; i++) - { - gUnknown_3005E94[i] = (struct UnkStruct_203AE98){ 0, 0, 0, 0, 0xFFFF, 0xFF }; - } - sQuestLogIdx = 0; - gUnknown_203B01A = 0; - gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_6 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; - switch (GetPlayerFacingDirection()) - { - case 0: - case 1: - gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; - break; - case 4: - gUnknown_3005E94[sQuestLogIdx].unk_3 = 3; - break; - case 2: - gUnknown_3005E94[sQuestLogIdx].unk_3 = 1; - break; - case 3: - gUnknown_3005E94[sQuestLogIdx].unk_3 = 2; - break; - } - gUnknown_203B01C = 0; - sQuestLogIdx++; - gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_6 = 2; - gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_1 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_2 = 0; - gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; - sQuestLogIdx++; - gUnknown_3005E88 = 2; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 1; break; + case 3: + gUnknown_3005E94[sQuestLogIdx].unk_3 = 2; + break; + } + gUnknown_203B01C = 0; + sQuestLogIdx++; + gUnknown_3005E94[sQuestLogIdx].unk_4 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_6 = 2; + gUnknown_3005E94[sQuestLogIdx].unk_0 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_1 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_2 = 0; + gUnknown_3005E94[sQuestLogIdx].unk_3 = 0; + sQuestLogIdx++; + gUnknown_3005E88 = 2; + break; } } @@ -1944,67 +1944,67 @@ void sub_8112B3C(void) { switch (gUnknown_3005E88) { - case 0: - break; - case 1: - if (sub_8112CEC()) + case 0: + break; + case 1: + if (sub_8112CEC()) + { + if (gUnknown_203B01A != 0) + gUnknown_203B01A--; + else { - if (gUnknown_203B01A != 0) - gUnknown_203B01A--; - else + while (1) { - while (1) + switch (gUnknown_3005E94[sQuestLogIdx].unk_6) { - switch (gUnknown_3005E94[sQuestLogIdx].unk_6) - { - case 0: - gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; - break; - case 1: - gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][1] = gUnknown_3005E94[sQuestLogIdx].unk_3; - break; - case 2: - *(u32 *)&gUnknown_3005E90 = ((gUnknown_3005E94[sQuestLogIdx].unk_3 << 24) | (gUnknown_3005E94[sQuestLogIdx].unk_2 << 16) | (gUnknown_3005E94[sQuestLogIdx].unk_1 << 8) | (gUnknown_3005E94[sQuestLogIdx].unk_0 << 0)); - break; - case 3: - gUnknown_3005E88 = 3; - break; - case 0xFE: - break; - case 0xFF: - gUnknown_3005E88 = 0; - break; - } - if (gUnknown_3005E88 == 0) - break; - if (++sQuestLogIdx >= sNumQuestLogs) - { - gUnknown_3005E88 = 0; - break; - } - gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; - if (gUnknown_3005E88 == 3) - break; - if (gUnknown_203B01A == 0) - continue; - if (gUnknown_203B01A == 0xFFFF) - break; - } + case 0: + gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][0] = gUnknown_3005E94[sQuestLogIdx].unk_3; + break; + case 1: + gUnknown_203AF9A[gUnknown_3005E94[sQuestLogIdx].unk_0][1] = gUnknown_3005E94[sQuestLogIdx].unk_3; + break; + case 2: + *(u32 *)&gUnknown_3005E90 = ((gUnknown_3005E94[sQuestLogIdx].unk_3 << 24) | (gUnknown_3005E94[sQuestLogIdx].unk_2 << 16) | (gUnknown_3005E94[sQuestLogIdx].unk_1 << 8) | (gUnknown_3005E94[sQuestLogIdx].unk_0 << 0)); + break; + case 3: + gUnknown_3005E88 = 3; + break; + case 0xFE: + break; + case 0xFF: + gUnknown_3005E88 = 0; + break; + } + if (gUnknown_3005E88 == 0) + break; + if (++sQuestLogIdx >= sNumQuestLogs) + { + gUnknown_3005E88 = 0; + break; + } + gUnknown_203B01A = gUnknown_3005E94[sQuestLogIdx].unk_4; + if (gUnknown_3005E88 == 3) + break; + if (gUnknown_203B01A == 0) + continue; + if (gUnknown_203B01A == 0xFFFF) + break; } } - else if (sQuestLogIdx >= sNumQuestLogs) - gUnknown_3005E88 = 0; - break; - case 2: - if (ScriptContext2_IsEnabled() != 1) - gUnknown_203B01A++; - if (sQuestLogIdx >= sNumQuestLogs) - gUnknown_3005E88 = 0; - break; - case 3: - break; - case 4: - break; + } + else if (sQuestLogIdx >= sNumQuestLogs) + gUnknown_3005E88 = 0; + break; + case 2: + if (ScriptContext2_IsEnabled() != 1) + gUnknown_203B01A++; + if (sQuestLogIdx >= sNumQuestLogs) + gUnknown_3005E88 = 0; + break; + case 3: + break; + case 4: + break; } } #else @@ -2203,15 +2203,15 @@ u8 sub_8112CAC(void) { switch (gUnknown_3005E88) { - case 0: - default: - return 0; - case 1: - case 3: - return 1; - case 2: - case 4: - return 2; + case 0: + default: + return 0; + case 1: + case 3: + return 1; + case 2: + case 4: + return 2; } } @@ -2669,27 +2669,27 @@ void BufferStreakTrainerText(void) switch (gSpecialVar_0x8004) { - case 0: - r2 = 0; - r3 = 0; - break; - case 1: - case 2: - case 3: - case 7: - break; - case 4: - r2 = 1; - r3 = 0; - break; - case 5: - r2 = 0; - r3 = 1; - break; - case 6: - r2 = 2; - r3 = 1; - break; + case 0: + r2 = 0; + r3 = 0; + break; + case 1: + case 2: + case 3: + case 7: + break; + case 4: + r2 = 1; + r3 = 0; + break; + case 5: + r2 = 0; + r3 = 1; + break; + case 6: + r2 = 2; + r3 = 1; + break; } sub_8113414(&gSaveBlock2Ptr->linkBattleRecords, r3, r2); } @@ -2702,18 +2702,18 @@ static void sub_8113414(struct LinkBattleRecords * a0, u8 a1, u8 a2) { switch (a2) { - case 0: - StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); - break; - case 1: - StringCopy(gStringVar1, gUnknown_84178D0); // LT. SURGE - break; - case 2: - StringCopy(gStringVar1, gUnknown_84178DA); // KOGA - break; - default: - StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); - break; + case 0: + StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); + break; + case 1: + StringCopy(gStringVar1, gUnknown_84178D0); // LT. SURGE + break; + case 2: + StringCopy(gStringVar1, gUnknown_84178DA); // KOGA + break; + default: + StringCopy(gStringVar1, gSaveBlock1Ptr->rivalName); + break; } } else @@ -3703,48 +3703,48 @@ static const u16 *sub_8113FBC(const u16 *a0) switch (ItemId_GetPocket(r5[0])) { - case POCKET_ITEMS: - case POCKET_POKE_BALLS: - case POCKET_BERRY_POUCH: - StringCopy(gStringVar1, ItemId_GetName(r5[0])); - if (r5[0] == ITEM_ESCAPE_ROPE) - { - sub_80C4DF8(gStringVar2, r5[2]); - StringExpandPlaceholders(gStringVar4, gUnknown_841AFA6); - } - else if (r5[1] != 0xFFFF) - { - QuestLog_AutoGetSpeciesName(r5[1], gStringVar2, 0); - StringExpandPlaceholders(gStringVar4, gUnknown_841A1E7); - } + case POCKET_ITEMS: + case POCKET_POKE_BALLS: + case POCKET_BERRY_POUCH: + StringCopy(gStringVar1, ItemId_GetName(r5[0])); + if (r5[0] == ITEM_ESCAPE_ROPE) + { + sub_80C4DF8(gStringVar2, r5[2]); + StringExpandPlaceholders(gStringVar4, gUnknown_841AFA6); + } + else if (r5[1] != 0xFFFF) + { + QuestLog_AutoGetSpeciesName(r5[1], gStringVar2, 0); + StringExpandPlaceholders(gStringVar4, gUnknown_841A1E7); + } + else + { + StringExpandPlaceholders(gStringVar4, gUnknown_841A210); + } + break; + case POCKET_KEY_ITEMS: + StringCopy(gStringVar1, ItemId_GetName(r5[0])); + StringExpandPlaceholders(gStringVar4, gUnknown_841A220); + break; + case POCKET_TM_CASE: + QuestLog_AutoGetSpeciesName(r5[1], gStringVar1, 0); + StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(r5[0])]); + if (r5[2] != 0xFFFF) + { + StringCopy(gStringVar3, gMoveNames[r5[2]]); + if (r5[0] > ITEM_TM50) + StringExpandPlaceholders(gStringVar4, gUnknown_841A965); else - { - StringExpandPlaceholders(gStringVar4, gUnknown_841A210); - } - break; - case POCKET_KEY_ITEMS: - StringCopy(gStringVar1, ItemId_GetName(r5[0])); - StringExpandPlaceholders(gStringVar4, gUnknown_841A220); - break; - case POCKET_TM_CASE: - QuestLog_AutoGetSpeciesName(r5[1], gStringVar1, 0); - StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(r5[0])]); - if (r5[2] != 0xFFFF) - { - StringCopy(gStringVar3, gMoveNames[r5[2]]); - if (r5[0] > ITEM_TM50) - StringExpandPlaceholders(gStringVar4, gUnknown_841A965); - else - StringExpandPlaceholders(gStringVar4, gUnknown_841A277); - } + StringExpandPlaceholders(gStringVar4, gUnknown_841A277); + } + else + { + if (r5[0] > ITEM_TM50) + StringExpandPlaceholders(gStringVar4, gUnknown_841A938); else - { - if (r5[0] > ITEM_TM50) - StringExpandPlaceholders(gStringVar4, gUnknown_841A938); - else - StringExpandPlaceholders(gStringVar4, gUnknown_841A255); - } - break; + StringExpandPlaceholders(gStringVar4, gUnknown_841A255); + } + break; } return r5 + 3; } @@ -4442,11 +4442,11 @@ static bool8 sub_8114FBC(u16 a0) { switch (a0) { - case 0x96: - case 0x8F ... 0x92: - case 0xF9 ... 0xFA: - case 0x19A: - return TRUE; + case 0x96: + case 0x8F ... 0x92: + case 0xF9 ... 0xFA: + case 0x19A: + return TRUE; } return FALSE; } @@ -4495,22 +4495,22 @@ static const u16 *sub_81150CC(const u16 *a0) switch (gUnknown_203B044.unk_2) { - case 0: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock2Ptr->playerName); - DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gSaveBlock1Ptr->rivalName); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A2E1); - break; - case 1: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock1Ptr->rivalName); - QuestLog_AutoGetSpeciesName(a0[2], NULL, 1); - DynamicPlaceholderTextUtil_SetPlaceholderPtr(2, gSaveBlock2Ptr->playerName); - QuestLog_AutoGetSpeciesName(a0[3], NULL, 3); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A312); - break; - case 2: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_8456AD8[r5[0]]); - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A349); - break; + case 0: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock2Ptr->playerName); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gSaveBlock1Ptr->rivalName); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A2E1); + break; + case 1: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock1Ptr->rivalName); + QuestLog_AutoGetSpeciesName(a0[2], NULL, 1); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(2, gSaveBlock2Ptr->playerName); + QuestLog_AutoGetSpeciesName(a0[3], NULL, 3); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A312); + break; + case 2: + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_8456AD8[r5[0]]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gUnknown_841A349); + break; } return (const u16 *)(r5 + 2); } diff --git a/src/scrcmd.c b/src/scrcmd.c index 2a6aff709..b54e08faa 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1835,7 +1835,7 @@ bool8 ScrCmd_showmoneybox(struct ScriptContext *ctx) u8 y = ScriptReadByte(ctx); u8 ignore = ScriptReadByte(ctx); - if (!ignore && sub_81119D4(sub_809D6D4) != TRUE) + if (!ignore && QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) DrawMoneyBox(GetMoney(&gSaveBlock1Ptr->money), x, y); return FALSE; } @@ -1865,7 +1865,7 @@ bool8 ScrCmd_showcoinsbox(struct ScriptContext *ctx) u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); - if (sub_81119D4(sub_809D6D4) != TRUE) + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) ShowCoinsWindow(GetCoins(), x, y); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index d375ece08..4bc7bfec9 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1,7 +1,6 @@ #include "global.h" #include "palette.h" #include "text.h" -#include "list_menu.h" #include "menu.h" #include "task.h" #include "sound.h" @@ -11,7 +10,12 @@ #include "new_menu_helpers.h" #include "event_data.h" #include "script.h" +#include "strings.h" +#include "string_util.h" +#include "field_effect.h" +#include "event_scripts.h" #include "constants/songs.h" +#include "constants/species.h" struct MultichoiceListStruct { @@ -27,6 +31,9 @@ void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); void sub_809CC98(u8 taskId); void sub_809CD48(u8 mcId); void task_yes_no_maybe(u8 taskId); +void sub_809CFDC(u8 taskId); +void sub_809D070(void); +bool8 sub_809D404(void); void sub_809D6B0(u8 windowId); u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); @@ -34,21 +41,27 @@ extern const u8 *const gUnknown_83E072C[]; extern const u8 *const gUnknown_83E0738[]; extern const u8 *const gUnknown_83E0748[]; extern const struct MultichoiceListStruct gUnknown_83E04B0[]; +extern const struct SpriteSheet sMuseumKabutopsSprSheets[]; +extern const u16 sMuseumKabutopsSprPalette[]; +extern const struct SpriteSheet sMuseumAerodactylSprSheets[]; +extern const u16 sMuseumAerodactylSprPalette[]; +extern const struct SpriteTemplate sMuseumFossilSprTemplate; +extern const u8 *const gUnknown_83E17E0[]; u16 sub_809C954(const u8 *str) { return (GetStringWidth(1, str, 0) + 7) / 8; } -u8 sub_809C974(const struct ListMenuItem * items, u8 count) +u8 sub_809C974(const struct MenuAction * items, u8 count) { u16 i; - u8 width = sub_809C954(items[0].label); + u8 width = sub_809C954(items[0].text); u8 tmp; for (i = 1; i < count; i++) { - tmp = sub_809C954(items[i].label); + tmp = sub_809C954(items[i].text); if (width < tmp) width = tmp; } @@ -84,7 +97,7 @@ void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) u8 windowId; const struct MenuAction * list; - if ((ignoreBpress & 2) || sub_81119D4(sub_809D6D4) != TRUE) + if ((ignoreBpress & 2) || QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) { ignoreBpress &= 1; count = gUnknown_83E04B0[mcId].count; @@ -218,7 +231,7 @@ bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) if (FuncIsActiveTask(task_yes_no_maybe) == TRUE) return FALSE; gSpecialVar_Result = 255; - if (!sub_81119D4(sub_809D6D4)) + if (!QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4)) { DisplayYesNoMenuDefaultYes(); CreateTask(task_yes_no_maybe, 80); @@ -261,3 +274,406 @@ void task_yes_no_maybe(u8 taskId) EnableBothScriptContexts(); } } + +bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount) +{ + const struct MenuAction * list; + u8 count; + u8 width; + u8 rowCount; + u8 taskId; + if (FuncIsActiveTask(sub_809CFDC) == TRUE) + return FALSE; + gSpecialVar_Result = 255; + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + { + list = gUnknown_83E04B0[multichoiceId].list; + count = gUnknown_83E04B0[multichoiceId].count; + width = sub_809C974(list, count) + 1; + rowCount = count / columnCount; + taskId = CreateTask(sub_809CFDC, 80); + gTasks[taskId].data[4] = a4; + gTasks[taskId].data[6] = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); + SetStdWindowBorderStyle(gTasks[taskId].data[6], FALSE); + MultichoiceGrid_PrintItems(gTasks[taskId].data[6], 1, width * 8, 16, columnCount, rowCount, list); + MultichoiceGrid_InitCursor(gTasks[taskId].data[6], 1, 0, 1, width * 8, columnCount, rowCount, 0); + ScheduleBgCopyTilemapToVram(0); + } + return TRUE; +} + +void sub_809CFDC(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s8 input = Menu_ProcessInputGridLayout(); + switch (input) + { + case -2: + return; + case -1: + if (data[4]) + return; + PlaySE(SE_SELECT); + gSpecialVar_Result = 127; + break; + default: + gSpecialVar_Result = input; + break; + } + sub_809D6B0(data[6]); + DestroyTask(taskId); + EnableBothScriptContexts(); +} + +bool8 ScrSpecial_CreatePCMenu(void) +{ + if (FuncIsActiveTask(sub_809CC98) == TRUE) + return FALSE; + gSpecialVar_Result = 255; + sub_809D070(); + return TRUE; +} + +void sub_809D070(void) +{ + u8 cursorWidth = GetMenuCursorDimensionByFont(2, 0); + u8 height = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + u8 windowWidth; + u8 nitems; + u8 windowId; + switch (sub_809C954(gUnknown_8417BB6)) + { + default: + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + windowWidth = 14; + else + windowWidth = 13; + break; + case 9: + case 10: + windowWidth = 14; + break; + } + if (FlagGet(FLAG_SYS_GAME_CLEAR)) + { + nitems = 5; + windowId = CreateWindowFromRect(0, 0, windowWidth, 10); + SetStdWindowBorderStyle(windowId, FALSE); + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BD3, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BBE, cursorWidth, 50, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BCB, cursorWidth, 66, 0xFF, NULL); + } + else + { + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + nitems = 4; + else + nitems = 3; + windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); + SetStdWindowBorderStyle(windowId, FALSE); + if (FlagGet(FLAG_SYS_POKEDEX_GET)) + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BD3, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BCB, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + } + if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) + AddTextPrinterParameterized(windowId, 2, gUnknown_8417BAC, cursorWidth, 2 , 0xFF, NULL); + else + AddTextPrinterParameterized(windowId, 2, gUnknown_8417B9F, cursorWidth, 2 , 0xFF, NULL); + StringExpandPlaceholders(gStringVar4, gUnknown_8417BB6); + Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); + Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + sub_809CC18(FALSE, nitems, windowId, 0xFF); + ScheduleBgCopyTilemapToVram(0); +} + +void ScriptMenu_DisplayPCStartupPrompt(void) +{ + sub_80F7768(0, TRUE); + AddTextPrinterParameterized2(0, 2, gUnknown_81A508A, 0, NULL, 2, 1, 3); +} + +void sub_809D288(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + task->data[0]++; + break; + case 1: + break; + case 2: + sub_8083A5C(&gSprites[task->data[2]], task->data[2]); + task->data[0]++; + break; + case 3: + sub_809D6B0(task->data[5]); + DestroyTask(taskId); + break; + } +} + +bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) +{ + u8 spriteId; + u8 taskId; + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) == TRUE) + return TRUE; + if (FindTaskIdByFunc(sub_809D288) != 0xFF) + return FALSE; + spriteId = sub_8083970(species, 8 * x + 40, 8 * y + 40, FALSE); + taskId = CreateTask(sub_809D288, 80); + gTasks[taskId].data[5] = CreateWindowFromRect(x, y, 8, 8); + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[1] = species; + gTasks[taskId].data[2] = spriteId; + gSprites[spriteId].callback = SpriteCallbackDummy; + gSprites[spriteId].oam.priority = 0; + SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + ScheduleBgCopyTilemapToVram(0); + return TRUE; +} + +bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) +{ + u8 taskId = FindTaskIdByFunc(sub_809D288); + if (taskId == 0xFF) + return NULL; + gTasks[taskId].data[0]++; + return sub_809D404; +} + +bool8 sub_809D404(void) +{ + if (FindTaskIdByFunc(sub_809D288) == 0xFF) + return TRUE; + else + return FALSE; +} + +void sub_809D424(void) +{ + u8 taskId = FindTaskIdByFunc(sub_809D288); + struct Task * task; + if (taskId != 0xFF) + { + task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + case 1: + case 2: + sub_8083A5C(&gSprites[task->data[2]], task->data[2]); + sub_809D6B0(task->data[5]); + DestroyTask(taskId); + break; + case 3: + sub_809D6B0(task->data[5]); + DestroyTask(taskId); + break; + } + } +} + +void sub_809D494(u8 taskId) +{ + struct Task * task = &gTasks[taskId]; + switch (task->data[0]) + { + case 0: + task->data[0]++; + break; + case 1: + break; + case 2: + DestroySprite(&gSprites[task->data[2]]); + FreeSpriteTilesByTag(7000); + task->data[0]++; + break; + case 3: + sub_809D6B0(task->data[5]); + DestroyTask(taskId); + break; + } +} + +bool8 Special_OpenMuseumFossilPic(void) +{ + u8 spriteId; + u8 taskId; + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) == TRUE) + return TRUE; + if (FindTaskIdByFunc(sub_809D494) != 0xFF) + return FALSE; + if (gSpecialVar_0x8004 == SPECIES_KABUTOPS) + { + LoadSpriteSheets(sMuseumKabutopsSprSheets); + LoadPalette(sMuseumKabutopsSprPalette, 0x1D0, 0x20); + } + else if (gSpecialVar_0x8004 == SPECIES_AERODACTYL) + { + LoadSpriteSheets(sMuseumAerodactylSprSheets); + LoadPalette(sMuseumAerodactylSprPalette, 0x1D0, 0x20); + } + else + { + return FALSE; + } + spriteId = CreateSprite(&sMuseumFossilSprTemplate, gSpecialVar_0x8005 * 8 + 40, gSpecialVar_0x8006 * 8 + 40, 0); + gSprites[spriteId].oam.paletteNum = 13; + taskId = CreateTask(sub_809D494, 80); + gTasks[taskId].data[5] = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[2] = spriteId; + SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + ScheduleBgCopyTilemapToVram(0); + return TRUE; +} + +bool8 Special_CloseMuseumFossilPic(void) +{ + u8 taskId = FindTaskIdByFunc(sub_809D494); + if (taskId == 0xFF) + return FALSE; + gTasks[taskId].data[0]++; + return TRUE; +} + +u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height) +{ + struct WindowTemplate template = SetWindowTemplateFields(0, left + 1, top + 1, width, height, 15, 0x038); + u8 windowId = AddWindow(&template); + PutWindowTilemap(windowId); + return windowId; +} + +void sub_809D6B0(u8 windowId) +{ + ClearWindowTilemap(windowId); + ClearStdWindowAndFrameToTransparent(windowId, TRUE); + RemoveWindow(windowId); +} + +void sub_809D6D4(void) +{ + u8 taskId; + s16 *data; + ScriptContext1_SetupScript(EventScript_1A7AE0); + taskId = FindTaskIdByFunc(sub_809D288); + if (taskId != 0xFF) + { + data = gTasks[taskId].data; + if (data[0] < 2) + sub_8083A5C(&gSprites[data[2]], data[2]); + } + taskId = FindTaskIdByFunc(sub_809D494); + if (taskId != 0xFF) + { + data = gTasks[taskId].data; + if (data[0] < 2) + { + DestroySprite(&gSprites[data[2]]); + FreeSpriteTilesByTag(7000); + } + } +} + +void sub_809D764(void) +{ + u8 r4; + u8 top; + u8 nitems; + u8 cursorWidth; + u8 fontHeight; + u8 windowId; + u8 i; + gSpecialVar_Result = 255; + if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + { + if (gSpecialVar_0x8005 == 1) + { + if (gSpecialVar_0x8004 < 5) + r4 = 5; + else + r4 = 4; + nitems = 5; + top = 2; + } + else + { + r4 = 0; + nitems = 6; + top = 0; + } + cursorWidth = GetMenuCursorDimensionByFont(2, 0); + fontHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + windowId = CreateWindowFromRect(17, top, 11, nitems * 2); + SetStdWindowBorderStyle(windowId, FALSE); + for (i = 0; i < nitems - 2; i++) + { + if (r4 != gSpecialVar_0x8004) + AddTextPrinterParameterized(windowId, 2, gUnknown_83E17E0[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + else + i--; + r4++; + if (r4 == 8) + r4 = 0; + } + AddTextPrinterParameterized(windowId, 2, gUnknown_8417DED, cursorWidth, i * 16 + 2, 0xFF, NULL); + i++; + AddTextPrinterParameterized(windowId, 2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); + Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + sub_809CC18(FALSE, nitems, windowId, 0xFF); + ScheduleBgCopyTilemapToVram(0); + } +} + +u16 sub_809D8C0(void) +{ + if (gSpecialVar_Result == 127) + return 127; + if (gSpecialVar_0x8005 == 1) + { + if (gSpecialVar_Result == 3) + { + return 254; + } + else if (gSpecialVar_Result == 4) + { + return 127; + } + else if (gSpecialVar_Result == 0) + { + if (gSpecialVar_0x8004 > 4) + return 4; + else + return 5; + } + else if (gSpecialVar_Result == 1) + { + if (gSpecialVar_0x8004 > 5) + return 5; + else + return 6; + } + else if (gSpecialVar_Result == 2) + { + if (gSpecialVar_0x8004 > 6) + return 6; + else + return 7; + } + } + else + { + if (gSpecialVar_Result == 4) + return 254; + else if (gSpecialVar_Result == 5) + return 127; + else if (gSpecialVar_Result >= gSpecialVar_0x8004) + return gSpecialVar_Result + 1; + else + return gSpecialVar_Result; + } + return 0; +} -- cgit v1.2.3 From 00675eaafba7605bdbf5c16984975e4ed6ad6bde Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 13:23:46 -0400 Subject: script_menu data --- asm/overworld.s | 6 +- data/data_835B488.s | 494 +--------------------- data/event_scripts.s | 93 +++-- data/script_menu/aerodactyl_fossil.png | Bin 0 -> 767 bytes data/script_menu/kabutops_fossil.png | Bin 0 -> 747 bytes data/specials.inc | 4 +- include/constants/menu.h | 7 + include/constants/seagallop.h | 2 + include/event_scripts.h | 6 + include/quest_log.h | 2 +- include/script_menu.h | 4 +- include/strings.h | 156 ++++++- ld_script.txt | 2 + src/berry_powder.c | 2 +- src/coins.c | 2 - src/fame_checker.c | 13 +- src/field_specials.c | 4 +- src/quest_log.c | 122 +++--- src/scrcmd.c | 4 +- src/script_menu.c | 744 ++++++++++++++++++++++++++++++--- 20 files changed, 958 insertions(+), 709 deletions(-) create mode 100644 data/script_menu/aerodactyl_fossil.png create mode 100644 data/script_menu/kabutops_fossil.png create mode 100644 include/constants/menu.h diff --git a/asm/overworld.s b/asm/overworld.s index 3fecdfa5c..553ad6aef 100644 --- a/asm/overworld.s +++ b/asm/overworld.s @@ -3293,7 +3293,7 @@ _080564B0: adds r2, r4, 0 bl sub_805B3E0 _080564BA: - bl sub_811092C + bl RunQuestLogCB add sp, 0x4 pop {r4-r6} pop {r0} @@ -3328,7 +3328,7 @@ sub_80564C8: @ 80564C8 .align 2, 0 _08056508: .4byte gUnknown_3005E90 _0805650C: - bl sub_811092C + bl RunQuestLogCB b _08056522 _08056512: bl sub_8111CD0 @@ -3336,7 +3336,7 @@ _08056512: lsrs r0, 24 cmp r0, 0x1 bne _08056522 - bl sub_811092C + bl RunQuestLogCB _08056522: ldr r0, _08056530 @ =gUnknown_3005E90 bl sub_806C888 diff --git a/data/data_835B488.s b/data/data_835B488.s index a909cfbff..61e8e3cfd 100644 --- a/data/data_835B488.s +++ b/data/data_835B488.s @@ -564,498 +564,8 @@ sBerries:: @ 83DF7E8 gUnknown_83DFC9C:: @ 83DFC9C .incbin "baserom.gba", 0x3DFC9C, 0xB4 -gUnknown_83DFD50:: @ 83DFD50 - .4byte gUnknown_8417938, NULL - .4byte gUnknown_841793C, NULL - -gUnknown_83DFD60:: @ 83DFD60 - .4byte gUnknown_8417ADC, NULL - .4byte gUnknown_8417AE3, NULL - .4byte gUnknown_8417AE9, NULL - .4byte gUnknown_8417AEE, NULL - -gUnknown_83DFD80:: @ 83DFD80 - .4byte gUnknown_84178F0, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFD90:: @ 83DFD90 - .4byte gUnknown_84178EB, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFDA0:: @ 83DFDA0 - .4byte gUnknown_84178FD, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFDB0:: @ 83DFDB0 - .4byte gUnknown_84178F0, NULL - .4byte gUnknown_84178EB, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFDC8:: @ 83DFDC8 - .4byte gUnknown_84178F0, NULL - .4byte gUnknown_84178FD, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFDE0:: @ 83DFDE0 - .4byte gUnknown_84178EB, NULL - .4byte gUnknown_84178FD, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFDF8:: @ 83DFDF8 - .4byte gUnknown_84178F0, NULL - .4byte gUnknown_84178EB, NULL - .4byte gUnknown_84178FD, NULL - .4byte gUnknown_8417907, NULL - -gUnknown_83DFE18:: @ 83DFE18 - .4byte gUnknown_8417914, NULL - .4byte gUnknown_841790C, NULL - .4byte gUnknown_8417910, NULL - .4byte gUnknown_8417918, NULL - .4byte gUnknown_841791C, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFE48:: @ 83DFE48 - .4byte gUnknown_8417938, NULL - .4byte gUnknown_841793C, NULL - .4byte gUnknown_84178E6, NULL - -gUnknown_83DFE60:: @ 83DFE60 - .4byte gUnknown_8417944, NULL - .4byte gUnknown_8417952, NULL - .4byte gUnknown_8417960, NULL - .4byte gUnknown_84178E6, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFE88:: @ 83DFE88 - .4byte gUnknown_8417938, NULL - .4byte gUnknown_841793C, NULL - .4byte gUnknown_84178E6, NULL - -gUnknown_83DFEA0:: @ 83DFEA0 - .4byte gUnknown_841796D, NULL - .4byte gUnknown_841797F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFEB8:: @ 83DFEB8 - .4byte gUnknown_841806D, NULL - .4byte gUnknown_841805D, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFED0:: @ 83DFED0 - .4byte gUnknown_8417D56, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFEE0:: @ 83DFEE0 - .4byte gUnknown_8417D63, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFEF0:: @ 83DFEF0 - .4byte gUnknown_8417D6F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFF00:: @ 83DFF00 - .4byte gUnknown_8417D56, NULL - .4byte gUnknown_8417D6F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFF18:: @ 83DFF18 - .4byte gUnknown_8417D63, NULL - .4byte gUnknown_8417D6F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFF30:: @ 83DFF30 - .4byte gUnknown_8417984, NULL - .4byte gUnknown_841799A, NULL - .4byte gUnknown_84179AD, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFF50:: @ 83DFF50 - .4byte gUnknown_8417A42, NULL - .4byte gUnknown_8417A58, NULL - .4byte gUnknown_8417A6E, NULL - .4byte gUnknown_8417A84, NULL - .4byte gUnknown_8417A9A, NULL - .4byte gUnknown_8417D4C, NULL - -gUnknown_83DFF80:: @ 83DFF80 - .4byte gUnknown_8417F4D, NULL - .4byte gUnknown_8417ED9, NULL - .4byte gUnknown_8417EF7, NULL - .4byte gUnknown_8417F11, NULL - .4byte gUnknown_8417F2F, NULL - .4byte gUnknown_8417D4C, NULL - -gUnknown_83DFFB0:: @ 83DFFB0 - .4byte gUnknown_84179C0, NULL - .4byte gUnknown_84179D6, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83DFFC8:: @ 83DFFC8 - .4byte gUnknown_84179ED, NULL - .4byte gUnknown_84179F7, NULL - -gUnknown_83DFFD8:: @ 83DFFD8 - .4byte gUnknown_8417A37, NULL - .4byte gUnknown_8417A3D, NULL - -gUnknown_83DFFE8:: @ 83DFFE8 - .4byte gUnknown_8417ABC, NULL - .4byte gUnknown_8417AB9, NULL - .4byte gUnknown_8417AB6, NULL - .4byte gUnknown_8417AB3, NULL - .4byte gUnknown_8417AB0, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0018:: @ 83E0018 - .4byte gUnknown_8417C0F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0028:: @ 83E0028 - .4byte gUnknown_8417C1B, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0038:: @ 83E0038 - .4byte gUnknown_8417C0F, NULL - .4byte gUnknown_8417C1B, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0050:: @ 83E0050 - .4byte gUnknown_8417C24, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0060:: @ 83E0060 - .4byte gUnknown_8417C0F, NULL - .4byte gUnknown_8417C24, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0078:: @ 83E0078 - .4byte gUnknown_8417C1B, NULL - .4byte gUnknown_8417C24, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0090:: @ 83E0090 - .4byte gUnknown_8417C0F, NULL - .4byte gUnknown_8417C1B, NULL - .4byte gUnknown_8417C24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A02, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A0C, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A02, NULL - .4byte gUnknown_8417A0C, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A19, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A02, NULL - .4byte gUnknown_8417A19, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A0C, NULL - .4byte gUnknown_8417A19, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - .4byte gUnknown_8417A02, NULL - .4byte gUnknown_8417A0C, NULL - .4byte gUnknown_8417A19, NULL - .4byte gUnknown_8417A24, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0190:: @ 83E0190 - .4byte gUnknown_8417BE2, NULL - .4byte gUnknown_8417BE8, NULL - .4byte gUnknown_8417BF0, NULL - .4byte gUnknown_8417BF8, NULL - .4byte gUnknown_8417C01, NULL - -gUnknown_83E01B8:: @ 83E01B8 - .4byte gUnknown_8417C33, NULL - .4byte gUnknown_8417C4B, NULL - -gUnknown_83E01C8:: @ 83E01C8 - .4byte gUnknown_8417C55, NULL - .4byte gUnknown_8417C6A, NULL - .4byte gUnknown_8417C83, NULL - .4byte gUnknown_8417C9D, NULL - .4byte gUnknown_8417CB7, NULL - .4byte gUnknown_8417D4C, NULL - -gUnknown_83E01F8:: @ 83E01F8 - .4byte gUnknown_8417D79, NULL - .4byte gUnknown_8417D86, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0210:: @ 83E0210 - .4byte gUnknown_8417D90, NULL - .4byte gUnknown_8417DA0, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0228:: @ 83E0228 - .4byte gUnknown_841805D, NULL - .4byte gUnknown_8418061, NULL - .4byte gUnknown_8418069, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0248:: @ 83E0248 - .4byte gUnknown_841807D, NULL - .4byte gUnknown_841808E, NULL - .4byte gUnknown_841809C, NULL - .4byte gOtherText_Quit, NULL - -gUnknown_83E0268:: @ 83E0268 - .4byte gUnknown_8417DFE, NULL - .4byte gUnknown_8417E09, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0280:: @ 83E0280 - .4byte gUnknown_8417DF3, NULL - .4byte gUnknown_8417E09, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0298:: @ 83E0298 - .4byte gUnknown_8417DF3, NULL - .4byte gUnknown_8417DFE, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E02B0:: @ 83E02B0 - .4byte gUnknown_8417D79, NULL - .4byte gUnknown_8417E50, NULL - .4byte gUnknown_8417E5A, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E02D0:: @ 83E02D0 - .4byte gUnknown_8417E66, NULL - .4byte gUnknown_8417E67, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E02E8:: @ 83E02E8 - .4byte gUnknown_8417D79, NULL - .4byte gUnknown_8417E50, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0300:: @ 83E0300 - .4byte gUnknown_8417E72, NULL - .4byte gUnknown_8417E7F, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0318:: @ 83E0318 - .4byte gUnknown_8417E94, NULL - .4byte gUnknown_8417EA4, NULL - -gUnknown_83E0328:: @ 83E0328 - .4byte gUnknown_8417D79, NULL - .4byte gUnknown_8417E50, NULL - .4byte gUnknown_8417E71, NULL - .4byte gUnknown_8417E5A, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0350:: @ 83E0350 - .4byte gUnknown_8417D79, NULL - .4byte gUnknown_8417E50, NULL - .4byte gUnknown_8417E71, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0370:: @ 83E0370 - .4byte gUnknown_8417EB3, NULL - .4byte gUnknown_8417EC1, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0388:: @ 83E0388 - .4byte gUnknown_8417EB3, NULL - .4byte gUnknown_8417ECC, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E03A0:: @ 83E03A0 - .4byte gUnknown_8417EB3, NULL - .4byte gUnknown_8417EC1, NULL - .4byte gUnknown_8417ECC, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E03C0:: @ 83E03C0 - .4byte gUnknown_8417DF3, NULL - .4byte gUnknown_8417DFE, NULL - .4byte gUnknown_8417E09, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E03E0:: @ 83E03E0 - .4byte gUnknown_8417E46, NULL - .4byte gUnknown_8417DFE, NULL - .4byte gUnknown_8417E09, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0400:: @ 83E0400 - .4byte gUnknown_8417E46, NULL - .4byte gUnknown_8417DF3, NULL - .4byte gUnknown_8417E09, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0420:: @ 83E0420 - .4byte gUnknown_8417E46, NULL - .4byte gUnknown_8417DF3, NULL - .4byte gUnknown_8417DFE, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0440:: @ 83E0440 - .4byte gUnknown_8417E46, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0450:: @ 83E0450 - .4byte gUnknown_8417F68, NULL - .4byte gUnknown_8417F67, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0468:: @ 83E0468 - .4byte gUnknown_8417F77, NULL - .4byte gUnknown_8417F69, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E0480:: @ 83E0480 - .4byte gOtherText_Single, NULL - .4byte gOtherText_Double, NULL - .4byte gOtherText_Knockout, NULL - .4byte gOtherText_Mixed, NULL - .4byte gOtherText_Exit, NULL - -gUnknown_83E04A8:: @ 83E04A8 - .4byte gOtherText_Exit, NULL - -gUnknown_83E04B0:: @ 83E04B0 - .4byte gUnknown_83DFD50, 2 - .4byte gUnknown_83E0190, 5 - .4byte gUnknown_83DFD60, 4 - .4byte gUnknown_83DFD80, 2 - .4byte gUnknown_83DFD90, 2 - .4byte gUnknown_83DFDA0, 2 - .4byte gUnknown_83DFDB0, 3 - .4byte gUnknown_83DFDC8, 3 - .4byte gUnknown_83DFDE0, 3 - .4byte gUnknown_83DFDF8, 4 - .4byte gUnknown_83E04A8, 1 - .4byte gUnknown_83E04A8, 1 - .4byte gUnknown_83E04A8, 1 - .4byte gUnknown_83E01B8, 2 - .4byte gUnknown_83E01C8, 6 - .4byte gUnknown_83DFE18, 6 - .4byte gUnknown_83DFE48, 3 - .4byte gUnknown_83DFE60, 5 - .4byte gUnknown_83DFE88, 3 - .4byte gUnknown_83DFEA0, 3 - .4byte gUnknown_83DFEB8, 3 - .4byte gUnknown_83DFED0, 2 - .4byte gUnknown_83DFEE0, 2 - .4byte gUnknown_83DFEF0, 2 - .4byte gUnknown_83DFF00, 3 - .4byte gUnknown_83DFF18, 3 - .4byte gUnknown_83DFF30, 4 - .4byte gUnknown_83DFFB0, 3 - .4byte gUnknown_83DFFC8, 2 - .4byte gUnknown_83DFFD8, 2 - .4byte gUnknown_83DFF50, 6 - .4byte gUnknown_83DFFE8, 6 - .4byte gUnknown_83E0018, 2 - .4byte gUnknown_83E0028, 2 - .4byte gUnknown_83E0038, 3 - .4byte gUnknown_83E0050, 2 - .4byte gUnknown_83E0060, 3 - .4byte gUnknown_83E0078, 3 - .4byte gUnknown_83E0090, 4 - .4byte gUnknown_83E01F8, 3 - .4byte gUnknown_83E0210, 3 - .4byte gUnknown_83DFF80, 6 - .4byte gUnknown_83E0228, 4 - .4byte gUnknown_83E0248, 4 - .4byte gUnknown_83E0268, 3 - .4byte gUnknown_83E0280, 3 - .4byte gUnknown_83E0298, 3 - .4byte gUnknown_83E02B0, 4 - .4byte gUnknown_83E02D0, 3 - .4byte gUnknown_83E0300, 3 - .4byte gUnknown_83E02E8, 3 - .4byte gUnknown_83E0318, 2 - .4byte gUnknown_83E0328, 5 - .4byte gUnknown_83E0350, 4 - .4byte gUnknown_83E0370, 3 - .4byte gUnknown_83E0388, 3 - .4byte gUnknown_83E03A0, 4 - .4byte gUnknown_83E03C0, 4 - .4byte gUnknown_83E03E0, 4 - .4byte gUnknown_83E0400, 4 - .4byte gUnknown_83E0420, 4 - .4byte gUnknown_83E0440, 2 - .4byte gUnknown_83E0450, 3 - .4byte gUnknown_83E0468, 3 - .4byte gUnknown_83E0480, 5 - -gStdStringPtrs:: @ 83E06B8 - .4byte gUnknown_8417ABF - .4byte gUnknown_8417AC4 - .4byte gUnknown_8417ACB - .4byte gUnknown_8417AD0 - .4byte gUnknown_8417AD6 - .4byte gUnknown_8417AF4 - .4byte gUnknown_8417AF9 - .4byte gUnknown_8417B00 - .4byte gUnknown_8417B05 - .4byte gUnknown_8417B0B - .4byte gUnknown_8417B11 - .4byte gUnknown_8417B17 - .4byte gUnknown_8417B21 - .4byte gUnknown_8417B2C - .4byte gUnknown_8417B36 - .4byte gUnknown_8417B3E - .4byte gUnknown_8417B4B - .4byte gUnknown_8417B58 - .4byte gUnknown_8417B65 - .4byte gUnknown_8417B72 - .4byte gUnknown_8417B7C - .4byte gUnknown_8417B87 - .4byte gUnknown_8417B94 - .4byte gUnknown_8417C2D - .4byte gUnknown_8417DA9 - .4byte gUnknown_8417DB6 - .4byte gUnknown_8417DC7 - .4byte gUnknown_8417DD9 - .4byte gUnknown_8417DE1 - -gUnknown_83E072C:: @ 83E072C - .incbin "baserom.gba", 0x3E072C, 0xC - -gUnknown_83E0738:: @ 83E0738 - .incbin "baserom.gba", 0x3E0738, 0x10 - -gUnknown_83E0748:: @ 83E0748 - .incbin "baserom.gba", 0x3E0748, 0x20 - -sMuseumFossilSprTemplate:: @ 83E0768 - .incbin "baserom.gba", 0x3E0768, 0x18 - -gUnknown_83E7080:: - .incbin "baserom.gba", 0x3E0780, 0x800 - -sMuseumAerodactylSprPalette:: @ 83E0F80 - .incbin "baserom.gba", 0x3E0F80, 0x20 - -gUnknown_83E0FA0:: - .incbin "baserom.gba", 0x3E0FA0, 0x800 - -sMuseumKabutopsSprPalette:: @ 83E17A0 - .incbin "baserom.gba", 0x3E17A0, 0x20 - -sMuseumKabutopsSprSheets:: @ 83E17C0 - .incbin "baserom.gba", 0x3E17C0, 0x10 - -sMuseumAerodactylSprSheets:: @ 83E17D0 - .incbin "baserom.gba", 0x3E17D0, 0x10 - -gUnknown_83E17E0:: @ 83E17E0 - .incbin "baserom.gba", 0x3E17E0, 0xAA0 + .section .rodata.83E2280 + .incbin "baserom.gba", 0x3E1800, 0xA80 gUnknown_83E2280:: @ 83E2280 .incbin "baserom.gba", 0x3E2280, 0x10 diff --git a/data/event_scripts.s b/data/event_scripts.s index da56bcf96..ccb9c9446 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -16,6 +16,7 @@ #include "constants/fame_checker.h" #include "constants/seagallop.h" #include "constants/game_stat.h" +#include "constants/menu.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .set FALSE, 0 @@ -1596,7 +1597,7 @@ EventScript_1A6578:: @ 81A6578 switch VAR_RESULT case 0, EventScript_1A65B8 case 1 EventScript_1A6663 - case 127, EventScript_1A6663 + case SCR_MENU_CANCEL, EventScript_1A6663 end EventScript_1A65B8:: @ 81A65B8 @@ -1949,7 +1950,7 @@ EventScript_1A69A8:: @ 81A69A8 case 2, EventScript_1A6A7A case 3, EventScript_1A6A56 case 4, EventScript_1A6A46 - case 127, EventScript_1A6A46 + case SCR_MENU_CANCEL, EventScript_1A6A46 end EventScript_1A69F0:: @ 81A69F0 @@ -4164,7 +4165,7 @@ EventScript_1A8EC5:: @ 81A8EC5 case 0, EventScript_1A8FF9 case 1, EventScript_1A9004 case 2, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A8F12:: @ 81A8F12 @@ -4174,7 +4175,7 @@ EventScript_1A8F12:: @ 81A8F12 case 1, EventScript_1A8FF9 case 2, EventScript_1A9004 case 3, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A8F54:: @ 81A8F54 @@ -4187,7 +4188,7 @@ EventScript_1A8F54:: @ 81A8F54 case 0, EventScript_1A8FEE case 1, EventScript_1A9004 case 2, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A8FA1:: @ 81A8FA1 @@ -4197,7 +4198,7 @@ EventScript_1A8FA1:: @ 81A8FA1 case 1, EventScript_1A8FEE case 2, EventScript_1A9004 case 3, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A8FE3:: @ 81A8FE3 @@ -4230,7 +4231,7 @@ EventScript_1A900F:: @ 81A900F case 0, EventScript_1A8FEE case 1, EventScript_1A8FF9 case 2, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A905C:: @ 81A905C @@ -4240,7 +4241,7 @@ EventScript_1A905C:: @ 81A905C case 1, EventScript_1A8FEE case 2, EventScript_1A8FF9 case 3, EventScript_1A90F6 - case 127, EventScript_1A90F6 + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A909E:: @ 81A909E @@ -4295,31 +4296,31 @@ Movement_1A911C:: @ 81A911C EventScript_1A911E:: @ 81A911E setvar VAR_0x8005, 0 - special sub_809D764 + special Special_DrawSeaGallopDestinationMenu waitstate - specialvar VAR_0x8006, sub_809D8C0 + specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination switch VAR_0x8006 - case 0, EventScript_1A91D5 - case 1, EventScript_1A91E0 - case 2, EventScript_1A91EB - case 3, EventScript_1A91F6 - case 4, EventScript_1A9201 - case 254, EventScript_1A917F - case 127, EventScript_1A90F6 + case SEAGALLOP_VERMILION_CITY, EventScript_1A91D5 + case SEAGALLOP_ONE_ISLAND, EventScript_1A91E0 + case SEAGALLOP_TWO_ISLAND, EventScript_1A91EB + case SEAGALLOP_THREE_ISLAND, EventScript_1A91F6 + case SEAGALLOP_FOUR_ISLAND, EventScript_1A9201 + case SEAGALLOP_MORE, EventScript_1A917F + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A917F:: @ 81A917F setvar VAR_0x8005, 1 - special sub_809D764 + special Special_DrawSeaGallopDestinationMenu waitstate - specialvar VAR_0x8006, sub_809D8C0 + specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination switch VAR_0x8006 - case 4, EventScript_1A9201 - case 5, EventScript_1A920C - case 6, EventScript_1A9217 - case 7, EventScript_1A9222 - case 254, EventScript_1A911E - case 127, EventScript_1A90F6 + case SEAGALLOP_FOUR_ISLAND, EventScript_1A9201 + case SEAGALLOP_FIVE_ISLAND, EventScript_1A920C + case SEAGALLOP_SIX_ISLAND, EventScript_1A9217 + case SEAGALLOP_SEVEN_ISLAND, EventScript_1A9222 + case SEAGALLOP_MORE, EventScript_1A911E + case SCR_MENU_CANCEL, EventScript_1A90F6 end EventScript_1A91D5:: @ 81A91D5 @@ -8006,7 +8007,7 @@ EventScript_1B2A23:: @ 81B2A23 switch VAR_RESULT case 0, EventScript_1B2B98 case 1, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2A4F:: @ 81B2A4F @@ -8014,7 +8015,7 @@ EventScript_1B2A4F:: @ 81B2A4F switch VAR_RESULT case 0, EventScript_1B2C62 case 1, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2A7B:: @ 81B2A7B @@ -8022,7 +8023,7 @@ EventScript_1B2A7B:: @ 81B2A7B switch VAR_RESULT case 0, EventScript_1B2D2C case 1, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2AA7:: @ 81B2AA7 @@ -8031,7 +8032,7 @@ EventScript_1B2AA7:: @ 81B2AA7 case 0, EventScript_1B2B98 case 1, EventScript_1B2C62 case 2, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2ADE:: @ 81B2ADE @@ -8040,7 +8041,7 @@ EventScript_1B2ADE:: @ 81B2ADE case 0, EventScript_1B2B98 case 1, EventScript_1B2D2C case 2, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2B15:: @ 81B2B15 @@ -8049,7 +8050,7 @@ EventScript_1B2B15:: @ 81B2B15 case 0, EventScript_1B2C62 case 1, EventScript_1B2D2C case 2, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2B4C:: @ 81B2B4C @@ -8059,7 +8060,7 @@ EventScript_1B2B4C:: @ 81B2B4C case 1, EventScript_1B2C62 case 2, EventScript_1B2D2C case 3, EventScript_1B2DF6 - case 127, EventScript_1B2DF6 + case SCR_MENU_CANCEL, EventScript_1B2DF6 end EventScript_1B2B8E:: @ 81B2B8E @@ -8612,7 +8613,7 @@ EventScript_1BB467:: @ 81BB467 case 0, EventScript_1BB6AB case 1, EventScript_1BB4A3 case 2, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BB4A3:: @ 81BB4A3 @@ -8632,7 +8633,7 @@ EventScript_1BB4AE:: @ 81BB4AE case 2, EventScript_1BB541 case 3, EventScript_1BB501 case 4, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BB501:: @ 81BB501 @@ -9203,7 +9204,7 @@ EventScript_1BBA51:: @ 81BBA51 case 0, EventScript_1BBA94 case 1, EventScript_1BB82F case 2, EventScript_1BBA88 - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBA88:: @ 81BBA88 @@ -9328,7 +9329,7 @@ EventScript_1BBBE7:: @ 81BBBE7 case 1, EventScript_1BBC97 case 2, EventScript_1BBD35 case 3, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBC32:: @ 81BBC32 @@ -9337,7 +9338,7 @@ EventScript_1BBC32:: @ 81BBC32 case 0, EventScript_1BBC69 case 1, EventScript_1BBC97 case 2, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBC69:: @ 81BBC69 @@ -9363,7 +9364,7 @@ EventScript_1BBC97:: @ 81BBC97 case 2, EventScript_1BBD1C case 3, EventScript_1BBD27 case 4, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBCEA:: @ 81BBCEA @@ -9446,7 +9447,7 @@ EventScript_1BBDBC:: @ 81BBDBC case 0, EventScript_1BBE28 case 1, EventScript_1BBE00 case 2, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBE00:: @ 81BBE00 @@ -9481,7 +9482,7 @@ EventScript_1BBE50:: @ 81BBE50 case 0, EventScript_1BBEBC case 1, EventScript_1BBE94 case 2, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBE94:: @ 81BBE94 @@ -9516,7 +9517,7 @@ EventScript_1BBEE4:: @ 81BBEE4 case 0, EventScript_1BBF50 case 1, EventScript_1BBF28 case 2, EventScript_1BB82F - case 127, EventScript_1BB82F + case SCR_MENU_CANCEL, EventScript_1BB82F end EventScript_1BBF28:: @ 81BBF28 @@ -9663,7 +9664,7 @@ EventScript_1BC060:: @ 81BC060 case 0, EventScript_1BC0B0 case 1, EventScript_1BC0BA case 2, EventScript_1BC0C4 - case 127, EventScript_1BC0C4 + case SCR_MENU_CANCEL, EventScript_1BC0C4 end EventScript_1BC0B0:: @ 81BC0B0 @@ -9702,7 +9703,7 @@ EventScript_1BC0CE:: @ 81BC0CE case 0, EventScript_1BC13A case 1, EventScript_1BC184 case 2, EventScript_1BB83F - case 127, EventScript_1BB83F + case SCR_MENU_CANCEL, EventScript_1BB83F end EventScript_1BC13A:: @ 81BC13A @@ -9755,7 +9756,7 @@ EventScript_1BC1CE:: @ 81BC1CE case 0, EventScript_1BC23A case 1, EventScript_1BC212 case 2, EventScript_1BB83F - case 127, EventScript_1BB83F + case SCR_MENU_CANCEL, EventScript_1BB83F end EventScript_1BC212:: @ 81BC212 @@ -11307,7 +11308,7 @@ EventScript_1BEE44:: @ 81BEE44 case 0, EventScript_1BEE8F case 1, EventScript_1BEEC3 case 2, EventScript_1BEE81 - case 127, EventScript_1BEEC3 + case SCR_MENU_CANCEL, EventScript_1BEEC3 end EventScript_1BEE81:: @ 81BEE81 @@ -11354,7 +11355,7 @@ EventScript_1BEEDB:: @ 81BEEDB case 0, EventScript_1BEF26 case 1, EventScript_1BEF35 case 2, EventScript_1BEF18 - case 127, EventScript_1BEF35 + case SCR_MENU_CANCEL, EventScript_1BEF35 end EventScript_1BEF18:: @ 81BEF18 diff --git a/data/script_menu/aerodactyl_fossil.png b/data/script_menu/aerodactyl_fossil.png new file mode 100644 index 000000000..067483d6e Binary files /dev/null and b/data/script_menu/aerodactyl_fossil.png differ diff --git a/data/script_menu/kabutops_fossil.png b/data/script_menu/kabutops_fossil.png new file mode 100644 index 000000000..e396b080a Binary files /dev/null and b/data/script_menu/kabutops_fossil.png differ diff --git a/data/specials.inc b/data/specials.inc index ac15812e3..1e38298a2 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -431,8 +431,8 @@ gSpecials:: @ 815FD60 def_special Special_HasLearnedAllMovesFromCapeBrinkTutor def_special Special_Credits def_special sub_8153810 - def_special sub_809D764 - def_special sub_809D8C0 + def_special Special_DrawSeaGallopDestinationMenu + def_special Special_GetSelectedSeaGallopDestination def_special sub_8147500 def_special GetPlayerFacingDirection def_special Special_DeoxysSound diff --git a/include/constants/menu.h b/include/constants/menu.h new file mode 100644 index 000000000..b981cca9e --- /dev/null +++ b/include/constants/menu.h @@ -0,0 +1,7 @@ +#ifndef GUARD_CONSTANTS_MENU_H +#define GUARD_CONSTANTS_MENU_H + +#define SCR_MENU_CANCEL 127 +#define SCR_MENU_UNSET 255 + +#endif //GUARD_CONSTANTS_MENU_H diff --git a/include/constants/seagallop.h b/include/constants/seagallop.h index eff4eb7a5..68e847445 100644 --- a/include/constants/seagallop.h +++ b/include/constants/seagallop.h @@ -13,4 +13,6 @@ #define SEAGALLOP_NAVEL_ROCK 9 #define SEAGALLOP_BIRTH_ISLAND 10 +#define SEAGALLOP_MORE 254 + #endif //GUARD_CONSTANTS_SEAGALLOP_H diff --git a/include/event_scripts.h b/include/event_scripts.h index 28058af81..c61e51f04 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -1170,5 +1170,11 @@ extern const u8 gText_DifferentGameFile[]; // script_menu extern const u8 EventScript_1A7AE0[]; +extern const u8 Text_1BC388[]; +extern const u8 Text_1BC3C7[]; +extern const u8 Text_1BCB42[]; +extern const u8 Text_1BCA95[]; +extern const u8 Text_1BCACB[]; +extern const u8 Text_1BCAF2[]; #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/quest_log.h b/include/quest_log.h index b7dcec871..adfe27e1b 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -25,7 +25,7 @@ void sub_8113550(u16, const u16 *); void sub_811539C(void); void sub_8115748(u16); u8 sub_8112CAC(void); -bool8 QuestLog_ScheduleRoutineIfNotInPlaybackMode(void (*func)(void)); +bool8 QuestLog_SchedulePlaybackCB(void (*func)(void)); void sub_8111F38(u16, u16); void sub_8111134(void); void DestroyHelpMessageWindow(u8 a0); diff --git a/include/script_menu.h b/include/script_menu.h index 95eb30d74..d19e6d14d 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -3,7 +3,7 @@ #include "global.h" -extern const u8 *const gStdStringPtrs[9]; +extern const u8 *const gStdStringPtrs[]; bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4); bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5); @@ -14,7 +14,7 @@ bool8 ScrSpecial_CreatePCMenu(void); void ScriptMenu_DisplayPCStartupPrompt(void); bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); -void sub_809D6D4(void); +void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void); void sub_809D424(void); #endif //GUARD_SCRIPT_MENU_H diff --git a/include/strings.h b/include/strings.h index 121a577a2..d4507b41f 100644 --- a/include/strings.h +++ b/include/strings.h @@ -91,7 +91,6 @@ extern const u8 gText_PkmnFainted3[]; extern const u8 gText_Coins[]; extern const u8 gText_EggNickname[]; extern const u8 gStartMenuText_Pokemon[]; -extern const u8 gText_PkmnFainted3[]; extern const u8 gOtherText_Use[]; extern const u8 gOtherText_Toss[]; @@ -99,7 +98,6 @@ extern const u8 gOtherText_Give[]; extern const u8 gOtherText_Exit[]; extern const u8 gText_ThreeHyphens[]; extern const u8 gOtherText_UnkF9_08_Clear_01[]; -extern const u8 gFameCheckerText_ListMenuCursor[]; extern const u8 gText_TimesStrVar1[]; extern const u8 gText_IsSelected[]; extern const u8 gText_ThereIsNoPokemon[]; @@ -116,6 +114,16 @@ extern const u8 gText_TurnedOverItemsWorthYen[]; extern const u8 gPokeDudeText_TMTypes[]; extern const u8 gPokeDudeText_ReadTMDescription[]; extern const u8 gFameCheckerText_Cancel[]; +extern const u8 gFameCheckerText_ListMenuCursor[]; +extern const u8 gFameCheckerText_FameCheckerWillBeClosed[]; +extern const u8 gFameCheckerText_ClearTextbox[]; +extern const u8 gFameCheckerText_MainScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_A_BUTTON}OK$" +extern const u8 gFameCheckerText_PickScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_B_BUTTON}CANCEL$" +extern const u8 gFameCheckerText_FlavorTextUI[]; // "{KEYGFX_START_BUTTON}PICK {KEYGFX_A_BUTTON}READ {KEYGFX_B_BUTTON}CANCEL$" +extern const u8 gFameCheckerOakName[]; // "OAK$" +extern const u8 gFameCheckerDaisyName[]; // "DAISY$" +extern const u8 gFameCheckerBillName[]; // "BILL$" +extern const u8 gFameCheckerMrFujiName[]; // "FUJI$" // teachy_tv extern const u8 gTeachyTvString_TeachBattle[]; @@ -151,8 +159,6 @@ extern const u8 gString_Someone[]; extern const u8 gString_Help[]; extern const u8 gString_HelpSystem_ClearTo8[]; -extern const u8 gOtherText_Give[]; -extern const u8 gFameCheckerText_Cancel[]; extern const u8 gOtherText_StrVar1[]; extern const u8 gOtherText_WhereShouldTheStrVar1BePlaced[]; extern const u8 gOtherText_Powder[]; @@ -185,7 +191,6 @@ extern const u8 BattleText_Rose[]; extern const u8 BattleText_UnknownString3[]; extern const u8 BattleText_GetPumped[]; extern const u8 BattleText_MistShroud[]; -extern const u8 gText_EggNickname[]; extern const u8 gText_BadEgg[]; extern const u8 gText_PkmnsXPreventsSwitching[]; extern u8 *gUnknown_83FD5D0[]; @@ -218,7 +223,6 @@ extern const u8 gUnknown_83FE6E6[]; extern const u8 gText_BattleSwitchWhich[]; extern const u8 gUnknown_83FE770[]; extern const u8 gText_MoveInterfacePP[]; -extern const u8 gUnknown_83FE770[]; extern const u8 gText_MoveInterfaceType[]; extern const u8 gText_LinkStandby[]; extern const u8 gUnknown_83FE725[]; @@ -344,14 +348,6 @@ extern const u8 gText_NewGame[]; extern const u8 gText_Continue[]; extern const u8 gText_MysteryGift[]; extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; -extern const u8 gText_WirelessAdapterIsNotConnected[]; extern const u8 gText_MysteryGiftCantBeUsedWhileWirelessAdapterIsAttached[]; extern const u8 gText_Player[]; extern const u8 gText_Time[]; @@ -381,7 +377,6 @@ extern const u8 gText_WonderNews[]; extern const u8 gText_Exit3[]; extern const u8 gText_WirelessCommunication[]; extern const u8 gText_Friend2[]; -extern const u8 gFameCheckerText_Cancel[]; extern const u8 gText_Receive[]; extern const u8 gText_Send[]; extern const u8 gText_Toss[]; @@ -448,7 +443,6 @@ extern const u8 gText_MailReturnedToBagMessageErased[]; // start_menu extern const u8 gStartMenuText_Pokedex[]; -extern const u8 gStartMenuText_Pokemon[]; extern const u8 gStartMenuText_Bag[]; extern const u8 gStartMenuText_Player[]; extern const u8 gStartMenuText_Save[]; @@ -459,7 +453,6 @@ extern const u8 gUnknown_84162A9[]; extern const u8 gStartMenuDesc_Pokedex[]; extern const u8 gStartMenuDesc_Pokemon[]; extern const u8 gStartMenuDesc_Bag[]; -extern const u8 gStartMenuDesc_Player[]; extern const u8 gStartMenuDesc_Save[]; extern const u8 gStartMenuDesc_Option[]; extern const u8 gStartMenuDesc_Exit[]; @@ -530,5 +523,134 @@ extern const u8 gUnknown_8417BCB[]; extern const u8 gUnknown_8417BD3[]; extern const u8 gUnknown_8417DED[]; extern const u8 gUnknown_81A508A[]; +extern const u8 gOtherText_Double[]; +extern const u8 gOtherText_Knockout[]; +extern const u8 gOtherText_Mixed[]; +extern const u8 gOtherText_Single[]; +extern const u8 gUnknown_84178E6[]; +extern const u8 gUnknown_84178EB[]; +extern const u8 gUnknown_84178F0[]; +extern const u8 gUnknown_84178FD[]; +extern const u8 gUnknown_8417907[]; +extern const u8 gUnknown_841790C[]; +extern const u8 gUnknown_8417910[]; +extern const u8 gUnknown_8417914[]; +extern const u8 gUnknown_8417918[]; +extern const u8 gUnknown_841791C[]; +extern const u8 gUnknown_8417938[]; +extern const u8 gUnknown_841793C[]; +extern const u8 gUnknown_8417944[]; +extern const u8 gUnknown_8417952[]; +extern const u8 gUnknown_8417960[]; +extern const u8 gUnknown_841796D[]; +extern const u8 gUnknown_841797F[]; +extern const u8 gUnknown_8417984[]; +extern const u8 gUnknown_841799A[]; +extern const u8 gUnknown_84179AD[]; +extern const u8 gUnknown_84179C0[]; +extern const u8 gUnknown_84179D6[]; +extern const u8 gUnknown_84179ED[]; +extern const u8 gUnknown_84179F7[]; +extern const u8 gUnknown_8417A02[]; +extern const u8 gUnknown_8417A0C[]; +extern const u8 gUnknown_8417A19[]; +extern const u8 gUnknown_8417A24[]; +extern const u8 gUnknown_8417A37[]; +extern const u8 gUnknown_8417A3D[]; +extern const u8 gUnknown_8417A42[]; +extern const u8 gUnknown_8417A58[]; +extern const u8 gUnknown_8417A6E[]; +extern const u8 gUnknown_8417A84[]; +extern const u8 gUnknown_8417A9A[]; +extern const u8 gUnknown_8417AB0[]; +extern const u8 gUnknown_8417AB3[]; +extern const u8 gUnknown_8417AB6[]; +extern const u8 gUnknown_8417AB9[]; +extern const u8 gUnknown_8417ABC[]; +extern const u8 gUnknown_8417ADC[]; +extern const u8 gUnknown_8417AE3[]; +extern const u8 gUnknown_8417AE9[]; +extern const u8 gUnknown_8417AEE[]; +extern const u8 gUnknown_8417BE2[]; +extern const u8 gUnknown_8417BE8[]; +extern const u8 gUnknown_8417BF0[]; +extern const u8 gUnknown_8417BF8[]; +extern const u8 gUnknown_8417C01[]; +extern const u8 gUnknown_8417C0F[]; +extern const u8 gUnknown_8417C1B[]; +extern const u8 gUnknown_8417C24[]; +extern const u8 gUnknown_8417C33[]; +extern const u8 gUnknown_8417C4B[]; +extern const u8 gUnknown_8417C55[]; +extern const u8 gUnknown_8417C6A[]; +extern const u8 gUnknown_8417C83[]; +extern const u8 gUnknown_8417C9D[]; +extern const u8 gUnknown_8417CB7[]; +extern const u8 gUnknown_8417D4C[]; +extern const u8 gUnknown_8417D56[]; +extern const u8 gUnknown_8417D63[]; +extern const u8 gUnknown_8417D6F[]; +extern const u8 gUnknown_8417D79[]; +extern const u8 gUnknown_8417D86[]; +extern const u8 gUnknown_8417D90[]; +extern const u8 gUnknown_8417DA0[]; +extern const u8 gUnknown_8417DF3[]; +extern const u8 gUnknown_8417DFE[]; +extern const u8 gUnknown_8417E09[]; +extern const u8 gUnknown_8417E46[]; +extern const u8 gUnknown_8417E50[]; +extern const u8 gUnknown_8417E5A[]; +extern const u8 gUnknown_8417E66[]; +extern const u8 gUnknown_8417E67[]; +extern const u8 gUnknown_8417E71[]; +extern const u8 gUnknown_8417E72[]; +extern const u8 gUnknown_8417E7F[]; +extern const u8 gUnknown_8417E94[]; +extern const u8 gUnknown_8417EA4[]; +extern const u8 gUnknown_8417EB3[]; +extern const u8 gUnknown_8417EC1[]; +extern const u8 gUnknown_8417ECC[]; +extern const u8 gUnknown_8417ED9[]; +extern const u8 gUnknown_8417EF7[]; +extern const u8 gUnknown_8417F11[]; +extern const u8 gUnknown_8417F2F[]; +extern const u8 gUnknown_8417F4D[]; +extern const u8 gUnknown_8417F67[]; +extern const u8 gUnknown_8417F68[]; +extern const u8 gUnknown_8417F69[]; +extern const u8 gUnknown_8417F77[]; +extern const u8 gUnknown_8417ABF[]; +extern const u8 gUnknown_8417AC4[]; +extern const u8 gUnknown_8417ACB[]; +extern const u8 gUnknown_8417AD0[]; +extern const u8 gUnknown_8417AD6[]; +extern const u8 gUnknown_8417AF4[]; +extern const u8 gUnknown_8417AF9[]; +extern const u8 gUnknown_8417B00[]; +extern const u8 gUnknown_8417B05[]; +extern const u8 gUnknown_8417B0B[]; +extern const u8 gUnknown_8417B11[]; +extern const u8 gUnknown_8417B17[]; +extern const u8 gUnknown_8417B21[]; +extern const u8 gUnknown_8417B2C[]; +extern const u8 gUnknown_8417B36[]; +extern const u8 gUnknown_8417B3E[]; +extern const u8 gUnknown_8417B4B[]; +extern const u8 gUnknown_8417B58[]; +extern const u8 gUnknown_8417B65[]; +extern const u8 gUnknown_8417B72[]; +extern const u8 gUnknown_8417B7C[]; +extern const u8 gUnknown_8417B87[]; +extern const u8 gUnknown_8417B94[]; +extern const u8 gUnknown_8417C2D[]; +extern const u8 gUnknown_8417DA9[]; +extern const u8 gUnknown_8417DB6[]; +extern const u8 gUnknown_8417DC7[]; +extern const u8 gUnknown_8417DD9[]; +extern const u8 gUnknown_8417DE1[]; +extern const u8 gUnknown_8417E16[]; +extern const u8 gUnknown_8417E22[]; +extern const u8 gUnknown_8417E2E[]; +extern const u8 gUnknown_8417E39[]; #endif //GUARD_STRINGS_H diff --git a/ld_script.txt b/ld_script.txt index 5c3c5ccb7..63c435a2f 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -428,6 +428,8 @@ SECTIONS { src/battle_anim_mon_movement.o(.rodata); src/item.o(.rodata); data/data_835B488.o(.rodata.83DF09C); + src/script_menu.o(.rodata); + data/data_835B488.o(.rodata.83E2280); src/flying.o(.rodata); src/psychic.o(.rodata); src/bug.o(.rodata); diff --git a/src/berry_powder.c b/src/berry_powder.c index 6adf4a4f9..f9d9f7dbb 100644 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -111,7 +111,7 @@ void sub_815F094(void) { struct WindowTemplate template; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { template = SetWindowTemplateFields(0, 1, 1, 8, 3, 15, 32); gUnknown_203F464 = AddWindow(&template); diff --git a/src/coins.c b/src/coins.c index 9de600e7f..e989bac88 100644 --- a/src/coins.c +++ b/src/coins.c @@ -5,8 +5,6 @@ #include "text_window.h" #include "strings.h" -extern const u8 gUnknown_8417C2D[]; - EWRAM_DATA static u8 sCoinsWindowId = 0; #define MAX_COINS 9999 diff --git a/src/fame_checker.c b/src/fame_checker.c index e803a9700..de555b682 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -26,6 +26,7 @@ #include "menu_indicators.h" #include "text_window.h" #include "fame_checker.h" +#include "strings.h" #define SPRITETAG_SELECTOR_CURSOR 1000 #define SPRITETAG_QUESTION_MARK 1001 @@ -123,18 +124,6 @@ static void Task_FCOpenOrCloseInfoBox(u8 taskId); static void UpdateInfoBoxTilemap(u8 bg, s16 state); static void PlaceListMenuCursor(bool8 isActive); -extern const u8 gFameCheckerText_Cancel[]; -extern const u8 gFameCheckerText_ListMenuCursor[]; -extern const u8 gFameCheckerText_FameCheckerWillBeClosed[]; -extern const u8 gFameCheckerText_ClearTextbox[]; -extern const u8 gFameCheckerText_MainScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_A_BUTTON}OK$" -extern const u8 gFameCheckerText_PickScreenUI[]; // "{KEYGFX_DPAD_ANY}PICK {KEYGFX_DPAD_UP_DOWN}SELECT {KEYGFX_B_BUTTON}CANCEL$" -extern const u8 gFameCheckerText_FlavorTextUI[]; // "{KEYGFX_START_BUTTON}PICK {KEYGFX_A_BUTTON}READ {KEYGFX_B_BUTTON}CANCEL$" -extern const u8 gFameCheckerOakName[]; // "OAK$" -extern const u8 gFameCheckerDaisyName[]; // "DAISY$" -extern const u8 gFameCheckerBillName[]; // "BILL$" -extern const u8 gFameCheckerMrFujiName[]; // "FUJI$" - static const u16 sFameCheckerTilemap[] = INCBIN_U16("data/fame_checker/tilemap_845c600.bin"); static const u8 sQuestionMarkSpriteGfx[] = INCBIN_U8("data/fame_checker/img_845ce00.4bpp"); static const u8 sSpinningPokeballSpriteGfx[] = INCBIN_U8("data/fame_checker/img_845cf00.4bpp"); diff --git a/src/field_specials.c b/src/field_specials.c index d701a9145..3c482e5bc 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1064,7 +1064,7 @@ void Special_DrawElevatorCurrentFloorWindow(void) { const u8 *floorname; u32 strwidth; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate); TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0); @@ -1137,7 +1137,7 @@ void Special_ListMenu(void) { u8 taskId; struct Task * task; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { taskId = CreateTask(Task_CreateScriptListMenu, 8); task = &gTasks[taskId]; diff --git a/src/quest_log.c b/src/quest_log.c index b5e333688..a51def1b9 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -38,6 +38,7 @@ #include "quest_log_8150454.h" #include "quest_log.h" #include "new_menu_helpers.h" +#include "strings.h" u8 gUnknown_3005E88; @@ -100,7 +101,7 @@ static EWRAM_DATA u8 gUnknown_203ADFE[3] = {0}; static EWRAM_DATA u16 *gUnknown_203AE04 = NULL; static EWRAM_DATA u16 *gUnknown_203AE08 = NULL; static EWRAM_DATA u16 *gUnknown_203AE0C[32] = {NULL}; -static EWRAM_DATA void (* gUnknown_203AE8C)(void) = NULL; +static EWRAM_DATA void (* sQuestLogCB)(void) = NULL; static EWRAM_DATA u16 *gUnknown_203AE90 = NULL; static EWRAM_DATA struct UnkStruct_203AE94 gUnknown_203AE94 = {0}; static EWRAM_DATA struct UnkStruct_203AE98 gUnknown_203AE98[32] = {0}; @@ -135,17 +136,17 @@ static u16 QuestLog_GetSaneBoxCount(void); static void sub_8111688(void); static void sub_811175C(u8, struct UnkStruct_203AE98 *); static void sub_81118F4(s8); -static void sub_8111914(void); -static void sub_8111984(void); -static void sub_8111A34(u8); +static void QuestLog_AdvancePlayhead(void); +static void QuestLog_EndPlayback(void); +static void Task_RunPlaybackCB(u8); static void sub_8111AD8(void); static void sub_8111B80(void); static u8 sub_8111BD4(void); static void sub_8111D10(void); static void sub_8111D90(u8); static void sub_8111E20(void); -static void sub_8111E64(s8); -static void sub_8111E84(void); +static void QuestLog_SkipToEndOfPlayback(s8); +static void QuestLog_WaitFadeAndCancelPlayback(void); static bool8 sub_8111F60(void); static void sub_8111F8C(u8); static void sub_8111FCC(u8); @@ -177,7 +178,7 @@ static bool8 sub_8113954(u16, u16 *); static void sub_8113A1C(u16); static void sub_811381C(void); static bool8 sub_8113A44(u16, u16 *); -static u16 *sub_8113A78(u16 *, u16 **); +static u16 *QuestLog_SkipCommand(u16 *, u16 **); static void sub_8113ABC(u16 *); static bool8 sub_8113AE8(u16 *); static bool8 sub_8113B44(u16 *); @@ -437,9 +438,9 @@ void sub_811089C(void) memset(gSaveBlock1Ptr->questLog, 0, sizeof(gSaveBlock1Ptr->questLog)); gUnknown_203ADF8 = 0; gUnknown_203ADFA = 0; - gUnknown_203AE8C = 0; + sQuestLogCB = 0; gUnknown_203AE08 = NULL; - gUnknown_203AE04 = 0; + gUnknown_203AE04 = NULL; sub_8113BD8(); sub_81138F8(); } @@ -455,10 +456,10 @@ void sub_8110920(void) gUnknown_203AE04 = NULL; } -void sub_811092C(void) +void RunQuestLogCB(void) { - if (gUnknown_203AE8C) - gUnknown_203AE8C(); + if (sQuestLogCB) + sQuestLogCB(); } bool8 sub_8110944(const void * a0, size_t a1) @@ -485,9 +486,9 @@ void sub_81109CC(u8 a0) { gUnknown_203ADFA = a0; if (a0 == 1) - gUnknown_203AE8C = sub_8110A00; + sQuestLogCB = sub_8110A00; else - gUnknown_203AE8C = sub_8110A3C; + sQuestLogCB = sub_8110A3C; } static void sub_8110A00(void) @@ -497,7 +498,7 @@ static void sub_8110A00(void) gUnknown_3005E88 = 0; sub_8110E3C(); gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } } @@ -1194,7 +1195,7 @@ static void sub_811175C(u8 a0, struct UnkStruct_203AE98 * a1) r6++; break; default: - r4 = sub_8113A78(r4, &gUnknown_203AE0C[r9]); + r4 = QuestLog_SkipCommand(r4, &gUnknown_203AE0C[r9]); if (r9 == 0) sub_8113ABC(gUnknown_203AE0C[0]); r9++; @@ -1208,10 +1209,10 @@ static void sub_811175C(u8 a0, struct UnkStruct_203AE98 * a1) static void sub_81118F4(s8 a0) { fade_screen(1, a0); - gUnknown_203AE8C = sub_8111914; + sQuestLogCB = QuestLog_AdvancePlayhead; } -static void sub_8111914(void) +static void QuestLog_AdvancePlayhead(void) { if (!gPaletteFade.active) { @@ -1224,12 +1225,12 @@ static void sub_8111914(void) else { gUnknown_3005E88 = 0; - sub_8111984(); + QuestLog_EndPlayback(); } } } -static void sub_8111984(void) +static void QuestLog_EndPlayback(void) { ResetSpecialVars(); Save_ResetSaveCounters(); @@ -1238,15 +1239,15 @@ static void sub_8111984(void) gFieldCallback2 = sub_8111F60; FreeAllWindowBuffers(); gUnknown_203ADFA = 3; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } void sub_81119C8(void) { - sub_8111914(); + QuestLog_AdvancePlayhead(); } -bool8 QuestLog_ScheduleRoutineIfNotInPlaybackMode(void (*a0)(void)) +bool8 QuestLog_SchedulePlaybackCB(void (*callback)(void)) { u8 taskId; @@ -1257,16 +1258,16 @@ bool8 QuestLog_ScheduleRoutineIfNotInPlaybackMode(void (*a0)(void)) break; case 2: gUnknown_3005E88 = 3; - taskId = CreateTask(sub_8111A34, 80); + taskId = CreateTask(Task_RunPlaybackCB, 80); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; - SetWordTaskArg(taskId, 14, (uintptr_t)a0); + SetWordTaskArg(taskId, 14, (uintptr_t)callback); return TRUE; } return FALSE; } -static void sub_8111A34(u8 taskId) +static void Task_RunPlaybackCB(u8 taskId) { void (*routine)(void); s16 *data = gTasks[taskId].data; @@ -1289,7 +1290,7 @@ static void sub_8111A34(u8 taskId) if (routine != NULL) routine(); DestroyTask(taskId); - gUnknown_203AE8C = sub_8111914; + sQuestLogCB = QuestLog_AdvancePlayhead; } break; } @@ -1384,7 +1385,7 @@ void sub_8111C68(void) { gUnknown_203AE94.unk_0_6 = 1; gUnknown_3005E88 = 0; - sub_8111E64(-3); + QuestLog_SkipToEndOfPlayback(-3); } } } @@ -1465,13 +1466,13 @@ static void sub_8111E20(void) CopyWindowToVram(gUnknown_203ADFE[1], 1); } -static void sub_8111E64(s8 a0) +static void QuestLog_SkipToEndOfPlayback(s8 a0) { fade_screen(1, a0); - gUnknown_203AE8C = sub_8111E84; + sQuestLogCB = QuestLog_WaitFadeAndCancelPlayback; } -static void sub_8111E84(void) +static void QuestLog_WaitFadeAndCancelPlayback(void) { if (!gPaletteFade.active) { @@ -1483,7 +1484,7 @@ static void sub_8111E84(void) sub_811175C(gUnknown_203ADF8, gUnknown_203AE98); } gUnknown_3005E88 = 0; - sub_8111984(); + QuestLog_EndPlayback(); } } @@ -1643,7 +1644,7 @@ void sub_811231C(void) sub_8110E68(gUnknown_203AE98); sub_8110E3C(); gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; gUnknown_203AE04 = NULL; gUnknown_203AE08 = NULL; gUnknown_3005E88 = 0; @@ -1659,7 +1660,7 @@ void sub_8112364(void) sub_8110E3C(); gUnknown_3005E88 = 0; gUnknown_203ADFA = 0; - gUnknown_203AE8C = NULL; + sQuestLogCB = NULL; } gUnknown_203AE04 = NULL; gUnknown_203AE08 = NULL; @@ -3313,7 +3314,7 @@ static const u16 *(*const sQuestLogScriptParsingCBs[])(const u16 *) = { sub_8115800 }; -static const u8 gUnknown_8456AA0[] = { +static const u8 sQuestLogEventCmdSizes[] = { 0x08, 0x08, 0x08, @@ -3359,16 +3360,16 @@ static const u8 gUnknown_8456AA0[] = { 0x06 }; -static u16 *sub_8113A78(u16 *a0, u16 **a1) +static u16 *QuestLog_SkipCommand(u16 *curPtr, u16 **prevPtr_p) { - u16 r2 = a0[0] & 0xfff; - u16 r4 = a0[0] >> 12; - if (r2 == 33) - r4 = 0; - if (r2 < 3 || r2 > 42) + u16 idx = curPtr[0] & 0xfff; + u16 cnt = curPtr[0] >> 12; + if (idx == 33) + cnt = 0; + if (idx < 3 || idx > 42) return NULL; - *a1 = a0; - return gUnknown_8456AA0[r2] + (gUnknown_8456AA0[r2] - 4) * r4 + (void *)a0; + *prevPtr_p = curPtr; + return sQuestLogEventCmdSizes[idx] + (sQuestLogEventCmdSizes[idx] - 4) * cnt + (void *)curPtr; } static void sub_8113ABC(u16 *a0) @@ -3484,7 +3485,7 @@ static void sub_8113BD8(void) static u16 *sub_8113BF4(u16 *a0) { - if (!sub_8110988(a0, gUnknown_8456AA0[39])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[39])) return NULL; a0[0] = 39; return a0 + 1; @@ -3492,7 +3493,7 @@ static u16 *sub_8113BF4(u16 *a0) static u16 *sub_8113C20(u16 *a0, struct UnkStruct_203AE98 * a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[39])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[39])) return NULL; a1->unk_6 = 0xFF; a1->unk_4 = 0; @@ -3505,7 +3506,7 @@ static u16 *sub_8113C20(u16 *a0, struct UnkStruct_203AE98 * a1) static u16 *sub_8113C5C(u16 *a0, u16 a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[41])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[41])) return NULL; a0[0] = 41; a0[1] = a1; @@ -3514,7 +3515,7 @@ static u16 *sub_8113C5C(u16 *a0, u16 a1) static u16 *sub_8113C8C(u16 *a0, struct UnkStruct_203AE98 * a1) { - if (!sub_8110988(a0, gUnknown_8456AA0[41])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[41])) return NULL; a1->unk_6 = 0xFE; a1->unk_4 = a0[1]; @@ -3529,7 +3530,7 @@ static u16 *sub_8113CC8(u16 *a0, struct UnkStruct_203AE98 * a1) { u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(a0, gUnknown_8456AA0[0])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[0])) return NULL; a0[0] = 0; a0[1] = a1->unk_4; @@ -3544,7 +3545,7 @@ static u16 *sub_8113D08(u16 *a0, struct UnkStruct_203AE98 * a1) { u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(a0, gUnknown_8456AA0[0])) + if (!sub_8110988(a0, sQuestLogEventCmdSizes[0])) return NULL; a1->unk_6 = 2; a1->unk_4 = a0[1]; @@ -3560,7 +3561,7 @@ static u16 *sub_8113D48(u16 *a0, struct UnkStruct_203AE98 * a1) u16 *r4 = a0; u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(r4, gUnknown_8456AA0[2])) + if (!sub_8110988(r4, sQuestLogEventCmdSizes[2])) return NULL; if (a1->unk_6 == 0) r4[0] = 2; @@ -3579,7 +3580,7 @@ static u16 *sub_8113D94(u16 *a0, struct UnkStruct_203AE98 * a1) u16 *r5 = a0; u8 *r6 = (u8 *)a0 + 4; - if (!sub_8110988(r5, gUnknown_8456AA0[2])) + if (!sub_8110988(r5, sQuestLogEventCmdSizes[2])) return NULL; if (r5[0] == 2) a1->unk_6 = 0; @@ -3601,9 +3602,9 @@ u16 *sub_8113DE0(u16 a0, u16 *a1) u8 r1; if (gUnknown_203B044.unk_1 == 0) - r6 = gUnknown_8456AA0[a0]; + r6 = sQuestLogEventCmdSizes[a0]; else - r6 = gUnknown_8456AA0[a0] - 4; + r6 = sQuestLogEventCmdSizes[a0] - 4; if (!sub_8110944(a1, r6)) return NULL; @@ -3635,13 +3636,10 @@ u16 *sub_8113DE0(u16 a0, u16 *a1) static const u16 *sub_8113E88(u16 a0, const u16 *a1) { - a1 = (const void *)a1 + (gUnknown_203B044.unk_2 * (gUnknown_8456AA0[a0] - 4) + 4); + a1 = (const void *)a1 + (gUnknown_203B044.unk_2 * (sQuestLogEventCmdSizes[a0] - 4) + 4); return a1; } -// TODO: delete this declaration once data_83FECCC.s is decompiled -extern const u8 gText_EggNickname[]; - void QuestLog_AutoGetSpeciesName(u16 a0, u8 *a1, u8 a2) { if (a1 != NULL) @@ -3873,7 +3871,7 @@ static u16 *sub_81143F0(u16 *a0, const u16 *a1) if (gUnknown_203B044.unk_0 == 11 && gUnknown_203B044.unk_1 != 0) return r4; - if (!sub_8110944(a0, gUnknown_8456AA0[11])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[11])) return NULL; r4[0] = 11; @@ -4371,7 +4369,7 @@ static u16 *sub_8114DE8(u16 *a0, const u16 *a1) { u16 *r4 = a0; u8 *r5 = (u8 *)a0 + 8; - if (!sub_8110944(r4, gUnknown_8456AA0[31])) + if (!sub_8110944(r4, sQuestLogEventCmdSizes[31])) return NULL; if (r5[0] == 0 && r5[1] == 0) { @@ -4393,7 +4391,7 @@ static u16 *sub_8114DE8(u16 *a0, const u16 *a1) static const u16 *sub_8114E68(const u16 *a0) { const u8 *r6; - if (!sub_8110944(a0, gUnknown_8456AA0[31])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[31])) return NULL; r6 = (const u8 *)a0 + 8; @@ -4473,7 +4471,7 @@ static const u16 *sub_811500C(const u16 *a0) static u16 *sub_8115078(u16 *a0, const u16 *a1) { - if (!sub_8110944(a0, gUnknown_8456AA0[33])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[33])) return NULL; a0[0] = 0x2021; a0[1] = sQuestLogIdx; @@ -4487,7 +4485,7 @@ static u16 *sub_8115078(u16 *a0, const u16 *a1) static const u16 *sub_81150CC(const u16 *a0) { const u8 *r5; - if (!sub_8110944(a0, gUnknown_8456AA0[33])) + if (!sub_8110944(a0, sQuestLogEventCmdSizes[33])) return NULL; r5 = (const u8 *)a0 + 8; diff --git a/src/scrcmd.c b/src/scrcmd.c index b54e08faa..be8e328db 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1835,7 +1835,7 @@ bool8 ScrCmd_showmoneybox(struct ScriptContext *ctx) u8 y = ScriptReadByte(ctx); u8 ignore = ScriptReadByte(ctx); - if (!ignore && QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if (!ignore && QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) DrawMoneyBox(GetMoney(&gSaveBlock1Ptr->money), x, y); return FALSE; } @@ -1865,7 +1865,7 @@ bool8 ScrCmd_showcoinsbox(struct ScriptContext *ctx) u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) ShowCoinsWindow(GetCoins(), x, y); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index 4bc7bfec9..a06d80bb1 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -16,6 +16,8 @@ #include "event_scripts.h" #include "constants/songs.h" #include "constants/species.h" +#include "constants/seagallop.h" +#include "constants/menu.h" struct MultichoiceListStruct { @@ -33,20 +35,628 @@ void sub_809CD48(u8 mcId); void task_yes_no_maybe(u8 taskId); void sub_809CFDC(u8 taskId); void sub_809D070(void); -bool8 sub_809D404(void); +bool8 PicboxWait(void); void sub_809D6B0(u8 windowId); u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); -extern const u8 *const gUnknown_83E072C[]; -extern const u8 *const gUnknown_83E0738[]; -extern const u8 *const gUnknown_83E0748[]; -extern const struct MultichoiceListStruct gUnknown_83E04B0[]; -extern const struct SpriteSheet sMuseumKabutopsSprSheets[]; -extern const u16 sMuseumKabutopsSprPalette[]; -extern const struct SpriteSheet sMuseumAerodactylSprSheets[]; -extern const u16 sMuseumAerodactylSprPalette[]; -extern const struct SpriteTemplate sMuseumFossilSprTemplate; -extern const u8 *const gUnknown_83E17E0[]; + +static const struct MenuAction sScriptMultiChoiceMenu_0[] = { + { gUnknown_8417938 }, + { gUnknown_841793C } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_2[] = { + { gUnknown_8417ADC }, + { gUnknown_8417AE3 }, + { gUnknown_8417AE9 }, + { gUnknown_8417AEE } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_3[] = { + { gUnknown_84178F0 }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_4[] = { + { gUnknown_84178EB }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_5[] = { + { gUnknown_84178FD }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_6[] = { + { gUnknown_84178F0 }, + { gUnknown_84178EB }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_7[] = { + { gUnknown_84178F0 }, + { gUnknown_84178FD }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_8[] = { + { gUnknown_84178EB }, + { gUnknown_84178FD }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_9[] = { + { gUnknown_84178F0 }, + { gUnknown_84178EB }, + { gUnknown_84178FD }, + { gUnknown_8417907 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_15[] = { + { gUnknown_8417914 }, + { gUnknown_841790C }, + { gUnknown_8417910 }, + { gUnknown_8417918 }, + { gUnknown_841791C }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_16[] = { + { gUnknown_8417938 }, + { gUnknown_841793C }, + { gUnknown_84178E6 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_17[] = { + { gUnknown_8417944 }, + { gUnknown_8417952 }, + { gUnknown_8417960 }, + { gUnknown_84178E6 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_18[] = { + { gUnknown_8417938 }, + { gUnknown_841793C }, + { gUnknown_84178E6 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_19[] = { + { gUnknown_841796D }, + { gUnknown_841797F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_20[] = { + { gUnknown_841806D }, + { gUnknown_841805D }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_21[] = { + { gUnknown_8417D56 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_22[] = { + { gUnknown_8417D63 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_23[] = { + { gUnknown_8417D6F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_24[] = { + { gUnknown_8417D56 }, + { gUnknown_8417D6F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_25[] = { + { gUnknown_8417D63 }, + { gUnknown_8417D6F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_26[] = { + { gUnknown_8417984 }, + { gUnknown_841799A }, + { gUnknown_84179AD }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_30[] = { + { gUnknown_8417A42 }, + { gUnknown_8417A58 }, + { gUnknown_8417A6E }, + { gUnknown_8417A84 }, + { gUnknown_8417A9A }, + { gUnknown_8417D4C } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_41[] = { + { gUnknown_8417F4D }, + { gUnknown_8417ED9 }, + { gUnknown_8417EF7 }, + { gUnknown_8417F11 }, + { gUnknown_8417F2F }, + { gUnknown_8417D4C } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_27[] = { + { gUnknown_84179C0 }, + { gUnknown_84179D6 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_28[] = { + { gUnknown_84179ED }, + { gUnknown_84179F7 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_29[] = { + { gUnknown_8417A37 }, + { gUnknown_8417A3D } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_31[] = { + { gUnknown_8417ABC }, + { gUnknown_8417AB9 }, + { gUnknown_8417AB6 }, + { gUnknown_8417AB3 }, + { gUnknown_8417AB0 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_32[] = { + { gUnknown_8417C0F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_33[] = { + { gUnknown_8417C1B }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_34[] = { + { gUnknown_8417C0F }, + { gUnknown_8417C1B }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_35[] = { + { gUnknown_8417C24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_36[] = { + { gUnknown_8417C0F }, + { gUnknown_8417C24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_37[] = { + { gUnknown_8417C1B }, + { gUnknown_8417C24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_38[] = { + { gUnknown_8417C0F }, + { gUnknown_8417C1B }, + { gUnknown_8417C24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_0[] = { + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_1[] = { + { gUnknown_8417A02 }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_2[] = { + { gUnknown_8417A0C }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_3[] = { + { gUnknown_8417A02 }, + { gUnknown_8417A0C }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_4[] = { + { gUnknown_8417A19 }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_5[] = { + { gUnknown_8417A02 }, + { gUnknown_8417A19 }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_6[] = { + { gUnknown_8417A0C }, + { gUnknown_8417A19 }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { + { gUnknown_8417A02 }, + { gUnknown_8417A0C }, + { gUnknown_8417A19 }, + { gUnknown_8417A24 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_1[] = { + { gUnknown_8417BE2 }, + { gUnknown_8417BE8 }, + { gUnknown_8417BF0 }, + { gUnknown_8417BF8 }, + { gUnknown_8417C01 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_13[] = { + { gUnknown_8417C33 }, + { gUnknown_8417C4B } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_14[] = { + { gUnknown_8417C55 }, + { gUnknown_8417C6A }, + { gUnknown_8417C83 }, + { gUnknown_8417C9D }, + { gUnknown_8417CB7 }, + { gUnknown_8417D4C } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_39[] = { + { gUnknown_8417D79 }, + { gUnknown_8417D86 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_40[] = { + { gUnknown_8417D90 }, + { gUnknown_8417DA0 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_42[] = { + { gUnknown_841805D }, + { gUnknown_8418061 }, + { gUnknown_8418069 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_43[] = { + { gUnknown_841807D }, + { gUnknown_841808E }, + { gUnknown_841809C }, + { gOtherText_Quit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_44[] = { + { gUnknown_8417DFE }, + { gUnknown_8417E09 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_45[] = { + { gUnknown_8417DF3 }, + { gUnknown_8417E09 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_46[] = { + { gUnknown_8417DF3 }, + { gUnknown_8417DFE }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_47[] = { + { gUnknown_8417D79 }, + { gUnknown_8417E50 }, + { gUnknown_8417E5A }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_48[] = { + { gUnknown_8417E66 }, + { gUnknown_8417E67 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_50[] = { + { gUnknown_8417D79 }, + { gUnknown_8417E50 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_49[] = { + { gUnknown_8417E72 }, + { gUnknown_8417E7F }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_51[] = { + { gUnknown_8417E94 }, + { gUnknown_8417EA4 } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_52[] = { + { gUnknown_8417D79 }, + { gUnknown_8417E50 }, + { gUnknown_8417E71 }, + { gUnknown_8417E5A }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_53[] = { + { gUnknown_8417D79 }, + { gUnknown_8417E50 }, + { gUnknown_8417E71 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_54[] = { + { gUnknown_8417EB3 }, + { gUnknown_8417EC1 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_55[] = { + { gUnknown_8417EB3 }, + { gUnknown_8417ECC }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_56[] = { + { gUnknown_8417EB3 }, + { gUnknown_8417EC1 }, + { gUnknown_8417ECC }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_57[] = { + { gUnknown_8417DF3 }, + { gUnknown_8417DFE }, + { gUnknown_8417E09 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_58[] = { + { gUnknown_8417E46 }, + { gUnknown_8417DFE }, + { gUnknown_8417E09 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_59[] = { + { gUnknown_8417E46 }, + { gUnknown_8417DF3 }, + { gUnknown_8417E09 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_60[] = { + { gUnknown_8417E46 }, + { gUnknown_8417DF3 }, + { gUnknown_8417DFE }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_61[] = { + { gUnknown_8417E46 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_62[] = { + { gUnknown_8417F68 }, + { gUnknown_8417F67 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_63[] = { + { gUnknown_8417F77 }, + { gUnknown_8417F69 }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_64[] = { + { gOtherText_Single }, + { gOtherText_Double }, + { gOtherText_Knockout }, + { gOtherText_Mixed }, + { gOtherText_Exit } +}; + +static const struct MenuAction sScriptMultiChoiceMenu_10[] = { + { gOtherText_Exit } +}; + +const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { + { sScriptMultiChoiceMenu_0, NELEMS(sScriptMultiChoiceMenu_0) }, + { sScriptMultiChoiceMenu_1, NELEMS(sScriptMultiChoiceMenu_1) }, + { sScriptMultiChoiceMenu_2, NELEMS(sScriptMultiChoiceMenu_2) }, + { sScriptMultiChoiceMenu_3, NELEMS(sScriptMultiChoiceMenu_3) }, + { sScriptMultiChoiceMenu_4, NELEMS(sScriptMultiChoiceMenu_4) }, + { sScriptMultiChoiceMenu_5, NELEMS(sScriptMultiChoiceMenu_5) }, + { sScriptMultiChoiceMenu_6, NELEMS(sScriptMultiChoiceMenu_6) }, + { sScriptMultiChoiceMenu_7, NELEMS(sScriptMultiChoiceMenu_7) }, + { sScriptMultiChoiceMenu_8, NELEMS(sScriptMultiChoiceMenu_8) }, + { sScriptMultiChoiceMenu_9, NELEMS(sScriptMultiChoiceMenu_9) }, + { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, + { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, + { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, + { sScriptMultiChoiceMenu_13, NELEMS(sScriptMultiChoiceMenu_13) }, + { sScriptMultiChoiceMenu_14, NELEMS(sScriptMultiChoiceMenu_14) }, + { sScriptMultiChoiceMenu_15, NELEMS(sScriptMultiChoiceMenu_15) }, + { sScriptMultiChoiceMenu_16, NELEMS(sScriptMultiChoiceMenu_16) }, + { sScriptMultiChoiceMenu_17, NELEMS(sScriptMultiChoiceMenu_17) }, + { sScriptMultiChoiceMenu_18, NELEMS(sScriptMultiChoiceMenu_18) }, + { sScriptMultiChoiceMenu_19, NELEMS(sScriptMultiChoiceMenu_19) }, + { sScriptMultiChoiceMenu_20, NELEMS(sScriptMultiChoiceMenu_20) }, + { sScriptMultiChoiceMenu_21, NELEMS(sScriptMultiChoiceMenu_21) }, + { sScriptMultiChoiceMenu_22, NELEMS(sScriptMultiChoiceMenu_22) }, + { sScriptMultiChoiceMenu_23, NELEMS(sScriptMultiChoiceMenu_23) }, + { sScriptMultiChoiceMenu_24, NELEMS(sScriptMultiChoiceMenu_24) }, + { sScriptMultiChoiceMenu_25, NELEMS(sScriptMultiChoiceMenu_25) }, + { sScriptMultiChoiceMenu_26, NELEMS(sScriptMultiChoiceMenu_26) }, + { sScriptMultiChoiceMenu_27, NELEMS(sScriptMultiChoiceMenu_27) }, + { sScriptMultiChoiceMenu_28, NELEMS(sScriptMultiChoiceMenu_28) }, + { sScriptMultiChoiceMenu_29, NELEMS(sScriptMultiChoiceMenu_29) }, + { sScriptMultiChoiceMenu_30, NELEMS(sScriptMultiChoiceMenu_30) }, + { sScriptMultiChoiceMenu_31, NELEMS(sScriptMultiChoiceMenu_31) }, + { sScriptMultiChoiceMenu_32, NELEMS(sScriptMultiChoiceMenu_32) }, + { sScriptMultiChoiceMenu_33, NELEMS(sScriptMultiChoiceMenu_33) }, + { sScriptMultiChoiceMenu_34, NELEMS(sScriptMultiChoiceMenu_34) }, + { sScriptMultiChoiceMenu_35, NELEMS(sScriptMultiChoiceMenu_35) }, + { sScriptMultiChoiceMenu_36, NELEMS(sScriptMultiChoiceMenu_36) }, + { sScriptMultiChoiceMenu_37, NELEMS(sScriptMultiChoiceMenu_37) }, + { sScriptMultiChoiceMenu_38, NELEMS(sScriptMultiChoiceMenu_38) }, + { sScriptMultiChoiceMenu_39, NELEMS(sScriptMultiChoiceMenu_39) }, + { sScriptMultiChoiceMenu_40, NELEMS(sScriptMultiChoiceMenu_40) }, + { sScriptMultiChoiceMenu_41, NELEMS(sScriptMultiChoiceMenu_41) }, + { sScriptMultiChoiceMenu_42, NELEMS(sScriptMultiChoiceMenu_42) }, + { sScriptMultiChoiceMenu_43, NELEMS(sScriptMultiChoiceMenu_43) }, + { sScriptMultiChoiceMenu_44, NELEMS(sScriptMultiChoiceMenu_44) }, + { sScriptMultiChoiceMenu_45, NELEMS(sScriptMultiChoiceMenu_45) }, + { sScriptMultiChoiceMenu_46, NELEMS(sScriptMultiChoiceMenu_46) }, + { sScriptMultiChoiceMenu_47, NELEMS(sScriptMultiChoiceMenu_47) }, + { sScriptMultiChoiceMenu_48, NELEMS(sScriptMultiChoiceMenu_48) }, + { sScriptMultiChoiceMenu_49, NELEMS(sScriptMultiChoiceMenu_49) }, + { sScriptMultiChoiceMenu_50, NELEMS(sScriptMultiChoiceMenu_50) }, + { sScriptMultiChoiceMenu_51, NELEMS(sScriptMultiChoiceMenu_51) }, + { sScriptMultiChoiceMenu_52, NELEMS(sScriptMultiChoiceMenu_52) }, + { sScriptMultiChoiceMenu_53, NELEMS(sScriptMultiChoiceMenu_53) }, + { sScriptMultiChoiceMenu_54, NELEMS(sScriptMultiChoiceMenu_54) }, + { sScriptMultiChoiceMenu_55, NELEMS(sScriptMultiChoiceMenu_55) }, + { sScriptMultiChoiceMenu_56, NELEMS(sScriptMultiChoiceMenu_56) }, + { sScriptMultiChoiceMenu_57, NELEMS(sScriptMultiChoiceMenu_57) }, + { sScriptMultiChoiceMenu_58, NELEMS(sScriptMultiChoiceMenu_58) }, + { sScriptMultiChoiceMenu_59, NELEMS(sScriptMultiChoiceMenu_59) }, + { sScriptMultiChoiceMenu_60, NELEMS(sScriptMultiChoiceMenu_60) }, + { sScriptMultiChoiceMenu_61, NELEMS(sScriptMultiChoiceMenu_61) }, + { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, + { sScriptMultiChoiceMenu_63, NELEMS(sScriptMultiChoiceMenu_63) }, + { sScriptMultiChoiceMenu_64, NELEMS(sScriptMultiChoiceMenu_64) } +}; + +const u8 *const gStdStringPtrs[] = { + gUnknown_8417ABF, + gUnknown_8417AC4, + gUnknown_8417ACB, + gUnknown_8417AD0, + gUnknown_8417AD6, + gUnknown_8417AF4, + gUnknown_8417AF9, + gUnknown_8417B00, + gUnknown_8417B05, + gUnknown_8417B0B, + gUnknown_8417B11, + gUnknown_8417B17, + gUnknown_8417B21, + gUnknown_8417B2C, + gUnknown_8417B36, + gUnknown_8417B3E, + gUnknown_8417B4B, + gUnknown_8417B58, + gUnknown_8417B65, + gUnknown_8417B72, + gUnknown_8417B7C, + gUnknown_8417B87, + gUnknown_8417B94, + gUnknown_8417C2D, + gUnknown_8417DA9, + gUnknown_8417DB6, + gUnknown_8417DC7, + gUnknown_8417DD9, + gUnknown_8417DE1 +}; + +static const u8 *const gUnknown_83E072C[] = { + Text_1BC388, + Text_1BC3C7, + Text_1BCB42 +}; + +static const u8 *const gUnknown_83E0738[] = { + Text_1BCA95, + Text_1BCACB, + Text_1BCAF2, + Text_1BCB42 +}; + +static const u8 *const gUnknown_83E0748[] = { + Text_1BCA95, + Text_1BCACB, + Text_1BCB42 +}; + +static const union AnimCmd sMuseumFossilAnim0[] = { + ANIMCMD_FRAME(0, 10), + ANIMCMD_END +}; + +static const union AnimCmd *const sMuseumFossilAnimCmdTable[] = { + sMuseumFossilAnim0 +}; + +static const struct OamData sMuseumFossilOamData = { + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64) +}; + +static const struct SpriteTemplate sMuseumFossilSprTemplate = { + .tileTag = 7000, + .paletteTag = 0xFFFF, + .oam = &sMuseumFossilOamData, + .anims = sMuseumFossilAnimCmdTable, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const u16 sMuseumAerodactylSprTiles[] = INCBIN_U16("data/script_menu/aerodactyl_fossil.4bpp"); +static const u16 sMuseumAerodactylSprPalette[] = INCBIN_U16("data/script_menu/aerodactyl_fossil.gbapal"); +static const u16 sMuseumKabutopsSprTiles[] = INCBIN_U16("data/script_menu/kabutops_fossil.4bpp"); +static const u16 sMuseumKabutopsSprPalette[] = INCBIN_U16("data/script_menu/kabutops_fossil.gbapal"); + +static const struct SpriteSheet sMuseumKabutopsSprSheets[] = { + {sMuseumKabutopsSprTiles, 0x800, 7000}, + {} +}; + +static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { + {sMuseumAerodactylSprTiles, 0x800, 7000}, + {} +}; + + +static const u8 *const sSeaGallopDestStrings[] = { + gUnknown_8417E46, + gUnknown_8417DF3, + gUnknown_8417DFE, + gUnknown_8417E09, + gUnknown_8417E16, + gUnknown_8417E22, + gUnknown_8417E2E, + gUnknown_8417E39 +}; u16 sub_809C954(const u8 *str) { @@ -72,7 +682,7 @@ bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 mcId, u8 ignoreBpress) { if (FuncIsActiveTask(sub_809CC98) == TRUE) return FALSE; - gSpecialVar_Result = 0xFF; + gSpecialVar_Result = SCR_MENU_UNSET; sub_809CA64(left, top, mcId, ignoreBpress, 0); return TRUE; } @@ -81,7 +691,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 mcId, u8 ignoreBpres { if (FuncIsActiveTask(sub_809CC98) == TRUE) return FALSE; - gSpecialVar_Result = 0xFF; + gSpecialVar_Result = SCR_MENU_UNSET; sub_809CA64(left, top, mcId, ignoreBpress, cursorPos); return TRUE; } @@ -97,11 +707,11 @@ void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) u8 windowId; const struct MenuAction * list; - if ((ignoreBpress & 2) || QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + if ((ignoreBpress & 2) || QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { ignoreBpress &= 1; - count = gUnknown_83E04B0[mcId].count; - list = gUnknown_83E04B0[mcId].list; + count = gScriptMultiChoiceMenus[mcId].count; + list = gScriptMultiChoiceMenus[mcId].list; strWidth = 0; for (i = 0; i < count; i++) { @@ -194,7 +804,7 @@ void sub_809CC98(u8 taskId) if (data[4]) return; PlaySE(SE_SELECT); - gSpecialVar_Result = 127; + gSpecialVar_Result = SCR_MENU_CANCEL; break; default: gSpecialVar_Result = input; @@ -230,8 +840,8 @@ bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) { if (FuncIsActiveTask(task_yes_no_maybe) == TRUE) return FALSE; - gSpecialVar_Result = 255; - if (!QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4)) + gSpecialVar_Result = SCR_MENU_UNSET; + if (!QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites)) { DisplayYesNoMenuDefaultYes(); CreateTask(task_yes_no_maybe, 80); @@ -241,7 +851,7 @@ bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) bool8 sub_809CE38(void) { - if (gSpecialVar_Result == 255) + if (gSpecialVar_Result == SCR_MENU_UNSET) return FALSE; else return TRUE; @@ -284,11 +894,11 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co u8 taskId; if (FuncIsActiveTask(sub_809CFDC) == TRUE) return FALSE; - gSpecialVar_Result = 255; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + gSpecialVar_Result = SCR_MENU_UNSET; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { - list = gUnknown_83E04B0[multichoiceId].list; - count = gUnknown_83E04B0[multichoiceId].count; + list = gScriptMultiChoiceMenus[multichoiceId].list; + count = gScriptMultiChoiceMenus[multichoiceId].count; width = sub_809C974(list, count) + 1; rowCount = count / columnCount; taskId = CreateTask(sub_809CFDC, 80); @@ -314,7 +924,7 @@ void sub_809CFDC(u8 taskId) if (data[4]) return; PlaySE(SE_SELECT); - gSpecialVar_Result = 127; + gSpecialVar_Result = SCR_MENU_CANCEL; break; default: gSpecialVar_Result = input; @@ -329,7 +939,7 @@ bool8 ScrSpecial_CreatePCMenu(void) { if (FuncIsActiveTask(sub_809CC98) == TRUE) return FALSE; - gSpecialVar_Result = 255; + gSpecialVar_Result = SCR_MENU_UNSET; sub_809D070(); return TRUE; } @@ -392,7 +1002,7 @@ void ScriptMenu_DisplayPCStartupPrompt(void) AddTextPrinterParameterized2(0, 2, gUnknown_81A508A, 0, NULL, 2, 1, 3); } -void sub_809D288(u8 taskId) +static void Task_ScriptShowMonPic(u8 taskId) { struct Task * task = &gTasks[taskId]; switch (task->data[0]) @@ -417,12 +1027,12 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) { u8 spriteId; u8 taskId; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) == TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) return TRUE; - if (FindTaskIdByFunc(sub_809D288) != 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) != 0xFF) return FALSE; spriteId = sub_8083970(species, 8 * x + 40, 8 * y + 40, FALSE); - taskId = CreateTask(sub_809D288, 80); + taskId = CreateTask(Task_ScriptShowMonPic, 80); gTasks[taskId].data[5] = CreateWindowFromRect(x, y, 8, 8); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = species; @@ -436,16 +1046,16 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) { - u8 taskId = FindTaskIdByFunc(sub_809D288); + u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); if (taskId == 0xFF) return NULL; gTasks[taskId].data[0]++; - return sub_809D404; + return PicboxWait; } -bool8 sub_809D404(void) +bool8 PicboxWait(void) { - if (FindTaskIdByFunc(sub_809D288) == 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) == 0xFF) return TRUE; else return FALSE; @@ -453,7 +1063,7 @@ bool8 sub_809D404(void) void sub_809D424(void) { - u8 taskId = FindTaskIdByFunc(sub_809D288); + u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); struct Task * task; if (taskId != 0xFF) { @@ -501,7 +1111,7 @@ bool8 Special_OpenMuseumFossilPic(void) { u8 spriteId; u8 taskId; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) == TRUE) + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) return TRUE; if (FindTaskIdByFunc(sub_809D494) != 0xFF) return FALSE; @@ -554,12 +1164,12 @@ void sub_809D6B0(u8 windowId) RemoveWindow(windowId); } -void sub_809D6D4(void) +void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) { u8 taskId; s16 *data; ScriptContext1_SetupScript(EventScript_1A7AE0); - taskId = FindTaskIdByFunc(sub_809D288); + taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); if (taskId != 0xFF) { data = gTasks[taskId].data; @@ -578,8 +1188,10 @@ void sub_809D6D4(void) } } -void sub_809D764(void) +void Special_DrawSeaGallopDestinationMenu(void) { + // 8004 = Starting location + // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) u8 r4; u8 top; u8 nitems; @@ -587,21 +1199,21 @@ void sub_809D764(void) u8 fontHeight; u8 windowId; u8 i; - gSpecialVar_Result = 255; - if (QuestLog_ScheduleRoutineIfNotInPlaybackMode(sub_809D6D4) != TRUE) + gSpecialVar_Result = SCR_MENU_UNSET; + if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { if (gSpecialVar_0x8005 == 1) { - if (gSpecialVar_0x8004 < 5) - r4 = 5; + if (gSpecialVar_0x8004 < SEAGALLOP_FIVE_ISLAND) + r4 = SEAGALLOP_FIVE_ISLAND; else - r4 = 4; + r4 = SEAGALLOP_FOUR_ISLAND; nitems = 5; top = 2; } else { - r4 = 0; + r4 = SEAGALLOP_VERMILION_CITY; nitems = 6; top = 0; } @@ -612,12 +1224,12 @@ void sub_809D764(void) for (i = 0; i < nitems - 2; i++) { if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, 2, gUnknown_83E17E0[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, sSeaGallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); else i--; r4++; - if (r4 == 8) - r4 = 0; + if (r4 == SEAGALLOP_CINNABAR_ISLAND) + r4 = SEAGALLOP_VERMILION_CITY; } AddTextPrinterParameterized(windowId, 2, gUnknown_8417DED, cursorWidth, i * 16 + 2, 0xFF, NULL); i++; @@ -628,52 +1240,54 @@ void sub_809D764(void) } } -u16 sub_809D8C0(void) +u16 Special_GetSelectedSeaGallopDestination(void) { - if (gSpecialVar_Result == 127) - return 127; + // 8004 = Starting location + // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) + if (gSpecialVar_Result == SCR_MENU_CANCEL) + return SCR_MENU_CANCEL; if (gSpecialVar_0x8005 == 1) { if (gSpecialVar_Result == 3) { - return 254; + return SEAGALLOP_MORE; } else if (gSpecialVar_Result == 4) { - return 127; + return SCR_MENU_CANCEL; } else if (gSpecialVar_Result == 0) { - if (gSpecialVar_0x8004 > 4) - return 4; + if (gSpecialVar_0x8004 > SEAGALLOP_FOUR_ISLAND) + return SEAGALLOP_FOUR_ISLAND; else - return 5; + return SEAGALLOP_FIVE_ISLAND; } else if (gSpecialVar_Result == 1) { - if (gSpecialVar_0x8004 > 5) - return 5; + if (gSpecialVar_0x8004 > SEAGALLOP_FIVE_ISLAND) + return SEAGALLOP_FIVE_ISLAND; else - return 6; + return SEAGALLOP_SIX_ISLAND; } else if (gSpecialVar_Result == 2) { - if (gSpecialVar_0x8004 > 6) - return 6; + if (gSpecialVar_0x8004 > SEAGALLOP_SIX_ISLAND) + return SEAGALLOP_SIX_ISLAND; else - return 7; + return SEAGALLOP_SEVEN_ISLAND; } } else { if (gSpecialVar_Result == 4) - return 254; + return SEAGALLOP_MORE; else if (gSpecialVar_Result == 5) - return 127; + return SCR_MENU_CANCEL; else if (gSpecialVar_Result >= gSpecialVar_0x8004) return gSpecialVar_Result + 1; else return gSpecialVar_Result; } - return 0; + return SEAGALLOP_VERMILION_CITY; } -- cgit v1.2.3 From 1f73aff8f45b4f83ddd044f2d32032cb678d36c1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 13:41:57 -0400 Subject: script_menu static funcs and vars --- src/script_menu.c | 118 +++++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/src/script_menu.c b/src/script_menu.c index a06d80bb1..5df40c935 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -25,19 +25,19 @@ struct MultichoiceListStruct u8 count; }; -EWRAM_DATA u8 gUnknown_2039988 = 0; +EWRAM_DATA u8 sDelay = 0; -void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); -u8 sub_809CBB4(u8 count); -void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); -void sub_809CC98(u8 taskId); -void sub_809CD48(u8 mcId); -void task_yes_no_maybe(u8 taskId); -void sub_809CFDC(u8 taskId); -void sub_809D070(void); -bool8 PicboxWait(void); -void sub_809D6B0(u8 windowId); -u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); +static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); +static u8 sub_809CBB4(u8 count); +static void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); +static void Task_MultichoiceMenu_HandleInput(u8 taskId); +static void MultiChoicePrintHelpDescription(u8 mcId); +static void task_yes_no_maybe(u8 taskId); +static void sub_809CFDC(u8 taskId); +static void CreatePCMenuWindow(void); +static bool8 PicboxWait(void); +static void DestroyScriptMenuWindow(u8 windowId); +static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); static const struct MenuAction sScriptMultiChoiceMenu_0[] = { @@ -589,20 +589,20 @@ const u8 *const gStdStringPtrs[] = { gUnknown_8417DE1 }; -static const u8 *const gUnknown_83E072C[] = { +static const u8 *const sDescriptionPtrs_CableClub_TradeBattleCancel[] = { Text_1BC388, Text_1BC3C7, Text_1BCB42 }; -static const u8 *const gUnknown_83E0738[] = { +static const u8 *const sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[] = { Text_1BCA95, Text_1BCACB, Text_1BCAF2, Text_1BCB42 }; -static const u8 *const gUnknown_83E0748[] = { +static const u8 *const sDescriptionPtrs_WirelessCenter_TradeBattleCancel[] = { Text_1BCA95, Text_1BCACB, Text_1BCB42 @@ -658,20 +658,20 @@ static const u8 *const sSeaGallopDestStrings[] = { gUnknown_8417E39 }; -u16 sub_809C954(const u8 *str) +static u16 GetStringTilesWide(const u8 *str) { return (GetStringWidth(1, str, 0) + 7) / 8; } -u8 sub_809C974(const struct MenuAction * items, u8 count) +static u8 GetMenuWidthFromList(const struct MenuAction * items, u8 count) { u16 i; - u8 width = sub_809C954(items[0].text); + u8 width = GetStringTilesWide(items[0].text); u8 tmp; for (i = 1; i < count; i++) { - tmp = sub_809C954(items[i].text); + tmp = GetStringTilesWide(items[i].text); if (width < tmp) width = tmp; } @@ -680,23 +680,23 @@ u8 sub_809C974(const struct MenuAction * items, u8 count) bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 mcId, u8 ignoreBpress) { - if (FuncIsActiveTask(sub_809CC98) == TRUE) + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) return FALSE; gSpecialVar_Result = SCR_MENU_UNSET; - sub_809CA64(left, top, mcId, ignoreBpress, 0); + DrawVerticalMultichoiceMenu(left, top, mcId, ignoreBpress, 0); return TRUE; } bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 cursorPos) { - if (FuncIsActiveTask(sub_809CC98) == TRUE) + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) return FALSE; gSpecialVar_Result = SCR_MENU_UNSET; - sub_809CA64(left, top, mcId, ignoreBpress, cursorPos); + DrawVerticalMultichoiceMenu(left, top, mcId, ignoreBpress, cursorPos); return TRUE; } -void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) +static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) { s32 i; s32 strWidth; @@ -735,7 +735,7 @@ void sub_809CA64(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos) } } -u8 sub_809CBB4(u8 count) +static u8 sub_809CBB4(u8 count) { switch (count) { @@ -762,14 +762,14 @@ u8 sub_809CBB4(u8 count) } } -void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) +static void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) { u8 taskId; if (mcId == 39 || mcId == 47 || mcId == 50) - gUnknown_2039988 = 12; + sDelay = 12; else - gUnknown_2039988 = 0; - taskId = CreateTask(sub_809CC98, 80); + sDelay = 0; + taskId = CreateTask(Task_MultichoiceMenu_HandleInput, 80); gTasks[taskId].data[4] = ignoreBpress; if (count > 3) gTasks[taskId].data[5] = TRUE; @@ -777,17 +777,17 @@ void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) gTasks[taskId].data[5] = FALSE; gTasks[taskId].data[6] = windowId; gTasks[taskId].data[7] = mcId; - sub_809CD48(mcId); + MultiChoicePrintHelpDescription(mcId); } -void sub_809CC98(u8 taskId) +static void Task_MultichoiceMenu_HandleInput(u8 taskId) { s16 *data = gTasks[taskId].data; s8 input; if (!gPaletteFade.active) { - if (gUnknown_2039988 != 0) - gUnknown_2039988--; + if (sDelay != 0) + sDelay--; else { if (data[5] == FALSE) @@ -795,7 +795,7 @@ void sub_809CC98(u8 taskId) else input = Menu_ProcessInput(); if (JOY_NEW(DPAD_UP | DPAD_DOWN)) - sub_809CD48(data[7]); + MultiChoicePrintHelpDescription(data[7]); switch (input) { case -2: @@ -810,28 +810,28 @@ void sub_809CC98(u8 taskId) gSpecialVar_Result = input; break; } - sub_809D6B0(data[6]); + DestroyScriptMenuWindow(data[6]); DestroyTask(taskId); EnableBothScriptContexts(); } } } -void sub_809CD48(u8 mcId) +static void MultiChoicePrintHelpDescription(u8 mcId) { switch (mcId) { case 39: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gUnknown_83E072C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 47: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gUnknown_83E0738[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case 50: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gUnknown_83E0748[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; } } @@ -857,7 +857,7 @@ bool8 sub_809CE38(void) return TRUE; } -void task_yes_no_maybe(u8 taskId) +static void task_yes_no_maybe(u8 taskId) { s8 input; if (gTasks[taskId].data[2] < 5) @@ -899,7 +899,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co { list = gScriptMultiChoiceMenus[multichoiceId].list; count = gScriptMultiChoiceMenus[multichoiceId].count; - width = sub_809C974(list, count) + 1; + width = GetMenuWidthFromList(list, count) + 1; rowCount = count / columnCount; taskId = CreateTask(sub_809CFDC, 80); gTasks[taskId].data[4] = a4; @@ -912,7 +912,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co return TRUE; } -void sub_809CFDC(u8 taskId) +static void sub_809CFDC(u8 taskId) { s16 *data = gTasks[taskId].data; s8 input = Menu_ProcessInputGridLayout(); @@ -930,28 +930,28 @@ void sub_809CFDC(u8 taskId) gSpecialVar_Result = input; break; } - sub_809D6B0(data[6]); + DestroyScriptMenuWindow(data[6]); DestroyTask(taskId); EnableBothScriptContexts(); } bool8 ScrSpecial_CreatePCMenu(void) { - if (FuncIsActiveTask(sub_809CC98) == TRUE) + if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) return FALSE; gSpecialVar_Result = SCR_MENU_UNSET; - sub_809D070(); + CreatePCMenuWindow(); return TRUE; } -void sub_809D070(void) +static void CreatePCMenuWindow(void) { u8 cursorWidth = GetMenuCursorDimensionByFont(2, 0); u8 height = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); u8 windowWidth; u8 nitems; u8 windowId; - switch (sub_809C954(gUnknown_8417BB6)) + switch (GetStringTilesWide(gUnknown_8417BB6)) { default: if (FlagGet(FLAG_SYS_POKEDEX_GET)) @@ -1017,7 +1017,7 @@ static void Task_ScriptShowMonPic(u8 taskId) task->data[0]++; break; case 3: - sub_809D6B0(task->data[5]); + DestroyScriptMenuWindow(task->data[5]); DestroyTask(taskId); break; } @@ -1053,7 +1053,7 @@ bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) return PicboxWait; } -bool8 PicboxWait(void) +static bool8 PicboxWait(void) { if (FindTaskIdByFunc(Task_ScriptShowMonPic) == 0xFF) return TRUE; @@ -1074,18 +1074,18 @@ void sub_809D424(void) case 1: case 2: sub_8083A5C(&gSprites[task->data[2]], task->data[2]); - sub_809D6B0(task->data[5]); + DestroyScriptMenuWindow(task->data[5]); DestroyTask(taskId); break; case 3: - sub_809D6B0(task->data[5]); + DestroyScriptMenuWindow(task->data[5]); DestroyTask(taskId); break; } } } -void sub_809D494(u8 taskId) +void Task_WaitMuseumFossilPic(u8 taskId) { struct Task * task = &gTasks[taskId]; switch (task->data[0]) @@ -1101,7 +1101,7 @@ void sub_809D494(u8 taskId) task->data[0]++; break; case 3: - sub_809D6B0(task->data[5]); + DestroyScriptMenuWindow(task->data[5]); DestroyTask(taskId); break; } @@ -1113,7 +1113,7 @@ bool8 Special_OpenMuseumFossilPic(void) u8 taskId; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) return TRUE; - if (FindTaskIdByFunc(sub_809D494) != 0xFF) + if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != 0xFF) return FALSE; if (gSpecialVar_0x8004 == SPECIES_KABUTOPS) { @@ -1131,7 +1131,7 @@ bool8 Special_OpenMuseumFossilPic(void) } spriteId = CreateSprite(&sMuseumFossilSprTemplate, gSpecialVar_0x8005 * 8 + 40, gSpecialVar_0x8006 * 8 + 40, 0); gSprites[spriteId].oam.paletteNum = 13; - taskId = CreateTask(sub_809D494, 80); + taskId = CreateTask(Task_WaitMuseumFossilPic, 80); gTasks[taskId].data[5] = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); gTasks[taskId].data[0] = 0; gTasks[taskId].data[2] = spriteId; @@ -1142,14 +1142,14 @@ bool8 Special_OpenMuseumFossilPic(void) bool8 Special_CloseMuseumFossilPic(void) { - u8 taskId = FindTaskIdByFunc(sub_809D494); + u8 taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); if (taskId == 0xFF) return FALSE; gTasks[taskId].data[0]++; return TRUE; } -u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height) +static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height) { struct WindowTemplate template = SetWindowTemplateFields(0, left + 1, top + 1, width, height, 15, 0x038); u8 windowId = AddWindow(&template); @@ -1157,7 +1157,7 @@ u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height) return windowId; } -void sub_809D6B0(u8 windowId) +static void DestroyScriptMenuWindow(u8 windowId) { ClearWindowTilemap(windowId); ClearStdWindowAndFrameToTransparent(windowId, TRUE); @@ -1176,7 +1176,7 @@ void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) if (data[0] < 2) sub_8083A5C(&gSprites[data[2]], data[2]); } - taskId = FindTaskIdByFunc(sub_809D494); + taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); if (taskId != 0xFF) { data = gTasks[taskId].data; -- cgit v1.2.3 From d33509ec93a5c6fc5b49b9efc2c92225a01846aa Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 13:56:01 -0400 Subject: script_menu name strings --- asm/dodrio_berry_picking.s | 16 +- asm/union_room_chat.s | 8 +- data/strings.s | 278 +++++++++++++-------------- include/strings.h | 273 +++++++++++++-------------- src/coins.c | 4 +- src/field_specials.c | 24 +-- src/script_menu.c | 454 ++++++++++++++++++++++----------------------- 7 files changed, 526 insertions(+), 531 deletions(-) diff --git a/asm/dodrio_berry_picking.s b/asm/dodrio_berry_picking.s index 8b2797dc8..ceccf74ff 100644 --- a/asm/dodrio_berry_picking.s +++ b/asm/dodrio_berry_picking.s @@ -10324,7 +10324,7 @@ _0815579C: ldr r0, [r3] adds r0, r7 ldrb r0, [r0] - ldr r2, _08155858 @ =gUnknown_8417938 + ldr r2, _08155858 @ =gText_Yes movs r1, 0x2 mov r9, r1 str r1, [sp] @@ -10336,7 +10336,7 @@ _0815579C: ldr r0, [r2] adds r0, r7 ldrb r0, [r0] - ldr r2, _0815585C @ =gUnknown_841793C + ldr r2, _0815585C @ =gText_No movs r1, 0x10 str r1, [sp] str r5, [sp, 0x4] @@ -10377,8 +10377,8 @@ _0815579C: _0815584C: .4byte 0x00003008 _08155850: .4byte 0x00003009 _08155854: .4byte gUnknown_841CDD7 -_08155858: .4byte gUnknown_8417938 -_0815585C: .4byte gUnknown_841793C +_08155858: .4byte gText_Yes +_0815585C: .4byte gText_No _08155860: .4byte gFameCheckerText_ListMenuCursor _08155864: .4byte 0x00003014 _08155868: @@ -10425,7 +10425,7 @@ _081558B0: ldr r0, [r2] adds r0, r4 ldrb r0, [r0] - ldr r2, _08155914 @ =gUnknown_8417938 + ldr r2, _08155914 @ =gText_Yes movs r3, 0x2 mov r8, r3 str r3, [sp] @@ -10440,7 +10440,7 @@ _081558B0: ldr r0, [r2] adds r0, r4 ldrb r0, [r0] - ldr r2, _08155918 @ =gUnknown_841793C + ldr r2, _08155918 @ =gText_No movs r6, 0x10 str r6, [sp] movs r3, 0xFF @@ -10462,8 +10462,8 @@ _081558B0: .align 2, 0 _0815590C: .4byte 0x00003020 _08155910: .4byte 0x00003009 -_08155914: .4byte gUnknown_8417938 -_08155918: .4byte gUnknown_841793C +_08155914: .4byte gText_Yes +_08155918: .4byte gText_No _0815591C: .4byte gFameCheckerText_ListMenuCursor _08155920: str r6, [sp] diff --git a/asm/union_room_chat.s b/asm/union_room_chat.s index 64cc9aa9f..0d1640699 100644 --- a/asm/union_room_chat.s +++ b/asm/union_room_chat.s @@ -4265,7 +4265,7 @@ sub_812A424: @ 812A424 bl PutWindowTilemap ldr r0, [r6] ldrb r0, [r0, 0x18] - ldr r2, _0812A514 @ =gUnknown_8417938 + ldr r2, _0812A514 @ =gText_Yes movs r5, 0x2 str r5, [sp] movs r4, 0xFF @@ -4276,7 +4276,7 @@ sub_812A424: @ 812A424 bl AddTextPrinterParameterized ldr r0, [r6] ldrb r0, [r0, 0x18] - ldr r2, _0812A518 @ =gUnknown_841793C + ldr r2, _0812A518 @ =gText_No movs r1, 0x10 str r1, [sp] str r4, [sp, 0x4] @@ -4314,8 +4314,8 @@ _0812A504: .4byte 0xff00ffff _0812A508: .4byte 0x00ffffff _0812A50C: .4byte 0x0000ffff _0812A510: .4byte gUnknown_203B0E4 -_0812A514: .4byte gUnknown_8417938 -_0812A518: .4byte gUnknown_841793C +_0812A514: .4byte gText_Yes +_0812A518: .4byte gText_No thumb_func_end sub_812A424 thumb_func_start sub_812A51C diff --git a/data/strings.s b/data/strings.s index 546f40899..ab93b95c5 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1358,34 +1358,34 @@ gUnknown_84178DA:: @ 84178DA gUnknown_84178DF:: @ 0x84178DF .string "さんか する$" -gUnknown_84178E6:: @ 0x84178E6 +gText_Info:: @ 0x84178E6 .string "INFO$" -gUnknown_84178EB:: @ 0x84178EB +gText_Eggs:: @ 0x84178EB .string "EGGS$" -gUnknown_84178F0:: @ 0x84178F0 +gText_HallOfFame:: @ 0x84178F0 .string "HALL OF FAME$" -gUnknown_84178FD:: @ 0x84178FD +gText_Victories:: @ 0x84178FD .string "VICTORIES$" -gUnknown_8417907:: @ 0x8417907 +gText_Quit:: @ 0x8417907 .string "QUIT$" -gUnknown_841790C:: @ 0x841790C +gText_Psn:: @ 0x841790C .string "PSN$" -gUnknown_8417910:: @ 0x8417910 +gText_Par:: @ 0x8417910 .string "PAR$" -gUnknown_8417914:: @ 0x8417914 +gText_Slp:: @ 0x8417914 .string "SLP$" -gUnknown_8417918:: @ 0x8417918 +gText_Brn:: @ 0x8417918 .string "BRN$" -gUnknown_841791C:: @ 0x841791C +gText_Frz:: @ 0x841791C .string "FRZ$" gUnknown_8417920:: @ 0x8417920 @@ -1403,247 +1403,247 @@ gUnknown_841792E:: @ 0x841792E gUnknown_8417933:: @ 0x8417933 .string "これから$" -gUnknown_8417938:: @ 8417938 +gText_Yes:: @ 8417938 .string "YES$" -gUnknown_841793C:: @ 841793C +gText_No:: @ 841793C .string "NO$" gUnknown_841793F:: @ 0x841793F .string "せつめい$" -gUnknown_8417944:: @ 0x8417944 +gText_SingleBattle:: @ 0x8417944 .string "SINGLE BATTLE$" -gUnknown_8417952:: @ 0x8417952 +gText_DoubleBattle:: @ 0x8417952 .string "DOUBLE BATTLE$" -gUnknown_8417960:: @ 0x8417960 +gText_MultiBattle:: @ 0x8417960 .string "MULTI BATTLE$" -gUnknown_841796D:: @ 0x841796D +gText_MakeAChallenge:: @ 0x841796D .string "Make a challenge.$" -gUnknown_841797F:: @ 0x841797F +gText_Info_2:: @ 0x841797F .string "INFO$" -gUnknown_8417984:: @ 0x8417984 +gText_FreshWater200:: @ 0x8417984 .string "FRESH WATER{CLEAR_TO 0x57}{SMALL}¥200$" -gUnknown_841799A:: @ 0x841799A +gText_SodaPop300:: @ 0x841799A .string "SODA POP{CLEAR_TO 0x57}{SMALL}¥300$" -gUnknown_84179AD:: @ 0x84179AD +gText_Lemonade350:: @ 0x84179AD .string "LEMONADE{CLEAR_TO 0x57}{SMALL}¥350$" -gUnknown_84179C0:: @ 0x84179C0 +gText_50Coins1000:: @ 0x84179C0 .string "{SMALL} 50 COINS{CLEAR_TO 0x45}¥1,000$" -gUnknown_84179D6:: @ 0x84179D6 +gText_500Coins10000:: @ 0x84179D6 .string "{SMALL}500 COINS{CLEAR_TO 0x40}¥10,000$" -gUnknown_84179ED:: @ 0x84179ED +gText_Excellent:: @ 0x84179ED .string "Excellent$" -gUnknown_84179F7:: @ 0x84179F7 +gText_NotSoBad:: @ 0x84179F7 .string "Not so bad$" -gUnknown_8417A02:: @ 0x8417A02 +gText_RedShard:: @ 0x8417A02 .string "RED SHARD$" -gUnknown_8417A0C:: @ 0x8417A0C +gText_YellowShard:: @ 0x8417A0C .string "YELLOW SHARD$" -gUnknown_8417A19:: @ 0x8417A19 +gText_BlueShard:: @ 0x8417A19 .string "BLUE SHARD$" -gUnknown_8417A24:: @ 0x8417A24 +gText_GreenShard:: @ 0x8417A24 .string "GREEN SHARD$" gUnknown_8417A30:: @ 0x8417A30 .string "バトルタワ-$" -gUnknown_8417A37:: @ 0x8417A37 +gText_Right:: @ 0x8417A37 .string "Right$" -gUnknown_8417A3D:: @ 0x8417A3D +gText_Left:: @ 0x8417A3D .string "Left$" -gUnknown_8417A42:: @ 0x8417A42 +gText_Tm134000Coins:: @ 0x8417A42 .string "TM13{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gUnknown_8417A58:: @ 0x8417A58 +gText_Tm233500Coins:: @ 0x8417A58 .string "TM23{CLEAR_TO 0x48}{SMALL}3,500 COINS$" -gUnknown_8417A6E:: @ 0x8417A6E +gText_Tm244000Coins:: @ 0x8417A6E .string "TM24{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gUnknown_8417A84:: @ 0x8417A84 +gText_Tm304500Coins:: @ 0x8417A84 .string "TM30{CLEAR_TO 0x48}{SMALL}4,500 COINS$" -gUnknown_8417A9A:: @ 0x8417A9A +gText_Tm354000Coins:: @ 0x8417A9A .string "TM35{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gUnknown_8417AB0:: @ 0x8417AB0 +gText_1F:: @ 0x8417AB0 .string "1F$" -gUnknown_8417AB3:: @ 0x8417AB3 +gText_2F:: @ 0x8417AB3 .string "2F$" -gUnknown_8417AB6:: @ 0x8417AB6 +gText_3F:: @ 0x8417AB6 .string "3F$" -gUnknown_8417AB9:: @ 0x8417AB9 +gText_4F:: @ 0x8417AB9 .string "4F$" -gUnknown_8417ABC:: @ 0x8417ABC +gText_5F:: @ 0x8417ABC .string "5F$" -gUnknown_8417ABF:: @ 0x8417ABF +gText_Cool:: @ 0x8417ABF .string "COOL$" -gUnknown_8417AC4:: @ 0x8417AC4 +gText_Beauty:: @ 0x8417AC4 .string "BEAUTY$" -gUnknown_8417ACB:: @ 0x8417ACB +gText_Cute:: @ 0x8417ACB .string "CUTE$" -gUnknown_8417AD0:: @ 0x8417AD0 +gText_Smart:: @ 0x8417AD0 .string "SMART$" -gUnknown_8417AD6:: @ 0x8417AD6 +gText_Tough:: @ 0x8417AD6 .string "TOUGH$" -gUnknown_8417ADC:: @ 0x8417ADC +gText_Normal:: @ 0x8417ADC .string "NORMAL$" -gUnknown_8417AE3:: @ 0x8417AE3 +gText_Black:: @ 0x8417AE3 .string "BLACK$" -gUnknown_8417AE9:: @ 0x8417AE9 +gText_Pink:: @ 0x8417AE9 .string "PINK$" -gUnknown_8417AEE:: @ 0x8417AEE +gText_Sepia:: @ 0x8417AEE .string "SEPIA$" -gUnknown_8417AF4:: @ 0x8417AF4 +gText_Cool_2:: @ 0x8417AF4 .string "COOL$" -gUnknown_8417AF9:: @ 0x8417AF9 +gText_Beauty_2:: @ 0x8417AF9 .string "BEAUTY$" -gUnknown_8417B00:: @ 0x8417B00 +gText_Cute_2:: @ 0x8417B00 .string "CUTE$" -gUnknown_8417B05:: @ 0x8417B05 +gText_Smart_2:: @ 0x8417B05 .string "SMART$" -gUnknown_8417B0B:: @ 0x8417B0B +gText_Tough_2:: @ 0x8417B0B .string "TOUGH$" -gUnknown_8417B11:: @ 0x8417B11 +gText_Items:: @ 0x8417B11 .string "ITEMS$" -gUnknown_8417B17:: @ 0x8417B17 +gText_KeyItems:: @ 0x8417B17 .string "KEY ITEMS$" -gUnknown_8417B21:: @ 0x8417B21 +gText_PokeBalls:: @ 0x8417B21 .string "POKé BALLS$" -gUnknown_8417B2C:: @ 0x8417B2C +gText_TmsgUnknown_8417B2CHms:: @ 0x8417B2C .string "TMs & HMs$" -gUnknown_8417B36:: @ 0x8417B36 +gText_Berries:: @ 0x8417B36 .string "BERRIES$" -gUnknown_8417B3E:: @ 0x8417B3E +gText_Boulderbadge:: @ 0x8417B3E .string "BOULDERBADGE$" -gUnknown_8417B4B:: @ 0x8417B4B +gText_Cascadebadge:: @ 0x8417B4B .string "CASCADEBADGE$" -gUnknown_8417B58:: @ 0x8417B58 +gText_Thunderbadge:: @ 0x8417B58 .string "THUNDERBADGE$" -gUnknown_8417B65:: @ 0x8417B65 +gText_Rainbowbadge:: @ 0x8417B65 .string "RAINBOWBADGE$" -gUnknown_8417B72:: @ 0x8417B72 +gText_Soulbadge:: @ 0x8417B72 .string "SOULBADGE$" -gUnknown_8417B7C:: @ 0x8417B7C +gText_Marshbadge:: @ 0x8417B7C .string "MARSHBADGE$" -gUnknown_8417B87:: @ 0x8417B87 +gText_Volcanobadge:: @ 0x8417B87 .string "VOLCANOBADGE$" -gUnknown_8417B94:: @ 0x8417B94 +gText_Earthbadge:: @ 0x8417B94 .string "EARTHBADGE$" -gUnknown_8417B9F:: @ 8417B9F +gText_SomeoneSPc:: @ 8417B9F .string "SOMEONE'S PC$" -gUnknown_8417BAC:: @ 8417BAC +gText_BillSPc:: @ 8417BAC .string "BILL'S PC$" -gUnknown_8417BB6:: @ 8417BB6 +gText_SPc:: @ 8417BB6 .string "{PLAYER}'s PC$" -gUnknown_8417BBE:: @ 8417BBE +gText_HallOfFame_2:: @ 8417BBE .string "HALL OF FAME$" -gUnknown_8417BCB:: @ 8417BCB +gText_LogOff:: @ 8417BCB .string "LOG OFF$" -gUnknown_8417BD3:: @ 8417BD3 +gText_ProfOakSPc:: @ 8417BD3 .string "PROF. OAK's PC$" -gUnknown_8417BE2:: @ 0x8417BE2 +gText_Eevee:: @ 0x8417BE2 .string "EEVEE$" -gUnknown_8417BE8:: @ 0x8417BE8 +gText_Flareon:: @ 0x8417BE8 .string "FLAREON$" -gUnknown_8417BF0:: @ 0x8417BF0 +gText_Jolteon:: @ 0x8417BF0 .string "JOLTEON$" -gUnknown_8417BF8:: @ 0x8417BF8 +gText_Vaporeon:: @ 0x8417BF8 .string "VAPOREON$" -gUnknown_8417C01:: @ 0x8417C01 +gText_QuitLooking:: @ 0x8417C01 .string "Quit looking.$" -gUnknown_8417C0F:: @ 0x8417C0F +gText_FreshWater:: @ 0x8417C0F .string "FRESH WATER$" -gUnknown_8417C1B:: @ 0x8417C1B +gText_SodaPop:: @ 0x8417C1B .string "SODA POP$" -gUnknown_8417C24:: @ 0x8417C24 +gText_Lemonade:: @ 0x8417C24 .string "LEMONADE$" -gUnknown_8417C2D:: @ 8417C2D +gText_Coins_2:: @ 8417C2D .string "COINS$" -gUnknown_8417C33:: @ 0x8417C33 +gText_Bicycle1000000:: @ 0x8417C33 .string "BICYCLE{CLEAR_TO 0x49}{SMALL}¥1,000,000$" -gUnknown_8417C4B:: @ 0x8417C4B +gText_NoThanks:: @ 0x8417C4B .string "NO THANKS$" -gUnknown_8417C55:: @ 0x8417C55 +gText_Abra180Coins:: @ 0x8417C55 .string "ABRA{CLEAR_TO 0x55}{SMALL} 180 COINS$" -gUnknown_8417C6A:: @ 0x8417C6A +gText_Clefairy500Coins:: @ 0x8417C6A .string "CLEFAIRY{CLEAR_TO 0x55}{SMALL} 500 COINS$" -gUnknown_8417C83:: @ 0x8417C83 +gText_Dratini2800Coins:: @ 0x8417C83 .string "DRATINI{CLEAR_TO 0x4B}{SMALL} 2,800 COINS$" -gUnknown_8417C9D:: @ 0x8417C9D +gText_Scyther5500Coins:: @ 0x8417C9D .string "SCYTHER{CLEAR_TO 0x4B}{SMALL} 5,500 COINS$" -gUnknown_8417CB7:: @ 0x8417CB7 +gText_Porygon9999Coins:: @ 0x8417CB7 .string "PORYGON{CLEAR_TO 0x4B}{SMALL} 9,999 COINS$" gUnknown_8417CD1:: @ 0x8417CD1 @@ -1661,136 +1661,136 @@ gUnknown_8417D18:: @ 0x8417D18 gUnknown_8417D32:: @ 0x8417D32 .string "PORYGON{CLEAR_TO 0x4B}{SMALL} 6,500 COINS$" -gUnknown_8417D4C:: @ 0x8417D4C +gText_NoThanks_2:: @ 0x8417D4C .string "NO THANKS$" -gUnknown_8417D56:: @ 0x8417D56 +gText_HelixFossil:: @ 0x8417D56 .string "HELIX FOSSIL$" -gUnknown_8417D63:: @ 0x8417D63 +gText_DomeFossil:: @ 0x8417D63 .string "DOME FOSSIL$" -gUnknown_8417D6F:: @ 0x8417D6F +gText_OldAmber:: @ 0x8417D6F .string "OLD AMBER$" -gUnknown_8417D79:: @ 0x8417D79 +gText_TradeCenter:: @ 0x8417D79 .string "TRADE CENTER$" -gUnknown_8417D86:: @ 0x8417D86 +gText_Colosseum:: @ 0x8417D86 .string "COLOSSEUM$" -gUnknown_8417D90:: @ 0x8417D90 +gText_GameLinkCable:: @ 0x8417D90 .string "Game Link cable$" -gUnknown_8417DA0:: @ 0x8417DA0 +gText_Wireless:: @ 0x8417DA0 .string "Wireless$" -gUnknown_8417DA9:: @ 0x8417DA9 +gText_ItemsPocket:: @ 0x8417DA9 .string "ITEMS POCKET$" -gUnknown_8417DB6:: @ 0x8417DB6 +gText_KeyItemsPocket:: @ 0x8417DB6 .string "KEY ITEMS POCKET$" -gUnknown_8417DC7:: @ 0x8417DC7 +gText_PokeBallsPocket:: @ 0x8417DC7 .string "POKé BALLS POCKET$" -gUnknown_8417DD9:: @ 0x8417DD9 +gText_TmCase:: @ 0x8417DD9 .string "TM CASE$" -gUnknown_8417DE1:: @ 0x8417DE1 +gText_BerryPouch_2:: @ 0x8417DE1 .string "BERRY POUCH$" -gUnknown_8417DED:: @ 8417DED +gText_Other:: @ 8417DED .string "OTHER$" -gUnknown_8417DF3:: @ 0x8417DF3 +gText_OneIsland:: @ 0x8417DF3 .string "ONE ISLAND$" -gUnknown_8417DFE:: @ 0x8417DFE +gText_TwoIsland:: @ 0x8417DFE .string "TWO ISLAND$" -gUnknown_8417E09:: @ 0x8417E09 +gText_ThreeIsland:: @ 0x8417E09 .string "THREE ISLAND$" -gUnknown_8417E16:: @ 0x8417E16 +gText_FourIsland:: @ 0x8417E16 .string "FOUR ISLAND$" -gUnknown_8417E22:: @ 0x8417E22 +gText_FiveIsland:: @ 0x8417E22 .string "FIVE ISLAND$" -gUnknown_8417E2E:: @ 0x8417E2E +gText_SixIsland:: @ 0x8417E2E .string "SIX ISLAND$" -gUnknown_8417E39:: @ 0x8417E39 +gText_SevenIsland:: @ 0x8417E39 .string "SEVEN ISLAND$" -gUnknown_8417E46:: @ 0x8417E46 +gText_Vermilion:: @ 0x8417E46 .string "VERMILION$" -gUnknown_8417E50:: @ 0x8417E50 +gText_Colosseum_2:: @ 0x8417E50 .string "COLOSSEUM$" -gUnknown_8417E5A:: @ 0x8417E5A +gText_BerryCrush:: @ 0x8417E5A .string "BERRY CRUSH$" -gUnknown_8417E66:: @ 0x8417E66 +gText_Dummy_8417E66:: @ 0x8417E66 .string "$" -gUnknown_8417E67:: @ 0x8417E67 +gText_Dummy_8417E67:: @ 0x8417E67 .string "$" gUnknown_8417E68:: @ 0x8417E68 .string "せつめいを きく$" -gUnknown_8417E71:: @ 0x8417E71 +gText_Dummy_8417E71:: @ 0x8417E71 .string "$" -gUnknown_8417E72:: @ 0x8417E72 +gText_PokemonJump:: @ 0x8417E72 .string "POKéMON JUMP$" -gUnknown_8417E7F:: @ 0x8417E7F +gText_DodrioBerryPicking:: @ 0x8417E7F .string "DODRIO BERRY-PICKING$" -gUnknown_8417E94:: @ 0x8417E94 +gText_2Tinymushrooms:: @ 0x8417E94 .string "2 TINYMUSHROOMS$" -gUnknown_8417EA4:: @ 0x8417EA4 +gText_1BigMushroom:: @ 0x8417EA4 .string "1 BIG MUSHROOM$" -gUnknown_8417EB3:: @ 0x8417EB3 +gText_SeviiIslands:: @ 0x8417EB3 .string "SEVII ISLANDS$" -gUnknown_8417EC1:: @ 0x8417EC1 +gText_NavelRock:: @ 0x8417EC1 .string "NAVEL ROCK$" -gUnknown_8417ECC:: @ 0x8417ECC +gText_BirthIsland:: @ 0x8417ECC .string "BIRTH ISLAND$" -gUnknown_8417ED9:: @ 0x8417ED9 +gText_MiracleSeed1000Coins:: @ 0x8417ED9 .string "MIRACLE SEED{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gUnknown_8417EF7:: @ 0x8417EF7 +gText_Charcoal1000Coins:: @ 0x8417EF7 .string "CHARCOAL{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gUnknown_8417F11:: @ 0x8417F11 +gText_MysticWater1000Coins:: @ 0x8417F11 .string "MYSTIC WATER{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gUnknown_8417F2F:: @ 0x8417F2F +gText_YellowFlute1600Coins:: @ 0x8417F2F .string "YELLOW FLUTE{CLEAR_TO 0x50}{SMALL}1,600 COINS$" -gUnknown_8417F4D:: @ 0x8417F4D +gText_SmokeBall800Coins:: @ 0x8417F4D .string "SMOKE BALL{CLEAR_TO 0x5A}{SMALL}800 COINS$" -gUnknown_8417F67:: @ 0x8417F67 +gText_Dummy_8417F67:: @ 0x8417F67 .string "$" -gUnknown_8417F68:: @ 0x8417F68 +gText_Dummy_8417F68:: @ 0x8417F68 .string "$" -gUnknown_8417F69:: @ 0x8417F69 +gText_BecomeLeader:: @ 0x8417F69 .string "BECOME LEADER$" -gUnknown_8417F77:: @ 0x8417F77 +gText_JoinGroup:: @ 0x8417F77 .string "JOIN GROUP$" gOtherText_Single:: @ 0x8417F82 @@ -1889,31 +1889,31 @@ gUnknown_8418055:: @ 0x8418055 gUnknown_8418059:: @ 0x8418059 .string "11F$" -gUnknown_841805D:: @ 0x841805D +gText_B1F:: @ 0x841805D .string "B1F$" -gUnknown_8418061:: @ 0x8418061 +gText_B2F:: @ 0x8418061 .string "B2F$" gUnknown_8418065:: @ 0x8418065 .string "B3F$" -gUnknown_8418069:: @ 0x8418069 +gText_B4F:: @ 0x8418069 .string "B4F$" -gUnknown_841806D:: @ 0x841806D +gText_Rooftop:: @ 0x841806D .string "ROOFTOP$" gUnknown_8418075:: @ 8418075 .string "Now on:$" -gUnknown_841807D:: @ 0x841807D +gText_LinkedGamePlay:: @ 0x841807D .string "LINKED GAME PLAY$" -gUnknown_841808E:: @ 0x841808E +gText_DirectCorner:: @ 0x841808E .string "DIRECT CORNER$" -gUnknown_841809C:: @ 0x841809C +gText_UnionRoom:: @ 0x841809C .string "UNION ROOM$" gUnknown_84180A7:: @ 0x84180A7 diff --git a/include/strings.h b/include/strings.h index d4507b41f..32b485ce4 100644 --- a/include/strings.h +++ b/include/strings.h @@ -474,10 +474,10 @@ extern const u8 gUnknown_8417FC3[]; extern const u8 gUnknown_8417FD0[]; extern const u8 gUnknown_8417FCC[]; extern const u8 gUnknown_8418075[]; -extern const u8 gUnknown_8418069[]; +extern const u8 gText_B4F[]; extern const u8 gUnknown_8418065[]; -extern const u8 gUnknown_8418061[]; -extern const u8 gUnknown_841805D[]; +extern const u8 gText_B2F[]; +extern const u8 gText_B1F[]; extern const u8 gUnknown_841803A[]; extern const u8 gUnknown_841803D[]; extern const u8 gUnknown_8418040[]; @@ -489,7 +489,7 @@ extern const u8 gUnknown_841804F[]; extern const u8 gUnknown_8418052[]; extern const u8 gUnknown_8418055[]; extern const u8 gUnknown_8418059[]; -extern const u8 gUnknown_841806D[]; +extern const u8 gText_Rooftop[]; extern const u8 gUnknown_8417FD9[]; extern const u8 gUnknown_8417FE6[]; extern const u8 gUnknown_8417FF3[]; @@ -498,9 +498,9 @@ extern const u8 gUnknown_841800D[]; extern const u8 gUnknown_8418017[]; extern const u8 gUnknown_8418022[]; extern const u8 gUnknown_841802F[]; -extern const u8 gUnknown_841807D[]; -extern const u8 gUnknown_841808E[]; -extern const u8 gUnknown_841809C[]; +extern const u8 gText_LinkedGamePlay[]; +extern const u8 gText_DirectCorner[]; +extern const u8 gText_UnionRoom[]; extern const u8 gOtherText_Quit[]; extern const u8 gUnknown_84180A7[]; extern const u8 gUnknown_84180BC[]; @@ -515,142 +515,137 @@ extern const u8 gUnknown_8418152[]; extern const u8 gUnknown_8418163[]; // script_menu -extern const u8 gUnknown_8417B9F[]; -extern const u8 gUnknown_8417BAC[]; -extern const u8 gUnknown_8417BB6[]; -extern const u8 gUnknown_8417BBE[]; -extern const u8 gUnknown_8417BCB[]; -extern const u8 gUnknown_8417BD3[]; -extern const u8 gUnknown_8417DED[]; +extern const u8 gText_SomeoneSPc[]; +extern const u8 gText_BillSPc[]; +extern const u8 gText_SPc[]; +extern const u8 gText_HallOfFame_2[]; +extern const u8 gText_LogOff[]; +extern const u8 gText_ProfOakSPc[]; +extern const u8 gText_Other[]; extern const u8 gUnknown_81A508A[]; extern const u8 gOtherText_Double[]; extern const u8 gOtherText_Knockout[]; extern const u8 gOtherText_Mixed[]; extern const u8 gOtherText_Single[]; -extern const u8 gUnknown_84178E6[]; -extern const u8 gUnknown_84178EB[]; -extern const u8 gUnknown_84178F0[]; -extern const u8 gUnknown_84178FD[]; -extern const u8 gUnknown_8417907[]; -extern const u8 gUnknown_841790C[]; -extern const u8 gUnknown_8417910[]; -extern const u8 gUnknown_8417914[]; -extern const u8 gUnknown_8417918[]; -extern const u8 gUnknown_841791C[]; -extern const u8 gUnknown_8417938[]; -extern const u8 gUnknown_841793C[]; -extern const u8 gUnknown_8417944[]; -extern const u8 gUnknown_8417952[]; -extern const u8 gUnknown_8417960[]; -extern const u8 gUnknown_841796D[]; -extern const u8 gUnknown_841797F[]; -extern const u8 gUnknown_8417984[]; -extern const u8 gUnknown_841799A[]; -extern const u8 gUnknown_84179AD[]; -extern const u8 gUnknown_84179C0[]; -extern const u8 gUnknown_84179D6[]; -extern const u8 gUnknown_84179ED[]; -extern const u8 gUnknown_84179F7[]; -extern const u8 gUnknown_8417A02[]; -extern const u8 gUnknown_8417A0C[]; -extern const u8 gUnknown_8417A19[]; -extern const u8 gUnknown_8417A24[]; -extern const u8 gUnknown_8417A37[]; -extern const u8 gUnknown_8417A3D[]; -extern const u8 gUnknown_8417A42[]; -extern const u8 gUnknown_8417A58[]; -extern const u8 gUnknown_8417A6E[]; -extern const u8 gUnknown_8417A84[]; -extern const u8 gUnknown_8417A9A[]; -extern const u8 gUnknown_8417AB0[]; -extern const u8 gUnknown_8417AB3[]; -extern const u8 gUnknown_8417AB6[]; -extern const u8 gUnknown_8417AB9[]; -extern const u8 gUnknown_8417ABC[]; -extern const u8 gUnknown_8417ADC[]; -extern const u8 gUnknown_8417AE3[]; -extern const u8 gUnknown_8417AE9[]; -extern const u8 gUnknown_8417AEE[]; -extern const u8 gUnknown_8417BE2[]; -extern const u8 gUnknown_8417BE8[]; -extern const u8 gUnknown_8417BF0[]; -extern const u8 gUnknown_8417BF8[]; -extern const u8 gUnknown_8417C01[]; -extern const u8 gUnknown_8417C0F[]; -extern const u8 gUnknown_8417C1B[]; -extern const u8 gUnknown_8417C24[]; -extern const u8 gUnknown_8417C33[]; -extern const u8 gUnknown_8417C4B[]; -extern const u8 gUnknown_8417C55[]; -extern const u8 gUnknown_8417C6A[]; -extern const u8 gUnknown_8417C83[]; -extern const u8 gUnknown_8417C9D[]; -extern const u8 gUnknown_8417CB7[]; -extern const u8 gUnknown_8417D4C[]; -extern const u8 gUnknown_8417D56[]; -extern const u8 gUnknown_8417D63[]; -extern const u8 gUnknown_8417D6F[]; -extern const u8 gUnknown_8417D79[]; -extern const u8 gUnknown_8417D86[]; -extern const u8 gUnknown_8417D90[]; -extern const u8 gUnknown_8417DA0[]; -extern const u8 gUnknown_8417DF3[]; -extern const u8 gUnknown_8417DFE[]; -extern const u8 gUnknown_8417E09[]; -extern const u8 gUnknown_8417E46[]; -extern const u8 gUnknown_8417E50[]; -extern const u8 gUnknown_8417E5A[]; -extern const u8 gUnknown_8417E66[]; -extern const u8 gUnknown_8417E67[]; -extern const u8 gUnknown_8417E71[]; -extern const u8 gUnknown_8417E72[]; -extern const u8 gUnknown_8417E7F[]; -extern const u8 gUnknown_8417E94[]; -extern const u8 gUnknown_8417EA4[]; -extern const u8 gUnknown_8417EB3[]; -extern const u8 gUnknown_8417EC1[]; -extern const u8 gUnknown_8417ECC[]; -extern const u8 gUnknown_8417ED9[]; -extern const u8 gUnknown_8417EF7[]; -extern const u8 gUnknown_8417F11[]; -extern const u8 gUnknown_8417F2F[]; -extern const u8 gUnknown_8417F4D[]; -extern const u8 gUnknown_8417F67[]; -extern const u8 gUnknown_8417F68[]; -extern const u8 gUnknown_8417F69[]; -extern const u8 gUnknown_8417F77[]; -extern const u8 gUnknown_8417ABF[]; -extern const u8 gUnknown_8417AC4[]; -extern const u8 gUnknown_8417ACB[]; -extern const u8 gUnknown_8417AD0[]; -extern const u8 gUnknown_8417AD6[]; -extern const u8 gUnknown_8417AF4[]; -extern const u8 gUnknown_8417AF9[]; -extern const u8 gUnknown_8417B00[]; -extern const u8 gUnknown_8417B05[]; -extern const u8 gUnknown_8417B0B[]; -extern const u8 gUnknown_8417B11[]; -extern const u8 gUnknown_8417B17[]; -extern const u8 gUnknown_8417B21[]; -extern const u8 gUnknown_8417B2C[]; -extern const u8 gUnknown_8417B36[]; -extern const u8 gUnknown_8417B3E[]; -extern const u8 gUnknown_8417B4B[]; -extern const u8 gUnknown_8417B58[]; -extern const u8 gUnknown_8417B65[]; -extern const u8 gUnknown_8417B72[]; -extern const u8 gUnknown_8417B7C[]; -extern const u8 gUnknown_8417B87[]; -extern const u8 gUnknown_8417B94[]; -extern const u8 gUnknown_8417C2D[]; -extern const u8 gUnknown_8417DA9[]; -extern const u8 gUnknown_8417DB6[]; -extern const u8 gUnknown_8417DC7[]; -extern const u8 gUnknown_8417DD9[]; -extern const u8 gUnknown_8417DE1[]; -extern const u8 gUnknown_8417E16[]; -extern const u8 gUnknown_8417E22[]; -extern const u8 gUnknown_8417E2E[]; -extern const u8 gUnknown_8417E39[]; +extern const u8 gText_Info[]; +extern const u8 gText_Eggs[]; +extern const u8 gText_HallOfFame[]; +extern const u8 gText_Victories[]; +extern const u8 gText_Quit[]; +extern const u8 gText_Psn[]; +extern const u8 gText_Par[]; +extern const u8 gText_Slp[]; +extern const u8 gText_Brn[]; +extern const u8 gText_Frz[]; +extern const u8 gText_Yes[]; +extern const u8 gText_No[]; +extern const u8 gText_SingleBattle[]; +extern const u8 gText_DoubleBattle[]; +extern const u8 gText_MultiBattle[]; +extern const u8 gText_MakeAChallenge[]; +extern const u8 gText_Info_2[]; +extern const u8 gText_FreshWater200[]; +extern const u8 gText_SodaPop300[]; +extern const u8 gText_Lemonade350[]; +extern const u8 gText_50Coins1000[]; +extern const u8 gText_500Coins10000[]; +extern const u8 gText_Excellent[]; +extern const u8 gText_NotSoBad[]; +extern const u8 gText_RedShard[]; +extern const u8 gText_YellowShard[]; +extern const u8 gText_BlueShard[]; +extern const u8 gText_GreenShard[]; +extern const u8 gText_Right[]; +extern const u8 gText_Left[]; +extern const u8 gText_Tm134000Coins[]; +extern const u8 gText_Tm233500Coins[]; +extern const u8 gText_Tm244000Coins[]; +extern const u8 gText_Tm304500Coins[]; +extern const u8 gText_Tm354000Coins[]; +extern const u8 gText_1F[]; +extern const u8 gText_2F[]; +extern const u8 gText_3F[]; +extern const u8 gText_4F[]; +extern const u8 gText_5F[]; +extern const u8 gText_Normal[]; +extern const u8 gText_Black[]; +extern const u8 gText_Pink[]; +extern const u8 gText_Sepia[]; +extern const u8 gText_Eevee[]; +extern const u8 gText_Flareon[]; +extern const u8 gText_Jolteon[]; +extern const u8 gText_Vaporeon[]; +extern const u8 gText_QuitLooking[]; +extern const u8 gText_FreshWater[]; +extern const u8 gText_SodaPop[]; +extern const u8 gText_Lemonade[]; +extern const u8 gText_Bicycle1000000[]; +extern const u8 gText_NoThanks[]; +extern const u8 gText_Abra180Coins[]; +extern const u8 gText_Clefairy500Coins[]; +extern const u8 gText_Dratini2800Coins[]; +extern const u8 gText_Scyther5500Coins[]; +extern const u8 gText_Porygon9999Coins[]; +extern const u8 gText_NoThanks_2[]; +extern const u8 gText_HelixFossil[]; +extern const u8 gText_DomeFossil[]; +extern const u8 gText_OldAmber[]; +extern const u8 gText_TradeCenter[]; +extern const u8 gText_Colosseum[]; +extern const u8 gText_GameLinkCable[]; +extern const u8 gText_Wireless[]; +extern const u8 gText_OneIsland[]; +extern const u8 gText_TwoIsland[]; +extern const u8 gText_ThreeIsland[]; +extern const u8 gText_Vermilion[]; +extern const u8 gText_Colosseum_2[]; +extern const u8 gText_BerryCrush[]; +extern const u8 gText_Dummy_8417E66[]; +extern const u8 gText_Dummy_8417E67[]; +extern const u8 gText_Dummy_8417E71[]; +extern const u8 gText_PokemonJump[]; +extern const u8 gText_DodrioBerryPicking[]; +extern const u8 gText_2Tinymushrooms[]; +extern const u8 gText_1BigMushroom[]; +extern const u8 gText_SeviiIslands[]; +extern const u8 gText_NavelRock[]; +extern const u8 gText_BirthIsland[]; +extern const u8 gText_MiracleSeed1000Coins[]; +extern const u8 gText_Charcoal1000Coins[]; +extern const u8 gText_MysticWater1000Coins[]; +extern const u8 gText_YellowFlute1600Coins[]; +extern const u8 gText_SmokeBall800Coins[]; +extern const u8 gText_Dummy_8417F67[]; +extern const u8 gText_Dummy_8417F68[]; +extern const u8 gText_BecomeLeader[]; +extern const u8 gText_JoinGroup[]; +extern const u8 gText_Cool_2[]; +extern const u8 gText_Beauty_2[]; +extern const u8 gText_Cute_2[]; +extern const u8 gText_Smart_2[]; +extern const u8 gText_Tough_2[]; +extern const u8 gText_Items[]; +extern const u8 gText_KeyItems[]; +extern const u8 gText_PokeBalls[]; +extern const u8 gText_TmsgUnknown_8417B2CHms[]; +extern const u8 gText_Berries[]; +extern const u8 gText_Boulderbadge[]; +extern const u8 gText_Cascadebadge[]; +extern const u8 gText_Thunderbadge[]; +extern const u8 gText_Rainbowbadge[]; +extern const u8 gText_Soulbadge[]; +extern const u8 gText_Marshbadge[]; +extern const u8 gText_Volcanobadge[]; +extern const u8 gText_Earthbadge[]; +extern const u8 gText_Coins_2[]; +extern const u8 gText_ItemsPocket[]; +extern const u8 gText_KeyItemsPocket[]; +extern const u8 gText_PokeBallsPocket[]; +extern const u8 gText_TmCase[]; +extern const u8 gText_BerryPouch_2[]; +extern const u8 gText_FourIsland[]; +extern const u8 gText_FiveIsland[]; +extern const u8 gText_SixIsland[]; +extern const u8 gText_SevenIsland[]; #endif //GUARD_STRINGS_H diff --git a/src/coins.c b/src/coins.c index e989bac88..2eaa31b2c 100644 --- a/src/coins.c +++ b/src/coins.c @@ -60,7 +60,7 @@ void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 void sub_80D0674(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, palette); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417C2D, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(windowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString_Parameterized(windowId, coinAmount, 0x10, 0xC, 0); } @@ -86,7 +86,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) PutWindowTilemap(sCoinsWindowId); TextWindow_SetStdFrame0_WithPal(sCoinsWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized(sCoinsWindowId, 2, gUnknown_8417C2D, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(sCoinsWindowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString(coinAmount); } diff --git a/src/field_specials.c b/src/field_specials.c index 3c482e5bc..354226d09 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -729,10 +729,10 @@ static const struct WindowTemplate sElevatorCurrentFloorWindowTemplate = { }; static const u8 *const sFloorNamePointers[] = { - gUnknown_8418069, + gText_B4F, gUnknown_8418065, - gUnknown_8418061, - gUnknown_841805D, + gText_B2F, + gText_B1F, gUnknown_841803A, gUnknown_841803D, gUnknown_8418040, @@ -744,7 +744,7 @@ static const u8 *const sFloorNamePointers[] = { gUnknown_8418052, gUnknown_8418055, gUnknown_8418059, - gUnknown_841806D + gText_Rooftop }; static const u8 sUnused_83F5B84[] = { @@ -1250,9 +1250,9 @@ static const u8 *const sListMenuLabels[][12] = { gUnknown_841803A, gOtherText_Exit, }, { - gUnknown_841805D, - gUnknown_8418061, - gUnknown_8418069, + gText_B1F, + gText_B2F, + gText_B4F, gOtherText_Exit, }, { gUnknown_8418046, @@ -1262,9 +1262,9 @@ static const u8 *const sListMenuLabels[][12] = { gUnknown_841803A, gOtherText_Exit, }, { - gUnknown_841807D, - gUnknown_841808E, - gUnknown_841809C, + gText_LinkedGamePlay, + gText_DirectCorner, + gText_UnionRoom, gOtherText_Quit, }, { gUnknown_84180A7, @@ -1280,8 +1280,8 @@ static const u8 *const sListMenuLabels[][12] = { gUnknown_8418163, gOtherText_Exit, }, { - gUnknown_841806D, - gUnknown_841805D, + gText_Rooftop, + gText_B1F, gOtherText_Exit, } }; diff --git a/src/script_menu.c b/src/script_menu.c index 5df40c935..eee943793 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -41,439 +41,439 @@ static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); static const struct MenuAction sScriptMultiChoiceMenu_0[] = { - { gUnknown_8417938 }, - { gUnknown_841793C } + { gText_Yes }, + { gText_No } }; static const struct MenuAction sScriptMultiChoiceMenu_2[] = { - { gUnknown_8417ADC }, - { gUnknown_8417AE3 }, - { gUnknown_8417AE9 }, - { gUnknown_8417AEE } + { gText_Normal }, + { gText_Black }, + { gText_Pink }, + { gText_Sepia } }; static const struct MenuAction sScriptMultiChoiceMenu_3[] = { - { gUnknown_84178F0 }, - { gUnknown_8417907 } + { gText_HallOfFame }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_4[] = { - { gUnknown_84178EB }, - { gUnknown_8417907 } + { gText_Eggs }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_5[] = { - { gUnknown_84178FD }, - { gUnknown_8417907 } + { gText_Victories }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_6[] = { - { gUnknown_84178F0 }, - { gUnknown_84178EB }, - { gUnknown_8417907 } + { gText_HallOfFame }, + { gText_Eggs }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_7[] = { - { gUnknown_84178F0 }, - { gUnknown_84178FD }, - { gUnknown_8417907 } + { gText_HallOfFame }, + { gText_Victories }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_8[] = { - { gUnknown_84178EB }, - { gUnknown_84178FD }, - { gUnknown_8417907 } + { gText_Eggs }, + { gText_Victories }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_9[] = { - { gUnknown_84178F0 }, - { gUnknown_84178EB }, - { gUnknown_84178FD }, - { gUnknown_8417907 } + { gText_HallOfFame }, + { gText_Eggs }, + { gText_Victories }, + { gText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_15[] = { - { gUnknown_8417914 }, - { gUnknown_841790C }, - { gUnknown_8417910 }, - { gUnknown_8417918 }, - { gUnknown_841791C }, + { gText_Slp }, + { gText_Psn }, + { gText_Par }, + { gText_Brn }, + { gText_Frz }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_16[] = { - { gUnknown_8417938 }, - { gUnknown_841793C }, - { gUnknown_84178E6 } + { gText_Yes }, + { gText_No }, + { gText_Info } }; static const struct MenuAction sScriptMultiChoiceMenu_17[] = { - { gUnknown_8417944 }, - { gUnknown_8417952 }, - { gUnknown_8417960 }, - { gUnknown_84178E6 }, + { gText_SingleBattle }, + { gText_DoubleBattle }, + { gText_MultiBattle }, + { gText_Info }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_18[] = { - { gUnknown_8417938 }, - { gUnknown_841793C }, - { gUnknown_84178E6 } + { gText_Yes }, + { gText_No }, + { gText_Info } }; static const struct MenuAction sScriptMultiChoiceMenu_19[] = { - { gUnknown_841796D }, - { gUnknown_841797F }, + { gText_MakeAChallenge }, + { gText_Info_2 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_20[] = { - { gUnknown_841806D }, - { gUnknown_841805D }, + { gText_Rooftop }, + { gText_B1F }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_21[] = { - { gUnknown_8417D56 }, + { gText_HelixFossil }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_22[] = { - { gUnknown_8417D63 }, + { gText_DomeFossil }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_23[] = { - { gUnknown_8417D6F }, + { gText_OldAmber }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_24[] = { - { gUnknown_8417D56 }, - { gUnknown_8417D6F }, + { gText_HelixFossil }, + { gText_OldAmber }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_25[] = { - { gUnknown_8417D63 }, - { gUnknown_8417D6F }, + { gText_DomeFossil }, + { gText_OldAmber }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_26[] = { - { gUnknown_8417984 }, - { gUnknown_841799A }, - { gUnknown_84179AD }, + { gText_FreshWater200 }, + { gText_SodaPop300 }, + { gText_Lemonade350 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_30[] = { - { gUnknown_8417A42 }, - { gUnknown_8417A58 }, - { gUnknown_8417A6E }, - { gUnknown_8417A84 }, - { gUnknown_8417A9A }, - { gUnknown_8417D4C } + { gText_Tm134000Coins }, + { gText_Tm233500Coins }, + { gText_Tm244000Coins }, + { gText_Tm304500Coins }, + { gText_Tm354000Coins }, + { gText_NoThanks_2 } }; static const struct MenuAction sScriptMultiChoiceMenu_41[] = { - { gUnknown_8417F4D }, - { gUnknown_8417ED9 }, - { gUnknown_8417EF7 }, - { gUnknown_8417F11 }, - { gUnknown_8417F2F }, - { gUnknown_8417D4C } + { gText_SmokeBall800Coins }, + { gText_MiracleSeed1000Coins }, + { gText_Charcoal1000Coins }, + { gText_MysticWater1000Coins }, + { gText_YellowFlute1600Coins }, + { gText_NoThanks_2 } }; static const struct MenuAction sScriptMultiChoiceMenu_27[] = { - { gUnknown_84179C0 }, - { gUnknown_84179D6 }, + { gText_50Coins1000 }, + { gText_500Coins10000 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_28[] = { - { gUnknown_84179ED }, - { gUnknown_84179F7 } + { gText_Excellent }, + { gText_NotSoBad } }; static const struct MenuAction sScriptMultiChoiceMenu_29[] = { - { gUnknown_8417A37 }, - { gUnknown_8417A3D } + { gText_Right }, + { gText_Left } }; static const struct MenuAction sScriptMultiChoiceMenu_31[] = { - { gUnknown_8417ABC }, - { gUnknown_8417AB9 }, - { gUnknown_8417AB6 }, - { gUnknown_8417AB3 }, - { gUnknown_8417AB0 }, + { gText_5F }, + { gText_4F }, + { gText_3F }, + { gText_2F }, + { gText_1F }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_32[] = { - { gUnknown_8417C0F }, + { gText_FreshWater }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_33[] = { - { gUnknown_8417C1B }, + { gText_SodaPop }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_34[] = { - { gUnknown_8417C0F }, - { gUnknown_8417C1B }, + { gText_FreshWater }, + { gText_SodaPop }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_35[] = { - { gUnknown_8417C24 }, + { gText_Lemonade }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_36[] = { - { gUnknown_8417C0F }, - { gUnknown_8417C24 }, + { gText_FreshWater }, + { gText_Lemonade }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_37[] = { - { gUnknown_8417C1B }, - { gUnknown_8417C24 }, + { gText_SodaPop }, + { gText_Lemonade }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_38[] = { - { gUnknown_8417C0F }, - { gUnknown_8417C1B }, - { gUnknown_8417C24 }, + { gText_FreshWater }, + { gText_SodaPop }, + { gText_Lemonade }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_0[] = { - { gUnknown_8417A24 }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_1[] = { - { gUnknown_8417A02 }, - { gUnknown_8417A24 }, + { gText_RedShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_2[] = { - { gUnknown_8417A0C }, - { gUnknown_8417A24 }, + { gText_YellowShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_3[] = { - { gUnknown_8417A02 }, - { gUnknown_8417A0C }, - { gUnknown_8417A24 }, + { gText_RedShard }, + { gText_YellowShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_4[] = { - { gUnknown_8417A19 }, - { gUnknown_8417A24 }, + { gText_BlueShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_5[] = { - { gUnknown_8417A02 }, - { gUnknown_8417A19 }, - { gUnknown_8417A24 }, + { gText_RedShard }, + { gText_BlueShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_6[] = { - { gUnknown_8417A0C }, - { gUnknown_8417A19 }, - { gUnknown_8417A24 }, + { gText_YellowShard }, + { gText_BlueShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { - { gUnknown_8417A02 }, - { gUnknown_8417A0C }, - { gUnknown_8417A19 }, - { gUnknown_8417A24 }, + { gText_RedShard }, + { gText_YellowShard }, + { gText_BlueShard }, + { gText_GreenShard }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_1[] = { - { gUnknown_8417BE2 }, - { gUnknown_8417BE8 }, - { gUnknown_8417BF0 }, - { gUnknown_8417BF8 }, - { gUnknown_8417C01 } + { gText_Eevee }, + { gText_Flareon }, + { gText_Jolteon }, + { gText_Vaporeon }, + { gText_QuitLooking } }; static const struct MenuAction sScriptMultiChoiceMenu_13[] = { - { gUnknown_8417C33 }, - { gUnknown_8417C4B } + { gText_Bicycle1000000 }, + { gText_NoThanks } }; static const struct MenuAction sScriptMultiChoiceMenu_14[] = { - { gUnknown_8417C55 }, - { gUnknown_8417C6A }, - { gUnknown_8417C83 }, - { gUnknown_8417C9D }, - { gUnknown_8417CB7 }, - { gUnknown_8417D4C } + { gText_Abra180Coins }, + { gText_Clefairy500Coins }, + { gText_Dratini2800Coins }, + { gText_Scyther5500Coins }, + { gText_Porygon9999Coins }, + { gText_NoThanks_2 } }; static const struct MenuAction sScriptMultiChoiceMenu_39[] = { - { gUnknown_8417D79 }, - { gUnknown_8417D86 }, + { gText_TradeCenter }, + { gText_Colosseum }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_40[] = { - { gUnknown_8417D90 }, - { gUnknown_8417DA0 }, + { gText_GameLinkCable }, + { gText_Wireless }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_42[] = { - { gUnknown_841805D }, - { gUnknown_8418061 }, - { gUnknown_8418069 }, + { gText_B1F }, + { gText_B2F }, + { gText_B4F }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_43[] = { - { gUnknown_841807D }, - { gUnknown_841808E }, - { gUnknown_841809C }, + { gText_LinkedGamePlay }, + { gText_DirectCorner }, + { gText_UnionRoom }, { gOtherText_Quit } }; static const struct MenuAction sScriptMultiChoiceMenu_44[] = { - { gUnknown_8417DFE }, - { gUnknown_8417E09 }, + { gText_TwoIsland }, + { gText_ThreeIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_45[] = { - { gUnknown_8417DF3 }, - { gUnknown_8417E09 }, + { gText_OneIsland }, + { gText_ThreeIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_46[] = { - { gUnknown_8417DF3 }, - { gUnknown_8417DFE }, + { gText_OneIsland }, + { gText_TwoIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_47[] = { - { gUnknown_8417D79 }, - { gUnknown_8417E50 }, - { gUnknown_8417E5A }, + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_BerryCrush }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_48[] = { - { gUnknown_8417E66 }, - { gUnknown_8417E67 }, + { gText_Dummy_8417E66 }, + { gText_Dummy_8417E67 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_50[] = { - { gUnknown_8417D79 }, - { gUnknown_8417E50 }, + { gText_TradeCenter }, + { gText_Colosseum_2 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_49[] = { - { gUnknown_8417E72 }, - { gUnknown_8417E7F }, + { gText_PokemonJump }, + { gText_DodrioBerryPicking }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_51[] = { - { gUnknown_8417E94 }, - { gUnknown_8417EA4 } + { gText_2Tinymushrooms }, + { gText_1BigMushroom } }; static const struct MenuAction sScriptMultiChoiceMenu_52[] = { - { gUnknown_8417D79 }, - { gUnknown_8417E50 }, - { gUnknown_8417E71 }, - { gUnknown_8417E5A }, + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_Dummy_8417E71 }, + { gText_BerryCrush }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_53[] = { - { gUnknown_8417D79 }, - { gUnknown_8417E50 }, - { gUnknown_8417E71 }, + { gText_TradeCenter }, + { gText_Colosseum_2 }, + { gText_Dummy_8417E71 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_54[] = { - { gUnknown_8417EB3 }, - { gUnknown_8417EC1 }, + { gText_SeviiIslands }, + { gText_NavelRock }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_55[] = { - { gUnknown_8417EB3 }, - { gUnknown_8417ECC }, + { gText_SeviiIslands }, + { gText_BirthIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_56[] = { - { gUnknown_8417EB3 }, - { gUnknown_8417EC1 }, - { gUnknown_8417ECC }, + { gText_SeviiIslands }, + { gText_NavelRock }, + { gText_BirthIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_57[] = { - { gUnknown_8417DF3 }, - { gUnknown_8417DFE }, - { gUnknown_8417E09 }, + { gText_OneIsland }, + { gText_TwoIsland }, + { gText_ThreeIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_58[] = { - { gUnknown_8417E46 }, - { gUnknown_8417DFE }, - { gUnknown_8417E09 }, + { gText_Vermilion }, + { gText_TwoIsland }, + { gText_ThreeIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_59[] = { - { gUnknown_8417E46 }, - { gUnknown_8417DF3 }, - { gUnknown_8417E09 }, + { gText_Vermilion }, + { gText_OneIsland }, + { gText_ThreeIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_60[] = { - { gUnknown_8417E46 }, - { gUnknown_8417DF3 }, - { gUnknown_8417DFE }, + { gText_Vermilion }, + { gText_OneIsland }, + { gText_TwoIsland }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_61[] = { - { gUnknown_8417E46 }, + { gText_Vermilion }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_62[] = { - { gUnknown_8417F68 }, - { gUnknown_8417F67 }, + { gText_Dummy_8417F68 }, + { gText_Dummy_8417F67 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_63[] = { - { gUnknown_8417F77 }, - { gUnknown_8417F69 }, + { gText_JoinGroup }, + { gText_BecomeLeader }, { gOtherText_Exit } }; @@ -558,35 +558,35 @@ const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { }; const u8 *const gStdStringPtrs[] = { - gUnknown_8417ABF, - gUnknown_8417AC4, - gUnknown_8417ACB, - gUnknown_8417AD0, - gUnknown_8417AD6, - gUnknown_8417AF4, - gUnknown_8417AF9, - gUnknown_8417B00, - gUnknown_8417B05, - gUnknown_8417B0B, - gUnknown_8417B11, - gUnknown_8417B17, - gUnknown_8417B21, - gUnknown_8417B2C, - gUnknown_8417B36, - gUnknown_8417B3E, - gUnknown_8417B4B, - gUnknown_8417B58, - gUnknown_8417B65, - gUnknown_8417B72, - gUnknown_8417B7C, - gUnknown_8417B87, - gUnknown_8417B94, - gUnknown_8417C2D, - gUnknown_8417DA9, - gUnknown_8417DB6, - gUnknown_8417DC7, - gUnknown_8417DD9, - gUnknown_8417DE1 + gText_Cool, + gText_Beauty, + gText_Cute, + gText_Smart, + gText_Tough, + gText_Cool_2, + gText_Beauty_2, + gText_Cute_2, + gText_Smart_2, + gText_Tough_2, + gText_Items, + gText_KeyItems, + gText_PokeBalls, + gText_TmsgUnknown_8417B2CHms, + gText_Berries, + gText_Boulderbadge, + gText_Cascadebadge, + gText_Thunderbadge, + gText_Rainbowbadge, + gText_Soulbadge, + gText_Marshbadge, + gText_Volcanobadge, + gText_Earthbadge, + gText_Coins_2, + gText_ItemsPocket, + gText_KeyItemsPocket, + gText_PokeBallsPocket, + gText_TmCase, + gText_BerryPouch_2 }; static const u8 *const sDescriptionPtrs_CableClub_TradeBattleCancel[] = { @@ -648,14 +648,14 @@ static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { static const u8 *const sSeaGallopDestStrings[] = { - gUnknown_8417E46, - gUnknown_8417DF3, - gUnknown_8417DFE, - gUnknown_8417E09, - gUnknown_8417E16, - gUnknown_8417E22, - gUnknown_8417E2E, - gUnknown_8417E39 + gText_Vermilion, + gText_OneIsland, + gText_TwoIsland, + gText_ThreeIsland, + gText_FourIsland, + gText_FiveIsland, + gText_SixIsland, + gText_SevenIsland }; static u16 GetStringTilesWide(const u8 *str) @@ -951,7 +951,7 @@ static void CreatePCMenuWindow(void) u8 windowWidth; u8 nitems; u8 windowId; - switch (GetStringTilesWide(gUnknown_8417BB6)) + switch (GetStringTilesWide(gText_SPc)) { default: if (FlagGet(FLAG_SYS_POKEDEX_GET)) @@ -969,9 +969,9 @@ static void CreatePCMenuWindow(void) nitems = 5; windowId = CreateWindowFromRect(0, 0, windowWidth, 10); SetStdWindowBorderStyle(windowId, FALSE); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BD3, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BBE, cursorWidth, 50, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BCB, cursorWidth, 66, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 66, 0xFF, NULL); } else { @@ -982,14 +982,14 @@ static void CreatePCMenuWindow(void) windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); SetStdWindowBorderStyle(windowId, FALSE); if (FlagGet(FLAG_SYS_POKEDEX_GET)) - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BD3, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BCB, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); } if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) - AddTextPrinterParameterized(windowId, 2, gUnknown_8417BAC, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); else - AddTextPrinterParameterized(windowId, 2, gUnknown_8417B9F, cursorWidth, 2 , 0xFF, NULL); - StringExpandPlaceholders(gStringVar4, gUnknown_8417BB6); + AddTextPrinterParameterized(windowId, 2, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); + StringExpandPlaceholders(gStringVar4, gText_SPc); Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); sub_809CC18(FALSE, nitems, windowId, 0xFF); @@ -1231,7 +1231,7 @@ void Special_DrawSeaGallopDestinationMenu(void) if (r4 == SEAGALLOP_CINNABAR_ISLAND) r4 = SEAGALLOP_VERMILION_CITY; } - AddTextPrinterParameterized(windowId, 2, gUnknown_8417DED, cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); i++; AddTextPrinterParameterized(windowId, 2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); -- cgit v1.2.3 From 15298c6cd152ebbe8dcf30fd9dcc384b7da02d19 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 14:01:40 -0400 Subject: Fix some string names --- data/strings.s | 42 +++++++++++++++++++++--------------------- include/strings.h | 42 +++++++++++++++++++++--------------------- src/script_menu.c | 42 +++++++++++++++++++++--------------------- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/data/strings.s b/data/strings.s index ab93b95c5..b46766ed3 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1427,19 +1427,19 @@ gText_MakeAChallenge:: @ 0x841796D gText_Info_2:: @ 0x841797F .string "INFO$" -gText_FreshWater200:: @ 0x8417984 +gText_FreshWater_200:: @ 0x8417984 .string "FRESH WATER{CLEAR_TO 0x57}{SMALL}¥200$" -gText_SodaPop300:: @ 0x841799A +gText_SodaPop_300:: @ 0x841799A .string "SODA POP{CLEAR_TO 0x57}{SMALL}¥300$" -gText_Lemonade350:: @ 0x84179AD +gText_Lemonade_350:: @ 0x84179AD .string "LEMONADE{CLEAR_TO 0x57}{SMALL}¥350$" -gText_50Coins1000:: @ 0x84179C0 +gText_50Coins_1000:: @ 0x84179C0 .string "{SMALL} 50 COINS{CLEAR_TO 0x45}¥1,000$" -gText_500Coins10000:: @ 0x84179D6 +gText_500Coins_10000:: @ 0x84179D6 .string "{SMALL}500 COINS{CLEAR_TO 0x40}¥10,000$" gText_Excellent:: @ 0x84179ED @@ -1469,19 +1469,19 @@ gText_Right:: @ 0x8417A37 gText_Left:: @ 0x8417A3D .string "Left$" -gText_Tm134000Coins:: @ 0x8417A42 +gText_Tm13_4000Coins:: @ 0x8417A42 .string "TM13{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gText_Tm233500Coins:: @ 0x8417A58 +gText_Tm23_3500Coins:: @ 0x8417A58 .string "TM23{CLEAR_TO 0x48}{SMALL}3,500 COINS$" -gText_Tm244000Coins:: @ 0x8417A6E +gText_Tm24_4000Coins:: @ 0x8417A6E .string "TM24{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gText_Tm304500Coins:: @ 0x8417A84 +gText_Tm30_4500Coins:: @ 0x8417A84 .string "TM30{CLEAR_TO 0x48}{SMALL}4,500 COINS$" -gText_Tm354000Coins:: @ 0x8417A9A +gText_Tm35_4000Coins:: @ 0x8417A9A .string "TM35{CLEAR_TO 0x48}{SMALL}4,000 COINS$" gText_1F:: @ 0x8417AB0 @@ -1625,25 +1625,25 @@ gText_Lemonade:: @ 0x8417C24 gText_Coins_2:: @ 8417C2D .string "COINS$" -gText_Bicycle1000000:: @ 0x8417C33 +gText_Bicycle_1000000:: @ 0x8417C33 .string "BICYCLE{CLEAR_TO 0x49}{SMALL}¥1,000,000$" gText_NoThanks:: @ 0x8417C4B .string "NO THANKS$" -gText_Abra180Coins:: @ 0x8417C55 +gText_Abra_180Coins:: @ 0x8417C55 .string "ABRA{CLEAR_TO 0x55}{SMALL} 180 COINS$" -gText_Clefairy500Coins:: @ 0x8417C6A +gText_Clefairy_500Coins:: @ 0x8417C6A .string "CLEFAIRY{CLEAR_TO 0x55}{SMALL} 500 COINS$" -gText_Dratini2800Coins:: @ 0x8417C83 +gText_Dratini_2800Coins:: @ 0x8417C83 .string "DRATINI{CLEAR_TO 0x4B}{SMALL} 2,800 COINS$" -gText_Scyther5500Coins:: @ 0x8417C9D +gText_Scyther_5500Coins:: @ 0x8417C9D .string "SCYTHER{CLEAR_TO 0x4B}{SMALL} 5,500 COINS$" -gText_Porygon9999Coins:: @ 0x8417CB7 +gText_Porygon_9999Coins:: @ 0x8417CB7 .string "PORYGON{CLEAR_TO 0x4B}{SMALL} 9,999 COINS$" gUnknown_8417CD1:: @ 0x8417CD1 @@ -1766,19 +1766,19 @@ gText_NavelRock:: @ 0x8417EC1 gText_BirthIsland:: @ 0x8417ECC .string "BIRTH ISLAND$" -gText_MiracleSeed1000Coins:: @ 0x8417ED9 +gText_MiracleSeed_1000Coins:: @ 0x8417ED9 .string "MIRACLE SEED{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gText_Charcoal1000Coins:: @ 0x8417EF7 +gText_Charcoal_1000Coins:: @ 0x8417EF7 .string "CHARCOAL{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gText_MysticWater1000Coins:: @ 0x8417F11 +gText_MysticWater_1000Coins:: @ 0x8417F11 .string "MYSTIC WATER{CLEAR_TO 0x50}{SMALL}1,000 COINS$" -gText_YellowFlute1600Coins:: @ 0x8417F2F +gText_YellowFlute_1600Coins:: @ 0x8417F2F .string "YELLOW FLUTE{CLEAR_TO 0x50}{SMALL}1,600 COINS$" -gText_SmokeBall800Coins:: @ 0x8417F4D +gText_SmokeBall_800Coins:: @ 0x8417F4D .string "SMOKE BALL{CLEAR_TO 0x5A}{SMALL}800 COINS$" gText_Dummy_8417F67:: @ 0x8417F67 diff --git a/include/strings.h b/include/strings.h index 32b485ce4..7613225d4 100644 --- a/include/strings.h +++ b/include/strings.h @@ -544,11 +544,11 @@ extern const u8 gText_DoubleBattle[]; extern const u8 gText_MultiBattle[]; extern const u8 gText_MakeAChallenge[]; extern const u8 gText_Info_2[]; -extern const u8 gText_FreshWater200[]; -extern const u8 gText_SodaPop300[]; -extern const u8 gText_Lemonade350[]; -extern const u8 gText_50Coins1000[]; -extern const u8 gText_500Coins10000[]; +extern const u8 gText_FreshWater_200[]; +extern const u8 gText_SodaPop_300[]; +extern const u8 gText_Lemonade_350[]; +extern const u8 gText_50Coins_1000[]; +extern const u8 gText_500Coins_10000[]; extern const u8 gText_Excellent[]; extern const u8 gText_NotSoBad[]; extern const u8 gText_RedShard[]; @@ -557,11 +557,11 @@ extern const u8 gText_BlueShard[]; extern const u8 gText_GreenShard[]; extern const u8 gText_Right[]; extern const u8 gText_Left[]; -extern const u8 gText_Tm134000Coins[]; -extern const u8 gText_Tm233500Coins[]; -extern const u8 gText_Tm244000Coins[]; -extern const u8 gText_Tm304500Coins[]; -extern const u8 gText_Tm354000Coins[]; +extern const u8 gText_Tm13_4000Coins[]; +extern const u8 gText_Tm23_3500Coins[]; +extern const u8 gText_Tm24_4000Coins[]; +extern const u8 gText_Tm30_4500Coins[]; +extern const u8 gText_Tm35_4000Coins[]; extern const u8 gText_1F[]; extern const u8 gText_2F[]; extern const u8 gText_3F[]; @@ -579,13 +579,13 @@ extern const u8 gText_QuitLooking[]; extern const u8 gText_FreshWater[]; extern const u8 gText_SodaPop[]; extern const u8 gText_Lemonade[]; -extern const u8 gText_Bicycle1000000[]; +extern const u8 gText_Bicycle_1000000[]; extern const u8 gText_NoThanks[]; -extern const u8 gText_Abra180Coins[]; -extern const u8 gText_Clefairy500Coins[]; -extern const u8 gText_Dratini2800Coins[]; -extern const u8 gText_Scyther5500Coins[]; -extern const u8 gText_Porygon9999Coins[]; +extern const u8 gText_Abra_180Coins[]; +extern const u8 gText_Clefairy_500Coins[]; +extern const u8 gText_Dratini_2800Coins[]; +extern const u8 gText_Scyther_5500Coins[]; +extern const u8 gText_Porygon_9999Coins[]; extern const u8 gText_NoThanks_2[]; extern const u8 gText_HelixFossil[]; extern const u8 gText_DomeFossil[]; @@ -610,11 +610,11 @@ extern const u8 gText_1BigMushroom[]; extern const u8 gText_SeviiIslands[]; extern const u8 gText_NavelRock[]; extern const u8 gText_BirthIsland[]; -extern const u8 gText_MiracleSeed1000Coins[]; -extern const u8 gText_Charcoal1000Coins[]; -extern const u8 gText_MysticWater1000Coins[]; -extern const u8 gText_YellowFlute1600Coins[]; -extern const u8 gText_SmokeBall800Coins[]; +extern const u8 gText_MiracleSeed_1000Coins[]; +extern const u8 gText_Charcoal_1000Coins[]; +extern const u8 gText_MysticWater_1000Coins[]; +extern const u8 gText_YellowFlute_1600Coins[]; +extern const u8 gText_SmokeBall_800Coins[]; extern const u8 gText_Dummy_8417F67[]; extern const u8 gText_Dummy_8417F68[]; extern const u8 gText_BecomeLeader[]; diff --git a/src/script_menu.c b/src/script_menu.c index eee943793..1076e19c0 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -161,33 +161,33 @@ static const struct MenuAction sScriptMultiChoiceMenu_25[] = { }; static const struct MenuAction sScriptMultiChoiceMenu_26[] = { - { gText_FreshWater200 }, - { gText_SodaPop300 }, - { gText_Lemonade350 }, + { gText_FreshWater_200 }, + { gText_SodaPop_300 }, + { gText_Lemonade_350 }, { gOtherText_Exit } }; static const struct MenuAction sScriptMultiChoiceMenu_30[] = { - { gText_Tm134000Coins }, - { gText_Tm233500Coins }, - { gText_Tm244000Coins }, - { gText_Tm304500Coins }, - { gText_Tm354000Coins }, + { gText_Tm13_4000Coins }, + { gText_Tm23_3500Coins }, + { gText_Tm24_4000Coins }, + { gText_Tm30_4500Coins }, + { gText_Tm35_4000Coins }, { gText_NoThanks_2 } }; static const struct MenuAction sScriptMultiChoiceMenu_41[] = { - { gText_SmokeBall800Coins }, - { gText_MiracleSeed1000Coins }, - { gText_Charcoal1000Coins }, - { gText_MysticWater1000Coins }, - { gText_YellowFlute1600Coins }, + { gText_SmokeBall_800Coins }, + { gText_MiracleSeed_1000Coins }, + { gText_Charcoal_1000Coins }, + { gText_MysticWater_1000Coins }, + { gText_YellowFlute_1600Coins }, { gText_NoThanks_2 } }; static const struct MenuAction sScriptMultiChoiceMenu_27[] = { - { gText_50Coins1000 }, - { gText_500Coins10000 }, + { gText_50Coins_1000 }, + { gText_500Coins_10000 }, { gOtherText_Exit } }; @@ -311,16 +311,16 @@ static const struct MenuAction sScriptMultiChoiceMenu_1[] = { }; static const struct MenuAction sScriptMultiChoiceMenu_13[] = { - { gText_Bicycle1000000 }, + { gText_Bicycle_1000000 }, { gText_NoThanks } }; static const struct MenuAction sScriptMultiChoiceMenu_14[] = { - { gText_Abra180Coins }, - { gText_Clefairy500Coins }, - { gText_Dratini2800Coins }, - { gText_Scyther5500Coins }, - { gText_Porygon9999Coins }, + { gText_Abra_180Coins }, + { gText_Clefairy_500Coins }, + { gText_Dratini_2800Coins }, + { gText_Scyther_5500Coins }, + { gText_Porygon_9999Coins }, { gText_NoThanks_2 } }; -- cgit v1.2.3 From 359ec8dde1d069b8b335e863f332f65c262c9145 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 14:52:54 -0400 Subject: Name multichoice menus --- data/event_scripts.s | 116 +++++---- data/maps/BirthIsland_Harbor/scripts.inc | 2 +- .../CeladonCity_Condominiums_RoofRoom/scripts.inc | 4 +- .../scripts.inc | 10 +- .../CeladonCity_DepartmentStore_Roof/scripts.inc | 16 +- data/maps/CeladonCity_GameCorner/scripts.inc | 2 +- .../CeladonCity_GameCorner_PrizeRoom/scripts.inc | 6 +- data/maps/CeruleanCity_BikeShop/scripts.inc | 2 +- .../scripts.inc | 10 +- data/maps/NavelRock_Harbor/scripts.inc | 2 +- data/maps/RocketHideout_Elevator/scripts.inc | 6 +- data/maps/Route25_SeaCottage/scripts.inc | 2 +- .../SevenIsland_TrainerTower_Elevator/scripts.inc | 4 +- .../SevenIsland_TrainerTower_Lobby/scripts.inc | 4 +- data/maps/TwoIsland_House/scripts.inc | 2 +- data/maps/VermilionCity/scripts.inc | 8 +- data/maps/ViridianCity_House2/scripts.inc | 2 +- data/strings.s | 34 +-- include/constants/menu.h | 66 ++++++ include/strings.h | 34 +-- src/field_specials.c | 56 ++--- src/script_menu.c | 258 ++++++++++----------- 22 files changed, 355 insertions(+), 291 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index ccb9c9446..bfa50b73f 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -24,9 +24,9 @@ .section script_data, "aw", %progbits - .include "data/script_cmd_table.inc" + .include "data/script_cmd_table.inc" - .align 2 + .align 2 gSpecialVars:: @ 815FD0C .4byte gSpecialVar_0x8000 .4byte gSpecialVar_0x8001 @@ -50,9 +50,9 @@ gSpecialVars:: @ 815FD0C .4byte gSpecialVar_PrevTextColor .4byte gUnknown_20370DE - .include "data/specials.inc" + .include "data/specials.inc" - .align 2 + .align 2 gStdScripts:: @ 8160450 .4byte gStdScript_0 .4byte gStdScript_1 @@ -1593,7 +1593,7 @@ EventScript_1A6578:: @ 81A6578 goto_if eq, EventScript_1A7AE0 message Text_1A5483 waitmessage - multichoice 19, 8, 0, 2 + multichoice 19, 8, MULTICHOICE_YES_NO, FALSE | (TRUE << 1) switch VAR_RESULT case 0, EventScript_1A65B8 case 1 EventScript_1A6663 @@ -4160,7 +4160,7 @@ EventScript_1A8EC5:: @ 81A8EC5 goto_if ge, EventScript_1A911E compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND, 4 goto_if ge, EventScript_1A8F12 - multichoice 19, 6, 44, 0 + multichoice 19, 6, MULTICHOICE_ISLAND_23, FALSE switch VAR_RESULT case 0, EventScript_1A8FF9 case 1, EventScript_1A9004 @@ -4169,7 +4169,7 @@ EventScript_1A8EC5:: @ 81A8EC5 end EventScript_1A8F12:: @ 81A8F12 - multichoice 19, 5, 58, 0 + multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V23, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FF9 @@ -4183,7 +4183,7 @@ EventScript_1A8F54:: @ 81A8F54 goto_if ge, EventScript_1A911E compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND, 4 goto_if ge, EventScript_1A8FA1 - multichoice 19, 6, 45, 0 + multichoice 19, 6, MULTICHOICE_ISLAND_13, FALSE switch VAR_RESULT case 0, EventScript_1A8FEE case 1, EventScript_1A9004 @@ -4192,7 +4192,7 @@ EventScript_1A8F54:: @ 81A8F54 end EventScript_1A8FA1:: @ 81A8FA1 - multichoice 19, 5, 59, 0 + multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V13, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -4226,7 +4226,7 @@ EventScript_1A900F:: @ 81A900F goto_if ge, EventScript_1A911E compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND, 4 goto_if ge, EventScript_1A905C - multichoice 19, 6, 46, 0 + multichoice 19, 6, MULTICHOICE_ISLAND_12, FALSE switch VAR_RESULT case 0, EventScript_1A8FEE case 1, EventScript_1A8FF9 @@ -4235,7 +4235,7 @@ EventScript_1A900F:: @ 81A900F end EventScript_1A905C:: @ 81A905C - multichoice 19, 5, 60, 0 + multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V12, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -7877,7 +7877,7 @@ CeladonCity_GameCorner_EventScript_1B2867:: @ 81B2867 waitse message gUnknown_81B1E24 waitmessage - multichoice 21, 0, 2, 1 + multichoice 21, 0, MULTICHOICE_TRAINER_CARD_ICON_TINT, TRUE switch VAR_RESULT case 0, EventScript_1B28DB case 1, EventScript_1B28E6 @@ -8003,7 +8003,7 @@ EventScript_1B29D0:: @ 81B29D0 end EventScript_1B2A23:: @ 81B2A23 - multichoice 15, 8, 3, 0 + multichoice 15, 8, MULTICHOICE_HOF_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2B98 case 1, EventScript_1B2DF6 @@ -8011,7 +8011,7 @@ EventScript_1B2A23:: @ 81B2A23 end EventScript_1B2A4F:: @ 81B2A4F - multichoice 16, 8, 4, 0 + multichoice 16, 8, MULTICHOICE_EGGS_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2C62 case 1, EventScript_1B2DF6 @@ -8019,7 +8019,7 @@ EventScript_1B2A4F:: @ 81B2A4F end EventScript_1B2A7B:: @ 81B2A7B - multichoice 15, 8, 5, 0 + multichoice 15, 8, MULTICHOICE_VICTORIES_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2D2C case 1, EventScript_1B2DF6 @@ -8027,7 +8027,7 @@ EventScript_1B2A7B:: @ 81B2A7B end EventScript_1B2AA7:: @ 81B2AA7 - multichoice 15, 6, 6, 0 + multichoice 15, 6, MULTICHOICE_HOF_EGGS_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2B98 case 1, EventScript_1B2C62 @@ -8036,7 +8036,7 @@ EventScript_1B2AA7:: @ 81B2AA7 end EventScript_1B2ADE:: @ 81B2ADE - multichoice 15, 6, 7, 0 + multichoice 15, 6, MULTICHOICE_HOF_VICTORIES_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2B98 case 1, EventScript_1B2D2C @@ -8045,7 +8045,7 @@ EventScript_1B2ADE:: @ 81B2ADE end EventScript_1B2B15:: @ 81B2B15 - multichoice 15, 6, 8, 0 + multichoice 15, 6, MULTICHOICE_EGGS_VICTORIES_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2C62 case 1, EventScript_1B2D2C @@ -8054,7 +8054,7 @@ EventScript_1B2B15:: @ 81B2B15 end EventScript_1B2B4C:: @ 81B2B4C - multichoice 15, 5, 9, 0 + multichoice 15, 5, MULTICHOICE_HOF_EGGS_VICTORIES_QUIT, FALSE switch VAR_RESULT case 0, EventScript_1B2B98 case 1, EventScript_1B2C62 @@ -8369,16 +8369,14 @@ ThreeIsland_PokemonCenter_2F_MapScript2_1BB1ED:: @ 81BB1ED TwoIsland_PokemonCenter_2F_MapScript2_1BB1ED:: @ 81BB1ED VermilionCity_PokemonCenter_2F_MapScript2_1BB1ED:: @ 81BB1ED ViridianCity_PokemonCenter_2F_MapScript2_1BB1ED:: @ 81BB1ED - multichoice 64, 1, 0, 39 - showelevmenu - compare_local_to_local 8, 111 - setdivewarp MAP_NAVEL_ROCK_EXTERIOR, 39, 7090, 28424 - setdivewarp MAP_VIRIDIAN_CITY_HOUSE1, 39, 7090, 28424 - setdivewarp MAP_PALLET_TOWN, 39, 7090, 28424 - setdivewarp MAP_PEWTER_CITY_MUSEUM_1F, 39, 7090, 28424 - setdivewarp MAP_CERULEAN_CITY_HOUSE1, 39, 7090, 28424 - setdivewarp MAP_LAVENDER_TOWN_POKEMON_CENTER_1F, 39, 7090, 8 - nop + map_script_2 VAR_0x406F, 1, EventScript_1BB227 + map_script_2 VAR_0x406F, 2, EventScript_1BB227 + map_script_2 VAR_0x406F, 5, EventScript_1BB227 + map_script_2 VAR_0x406F, 3, EventScript_1BB227 + map_script_2 VAR_0x406F, 6, EventScript_1BB227 + map_script_2 VAR_0x406F, 7, EventScript_1BB227 + map_script_2 VAR_0x406F, 8, EventScript_1BB227 + .2byte 0 EventScript_1BB227:: @ 81BB227 compare_var_to_value VAR_0x8007, 0 @@ -8608,7 +8606,7 @@ EventScript_1BB459:: @ 81BB459 EventScript_1BB467:: @ 81BB467 setvar VAR_0x8004, 0 - multichoice 0, 0, 39, 0 + multichoice 0, 0, MULTICHOICE_TRADE_CENTER_COLOSSEUM, FALSE switch VAR_RESULT case 0, EventScript_1BB6AB case 1, EventScript_1BB4A3 @@ -8626,7 +8624,7 @@ EventScript_1BB4AD:: @ 81BB4AD EventScript_1BB4AE:: @ 81BB4AE message Text_1BD338 waitmessage - multichoice 0, 0, 17, 0 + multichoice 0, 0, MULTICHOICE_SINGLE_DOUBLE_MULTI_INFO_EXIT, FALSE switch VAR_RESULT case 0, EventScript_1BB50F case 1, EventScript_1BB51A @@ -9199,7 +9197,7 @@ EventScript_1BBA50:: @ 81BBA50 end EventScript_1BBA51:: @ 81BBA51 - multichoice 18, 6, 16, 0 + multichoice 18, 6, MULTICHOICE_YES_NO_INFO, FALSE switch VAR_RESULT case 0, EventScript_1BBA94 case 1, EventScript_1BB82F @@ -9323,7 +9321,7 @@ EventScript_1BBBE6:: @ 81BBBE6 EventScript_1BBBE7:: @ 81BBBE7 checkflag FLAG_GOT_POWDER_JAR goto_if FALSE, EventScript_1BBC32 - multichoice 0, 0, 47, 0 + multichoice 0, 0, MULTICHOICE_TRADE_COLOSSEUM_CRUSH, FALSE switch VAR_RESULT case 0, EventScript_1BBC69 case 1, EventScript_1BBC97 @@ -9333,7 +9331,7 @@ EventScript_1BBBE7:: @ 81BBBE7 end EventScript_1BBC32:: @ 81BBC32 - multichoice 0, 0, 50, 0 + multichoice 0, 0, MULTICHOICE_TRADE_COLOSSEUM_2, FALSE switch VAR_RESULT case 0, EventScript_1BBC69 case 1, EventScript_1BBC97 @@ -9357,7 +9355,7 @@ EventScript_1BBC96:: @ 81BBC96 EventScript_1BBC97:: @ 81BBC97 message Text_1BD338 waitmessage - multichoice 0, 0, 17, 0 + multichoice 0, 0, MULTICHOICE_SINGLE_DOUBLE_MULTI_INFO_EXIT, FALSE switch VAR_RESULT case 0, EventScript_1BBCEA case 1, EventScript_1BBCF5 @@ -9442,7 +9440,7 @@ EventScript_1BBDBC:: @ 81BBDBC message Text_1BD51B waitmessage call EventScript_1A6675 - multichoice 13, 6, 63, 0 + multichoice 13, 6, MULTICHOICE_JOIN_OR_LEAD, FALSE switch VAR_RESULT case 0, EventScript_1BBE28 case 1, EventScript_1BBE00 @@ -9477,7 +9475,7 @@ EventScript_1BBE50:: @ 81BBE50 message Text_1BD582 waitmessage call EventScript_1A6675 - multichoice 13, 6, 63, 0 + multichoice 13, 6, MULTICHOICE_JOIN_OR_LEAD, FALSE switch VAR_RESULT case 0, EventScript_1BBEBC case 1, EventScript_1BBE94 @@ -9512,7 +9510,7 @@ EventScript_1BBEE4:: @ 81BBEE4 message Text_1BD5F1 waitmessage call EventScript_1A6675 - multichoice 13, 6, 63, 0 + multichoice 13, 6, MULTICHOICE_JOIN_OR_LEAD, FALSE switch VAR_RESULT case 0, EventScript_1BBF50 case 1, EventScript_1BBF28 @@ -9659,7 +9657,7 @@ EventScript_1BC060:: @ 81BC060 faceplayer message Text_1BCCFF waitmessage - multichoice 0, 0, 49, 0 + multichoice 0, 0, MULTICHOICE_POKEJUMP_DODRIO, FALSE switch VAR_RESULT case 0, EventScript_1BC0B0 case 1, EventScript_1BC0BA @@ -9698,7 +9696,7 @@ EventScript_1BC0CE:: @ 81BC0CE special HelpSystem_Disable message Text_1BD02D waitmessage - multichoice 0, 0, 49, 0 + multichoice 0, 0, MULTICHOICE_POKEJUMP_DODRIO, FALSE switch VAR_RESULT case 0, EventScript_1BC13A case 1, EventScript_1BC184 @@ -9751,7 +9749,7 @@ EventScript_1BC1CE:: @ 81BC1CE message Text_1BD5F1 waitmessage call EventScript_1A6675 - multichoice 13, 6, 63, 0 + multichoice 13, 6, MULTICHOICE_JOIN_OR_LEAD, FALSE switch VAR_RESULT case 0, EventScript_1BC23A case 1, EventScript_1BC212 @@ -11303,7 +11301,7 @@ EventScript_1BEE3A:: @ 81BEE3A EventScript_1BEE44:: @ 81BEE44 message Text_1BF017 waitmessage - multichoice 18, 6, 18, 0 + multichoice 18, 6, MULTICHOICE_YES_NO_INFO_2, FALSE switch VAR_RESULT case 0, EventScript_1BEE8F case 1, EventScript_1BEEC3 @@ -11350,7 +11348,7 @@ EventScript_1BEECD:: @ 81BEECD EventScript_1BEEDB:: @ 81BEEDB message Text_1BF1FB waitmessage - multichoice 18, 6, 18, 0 + multichoice 18, 6, MULTICHOICE_YES_NO_INFO_2, FALSE switch VAR_RESULT case 0, EventScript_1BEF26 case 1, EventScript_1BEF35 @@ -13429,7 +13427,7 @@ VictoryRoad_2F_EventScript_1C47AE:: @ 81C47AE goto_if eq, EventScript_1C4802 setflag FLAG_TUTOR_DOUBLE_EDGE goto EventScript_1C480C - end + end EventScript_1C4802:: @ 81C4802 msgbox Text_174ABC @@ -13459,7 +13457,7 @@ EventScript_1C4816:: @ 81C4816 goto_if eq, EventScript_1C486A setflag FLAG_TUTOR_THUNDER_WAVE goto EventScript_1C4874 - end + end EventScript_1C486A:: @ 81C486A msgbox Text_17579D @@ -13489,7 +13487,7 @@ RockTunnel_B1F_EventScript_1C487E:: @ 81C487E goto_if eq, EventScript_1C48D2 setflag FLAG_TUTOR_ROCK_SLIDE goto EventScript_1C48DC - end + end EventScript_1C48D2:: @ 81C48D2 msgbox Text_179AC0 @@ -13519,7 +13517,7 @@ MtEmber_Exterior_EventScript_1C48E6:: @ 81C48E6 goto_if eq, EventScript_1C493A setflag FLAG_TUTOR_EXPLOSION goto EventScript_1C4944 - end + end EventScript_1C493A:: @ 81C493A msgbox Text_17A6ED @@ -13549,7 +13547,7 @@ Route4_EventScript_1C494E:: @ 81C494E goto_if eq, EventScript_1C49A2 setflag FLAG_TUTOR_META_PUNCH goto EventScript_1C49AC - end + end EventScript_1C49A2:: @ 81C49A2 msgbox Text_183A83 @@ -13579,7 +13577,7 @@ Route4_EventScript_1C49B6:: @ 81C49B6 goto_if eq, EventScript_1C4A0A setflag FLAG_TUTOR_MEGA_KICK goto EventScript_1C4A14 - end + end EventScript_1C4A0A:: @ 81C4A0A msgbox Text_183C25 @@ -13609,7 +13607,7 @@ EventScript_1C4A1E:: @ 81C4A1E goto_if eq, EventScript_1C4A72 setflag FLAG_TUTOR_DREAM_EATER goto EventScript_1C4A7C - end + end EventScript_1C4A72:: @ 81C4A72 msgbox Text_17E3E9 @@ -13639,7 +13637,7 @@ EventScript_1C4A86:: @ 81C4A86 goto_if eq, EventScript_1C4ADA setflag FLAG_TUTOR_SOFT_BOILED goto EventScript_1C4AE4 - end + end EventScript_1C4ADA:: @ 81C4ADA msgbox Text_18043F @@ -13669,7 +13667,7 @@ FuchsiaCity_EventScript_1C4AEE:: @ 81C4AEE goto_if eq, EventScript_1C4B42 setflag FLAG_TUTOR_SUBSTITUTE goto EventScript_1C4B4C - end + end EventScript_1C4B42:: @ 81C4B42 msgbox Text_180A32 @@ -13699,7 +13697,7 @@ SevenIsland_EventScript_1C4B56:: @ 81C4B56 goto_if eq, EventScript_1C4BAA setflag FLAG_TUTOR_SWORDS_DANCE goto EventScript_1C4BB4 - end + end EventScript_1C4BAA:: @ 81C4BAA msgbox Text_182FC1 @@ -13729,7 +13727,7 @@ PewterCity_Museum_1F_EventScript_1C4BBE:: @ 81C4BBE goto_if eq, EventScript_1C4C12 setflag FLAG_TUTOR_SEISMIC_TOSS goto EventScript_1C4C1C - end + end EventScript_1C4C12:: @ 81C4C12 msgbox Text_190AA9 @@ -13759,7 +13757,7 @@ EventScript_1C4C26:: @ 81C4C26 goto_if eq, EventScript_1C4C7A setflag FLAG_TUTOR_COUNTER goto EventScript_1C4C84 - end + end EventScript_1C4C7A:: @ 81C4C7A msgbox Text_1959CC @@ -13789,7 +13787,7 @@ EventScript_1C4C8E:: @ 81C4C8E goto_if eq, EventScript_1C4CE2 setflag FLAG_TUTOR_METRONOME goto EventScript_1C4CEC - end + end EventScript_1C4CE2:: @ 81C4CE2 msgbox Text_19A1CB @@ -13820,7 +13818,7 @@ EventScript_1C4CF6:: @ 81C4CF6 removeitem ITEM_POKE_DOLL, 1 setflag FLAG_TUTOR_MIMIC goto EventScript_1C4D59 - end + end EventScript_1C4D4F:: @ 81C4D4F msgbox Text_19ADD8 @@ -13862,7 +13860,7 @@ FourIsland_House1_EventScript_1C4D84:: @ 81C4D84 goto_if eq, EventScript_1C4DD8 setflag FLAG_TUTOR_BODY_SLAM goto EventScript_1C4DE2 - end + end EventScript_1C4DD8:: @ 81C4DD8 msgbox Text_1A35C7 @@ -14503,7 +14501,7 @@ gText_PlayerSavedTheGame:: @ 81C5647 .string "{PLAYER} saved the game.$" gUnknown_81C565A:: - .string "セーブに しっぱい しました‥$" + .string "セーブに しっぱい しました‥$" gText_DifferentGameFile:: @ 81C566A .string "WARNING!\p" diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index ea213a771..774837274 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -7,7 +7,7 @@ BirthIsland_Harbor_EventScript_1653E7:: @ 81653E7 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_BIRTH_ISLAND - multichoice 20, 8, 61, 0 + multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc index 3ffdd24f6..a18215910 100644 --- a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc @@ -68,7 +68,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_16C522:: @ 816C522 message Text_1965F4 waitmessage setvar VAR_0x8004, 4 - multichoice 0, 0, 43, 0 + multichoice 0, 0, MULTICHOICE_LINKED_DIRECT_UNION, FALSE switch VAR_RESULT case 0, EventScript_16C5C0 case 1, EventScript_16C5CE @@ -80,7 +80,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_16C522:: @ 816C522 EventScript_16C578:: @ 816C578 message Text_1965F4 waitmessage - multichoice 0, 0, 43, 0 + multichoice 0, 0, MULTICHOICE_LINKED_DIRECT_UNION, FALSE switch VAR_RESULT case 0, EventScript_16C5C0 case 1, EventScript_16C5CE diff --git a/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc index 0e2673614..3fcd14e8a 100644 --- a/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc @@ -21,29 +21,29 @@ CeladonCity_DepartmentStore_Elevator_EventScript_16C153:: @ 816C153 end EventScript_16C1B7:: @ 816C1B7 - multichoicedefault 0, 0, 31, 0, 0 + multichoicedefault 0, 0, MULTICHOICE_DEPT_STORE_ELEVATOR, 0, FALSE goto EventScript_16C1F3 EventScript_16C1C2:: @ 816C1C2 end EventScript_16C1C3:: @ 816C1C3 - multichoicedefault 0, 0, 31, 1, 0 + multichoicedefault 0, 0, MULTICHOICE_DEPT_STORE_ELEVATOR, 1, FALSE goto EventScript_16C1F3 end EventScript_16C1CF:: @ 816C1CF - multichoicedefault 0, 0, 31, 2, 0 + multichoicedefault 0, 0, MULTICHOICE_DEPT_STORE_ELEVATOR, 2, FALSE goto EventScript_16C1F3 end EventScript_16C1DB:: @ 816C1DB - multichoicedefault 0, 0, 31, 3, 0 + multichoicedefault 0, 0, MULTICHOICE_DEPT_STORE_ELEVATOR, 3, FALSE goto EventScript_16C1F3 end EventScript_16C1E7:: @ 816C1E7 - multichoicedefault 0, 0, 31, 4, 0 + multichoicedefault 0, 0, MULTICHOICE_DEPT_STORE_ELEVATOR, 4, FALSE goto EventScript_16C1F3 end diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc index 805775505..6e5c8a284 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc @@ -58,7 +58,7 @@ EventScript_16BD3E:: @ 816BD3E end EventScript_16BDAE:: @ 816BDAE - multichoice 0, 0, 32, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_FRESH_WATER, FALSE switch VAR_RESULT case 0, EventScript_16BF19 case 1, EventScript_16C00C @@ -66,7 +66,7 @@ EventScript_16BDAE:: @ 816BDAE end EventScript_16BDDA:: @ 816BDDA - multichoice 0, 0, 33, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_SODA_POP, FALSE switch VAR_RESULT case 0, EventScript_16BF3A case 1, EventScript_16C00C @@ -74,7 +74,7 @@ EventScript_16BDDA:: @ 816BDDA end EventScript_16BE06:: @ 816BE06 - multichoice 0, 0, 34, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP, FALSE switch VAR_RESULT case 0, EventScript_16BF19 case 1, EventScript_16BF3A @@ -83,7 +83,7 @@ EventScript_16BE06:: @ 816BE06 end EventScript_16BE3D:: @ 816BE3D - multichoice 0, 0, 35, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_LEMONADE, FALSE switch VAR_RESULT case 0, EventScript_16BF5B case 1, EventScript_16C00C @@ -91,7 +91,7 @@ EventScript_16BE3D:: @ 816BE3D end EventScript_16BE69:: @ 816BE69 - multichoice 0, 0, 36, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_LEMONADE, FALSE switch VAR_RESULT case 0, EventScript_16BF19 case 1, EventScript_16BF5B @@ -100,7 +100,7 @@ EventScript_16BE69:: @ 816BE69 end EventScript_16BEA0:: @ 816BEA0 - multichoice 0, 0, 37, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_SODA_POP_LEMONADE, FALSE switch VAR_RESULT case 0, EventScript_16BF3A case 1, EventScript_16BF5B @@ -109,7 +109,7 @@ EventScript_16BEA0:: @ 816BEA0 end EventScript_16BED7:: @ 816BED7 - multichoice 0, 0, 38, 0 + multichoice 0, 0, MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP_LEMONADE, FALSE switch VAR_RESULT case 0, EventScript_16BF19 case 1, EventScript_16BF3A @@ -220,7 +220,7 @@ CeladonCity_DepartmentStore_Roof_EventScript_16C034:: @ 816C034 end EventScript_16C045:: @ 816C045 - multichoice 12, 0, 26, 0 + multichoice 12, 0, MULTICHOICE_CELADON_VENDING_MACHINE, FALSE copyvar VAR_0x4001, VAR_RESULT switch VAR_0x4001 case 0, EventScript_16C083 diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index f79ffb046..2d433d4ba 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -29,7 +29,7 @@ CeladonCity_GameCorner_EventScript_16C68D:: @ 816C68D showcoinsbox 0, 5 message Text_196984 waitmessage - multichoice 13, 0, 27, 0 + multichoice 13, 0, MULTICHOICE_GAME_CORNER_COIN_PURCHASE_COUNTER, FALSE copyvar VAR_0x8009, VAR_RESULT switch VAR_RESULT case 0, EventScript_16C6E6 diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 70d9121eb..01ad2b414 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -25,7 +25,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_16CB88:: @ 816CB88 EventScript_16CBB2:: @ 816CBB2 message Text_19707A waitmessage - multichoice 11, 0, 14, 0 + multichoice 11, 0, MULTICHOICE_GAME_CORNER_POKEMON_PRIZES, FALSE switch VAR_RESULT case 0, EventScript_16CC15 case 1, EventScript_16CC25 @@ -204,7 +204,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_16CE1D:: @ 816CE1D EventScript_16CE47:: @ 816CE47 message Text_19707A waitmessage - multichoice 11, 0, 30, 0 + multichoice 11, 0, MULTICHOICE_GAME_CORNER_TMPRIZES, FALSE switch VAR_RESULT case 0, EventScript_16CEA5 case 1, EventScript_16CEB9 @@ -302,7 +302,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_16CF88:: @ 816CF88 EventScript_16CFB2:: @ 816CFB2 message Text_19707A waitmessage - multichoice 10, 0, 41, 0 + multichoice 10, 0, MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES, FALSE switch VAR_RESULT case 0, EventScript_16D010 case 1, EventScript_16D020 diff --git a/data/maps/CeruleanCity_BikeShop/scripts.inc b/data/maps/CeruleanCity_BikeShop/scripts.inc index 1091e75cb..40302e25f 100644 --- a/data/maps/CeruleanCity_BikeShop/scripts.inc +++ b/data/maps/CeruleanCity_BikeShop/scripts.inc @@ -11,7 +11,7 @@ CeruleanCity_BikeShop_EventScript_16ABBD:: @ 816ABBD showmoneybox 0, 0, 0 message Text_192755 waitmessage - multichoice 11, 0, 13, 0 + multichoice 11, 0, MULTICHOICE_BIKE_SHOP, FALSE switch VAR_RESULT case 0, EventScript_16AC07 case 1, EventScript_16AC15 diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc index ad8b416cd..27fb47f63 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc @@ -103,7 +103,7 @@ EventScript_16E544:: @ 816E544 call EventScript_16E51C compare_var_to_value VAR_RESULT, 1 goto_if eq, EventScript_16E5FA - multichoice 0, 0, 21, 0 + multichoice 0, 0, MULTICHOICE_HELIX, FALSE switch VAR_RESULT case 0, EventScript_16E668 case 1, EventScript_16E53A @@ -116,7 +116,7 @@ EventScript_16E586:: @ 816E586 call EventScript_16E51C compare_var_to_value VAR_RESULT, 1 goto_if eq, EventScript_16E631 - multichoice 0, 0, 22, 0 + multichoice 0, 0, MULTICHOICE_DOME, FALSE switch VAR_RESULT case 0, EventScript_16E6A6 case 1, EventScript_16E53A @@ -126,7 +126,7 @@ EventScript_16E586:: @ 816E586 EventScript_16E5C8:: @ 816E5C8 message Text_19A282 waitmessage - multichoice 0, 0, 23, 0 + multichoice 0, 0, MULTICHOICE_AMBER, FALSE switch VAR_RESULT case 0, EventScript_16E6E4 case 1, EventScript_16E53A @@ -134,7 +134,7 @@ EventScript_16E5C8:: @ 816E5C8 end EventScript_16E5FA:: @ 816E5FA - multichoice 0, 0, 24, 0 + multichoice 0, 0, MULTICHOICE_HELIX_AMBER, FALSE switch VAR_RESULT case 0, EventScript_16E668 case 1, EventScript_16E6E4 @@ -143,7 +143,7 @@ EventScript_16E5FA:: @ 816E5FA end EventScript_16E631:: @ 816E631 - multichoice 0, 0, 25, 0 + multichoice 0, 0, MULTICHOICE_DOME_AMBER, FALSE switch VAR_RESULT case 0, EventScript_16E6A6 case 1, EventScript_16E6E4 diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 8cb8dd796..a82b30573 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -8,7 +8,7 @@ NavelRock_Harbor_EventScript_165421:: @ 8165421 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_NAVEL_ROCK - multichoice 20, 8, 61, 0 + multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/RocketHideout_Elevator/scripts.inc b/data/maps/RocketHideout_Elevator/scripts.inc index c6a199a52..2b593b1bb 100644 --- a/data/maps/RocketHideout_Elevator/scripts.inc +++ b/data/maps/RocketHideout_Elevator/scripts.inc @@ -21,21 +21,21 @@ RocketHideout_Elevator_EventScript_1614D9:: @ 81614D9 end EventScript_161530:: @ 8161530 - multichoicedefault 0, 0, 42, 0, 0 + multichoicedefault 0, 0, MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR, 0, FALSE goto EventScript_161554 EventScript_16153B:: @ 816153B end EventScript_16153C:: @ 816153C - multichoicedefault 0, 0, 42, 1, 0 + multichoicedefault 0, 0, MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR, 1, FALSE goto EventScript_161554 EventScript_161547:: @ 8161547 end EventScript_161548:: @ 8161548 - multichoicedefault 0, 0, 42, 2, 0 + multichoicedefault 0, 0, MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR, 2, FALSE goto EventScript_161554 EventScript_161553:: @ 8161553 diff --git a/data/maps/Route25_SeaCottage/scripts.inc b/data/maps/Route25_SeaCottage/scripts.inc index 76be366f2..e8d016a02 100644 --- a/data/maps/Route25_SeaCottage/scripts.inc +++ b/data/maps/Route25_SeaCottage/scripts.inc @@ -248,7 +248,7 @@ EventScript_1707CA:: @ 81707CA EventScript_1707D8:: @ 81707D8 message Text_1A0479 waitmessage - multichoice 0, 0, 1, 0 + multichoice 0, 0, MULTICHOICE_EEVEELUTIONS, FALSE switch VAR_RESULT case 0, EventScript_17082B case 1, EventScript_170840 diff --git a/data/maps/SevenIsland_TrainerTower_Elevator/scripts.inc b/data/maps/SevenIsland_TrainerTower_Elevator/scripts.inc index a415190da..e8ee2450f 100644 --- a/data/maps/SevenIsland_TrainerTower_Elevator/scripts.inc +++ b/data/maps/SevenIsland_TrainerTower_Elevator/scripts.inc @@ -20,12 +20,12 @@ SevenIsland_TrainerTower_Elevator_EventScript_164B03:: @ 8164B03 end EventScript_164B46:: @ 8164B46 - multichoicedefault 0, 0, 20, 0, 0 + multichoicedefault 0, 0, MULTICHOICE_ROOFTOP_B1F, 0, FALSE goto EventScript_164B5E end EventScript_164B52:: @ 8164B52 - multichoicedefault 0, 0, 20, 1, 0 + multichoicedefault 0, 0, MULTICHOICE_ROOFTOP_B1F, 1, FALSE goto EventScript_164B5E end diff --git a/data/maps/SevenIsland_TrainerTower_Lobby/scripts.inc b/data/maps/SevenIsland_TrainerTower_Lobby/scripts.inc index 24f2fd622..142f33ee3 100644 --- a/data/maps/SevenIsland_TrainerTower_Lobby/scripts.inc +++ b/data/maps/SevenIsland_TrainerTower_Lobby/scripts.inc @@ -169,7 +169,7 @@ EventScript_164A00:: @ 8164A00 EventScript_164A08:: @ 8164A08 message Text_17C88D waitmessage - multichoice 18, 6, 16, 0 + multichoice 18, 6, MULTICHOICE_YES_NO_INFO, FALSE switch VAR_RESULT case 0, EventScript_164A53 case 1, EventScript_164ABF @@ -183,7 +183,7 @@ EventScript_164A45:: @ 8164A45 end EventScript_164A53:: @ 8164A53 - multichoice 13, 3, 64, 0 + multichoice 13, 3, MULTICHOICE_TRAINER_TOWER_MODE, FALSE switch VAR_RESULT case 0, EventScript_164AA0 case 1, EventScript_164AA0 diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc index 33f6d42fd..40c68cb7e 100644 --- a/data/maps/TwoIsland_House/scripts.inc +++ b/data/maps/TwoIsland_House/scripts.inc @@ -98,7 +98,7 @@ EventScript_171741:: @ 8171741 EventScript_17175B:: @ 817175B message Text_1A2D43 waitmessage - multichoice 0, 0, 51, 1 + multichoice 0, 0, MULTICHOICE_MUSHROOMS, TRUE switch VAR_RESULT case 0, EventScript_171741 case 1, EventScript_171727 diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index d1d312add..bf1c38578 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -110,7 +110,7 @@ EventScript_1669FD:: @ 81669FD call_if FALSE, EventScript_166A53 message Text_17FCC1 waitmessage - multichoice 17, 6, 54, 0 + multichoice 17, 6, MULTICHOICE_SEVII_NAVEL, FALSE switch VAR_RESULT case 0, EventScript_1A911E case 1, EventScript_166B0B @@ -128,7 +128,7 @@ EventScript_166A5F:: @ 8166A5F call_if FALSE, EventScript_166AA5 message Text_17FCC1 waitmessage - multichoice 13, 6, 55, 0 + multichoice 13, 6, MULTICHOICE_SEVII_BIRTH, FALSE switch VAR_RESULT case 0, EventScript_1A911E case 1, EventScript_166B23 @@ -148,7 +148,7 @@ EventScript_166AB1:: @ 8166AB1 call_if FALSE, EventScript_166AA5 message Text_17FCC1 waitmessage - multichoice 13, 5, 56, 0 + multichoice 13, 5, MULTICHOICE_SEVII_NAVEL_BIRTH, FALSE switch VAR_RESULT case 0, EventScript_1A911E case 1, EventScript_166B0B @@ -175,7 +175,7 @@ EventScript_166B3B:: @ 8166B3B message Text_17FB23 waitmessage setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY - multichoice 19, 5, 57, 0 + multichoice 19, 5, MULTICHOICE_SEA_GALLOP_123, FALSE switch VAR_RESULT case 0, EventScript_1A8FEE case 1, EventScript_1A8FF9 diff --git a/data/maps/ViridianCity_House2/scripts.inc b/data/maps/ViridianCity_House2/scripts.inc index a31719b55..1c25dd3e4 100644 --- a/data/maps/ViridianCity_House2/scripts.inc +++ b/data/maps/ViridianCity_House2/scripts.inc @@ -56,7 +56,7 @@ ViridianCity_House2_EventScript_16A11D:: @ 816A11D EventScript_16A12C:: @ 816A12C message Text_18FF88 waitmessage - multichoicegrid 7, 1, 15, 3, 0 + multichoicegrid 7, 1, MULTICHOICE_TRAINER_SCHOOL_WHITEBOARD, 3, FALSE switch VAR_RESULT case 0, EventScript_16A18B case 1, EventScript_16A1A7 diff --git a/data/strings.s b/data/strings.s index b46766ed3..994e32d0f 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1484,19 +1484,19 @@ gText_Tm30_4500Coins:: @ 0x8417A84 gText_Tm35_4000Coins:: @ 0x8417A9A .string "TM35{CLEAR_TO 0x48}{SMALL}4,000 COINS$" -gText_1F:: @ 0x8417AB0 +gText_1F_2:: @ 0x8417AB0 .string "1F$" -gText_2F:: @ 0x8417AB3 +gText_2F_2:: @ 0x8417AB3 .string "2F$" -gText_3F:: @ 0x8417AB6 +gText_3F_2:: @ 0x8417AB6 .string "3F$" -gText_4F:: @ 0x8417AB9 +gText_4F_2:: @ 0x8417AB9 .string "4F$" -gText_5F:: @ 0x8417ABC +gText_5F_2:: @ 0x8417ABC .string "5F$" gText_Cool:: @ 0x8417ABF @@ -1856,37 +1856,37 @@ gUnknown_8418022:: @ 0x8418022 gUnknown_841802F:: @ 0x841802F .string "EARTHBADGE$" -gUnknown_841803A:: @ 0x841803A +gText_1F:: @ 0x841803A .string "1F$" -gUnknown_841803D:: @ 0x841803D +gText_2F:: @ 0x841803D .string "2F$" -gUnknown_8418040:: @ 0x8418040 +gText_3F:: @ 0x8418040 .string "3F$" -gUnknown_8418043:: @ 0x8418043 +gText_4F:: @ 0x8418043 .string "4F$" -gUnknown_8418046:: @ 0x8418046 +gText_5F:: @ 0x8418046 .string "5F$" -gUnknown_8418049:: @ 0x8418049 +gText_6F:: @ 0x8418049 .string "6F$" -gUnknown_841804C:: @ 0x841804C +gText_7F:: @ 0x841804C .string "7F$" -gUnknown_841804F:: @ 0x841804F +gText_8F:: @ 0x841804F .string "8F$" -gUnknown_8418052:: @ 0x8418052 +gText_9F:: @ 0x8418052 .string "9F$" -gUnknown_8418055:: @ 0x8418055 +gText_10F:: @ 0x8418055 .string "10F$" -gUnknown_8418059:: @ 0x8418059 +gText_11F:: @ 0x8418059 .string "11F$" gText_B1F:: @ 0x841805D @@ -1895,7 +1895,7 @@ gText_B1F:: @ 0x841805D gText_B2F:: @ 0x8418061 .string "B2F$" -gUnknown_8418065:: @ 0x8418065 +gText_B3F:: @ 0x8418065 .string "B3F$" gText_B4F:: @ 0x8418069 diff --git a/include/constants/menu.h b/include/constants/menu.h index b981cca9e..b873bc296 100644 --- a/include/constants/menu.h +++ b/include/constants/menu.h @@ -4,4 +4,70 @@ #define SCR_MENU_CANCEL 127 #define SCR_MENU_UNSET 255 +#define MULTICHOICE_YES_NO 0 +#define MULTICHOICE_EEVEELUTIONS 1 +#define MULTICHOICE_TRAINER_CARD_ICON_TINT 2 +#define MULTICHOICE_HOF_QUIT 3 +#define MULTICHOICE_EGGS_QUIT 4 +#define MULTICHOICE_VICTORIES_QUIT 5 +#define MULTICHOICE_HOF_EGGS_QUIT 6 +#define MULTICHOICE_HOF_VICTORIES_QUIT 7 +#define MULTICHOICE_EGGS_VICTORIES_QUIT 8 +#define MULTICHOICE_HOF_EGGS_VICTORIES_QUIT 9 +#define MULTICHOICE_EXIT 10 +#define MULTICHOICE_EXIT_2 11 +#define MULTICHOICE_EXIT_3 12 +#define MULTICHOICE_BIKE_SHOP 13 +#define MULTICHOICE_GAME_CORNER_POKEMON_PRIZES 14 +#define MULTICHOICE_TRAINER_SCHOOL_WHITEBOARD 15 +#define MULTICHOICE_YES_NO_INFO 16 +#define MULTICHOICE_SINGLE_DOUBLE_MULTI_INFO_EXIT 17 +#define MULTICHOICE_YES_NO_INFO_2 18 +#define MULTICHOICE_CHALLENGE_INFO_EXIT 19 +#define MULTICHOICE_ROOFTOP_B1F 20 +#define MULTICHOICE_HELIX 21 +#define MULTICHOICE_DOME 22 +#define MULTICHOICE_AMBER 23 +#define MULTICHOICE_HELIX_AMBER 24 +#define MULTICHOICE_DOME_AMBER 25 +#define MULTICHOICE_CELADON_VENDING_MACHINE 26 +#define MULTICHOICE_GAME_CORNER_COIN_PURCHASE_COUNTER 27 +#define MULTICHOICE_EXCELLENT_NOT_SO_BAD 28 +#define MULTICHOICE_RIGHT_LEFT 29 +#define MULTICHOICE_GAME_CORNER_TMPRIZES 30 +#define MULTICHOICE_DEPT_STORE_ELEVATOR 31 +#define MULTICHOICE_THIRSTY_GIRL_FRESH_WATER 32 +#define MULTICHOICE_THIRSTY_GIRL_SODA_POP 33 +#define MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP 34 +#define MULTICHOICE_THIRSTY_GIRL_LEMONADE 35 +#define MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_LEMONADE 36 +#define MULTICHOICE_THIRSTY_GIRL_SODA_POP_LEMONADE 37 +#define MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP_LEMONADE 38 +#define MULTICHOICE_TRADE_CENTER_COLOSSEUM 39 +#define MULTICHOICE_LINK_WIRELESS 40 +#define MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES 41 +#define MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR 42 +#define MULTICHOICE_LINKED_DIRECT_UNION 43 +#define MULTICHOICE_ISLAND_23 44 +#define MULTICHOICE_ISLAND_13 45 +#define MULTICHOICE_ISLAND_12 46 +#define MULTICHOICE_TRADE_COLOSSEUM_CRUSH 47 +#define MULTICHOICE_48 48 +#define MULTICHOICE_POKEJUMP_DODRIO 49 +#define MULTICHOICE_TRADE_COLOSSEUM_2 50 +#define MULTICHOICE_MUSHROOMS 51 +#define MULTICHOICE_TRADE_COLOSSEUM_BLANK_CRUSH 52 +#define MULTICHOICE_TRADE_COLOSSEUM_BLANK 53 +#define MULTICHOICE_SEVII_NAVEL 54 +#define MULTICHOICE_SEVII_BIRTH 55 +#define MULTICHOICE_SEVII_NAVEL_BIRTH 56 +#define MULTICHOICE_SEA_GALLOP_123 57 +#define MULTICHOICE_SEA_GALLOP_V23 58 +#define MULTICHOICE_SEA_GALLOP_V13 59 +#define MULTICHOICE_SEA_GALLOP_V12 60 +#define MULTICHOICE_SEA_GALLOP_VERMILION 61 +#define MULTICHOICE_62 62 +#define MULTICHOICE_JOIN_OR_LEAD 63 +#define MULTICHOICE_TRAINER_TOWER_MODE 64 + #endif //GUARD_CONSTANTS_MENU_H diff --git a/include/strings.h b/include/strings.h index 7613225d4..d60e841ef 100644 --- a/include/strings.h +++ b/include/strings.h @@ -475,20 +475,20 @@ extern const u8 gUnknown_8417FD0[]; extern const u8 gUnknown_8417FCC[]; extern const u8 gUnknown_8418075[]; extern const u8 gText_B4F[]; -extern const u8 gUnknown_8418065[]; +extern const u8 gText_B3F[]; extern const u8 gText_B2F[]; extern const u8 gText_B1F[]; -extern const u8 gUnknown_841803A[]; -extern const u8 gUnknown_841803D[]; -extern const u8 gUnknown_8418040[]; -extern const u8 gUnknown_8418043[]; -extern const u8 gUnknown_8418046[]; -extern const u8 gUnknown_8418049[]; -extern const u8 gUnknown_841804C[]; -extern const u8 gUnknown_841804F[]; -extern const u8 gUnknown_8418052[]; -extern const u8 gUnknown_8418055[]; -extern const u8 gUnknown_8418059[]; +extern const u8 gText_1F[]; +extern const u8 gText_2F[]; +extern const u8 gText_3F[]; +extern const u8 gText_4F[]; +extern const u8 gText_5F[]; +extern const u8 gText_6F[]; +extern const u8 gText_7F[]; +extern const u8 gText_8F[]; +extern const u8 gText_9F[]; +extern const u8 gText_10F[]; +extern const u8 gText_11F[]; extern const u8 gText_Rooftop[]; extern const u8 gUnknown_8417FD9[]; extern const u8 gUnknown_8417FE6[]; @@ -562,11 +562,11 @@ extern const u8 gText_Tm23_3500Coins[]; extern const u8 gText_Tm24_4000Coins[]; extern const u8 gText_Tm30_4500Coins[]; extern const u8 gText_Tm35_4000Coins[]; -extern const u8 gText_1F[]; -extern const u8 gText_2F[]; -extern const u8 gText_3F[]; -extern const u8 gText_4F[]; -extern const u8 gText_5F[]; +extern const u8 gText_1F_2[]; +extern const u8 gText_2F_2[]; +extern const u8 gText_3F_2[]; +extern const u8 gText_4F_2[]; +extern const u8 gText_5F_2[]; extern const u8 gText_Normal[]; extern const u8 gText_Black[]; extern const u8 gText_Pink[]; diff --git a/src/field_specials.c b/src/field_specials.c index 354226d09..177df7580 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -730,20 +730,20 @@ static const struct WindowTemplate sElevatorCurrentFloorWindowTemplate = { static const u8 *const sFloorNamePointers[] = { gText_B4F, - gUnknown_8418065, + gText_B3F, gText_B2F, gText_B1F, - gUnknown_841803A, - gUnknown_841803D, - gUnknown_8418040, - gUnknown_8418043, - gUnknown_8418046, - gUnknown_8418049, - gUnknown_841804C, - gUnknown_841804F, - gUnknown_8418052, - gUnknown_8418055, - gUnknown_8418059, + gText_1F, + gText_2F, + gText_3F, + gText_4F, + gText_5F, + gText_6F, + gText_7F, + gText_8F, + gText_9F, + gText_10F, + gText_11F, gText_Rooftop }; @@ -1237,17 +1237,17 @@ static const u8 *const sListMenuLabels[][12] = { gUnknown_841802F, gOtherText_Exit, }, { - gUnknown_8418059, - gUnknown_8418055, - gUnknown_8418052, - gUnknown_841804F, - gUnknown_841804C, - gUnknown_8418049, - gUnknown_8418046, - gUnknown_8418043, - gUnknown_8418040, - gUnknown_841803D, - gUnknown_841803A, + gText_11F, + gText_10F, + gText_9F, + gText_8F, + gText_7F, + gText_6F, + gText_5F, + gText_4F, + gText_3F, + gText_2F, + gText_1F, gOtherText_Exit, }, { gText_B1F, @@ -1255,11 +1255,11 @@ static const u8 *const sListMenuLabels[][12] = { gText_B4F, gOtherText_Exit, }, { - gUnknown_8418046, - gUnknown_8418043, - gUnknown_8418040, - gUnknown_841803D, - gUnknown_841803A, + gText_5F, + gText_4F, + gText_3F, + gText_2F, + gText_1F, gOtherText_Exit, }, { gText_LinkedGamePlay, diff --git a/src/script_menu.c b/src/script_menu.c index 1076e19c0..08baed433 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -40,59 +40,59 @@ static void DestroyScriptMenuWindow(u8 windowId); static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); -static const struct MenuAction sScriptMultiChoiceMenu_0[] = { +static const struct MenuAction sScriptMultiChoiceMenu_YesNo[] = { { gText_Yes }, { gText_No } }; -static const struct MenuAction sScriptMultiChoiceMenu_2[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TrainerCardIconTint[] = { { gText_Normal }, { gText_Black }, { gText_Pink }, { gText_Sepia } }; -static const struct MenuAction sScriptMultiChoiceMenu_3[] = { +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Quit[] = { { gText_HallOfFame }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_4[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Quit[] = { { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_5[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Victories_Quit[] = { { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_6[] = { +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_7[] = { +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Victories_Quit[] = { { gText_HallOfFame }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_8[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Victories_Quit[] = { { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_9[] = { +static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_15[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] = { { gText_Slp }, { gText_Psn }, { gText_Par }, @@ -101,13 +101,13 @@ static const struct MenuAction sScriptMultiChoiceMenu_15[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_16[] = { +static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_17[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[] = { { gText_SingleBattle }, { gText_DoubleBattle }, { gText_MultiBattle }, @@ -115,59 +115,59 @@ static const struct MenuAction sScriptMultiChoiceMenu_17[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_18[] = { +static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo2[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_19[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ChallengeInfoExit[] = { { gText_MakeAChallenge }, { gText_Info_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_20[] = { +static const struct MenuAction sScriptMultiChoiceMenu_RooftopB1F[] = { { gText_Rooftop }, { gText_B1F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_21[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Helix[] = { { gText_HelixFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_22[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Dome[] = { { gText_DomeFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_23[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Amber[] = { { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_24[] = { +static const struct MenuAction sScriptMultiChoiceMenu_HelixAmber[] = { { gText_HelixFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_25[] = { +static const struct MenuAction sScriptMultiChoiceMenu_DomeAmber[] = { { gText_DomeFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_26[] = { +static const struct MenuAction sScriptMultiChoiceMenu_CeladonVendingMachine[] = { { gText_FreshWater_200 }, { gText_SodaPop_300 }, { gText_Lemonade_350 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_30[] = { +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { { gText_Tm13_4000Coins }, { gText_Tm23_3500Coins }, { gText_Tm24_4000Coins }, @@ -176,7 +176,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_30[] = { { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_41[] = { +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes[] = { { gText_SmokeBall_800Coins }, { gText_MiracleSeed_1000Coins }, { gText_Charcoal_1000Coins }, @@ -185,65 +185,65 @@ static const struct MenuAction sScriptMultiChoiceMenu_41[] = { { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_27[] = { +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter[] = { { gText_50Coins_1000 }, { gText_500Coins_10000 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_28[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Excellent_NotSoBad[] = { { gText_Excellent }, { gText_NotSoBad } }; -static const struct MenuAction sScriptMultiChoiceMenu_29[] = { +static const struct MenuAction sScriptMultiChoiceMenu_RightLeft[] = { { gText_Right }, { gText_Left } }; -static const struct MenuAction sScriptMultiChoiceMenu_31[] = { - { gText_5F }, - { gText_4F }, - { gText_3F }, - { gText_2F }, - { gText_1F }, +static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { + { gText_5F_2 }, + { gText_4F_2 }, + { gText_3F_2 }, + { gText_2F_2 }, + { gText_1F_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_32[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWater[] = { { gText_FreshWater }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_33[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPop[] = { { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_34[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop[] = { { gText_FreshWater }, { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_35[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlLemonade[] = { { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_36[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade[] = { { gText_FreshWater }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_37[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade[] = { { gText_SodaPop }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_38[] = { +static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade[] = { { gText_FreshWater }, { gText_SodaPop }, { gText_Lemonade }, @@ -302,7 +302,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_1[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { { gText_Eevee }, { gText_Flareon }, { gText_Jolteon }, @@ -310,12 +310,12 @@ static const struct MenuAction sScriptMultiChoiceMenu_1[] = { { gText_QuitLooking } }; -static const struct MenuAction sScriptMultiChoiceMenu_13[] = { +static const struct MenuAction sScriptMultiChoiceMenu_BikeShop[] = { { gText_Bicycle_1000000 }, { gText_NoThanks } }; -static const struct MenuAction sScriptMultiChoiceMenu_14[] = { +static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] = { { gText_Abra_180Coins }, { gText_Clefairy_500Coins }, { gText_Dratini_2800Coins }, @@ -324,51 +324,51 @@ static const struct MenuAction sScriptMultiChoiceMenu_14[] = { { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_39[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TradeCenter_Colosseum[] = { { gText_TradeCenter }, { gText_Colosseum }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_40[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Link_Wireless[] = { { gText_GameLinkCable }, { gText_Wireless }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_42[] = { +static const struct MenuAction sScriptMultiChoiceMenu_RocketHideoutElevator[] = { { gText_B1F }, { gText_B2F }, { gText_B4F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_43[] = { +static const struct MenuAction sScriptMultiChoiceMenu_LinkedDirectUnion[] = { { gText_LinkedGamePlay }, { gText_DirectCorner }, { gText_UnionRoom }, { gOtherText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_44[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Island23[] = { { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_45[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Island13[] = { { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_46[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Island12[] = { { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_47[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_BerryCrush }, @@ -381,24 +381,24 @@ static const struct MenuAction sScriptMultiChoiceMenu_48[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_50[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseum_2[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_49[] = { +static const struct MenuAction sScriptMultiChoiceMenu_PokejumpDodrio[] = { { gText_PokemonJump }, { gText_DodrioBerryPicking }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_51[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Mushrooms[] = { { gText_2Tinymushrooms }, { gText_1BigMushroom } }; -static const struct MenuAction sScriptMultiChoiceMenu_52[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_Dummy_8417E71 }, @@ -406,61 +406,61 @@ static const struct MenuAction sScriptMultiChoiceMenu_52[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_53[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlank[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_Dummy_8417E71 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_54[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavel[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_55[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeviiBirth[] = { { gText_SeviiIslands }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_56[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_57[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeaGallop123[] = { { gText_OneIsland }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_58[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV23[] = { { gText_Vermilion }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_59[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV13[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_60[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV12[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_61[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopVermilion[] = { { gText_Vermilion }, { gOtherText_Exit } }; @@ -471,13 +471,13 @@ static const struct MenuAction sScriptMultiChoiceMenu_62[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_63[] = { +static const struct MenuAction sScriptMultiChoiceMenu_JoinOrLead[] = { { gText_JoinGroup }, { gText_BecomeLeader }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_64[] = { +static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { { gOtherText_Single }, { gOtherText_Double }, { gOtherText_Knockout }, @@ -485,76 +485,76 @@ static const struct MenuAction sScriptMultiChoiceMenu_64[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_10[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Exit[] = { { gOtherText_Exit } }; const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { - { sScriptMultiChoiceMenu_0, NELEMS(sScriptMultiChoiceMenu_0) }, - { sScriptMultiChoiceMenu_1, NELEMS(sScriptMultiChoiceMenu_1) }, - { sScriptMultiChoiceMenu_2, NELEMS(sScriptMultiChoiceMenu_2) }, - { sScriptMultiChoiceMenu_3, NELEMS(sScriptMultiChoiceMenu_3) }, - { sScriptMultiChoiceMenu_4, NELEMS(sScriptMultiChoiceMenu_4) }, - { sScriptMultiChoiceMenu_5, NELEMS(sScriptMultiChoiceMenu_5) }, - { sScriptMultiChoiceMenu_6, NELEMS(sScriptMultiChoiceMenu_6) }, - { sScriptMultiChoiceMenu_7, NELEMS(sScriptMultiChoiceMenu_7) }, - { sScriptMultiChoiceMenu_8, NELEMS(sScriptMultiChoiceMenu_8) }, - { sScriptMultiChoiceMenu_9, NELEMS(sScriptMultiChoiceMenu_9) }, - { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, - { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, - { sScriptMultiChoiceMenu_10, NELEMS(sScriptMultiChoiceMenu_10) }, - { sScriptMultiChoiceMenu_13, NELEMS(sScriptMultiChoiceMenu_13) }, - { sScriptMultiChoiceMenu_14, NELEMS(sScriptMultiChoiceMenu_14) }, - { sScriptMultiChoiceMenu_15, NELEMS(sScriptMultiChoiceMenu_15) }, - { sScriptMultiChoiceMenu_16, NELEMS(sScriptMultiChoiceMenu_16) }, - { sScriptMultiChoiceMenu_17, NELEMS(sScriptMultiChoiceMenu_17) }, - { sScriptMultiChoiceMenu_18, NELEMS(sScriptMultiChoiceMenu_18) }, - { sScriptMultiChoiceMenu_19, NELEMS(sScriptMultiChoiceMenu_19) }, - { sScriptMultiChoiceMenu_20, NELEMS(sScriptMultiChoiceMenu_20) }, - { sScriptMultiChoiceMenu_21, NELEMS(sScriptMultiChoiceMenu_21) }, - { sScriptMultiChoiceMenu_22, NELEMS(sScriptMultiChoiceMenu_22) }, - { sScriptMultiChoiceMenu_23, NELEMS(sScriptMultiChoiceMenu_23) }, - { sScriptMultiChoiceMenu_24, NELEMS(sScriptMultiChoiceMenu_24) }, - { sScriptMultiChoiceMenu_25, NELEMS(sScriptMultiChoiceMenu_25) }, - { sScriptMultiChoiceMenu_26, NELEMS(sScriptMultiChoiceMenu_26) }, - { sScriptMultiChoiceMenu_27, NELEMS(sScriptMultiChoiceMenu_27) }, - { sScriptMultiChoiceMenu_28, NELEMS(sScriptMultiChoiceMenu_28) }, - { sScriptMultiChoiceMenu_29, NELEMS(sScriptMultiChoiceMenu_29) }, - { sScriptMultiChoiceMenu_30, NELEMS(sScriptMultiChoiceMenu_30) }, - { sScriptMultiChoiceMenu_31, NELEMS(sScriptMultiChoiceMenu_31) }, - { sScriptMultiChoiceMenu_32, NELEMS(sScriptMultiChoiceMenu_32) }, - { sScriptMultiChoiceMenu_33, NELEMS(sScriptMultiChoiceMenu_33) }, - { sScriptMultiChoiceMenu_34, NELEMS(sScriptMultiChoiceMenu_34) }, - { sScriptMultiChoiceMenu_35, NELEMS(sScriptMultiChoiceMenu_35) }, - { sScriptMultiChoiceMenu_36, NELEMS(sScriptMultiChoiceMenu_36) }, - { sScriptMultiChoiceMenu_37, NELEMS(sScriptMultiChoiceMenu_37) }, - { sScriptMultiChoiceMenu_38, NELEMS(sScriptMultiChoiceMenu_38) }, - { sScriptMultiChoiceMenu_39, NELEMS(sScriptMultiChoiceMenu_39) }, - { sScriptMultiChoiceMenu_40, NELEMS(sScriptMultiChoiceMenu_40) }, - { sScriptMultiChoiceMenu_41, NELEMS(sScriptMultiChoiceMenu_41) }, - { sScriptMultiChoiceMenu_42, NELEMS(sScriptMultiChoiceMenu_42) }, - { sScriptMultiChoiceMenu_43, NELEMS(sScriptMultiChoiceMenu_43) }, - { sScriptMultiChoiceMenu_44, NELEMS(sScriptMultiChoiceMenu_44) }, - { sScriptMultiChoiceMenu_45, NELEMS(sScriptMultiChoiceMenu_45) }, - { sScriptMultiChoiceMenu_46, NELEMS(sScriptMultiChoiceMenu_46) }, - { sScriptMultiChoiceMenu_47, NELEMS(sScriptMultiChoiceMenu_47) }, + { sScriptMultiChoiceMenu_YesNo, NELEMS(sScriptMultiChoiceMenu_YesNo) }, + { sScriptMultiChoiceMenu_Eeveelutions, NELEMS(sScriptMultiChoiceMenu_Eeveelutions) }, + { sScriptMultiChoiceMenu_TrainerCardIconTint, NELEMS(sScriptMultiChoiceMenu_TrainerCardIconTint) }, + { sScriptMultiChoiceMenu_HOF_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Quit) }, + { sScriptMultiChoiceMenu_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Quit) }, + { sScriptMultiChoiceMenu_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Victories_Quit) }, + { sScriptMultiChoiceMenu_HOF_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Quit) }, + { sScriptMultiChoiceMenu_HOF_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Victories_Quit) }, + { sScriptMultiChoiceMenu_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Victories_Quit) }, + { sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit) }, + { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, + { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, + { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, + { sScriptMultiChoiceMenu_BikeShop, NELEMS(sScriptMultiChoiceMenu_BikeShop) }, + { sScriptMultiChoiceMenu_GameCornerPokemonPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerPokemonPrizes) }, + { sScriptMultiChoiceMenu_TrainerSchoolWhiteboard, NELEMS(sScriptMultiChoiceMenu_TrainerSchoolWhiteboard) }, + { sScriptMultiChoiceMenu_YesNoInfo, NELEMS(sScriptMultiChoiceMenu_YesNoInfo) }, + { sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit, NELEMS(sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit) }, + { sScriptMultiChoiceMenu_YesNoInfo2, NELEMS(sScriptMultiChoiceMenu_YesNoInfo2) }, + { sScriptMultiChoiceMenu_ChallengeInfoExit, NELEMS(sScriptMultiChoiceMenu_ChallengeInfoExit) }, + { sScriptMultiChoiceMenu_RooftopB1F, NELEMS(sScriptMultiChoiceMenu_RooftopB1F) }, + { sScriptMultiChoiceMenu_Helix, NELEMS(sScriptMultiChoiceMenu_Helix) }, + { sScriptMultiChoiceMenu_Dome, NELEMS(sScriptMultiChoiceMenu_Dome) }, + { sScriptMultiChoiceMenu_Amber, NELEMS(sScriptMultiChoiceMenu_Amber) }, + { sScriptMultiChoiceMenu_HelixAmber, NELEMS(sScriptMultiChoiceMenu_HelixAmber) }, + { sScriptMultiChoiceMenu_DomeAmber, NELEMS(sScriptMultiChoiceMenu_DomeAmber) }, + { sScriptMultiChoiceMenu_CeladonVendingMachine, NELEMS(sScriptMultiChoiceMenu_CeladonVendingMachine) }, + { sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter, NELEMS(sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter) }, + { sScriptMultiChoiceMenu_Excellent_NotSoBad, NELEMS(sScriptMultiChoiceMenu_Excellent_NotSoBad) }, + { sScriptMultiChoiceMenu_RightLeft, NELEMS(sScriptMultiChoiceMenu_RightLeft) }, + { sScriptMultiChoiceMenu_GameCornerTMPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerTMPrizes) }, + { sScriptMultiChoiceMenu_DeptStoreElevator, NELEMS(sScriptMultiChoiceMenu_DeptStoreElevator) }, + { sScriptMultiChoiceMenu_ThirstyGirlFreshWater, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWater) }, + { sScriptMultiChoiceMenu_ThirstyGirlSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPop) }, + { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop) }, + { sScriptMultiChoiceMenu_ThirstyGirlLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlLemonade) }, + { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade) }, + { sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade) }, + { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade) }, + { sScriptMultiChoiceMenu_TradeCenter_Colosseum, NELEMS(sScriptMultiChoiceMenu_TradeCenter_Colosseum) }, + { sScriptMultiChoiceMenu_Link_Wireless, NELEMS(sScriptMultiChoiceMenu_Link_Wireless) }, + { sScriptMultiChoiceMenu_GameCornerBattleItemPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerBattleItemPrizes) }, + { sScriptMultiChoiceMenu_RocketHideoutElevator, NELEMS(sScriptMultiChoiceMenu_RocketHideoutElevator) }, + { sScriptMultiChoiceMenu_LinkedDirectUnion, NELEMS(sScriptMultiChoiceMenu_LinkedDirectUnion) }, + { sScriptMultiChoiceMenu_Island23, NELEMS(sScriptMultiChoiceMenu_Island23) }, + { sScriptMultiChoiceMenu_Island13, NELEMS(sScriptMultiChoiceMenu_Island13) }, + { sScriptMultiChoiceMenu_Island12, NELEMS(sScriptMultiChoiceMenu_Island12) }, + { sScriptMultiChoiceMenu_TradeColosseumCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumCrush) }, { sScriptMultiChoiceMenu_48, NELEMS(sScriptMultiChoiceMenu_48) }, - { sScriptMultiChoiceMenu_49, NELEMS(sScriptMultiChoiceMenu_49) }, - { sScriptMultiChoiceMenu_50, NELEMS(sScriptMultiChoiceMenu_50) }, - { sScriptMultiChoiceMenu_51, NELEMS(sScriptMultiChoiceMenu_51) }, - { sScriptMultiChoiceMenu_52, NELEMS(sScriptMultiChoiceMenu_52) }, - { sScriptMultiChoiceMenu_53, NELEMS(sScriptMultiChoiceMenu_53) }, - { sScriptMultiChoiceMenu_54, NELEMS(sScriptMultiChoiceMenu_54) }, - { sScriptMultiChoiceMenu_55, NELEMS(sScriptMultiChoiceMenu_55) }, - { sScriptMultiChoiceMenu_56, NELEMS(sScriptMultiChoiceMenu_56) }, - { sScriptMultiChoiceMenu_57, NELEMS(sScriptMultiChoiceMenu_57) }, - { sScriptMultiChoiceMenu_58, NELEMS(sScriptMultiChoiceMenu_58) }, - { sScriptMultiChoiceMenu_59, NELEMS(sScriptMultiChoiceMenu_59) }, - { sScriptMultiChoiceMenu_60, NELEMS(sScriptMultiChoiceMenu_60) }, - { sScriptMultiChoiceMenu_61, NELEMS(sScriptMultiChoiceMenu_61) }, + { sScriptMultiChoiceMenu_PokejumpDodrio, NELEMS(sScriptMultiChoiceMenu_PokejumpDodrio) }, + { sScriptMultiChoiceMenu_TradeColosseum_2, NELEMS(sScriptMultiChoiceMenu_TradeColosseum_2) }, + { sScriptMultiChoiceMenu_Mushrooms, NELEMS(sScriptMultiChoiceMenu_Mushrooms) }, + { sScriptMultiChoiceMenu_TradeColosseumBlankCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlankCrush) }, + { sScriptMultiChoiceMenu_TradeColosseumBlank, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlank) }, + { sScriptMultiChoiceMenu_SeviiNavel, NELEMS(sScriptMultiChoiceMenu_SeviiNavel) }, + { sScriptMultiChoiceMenu_SeviiBirth, NELEMS(sScriptMultiChoiceMenu_SeviiBirth) }, + { sScriptMultiChoiceMenu_SeviiNavelBirth, NELEMS(sScriptMultiChoiceMenu_SeviiNavelBirth) }, + { sScriptMultiChoiceMenu_SeaGallop123, NELEMS(sScriptMultiChoiceMenu_SeaGallop123) }, + { sScriptMultiChoiceMenu_SeaGallopV23, NELEMS(sScriptMultiChoiceMenu_SeaGallopV23) }, + { sScriptMultiChoiceMenu_SeaGallopV13, NELEMS(sScriptMultiChoiceMenu_SeaGallopV13) }, + { sScriptMultiChoiceMenu_SeaGallopV12, NELEMS(sScriptMultiChoiceMenu_SeaGallopV12) }, + { sScriptMultiChoiceMenu_SeaGallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeaGallopVermilion) }, { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, - { sScriptMultiChoiceMenu_63, NELEMS(sScriptMultiChoiceMenu_63) }, - { sScriptMultiChoiceMenu_64, NELEMS(sScriptMultiChoiceMenu_64) } + { sScriptMultiChoiceMenu_JoinOrLead, NELEMS(sScriptMultiChoiceMenu_JoinOrLead) }, + { sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) } }; const u8 *const gStdStringPtrs[] = { -- cgit v1.2.3 From 2fce74000549a66bc5508b0c9cfbb42bf76009f4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 14:59:46 -0400 Subject: Name strings used in field_specials --- data/strings.s | 48 ++++++++++++++++++++++++------------------------ include/strings.h | 48 ++++++++++++++++++++++++------------------------ src/field_specials.c | 48 ++++++++++++++++++++++++------------------------ 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/data/strings.s b/data/strings.s index 994e32d0f..154e7efc1 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1820,40 +1820,40 @@ gUnknown_8417FB6:: @ 0x8417FB6 gUnknown_8417FB9:: @ 8417FB9 .string ".$" -gUnknown_8417FBB:: @ 8417FBB +gText_BigGuy:: @ 8417FBB .string "Big guy$" -gUnknown_8417FC3:: @ 8417FC3 +gText_BigGirl:: @ 8417FC3 .string "Big girl$" -gUnknown_8417FCC:: @ 8417FCC +gText_Daughter:: @ 8417FCC .string "son$" -gUnknown_8417FD0:: @ 8417FD0 +gText_Son:: @ 8417FD0 .string "daughter$" -gUnknown_8417FD9:: @ 0x8417FD9 +gText_BoulderBadge:: @ 0x8417FD9 .string "BOULDERBADGE$" -gUnknown_8417FE6:: @ 0x8417FE6 +gText_CascadeBadge:: @ 0x8417FE6 .string "CASCADEBADGE$" -gUnknown_8417FF3:: @ 0x8417FF3 +gText_ThunderBadge:: @ 0x8417FF3 .string "THUNDERBADGE$" -gUnknown_8418000:: @ 0x8418000 +gText_RainbowBadge:: @ 0x8418000 .string "RAINBOWBADGE$" -gUnknown_841800D:: @ 0x841800D +gText_SoulBadge:: @ 0x841800D .string "SOULBADGE$" -gUnknown_8418017:: @ 0x8418017 +gText_MarshBadge:: @ 0x8418017 .string "MARSHBADGE$" -gUnknown_8418022:: @ 0x8418022 +gText_VolcanoBadge:: @ 0x8418022 .string "VOLCANOBADGE$" -gUnknown_841802F:: @ 0x841802F +gText_EarthBadge:: @ 0x841802F .string "EARTHBADGE$" gText_1F:: @ 0x841803A @@ -1904,7 +1904,7 @@ gText_B4F:: @ 0x8418069 gText_Rooftop:: @ 0x841806D .string "ROOFTOP$" -gUnknown_8418075:: @ 8418075 +gText_NowOn:: @ 8418075 .string "Now on:$" gText_LinkedGamePlay:: @ 0x841807D @@ -1916,37 +1916,37 @@ gText_DirectCorner:: @ 0x841808E gText_UnionRoom:: @ 0x841809C .string "UNION ROOM$" -gUnknown_84180A7:: @ 0x84180A7 +gText_Energypowder_50:: @ 0x84180A7 .string "ENERGYPOWDER{CLEAR_TO 0x74}{SMALL}50$" -gUnknown_84180BC:: @ 0x84180BC +gText_EnergyRoot_80:: @ 0x84180BC .string "ENERGY ROOT{CLEAR_TO 0x74}{SMALL}80$" -gUnknown_84180D0:: @ 0x84180D0 +gText_HealPowder_50:: @ 0x84180D0 .string "HEAL POWDER{CLEAR_TO 0x74}{SMALL}50$" -gUnknown_84180E4:: @ 0x84180E4 +gText_RevivalHerb_300:: @ 0x84180E4 .string "REVIVAL HERB{CLEAR_TO 0x6F}{SMALL}300$" -gUnknown_84180FA:: @ 0x84180FA +gText_Protein_1000:: @ 0x84180FA .string "PROTEIN{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_841810D:: @ 0x841810D +gText_Iron_1000:: @ 0x841810D .string "IRON{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_841811D:: @ 0x841811D +gText_Carbos_1000:: @ 0x841811D .string "CARBOS{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_841812F:: @ 0x841812F +gText_Calcium_1000:: @ 0x841812F .string "CALCIUM{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_8418142:: @ 0x8418142 +gText_Zinc_1000:: @ 0x8418142 .string "ZINC{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_8418152:: @ 0x8418152 +gText_HpUp_1000:: @ 0x8418152 .string "HP UP{CLEAR_TO 0x65}{SMALL}1,000$" -gUnknown_8418163:: @ 0x8418163 +gText_PpUp_3000:: @ 0x8418163 .string "PP UP{CLEAR_TO 0x65}{SMALL}3,000$" gString_BattleRecords_PlayersBattleResults:: @ 8418174 diff --git a/include/strings.h b/include/strings.h index d60e841ef..51396954c 100644 --- a/include/strings.h +++ b/include/strings.h @@ -469,11 +469,11 @@ extern const u8 gSaveStatName_Time[]; extern const u8 gText_From[]; // field_specials -extern const u8 gUnknown_8417FBB[]; -extern const u8 gUnknown_8417FC3[]; -extern const u8 gUnknown_8417FD0[]; -extern const u8 gUnknown_8417FCC[]; -extern const u8 gUnknown_8418075[]; +extern const u8 gText_BigGuy[]; +extern const u8 gText_BigGirl[]; +extern const u8 gText_Son[]; +extern const u8 gText_Daughter[]; +extern const u8 gText_NowOn[]; extern const u8 gText_B4F[]; extern const u8 gText_B3F[]; extern const u8 gText_B2F[]; @@ -490,29 +490,29 @@ extern const u8 gText_9F[]; extern const u8 gText_10F[]; extern const u8 gText_11F[]; extern const u8 gText_Rooftop[]; -extern const u8 gUnknown_8417FD9[]; -extern const u8 gUnknown_8417FE6[]; -extern const u8 gUnknown_8417FF3[]; -extern const u8 gUnknown_8418000[]; -extern const u8 gUnknown_841800D[]; -extern const u8 gUnknown_8418017[]; -extern const u8 gUnknown_8418022[]; -extern const u8 gUnknown_841802F[]; +extern const u8 gText_BoulderBadge[]; +extern const u8 gText_CascadeBadge[]; +extern const u8 gText_ThunderBadge[]; +extern const u8 gText_RainbowBadge[]; +extern const u8 gText_SoulBadge[]; +extern const u8 gText_MarshBadge[]; +extern const u8 gText_VolcanoBadge[]; +extern const u8 gText_EarthBadge[]; extern const u8 gText_LinkedGamePlay[]; extern const u8 gText_DirectCorner[]; extern const u8 gText_UnionRoom[]; extern const u8 gOtherText_Quit[]; -extern const u8 gUnknown_84180A7[]; -extern const u8 gUnknown_84180BC[]; -extern const u8 gUnknown_84180D0[]; -extern const u8 gUnknown_84180E4[]; -extern const u8 gUnknown_84180FA[]; -extern const u8 gUnknown_841810D[]; -extern const u8 gUnknown_841811D[]; -extern const u8 gUnknown_841812F[]; -extern const u8 gUnknown_8418142[]; -extern const u8 gUnknown_8418152[]; -extern const u8 gUnknown_8418163[]; +extern const u8 gText_Energypowder_50[]; +extern const u8 gText_EnergyRoot_80[]; +extern const u8 gText_HealPowder_50[]; +extern const u8 gText_RevivalHerb_300[]; +extern const u8 gText_Protein_1000[]; +extern const u8 gText_Iron_1000[]; +extern const u8 gText_Carbos_1000[]; +extern const u8 gText_Calcium_1000[]; +extern const u8 gText_Zinc_1000[]; +extern const u8 gText_HpUp_1000[]; +extern const u8 gText_PpUp_3000[]; // script_menu extern const u8 gText_SomeoneSPc[]; diff --git a/src/field_specials.c b/src/field_specials.c index 177df7580..617faa017 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -141,17 +141,17 @@ u8 Special_GetPlayerTrainerIdOnesDigit(void) void Special_BufferBigGuyOrBigGirlString(void) { if (gSaveBlock2Ptr->playerGender == MALE) - StringCopy(gStringVar1, gUnknown_8417FBB); + StringCopy(gStringVar1, gText_BigGuy); else - StringCopy(gStringVar1, gUnknown_8417FC3); + StringCopy(gStringVar1, gText_BigGirl); } void Special_BufferSonOrDaughterString(void) { if (gSaveBlock2Ptr->playerGender == MALE) - StringCopy(gStringVar1, gUnknown_8417FD0); + StringCopy(gStringVar1, gText_Son); else - StringCopy(gStringVar1, gUnknown_8417FCC); + StringCopy(gStringVar1, gText_Daughter); } u8 Special_GetBattleOutcome(void) @@ -1069,7 +1069,7 @@ void Special_DrawElevatorCurrentFloorWindow(void) sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate); TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sElevatorCurrentFloorWindowId, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, gUnknown_8418075, 0, 2, 0xFF, NULL); + AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, gText_NowOn, 0, 2, 0xFF, NULL); floorname = sFloorNamePointers[gSpecialVar_0x8005]; strwidth = GetStringWidth(2, floorname, 0); AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, floorname, 56 - strwidth, 16, 0xFF, NULL); @@ -1227,14 +1227,14 @@ void Special_ListMenu(void) static const u8 *const sListMenuLabels[][12] = { { - gUnknown_8417FD9, - gUnknown_8417FE6, - gUnknown_8417FF3, - gUnknown_8418000, - gUnknown_841800D, - gUnknown_8418017, - gUnknown_8418022, - gUnknown_841802F, + gText_BoulderBadge, + gText_CascadeBadge, + gText_ThunderBadge, + gText_RainbowBadge, + gText_SoulBadge, + gText_MarshBadge, + gText_VolcanoBadge, + gText_EarthBadge, gOtherText_Exit, }, { gText_11F, @@ -1267,17 +1267,17 @@ static const u8 *const sListMenuLabels[][12] = { gText_UnionRoom, gOtherText_Quit, }, { - gUnknown_84180A7, - gUnknown_84180BC, - gUnknown_84180D0, - gUnknown_84180E4, - gUnknown_84180FA, - gUnknown_841810D, - gUnknown_841811D, - gUnknown_841812F, - gUnknown_8418142, - gUnknown_8418152, - gUnknown_8418163, + gText_Energypowder_50, + gText_EnergyRoot_80, + gText_HealPowder_50, + gText_RevivalHerb_300, + gText_Protein_1000, + gText_Iron_1000, + gText_Carbos_1000, + gText_Calcium_1000, + gText_Zinc_1000, + gText_HpUp_1000, + gText_PpUp_3000, gOtherText_Exit, }, { gText_Rooftop, -- cgit v1.2.3 From 52ce0f21c6c05e330c28cb4aa2f0755220723fed Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 15:06:19 -0400 Subject: Name strings for leafgreen mon prizes --- data/strings.s | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/strings.s b/data/strings.s index 154e7efc1..16666410c 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1646,19 +1646,19 @@ gText_Scyther_5500Coins:: @ 0x8417C9D gText_Porygon_9999Coins:: @ 0x8417CB7 .string "PORYGON{CLEAR_TO 0x4B}{SMALL} 9,999 COINS$" -gUnknown_8417CD1:: @ 0x8417CD1 +gText_Abra_120Coins:: @ 0x8417CD1 .string "ABRA{CLEAR_TO 0x55}{SMALL} 120 COINS$" -gUnknown_8417CE6:: @ 0x8417CE6 +gText_Clefairy_750Coins:: @ 0x8417CE6 .string "CLEFAIRY{CLEAR_TO 0x55}{SMALL} 750 COINS$" -gUnknown_8417CFF:: @ 0x8417CFF +gText_Pinsir_2500Coins:: @ 0x8417CFF .string "PINSIR{CLEAR_TO 0x4B}{SMALL} 2,500 COINS$" -gUnknown_8417D18:: @ 0x8417D18 +gText_Dratini_4600Coins:: @ 0x8417D18 .string "DRATINI{CLEAR_TO 0x4B}{SMALL} 4,600 COINS$" -gUnknown_8417D32:: @ 0x8417D32 +gText_Porygon_6500Coins:: @ 0x8417D32 .string "PORYGON{CLEAR_TO 0x4B}{SMALL} 6,500 COINS$" gText_NoThanks_2:: @ 0x8417D4C -- cgit v1.2.3 From 4b052a204084119ad9302ccdf43b76733447a2df Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 17:01:05 -0400 Subject: Resolve review comments --- data/event_scripts.s | 16 +++++++------- data/maps/BirthIsland_Harbor/scripts.inc | 2 +- data/maps/NavelRock_Harbor/scripts.inc | 2 +- data/maps/VermilionCity/scripts.inc | 2 +- data/specials.inc | 6 ++--- include/constants/menu.h | 10 ++++----- include/seagallop.h | 2 +- src/quest_log.c | 4 ++-- src/script_menu.c | 32 +++++++++++++-------------- src/seagallop.c | 38 ++++++++++++++++---------------- 10 files changed, 57 insertions(+), 57 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index bfa50b73f..51ae70416 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -4169,7 +4169,7 @@ EventScript_1A8EC5:: @ 81A8EC5 end EventScript_1A8F12:: @ 81A8F12 - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V23, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V23, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FF9 @@ -4192,7 +4192,7 @@ EventScript_1A8F54:: @ 81A8F54 end EventScript_1A8FA1:: @ 81A8FA1 - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V13, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V13, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -4235,7 +4235,7 @@ EventScript_1A900F:: @ 81A900F end EventScript_1A905C:: @ 81A905C - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V12, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V12, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -4271,7 +4271,7 @@ EventScript_1A90DA:: @ 81A90DA goto_if eq, EventScript_1A7AE0 special sub_8112364 fadescreen 1 - special ScrSpecial_SeaGallopFerry + special ScrSpecial_SeagallopFerry waitstate end @@ -4296,9 +4296,9 @@ Movement_1A911C:: @ 81A911C EventScript_1A911E:: @ 81A911E setvar VAR_0x8005, 0 - special Special_DrawSeaGallopDestinationMenu + special Special_DrawSeagallopDestinationMenu waitstate - specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination + specialvar VAR_0x8006, Special_GetSelectedSeagallopDestination switch VAR_0x8006 case SEAGALLOP_VERMILION_CITY, EventScript_1A91D5 case SEAGALLOP_ONE_ISLAND, EventScript_1A91E0 @@ -4311,9 +4311,9 @@ EventScript_1A911E:: @ 81A911E EventScript_1A917F:: @ 81A917F setvar VAR_0x8005, 1 - special Special_DrawSeaGallopDestinationMenu + special Special_DrawSeagallopDestinationMenu waitstate - specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination + specialvar VAR_0x8006, Special_GetSelectedSeagallopDestination switch VAR_0x8006 case SEAGALLOP_FOUR_ISLAND, EventScript_1A9201 case SEAGALLOP_FIVE_ISLAND, EventScript_1A920C diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 774837274..6df635f1a 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -7,7 +7,7 @@ BirthIsland_Harbor_EventScript_1653E7:: @ 81653E7 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_BIRTH_ISLAND - multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE + multichoice 20, 8, MULTICHOICE_SEAGALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index a82b30573..60832d168 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -8,7 +8,7 @@ NavelRock_Harbor_EventScript_165421:: @ 8165421 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_NAVEL_ROCK - multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE + multichoice 20, 8, MULTICHOICE_SEAGALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index bf1c38578..fcacff2e3 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -175,7 +175,7 @@ EventScript_166B3B:: @ 8166B3B message Text_17FB23 waitmessage setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_123, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_123, FALSE switch VAR_RESULT case 0, EventScript_1A8FEE case 1, EventScript_1A8FF9 diff --git a/data/specials.inc b/data/specials.inc index 1e38298a2..169ea0182 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -387,7 +387,7 @@ gSpecials:: @ 815FD60 def_special IsThereMonInRoute5Daycare def_special GetNumLevelsGainedForRoute5DaycareMon def_special TakePokemonFromRoute5Daycare - def_special ScrSpecial_SeaGallopFerry + def_special ScrSpecial_SeagallopFerry def_special Special_PlayerPartyContainsSpecies def_special Special_SetSomeVariable def_special HelpSystem_BackupSomeVariable @@ -431,8 +431,8 @@ gSpecials:: @ 815FD60 def_special Special_HasLearnedAllMovesFromCapeBrinkTutor def_special Special_Credits def_special sub_8153810 - def_special Special_DrawSeaGallopDestinationMenu - def_special Special_GetSelectedSeaGallopDestination + def_special Special_DrawSeagallopDestinationMenu + def_special Special_GetSelectedSeagallopDestination def_special sub_8147500 def_special GetPlayerFacingDirection def_special Special_DeoxysSound diff --git a/include/constants/menu.h b/include/constants/menu.h index b873bc296..44df246d9 100644 --- a/include/constants/menu.h +++ b/include/constants/menu.h @@ -61,11 +61,11 @@ #define MULTICHOICE_SEVII_NAVEL 54 #define MULTICHOICE_SEVII_BIRTH 55 #define MULTICHOICE_SEVII_NAVEL_BIRTH 56 -#define MULTICHOICE_SEA_GALLOP_123 57 -#define MULTICHOICE_SEA_GALLOP_V23 58 -#define MULTICHOICE_SEA_GALLOP_V13 59 -#define MULTICHOICE_SEA_GALLOP_V12 60 -#define MULTICHOICE_SEA_GALLOP_VERMILION 61 +#define MULTICHOICE_SEAGALLOP_123 57 +#define MULTICHOICE_SEAGALLOP_V23 58 +#define MULTICHOICE_SEAGALLOP_V13 59 +#define MULTICHOICE_SEAGALLOP_V12 60 +#define MULTICHOICE_SEAGALLOP_VERMILION 61 #define MULTICHOICE_62 62 #define MULTICHOICE_JOIN_OR_LEAD 63 #define MULTICHOICE_TRAINER_TOWER_MODE 64 diff --git a/include/seagallop.h b/include/seagallop.h index a8eaa6c88..50b128185 100644 --- a/include/seagallop.h +++ b/include/seagallop.h @@ -3,6 +3,6 @@ #include "constants/seagallop.h" -void ScrSpecial_SeaGallopFerry(void); +void ScrSpecial_SeagallopFerry(void); #endif //GUARD_SEAGALLOP_H diff --git a/src/quest_log.c b/src/quest_log.c index a51def1b9..14485ca46 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -438,7 +438,7 @@ void sub_811089C(void) memset(gSaveBlock1Ptr->questLog, 0, sizeof(gSaveBlock1Ptr->questLog)); gUnknown_203ADF8 = 0; gUnknown_203ADFA = 0; - sQuestLogCB = 0; + sQuestLogCB = NULL; gUnknown_203AE08 = NULL; gUnknown_203AE04 = NULL; sub_8113BD8(); @@ -458,7 +458,7 @@ void sub_8110920(void) void RunQuestLogCB(void) { - if (sQuestLogCB) + if (sQuestLogCB != NULL) sQuestLogCB(); } diff --git a/src/script_menu.c b/src/script_menu.c index 08baed433..ed2f0aa0a 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -21,11 +21,11 @@ struct MultichoiceListStruct { - const struct MenuAction *list; + const struct MenuAction * list; u8 count; }; -EWRAM_DATA u8 sDelay = 0; +static EWRAM_DATA u8 sDelay = 0; static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); static u8 sub_809CBB4(u8 count); @@ -432,35 +432,35 @@ static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallop123[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Seagallop123[] = { { gText_OneIsland }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV23[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV23[] = { { gText_Vermilion }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV13[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV13[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV12[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV12[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopVermilion[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopVermilion[] = { { gText_Vermilion }, { gOtherText_Exit } }; @@ -547,11 +547,11 @@ const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { { sScriptMultiChoiceMenu_SeviiNavel, NELEMS(sScriptMultiChoiceMenu_SeviiNavel) }, { sScriptMultiChoiceMenu_SeviiBirth, NELEMS(sScriptMultiChoiceMenu_SeviiBirth) }, { sScriptMultiChoiceMenu_SeviiNavelBirth, NELEMS(sScriptMultiChoiceMenu_SeviiNavelBirth) }, - { sScriptMultiChoiceMenu_SeaGallop123, NELEMS(sScriptMultiChoiceMenu_SeaGallop123) }, - { sScriptMultiChoiceMenu_SeaGallopV23, NELEMS(sScriptMultiChoiceMenu_SeaGallopV23) }, - { sScriptMultiChoiceMenu_SeaGallopV13, NELEMS(sScriptMultiChoiceMenu_SeaGallopV13) }, - { sScriptMultiChoiceMenu_SeaGallopV12, NELEMS(sScriptMultiChoiceMenu_SeaGallopV12) }, - { sScriptMultiChoiceMenu_SeaGallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeaGallopVermilion) }, + { sScriptMultiChoiceMenu_Seagallop123, NELEMS(sScriptMultiChoiceMenu_Seagallop123) }, + { sScriptMultiChoiceMenu_SeagallopV23, NELEMS(sScriptMultiChoiceMenu_SeagallopV23) }, + { sScriptMultiChoiceMenu_SeagallopV13, NELEMS(sScriptMultiChoiceMenu_SeagallopV13) }, + { sScriptMultiChoiceMenu_SeagallopV12, NELEMS(sScriptMultiChoiceMenu_SeagallopV12) }, + { sScriptMultiChoiceMenu_SeagallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeagallopVermilion) }, { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, { sScriptMultiChoiceMenu_JoinOrLead, NELEMS(sScriptMultiChoiceMenu_JoinOrLead) }, { sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) } @@ -647,7 +647,7 @@ static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { }; -static const u8 *const sSeaGallopDestStrings[] = { +static const u8 *const sSeagallopDestStrings[] = { gText_Vermilion, gText_OneIsland, gText_TwoIsland, @@ -1188,7 +1188,7 @@ void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) } } -void Special_DrawSeaGallopDestinationMenu(void) +void Special_DrawSeagallopDestinationMenu(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) @@ -1224,7 +1224,7 @@ void Special_DrawSeaGallopDestinationMenu(void) for (i = 0; i < nitems - 2; i++) { if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, 2, sSeaGallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); else i--; r4++; @@ -1240,7 +1240,7 @@ void Special_DrawSeaGallopDestinationMenu(void) } } -u16 Special_GetSelectedSeaGallopDestination(void) +u16 Special_GetSelectedSeagallopDestination(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) diff --git a/src/seagallop.c b/src/seagallop.c index 006a356e4..cf07f9880 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -25,13 +25,13 @@ static EWRAM_DATA void * sBg3TilemapBuffer = NULL; -static void CB2_SetUpSeaGallopScene(void); +static void CB2_SetUpSeagallopScene(void); static void VBlankCB_SeaGallop(void); static void MainCB2_SeaGallop(void); -static void Task_SeaGallop_0(u8 taskId); -static void Task_SeaGallop_1(u8 taskId); -static void Task_SeaGallop_2(u8 taskId); -static void Task_SeaGallop_3(void); +static void Task_Seagallop_0(u8 taskId); +static void Task_Seagallop_1(u8 taskId); +static void Task_Seagallop_2(u8 taskId); +static void Task_Seagallop_3(void); static void ResetGPU(void); static void ResetAllAssets(void); static void SetDispcnt(void); @@ -64,7 +64,7 @@ static const struct BgTemplate sBGTemplates[] = { } }; -static const s8 sSeaGallopSpawnTable[][4] = { +static const s8 sSeag[][4] = { // Map X Y [SEAGALLOP_VERMILION_CITY] = {MAP(VERMILION_CITY), 0x17, 0x20}, [SEAGALLOP_ONE_ISLAND] = {MAP(ONE_ISLAND_HARBOR), 0x08, 0x05}, @@ -176,14 +176,14 @@ static const struct SpriteTemplate sWakeSpriteTemplate = { SpriteCB_Wake }; -void ScrSpecial_SeaGallopFerry(void) +void ScrSpecial_SeagallopFerry(void) { SetVBlankCallback(NULL); HelpSystem_Disable(); - SetMainCallback2(CB2_SetUpSeaGallopScene); + SetMainCallback2(CB2_SetUpSeagallopScene); } -static void CB2_SetUpSeaGallopScene(void) +static void CB2_SetUpSeagallopScene(void) { void ** ptr; switch (gMain.state) @@ -248,7 +248,7 @@ static void CB2_SetUpSeaGallopScene(void) SetGpuReg(REG_OFFSET_WINOUT, 0x00); SetGpuReg(REG_OFFSET_WIN0H, 0x00F0); SetGpuReg(REG_OFFSET_WIN0V, 0x1888); - CreateTask(Task_SeaGallop_0, 8); + CreateTask(Task_Seagallop_0, 8); SetMainCallback2(MainCB2_SeaGallop); gMain.state = 0; break; @@ -270,9 +270,9 @@ static void MainCB2_SeaGallop(void) UpdatePaletteFade(); } -static void Task_SeaGallop_0(u8 taskId) +static void Task_Seagallop_0(u8 taskId) { - gTasks[taskId].func = Task_SeaGallop_1; + gTasks[taskId].func = Task_Seagallop_1; } static void ScrollBG(void) @@ -287,7 +287,7 @@ static void ScrollBG(void) } } -static void Task_SeaGallop_1(u8 taskId) +static void Task_Seagallop_1(u8 taskId) { struct Task * task = &gTasks[taskId]; @@ -296,29 +296,29 @@ static void Task_SeaGallop_1(u8 taskId) { Overworld_FadeOutMapMusic(); sub_807DC18(); - task->func = Task_SeaGallop_2; + task->func = Task_Seagallop_2; } } -static void Task_SeaGallop_2(u8 taskId) +static void Task_Seagallop_2(u8 taskId) { ScrollBG(); if (sub_8055FC4() && !gPaletteFade.active) { - Task_SeaGallop_3(); + Task_Seagallop_3(); HelpSystem_Enable(); DestroyTask(taskId); } } -static void Task_SeaGallop_3(void) +static void Task_Seagallop_3(void) { const s8 * warpInfo; - if (gSpecialVar_0x8006 >= NELEMS(sSeaGallopSpawnTable)) + if (gSpecialVar_0x8006 >= NELEMS(sSeag)) gSpecialVar_0x8006 = 0; - warpInfo = sSeaGallopSpawnTable[gSpecialVar_0x8006]; + warpInfo = sSeag[gSpecialVar_0x8006]; SetWarpDestination(warpInfo[0], warpInfo[1], -1, warpInfo[2], warpInfo[3]); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); -- cgit v1.2.3 From fd78afa5a7d4441fe0d76693e301deb6bc2557dc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 25 Oct 2019 17:11:31 -0400 Subject: Name remaining static routines in script_menu.c --- src/script_menu.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/script_menu.c b/src/script_menu.c index ed2f0aa0a..b3826322b 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -28,12 +28,12 @@ struct MultichoiceListStruct static EWRAM_DATA u8 sDelay = 0; static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); -static u8 sub_809CBB4(u8 count); -static void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); +static u8 GetMCWindowHeight(u8 count); +static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId); static void Task_MultichoiceMenu_HandleInput(u8 taskId); static void MultiChoicePrintHelpDescription(u8 mcId); -static void task_yes_no_maybe(u8 taskId); -static void sub_809CFDC(u8 taskId); +static void Task_YesNoMenu_HandleInput(u8 taskId); +static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId); static void CreatePCMenuWindow(void); static bool8 PicboxWait(void); static void DestroyScriptMenuWindow(u8 windowId); @@ -722,7 +722,7 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres width = (strWidth + 9) / 8 + 1; if (left + width > 28) left = 28 - width; - height = sub_809CBB4(count); + height = GetMCWindowHeight(count); windowId = CreateWindowFromRect(left, top, width, height); SetStdWindowBorderStyle(windowId, FALSE); if (mcId == 30 || mcId == 13 || mcId == 41) @@ -730,12 +730,12 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres else MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); Menu_InitCursor(windowId, 2, 0, 2, 14, count, initPos); - sub_809CC18(ignoreBpress, count, windowId, mcId); + CreateMCMenuInputHandlerTask(ignoreBpress, count, windowId, mcId); ScheduleBgCopyTilemapToVram(0); } } -static u8 sub_809CBB4(u8 count) +static u8 GetMCWindowHeight(u8 count) { switch (count) { @@ -762,7 +762,7 @@ static u8 sub_809CBB4(u8 count) } } -static void sub_809CC18(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) +static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) { u8 taskId; if (mcId == 39 || mcId == 47 || mcId == 50) @@ -838,13 +838,13 @@ static void MultiChoicePrintHelpDescription(u8 mcId) bool8 ScriptMenu_YesNo(u8 unused, u8 stuff) { - if (FuncIsActiveTask(task_yes_no_maybe) == TRUE) + if (FuncIsActiveTask(Task_YesNoMenu_HandleInput) == TRUE) return FALSE; gSpecialVar_Result = SCR_MENU_UNSET; if (!QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites)) { DisplayYesNoMenuDefaultYes(); - CreateTask(task_yes_no_maybe, 80); + CreateTask(Task_YesNoMenu_HandleInput, 80); } return TRUE; } @@ -857,7 +857,7 @@ bool8 sub_809CE38(void) return TRUE; } -static void task_yes_no_maybe(u8 taskId) +static void Task_YesNoMenu_HandleInput(u8 taskId) { s8 input; if (gTasks[taskId].data[2] < 5) @@ -892,7 +892,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co u8 width; u8 rowCount; u8 taskId; - if (FuncIsActiveTask(sub_809CFDC) == TRUE) + if (FuncIsActiveTask(Hask_MultichoiceGridMenu_HandleInput) == TRUE) return FALSE; gSpecialVar_Result = SCR_MENU_UNSET; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) @@ -901,7 +901,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co count = gScriptMultiChoiceMenus[multichoiceId].count; width = GetMenuWidthFromList(list, count) + 1; rowCount = count / columnCount; - taskId = CreateTask(sub_809CFDC, 80); + taskId = CreateTask(Hask_MultichoiceGridMenu_HandleInput, 80); gTasks[taskId].data[4] = a4; gTasks[taskId].data[6] = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); SetStdWindowBorderStyle(gTasks[taskId].data[6], FALSE); @@ -912,7 +912,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co return TRUE; } -static void sub_809CFDC(u8 taskId) +static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) { s16 *data = gTasks[taskId].data; s8 input = Menu_ProcessInputGridLayout(); @@ -992,7 +992,7 @@ static void CreatePCMenuWindow(void) StringExpandPlaceholders(gStringVar4, gText_SPc); Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); - sub_809CC18(FALSE, nitems, windowId, 0xFF); + CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); ScheduleBgCopyTilemapToVram(0); } @@ -1235,7 +1235,7 @@ void Special_DrawSeagallopDestinationMenu(void) i++; AddTextPrinterParameterized(windowId, 2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); - sub_809CC18(FALSE, nitems, windowId, 0xFF); + CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); ScheduleBgCopyTilemapToVram(0); } } -- cgit v1.2.3 From 680e03618a6cc7da3072eef6caa02c2fc682065a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 26 Oct 2019 10:24:35 -0400 Subject: Bump baserom.ips --- baserom.ips | Bin 635220 -> 625796 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/baserom.ips b/baserom.ips index f619a0841..42cccca6c 100644 Binary files a/baserom.ips and b/baserom.ips differ -- cgit v1.2.3