From 4e95a132955541349558aeeba29a44890aefcee2 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Thu, 7 Jan 2016 23:27:40 -0800 Subject: [PATCH] update asm --- asm/emerald.s | 3536 +++++++++++++++++++++-------------------- asm/gpu_bg.s | 48 +- asm/gpu_reg_manager.s | 40 +- asm/main.s | 8 +- asm/main_menu.s | 50 +- asm/malloc.s | 6 +- asm/rtc.s | 2 +- asm/string_util.s | 8 +- asm/task.s | 8 +- asm/text_renderer.s | 30 +- asm/window.s | 16 +- include/global.h | 12 + include/io_regs.h | 337 ++++ wram_syms.txt | 8 +- 14 files changed, 2273 insertions(+), 1836 deletions(-) create mode 100644 include/io_regs.h diff --git a/asm/emerald.s b/asm/emerald.s index ebf419458..a8ed6cd82 100644 --- a/asm/emerald.s +++ b/asm/emerald.s @@ -257,7 +257,7 @@ _080095A0: ldr r0, =sub_8009404 movs r1, 0 bl AddTask - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -681,7 +681,7 @@ c2_08009A8C: ; 80099BC movs r1, 0x1 movs r2, 0 bl sub_8009818 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -3407,7 +3407,7 @@ _0800AF8C: adds r1, r0, 0 str r1, [r4] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_082ED204 bl InitWindows lsls r0, 16 @@ -3436,7 +3436,7 @@ _0800AF8C: movs r1, 0xE0 lsls r1, 8 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits ldr r0, =gUnknown_0860F074 movs r1, 0xF0 movs r2, 0x20 @@ -3451,7 +3451,7 @@ _0800AF8C: ldr r1, =0x030022c0 movs r0, 0 str r0, [r1] - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -13103,7 +13103,7 @@ _0800FE76: thumb_func_end sub_800FE50 thumb_func_start sub_800FE84 -; BOOL sub_800FE84(u32 a1, u32 size) +; bool8 sub_800FE84(u32 a1, u32 size) sub_800FE84: ; 800FE84 push {r4-r7,lr} mov r7, r9 @@ -16650,7 +16650,7 @@ _08011B38: lsls r1, 5 movs r0, 0 bl SetGpuReg - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -16720,7 +16720,7 @@ _08011BEA: thumb_func_start sub_8011BF8 sub_8011BF8: ; 8011BF8 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -18272,7 +18272,7 @@ _08012938: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r6, 0x12] ldrb r0, [r6, 0x11] movs r1, 0 @@ -19753,7 +19753,7 @@ _0801360C: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r6, 0xE] ldrb r0, [r6, 0xD] movs r1, 0 @@ -19787,7 +19787,7 @@ _080136EA: b _08013A72 _080136F2: ldrb r0, [r6, 0xE] - bl sub_81AE604 + bl ListMenuHandleInput adds r4, r0, 0 ldr r0, =0x030022c0 ldrh r1, [r0, 0x2E] @@ -21040,7 +21040,7 @@ _080141D4: ldr r1, =c2_exit_to_overworld_2_switch bl sub_80C4E74 _080141F2: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -21243,7 +21243,7 @@ _080143B4: ldr r0, =sub_8086074 bl SetMainCallback2 _080143C6: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -21998,7 +21998,7 @@ _08014AEC: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r5, 0x12] movs r0, 0 bl CopyBgTilemapBufferToVram @@ -22530,7 +22530,7 @@ _08014FE8: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r7, 0xE] ldrb r0, [r7, 0xD] bl sub_8018784 @@ -22567,7 +22567,7 @@ _080150CE: b _080152A0 _080150D6: ldrb r0, [r7, 0xE] - bl sub_81AE604 + bl ListMenuHandleInput adds r2, r0, 0 ldr r0, =0x030022c0 ldrh r1, [r0, 0x2E] @@ -22903,7 +22903,7 @@ _08015398: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r5, 0xE] movs r0, 0 bl CopyBgTilemapBufferToVram @@ -22938,7 +22938,7 @@ _08015446: cmp r0, 0 beq _08015452 ldrb r0, [r5, 0xE] - bl sub_81AE604 + bl ListMenuHandleInput _08015452: ldrb r0, [r5, 0x14] cmp r0, 0x78 @@ -26299,7 +26299,7 @@ _080171DC: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit mov r1, r9 strb r0, [r1] ldrb r0, [r5] @@ -26313,7 +26313,7 @@ _080171DC: _08017228: mov r3, r9 ldrb r0, [r3] - bl sub_81AE604 + bl ListMenuHandleInput mov r8, r0 ldr r0, =0x030022c0 ldrh r1, [r0, 0x2E] @@ -26412,7 +26412,7 @@ _080172C8: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0x1 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit mov r1, r10 strb r0, [r1] b _08017314 @@ -26429,7 +26429,7 @@ _08017314: _0801731C: mov r3, r10 ldrb r0, [r3] - bl sub_81AE604 + bl ListMenuHandleInput adds r1, r0, 0 ldr r0, =0x030022c0 ldrh r2, [r0, 0x2E] @@ -27531,7 +27531,7 @@ _08017B94: adds r0, r6, 0 movs r2, 0x44 adds r3, r5, 0 - bl sub_819A2F8 + bl blit_move_info_icon movs r0, 0xB mov r2, r8 muls r2, r0 @@ -28610,7 +28610,7 @@ sub_8018424: ; 8018424 thumb_func_start sub_8018438 sub_8018438: ; 8018438 push {lr} - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -28700,22 +28700,22 @@ _08018482: bl Alloc adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl Alloc adds r1, r0, 0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl Alloc adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl Alloc adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x3 bl bgid_upload_textbox_1 ldr r0, =gUnknown_082F05A8 @@ -28724,7 +28724,7 @@ _08018482: movs r1, 0xC0 lsls r1, 7 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0x50 movs r1, 0 bl SetGpuReg @@ -28841,7 +28841,7 @@ c2_mystery_gift: ; 8018650 strb r0, [r1] bl task_add_00_mystery_gift _0801866C: - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 .pool @@ -28874,16 +28874,16 @@ sub_80186A4: ; 80186A4 strb r0, [r1] bl FreeAllWindowBuffers movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x2 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free ldr r0, =c2_title_screen_1 bl SetMainCallback2 @@ -29400,7 +29400,7 @@ _08018AD2: add r1, sp, 0x4 movs r2, 0x1 movs r3, 0xA - bl sub_81AE45C + bl DoMysteryGiftListMenu adds r4, r0, 0 movs r0, 0x1 negs r0, r0 @@ -29510,7 +29510,7 @@ _08018BC6: movs r1, 0xA movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu _08018BD6: ldrb r0, [r5] adds r0, 0x1 @@ -29660,7 +29660,7 @@ _08018D28: str r2, [sp] movs r2, 0x1 movs r3, 0xA - bl sub_81AE45C + bl DoMysteryGiftListMenu adds r4, r0, 0 movs r0, 0x1 negs r0, r0 @@ -32559,7 +32559,7 @@ sub_801A3F4: ; 801A3F4 lsls r0, 24 cmp r0, 0 bne _0801A414 - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -32614,12 +32614,12 @@ sub_801A43C: ; 801A43C bl Alloc adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl Alloc adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_082F0990 movs r0, 0 str r0, [sp] @@ -32692,7 +32692,7 @@ sub_801A43C: ; 801A43C bl CopyBgTilemapBufferToVram ldr r0, =sub_801A3F4 bl SetMainCallback2 - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -32712,7 +32712,7 @@ sub_801A584: ; 801A584 _0801A58C: lsls r0, r4, 24 lsrs r0, 24 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free adds r4, 0x1 cmp r4, 0x1 @@ -33884,7 +33884,7 @@ _0801AF98: ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 _0801AFAE: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -37113,7 +37113,7 @@ _0801C9A8: movs r2, 0xE3 lsls r2, 1 adds r1, r2 - bl sub_81AF380 + bl AddScrollIndicatorArrowPair ldr r1, [r4] ldr r3, =0x000001c1 adds r2, r1, r3 @@ -37241,7 +37241,7 @@ _0801CABE: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits b _0801CC0E _0801CAF4: movs r4, 0x1E @@ -37320,7 +37320,7 @@ _0801CB84: ldrb r0, [r1] cmp r0, 0xFF beq _0801CC0E - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r2, =0x000001c1 adds r1, r0, r2 @@ -37403,7 +37403,7 @@ sub_801CC38: ; 801CC38 ldrb r0, [r1] cmp r0, 0xFF beq _0801CC72 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r2, =0x000001c1 adds r1, r0, r2 @@ -37441,7 +37441,7 @@ sub_801CC80: ; 801CC80 movs r3, 0xE3 lsls r3, 1 adds r1, r2, r3 - bl sub_81AF380 + bl AddScrollIndicatorArrowPair ldr r1, [r4] ldr r2, =0x000001c1 adds r1, r2 @@ -39863,7 +39863,7 @@ sub_801DF20: ; 801DF20 thumb_func_start sub_801DF38 sub_801DF38: ; 801DF38 push {lr} - bl run_active_tasks + bl RunActiveTasks bl sub_801F5B8 bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -44599,7 +44599,7 @@ sub_8020480: ; 8020480 movs r1, 0xE0 lsls r1, 8 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r1, 0x80 lsls r1, 6 movs r0, 0 @@ -44630,22 +44630,22 @@ sub_8020538: ; 8020538 lsls r0, 1 adds r1, r0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000928 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001128 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001928 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer pop {r4} pop {r0} bx r0 @@ -45637,7 +45637,7 @@ sub_8020D8C: ; 8020D8C _08020DA8: ldrh r0, [r1] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item _08020DB0: ldr r4, =0x02022c90 ldr r2, [r4] @@ -45870,7 +45870,7 @@ sub_8020F74: ; 8020F74 thumb_func_start sub_8020F88 sub_8020F88: ; 8020F88 push {lr} - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -46050,17 +46050,17 @@ _080210F2: lsls r0, 1 adds r1, r5, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x87 lsls r0, 6 adds r1, r5, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0xC7 lsls r0, 6 adds r1, r5, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0 movs r1, 0 movs r2, 0 @@ -46361,23 +46361,23 @@ _080213E6: movs r0, 0 bl HideBg movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 bl HideBg movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x2 bl HideBg movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x3 bl HideBg movs r0, 0x3 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r1, 0x82 lsls r1, 5 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits b _0802143E _08021426: bl sub_800E084 @@ -55997,7 +55997,7 @@ _080261C0: thumb_func_start sub_80261CC sub_80261CC: ; 80261CC push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -64719,19 +64719,19 @@ _0802A7CE: ldr r4, =0x02022cf8 ldr r1, [r4] movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r2, 0x80 lsls r2, 5 adds r1, r2 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0x80 lsls r0, 6 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer add sp, 0x8 pop {r3} mov r8, r3 @@ -65165,7 +65165,7 @@ sub_802AC58: ; 802AC58 thumb_func_start sub_802AC6C sub_802AC6C: ; 802AC6C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -70015,7 +70015,7 @@ _0802D178: lsls r0, 1 adds r1, r0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x20 str r0, [sp] str r0, [sp, 0x4] @@ -71155,7 +71155,7 @@ sub_802DB18: ; 802DB18 mov r0, sp movs r1, 0x1 movs r2, 0xD - bl sub_81996C0 + bl CreateYesNoMenu add sp, 0x8 pop {r4,r5} pop {r0} @@ -77807,7 +77807,7 @@ _0803463E: thumb_func_end DecompressMonPic_DetectFrontOrBack thumb_func_start DecompressMonPic -; void DecompressMonPic(void **picTable, void *dest, u32 speciesId, u32 personality, BOOL isFrontPic) +; void DecompressMonPic(void **picTable, void *dest, u32 speciesId, u32 personality, bool8 isFrontPic) DecompressMonPic: ; 8034654 push {r4-r7,lr} mov r7, r8 @@ -78359,7 +78359,7 @@ _08034A30: thumb_func_end DecompressPicFromTable_2 thumb_func_start DecompressMonPic_2 -; void DecompressMonPic_2(void **picTable, void *dest, u32 speciesId, u32 personality, BOOL isFrontPic) +; void DecompressMonPic_2(void **picTable, void *dest, u32 speciesId, u32 personality, bool8 isFrontPic) DecompressMonPic_2: ; 8034A40 push {r4-r7,lr} mov r7, r8 @@ -78529,7 +78529,7 @@ _08034B66: thumb_func_end DecompressMonPicWithoutDuplicatingDeoxysTiles_DetectFrontOrBack thumb_func_start DecompressMonPicWithoutDuplicatingDeoxysTiles -; void DecompressMonPicWithoutDuplicatingDeoxysTiles(void **picTable, void *dest, u32 speciesId, u32 personality, BOOL isFrontPic) +; void DecompressMonPicWithoutDuplicatingDeoxysTiles(void **picTable, void *dest, u32 speciesId, u32 personality, bool8 isFrontPic) DecompressMonPicWithoutDuplicatingDeoxysTiles: ; 8034B7C push {r4-r7,lr} mov r7, r8 @@ -79970,10 +79970,10 @@ trs_config: ; 8035658 ldr r4, =0x02023060 ldr r1, [r4] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer b _080356AA .pool _080356A4: @@ -82666,7 +82666,7 @@ _08036FA0: thumb_func_start sub_8036FAC sub_8036FAC: ; 8036FAC push {r4-r6,lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl link_get_multiplayer_id @@ -83136,7 +83136,7 @@ _0803744C: sub_8037458: ; 8037458 push {r4-r7,lr} sub sp, 0x4 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl link_get_multiplayer_id @@ -83850,7 +83850,7 @@ _08037B02: str r1, [sp] adds r0, 0xAC mov r10, r0 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad ldr r5, =0x02024332 @@ -84080,7 +84080,7 @@ intro_end: ; 8037D2C mov r8, r1 adds r7, r0, 0 adds r7, 0xAC - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad ldr r5, =0x02024332 @@ -84158,7 +84158,7 @@ sub_8037DF4: ; 8037DF4 ldr r0, =0x02024474 adds r0, 0x25 strb r7, [r0] - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad ldr r0, =0x02024332 @@ -84858,7 +84858,7 @@ sub_8038420: ; 8038420 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks ldr r0, =0x030022c0 ldrh r1, [r0, 0x2C] movs r0, 0x2 @@ -86133,7 +86133,7 @@ sub_8038F14: ; 8038F14 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_8038F14 @@ -86596,7 +86596,7 @@ sub_803937C: ; 803937C bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_803937C @@ -179354,7 +179354,7 @@ _0806BCB2: thumb_func_end battle_data_fill thumb_func_start ExecuteTableBasedItemEffect_ -; BOOL ExecuteTableBasedItemEffect_(struct pokemon *mon, u16 itemId, u8 a3, u8 monMoveIndex) +; bool8 ExecuteTableBasedItemEffect_(struct pokemon *mon, u16 itemId, u8 a3, u8 monMoveIndex) ExecuteTableBasedItemEffect_: ; 806BD04 push {r4,lr} sub sp, 0x4 @@ -179376,7 +179376,7 @@ ExecuteTableBasedItemEffect_: ; 806BD04 thumb_func_end ExecuteTableBasedItemEffect_ thumb_func_start ExecuteTableBasedItemEffect -; BOOL ExecuteTableBasedItemEffect(struct pokemon *mon, u16 itemId, u8 a3, u8 monMoveIndex, u8 a5) +; bool8 ExecuteTableBasedItemEffect(struct pokemon *mon, u16 itemId, u8 a3, u8 monMoveIndex, u8 a5) ExecuteTableBasedItemEffect: ; 806BD28 push {r4-r7,lr} mov r7, r10 @@ -181311,7 +181311,7 @@ _0806CD5C: thumb_func_end ExecuteTableBasedItemEffect thumb_func_start HealStatusConditions -; BOOL HealStatusConditions(struct pokemon *a1, int a2, u32 healMask, u8 a4) +; bool8 HealStatusConditions(struct pokemon *a1, int a2, u32 healMask, u8 a4) HealStatusConditions: ; 806CD6C push {r4-r6,lr} sub sp, 0x4 @@ -188595,7 +188595,7 @@ _080705C2: adds r0, r5, r3 lsls r0, 16 lsrs r0, 16 - bl sub_81B6CFC + bl ItemIdToBattleMoveId ldrh r1, [r4] lsls r0, 16 lsrs r0, 16 @@ -190169,7 +190169,7 @@ c3_080469FC: ; 8071204 lsls r0, 3 adds r4, r0, r1 ldrb r0, [r4, 0x8] - bl sub_81AE604 + bl ListMenuHandleInput adds r1, r0, 0 ldr r0, =0x030022c0 ldrh r2, [r0, 0x2E] @@ -190261,7 +190261,7 @@ sub_80712C0: ; 80712C0 strb r4, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 @@ -190883,13 +190883,13 @@ _080717EC: bl Alloc adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x80 lsls r0, 6 bl Alloc adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer bl DeactivateAllTextPrinters bl sub_80A1A74 bl ResetObjectPaletteAllocator @@ -191007,7 +191007,7 @@ _080719C8: movs r0, 0 strb r0, [r1, 0x2] _080719D6: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -191351,7 +191351,7 @@ _08071CF8: adds r1, r4, 0 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r1, [r5] b _08071DC8 .pool @@ -191450,15 +191450,15 @@ _08071DD4: ldrb r0, [r0, 0x8] bl RemoveWindow movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer ldr r0, [r4] bl Free ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 _08071E06: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -201828,7 +201828,7 @@ sub_80772A4: ; 80772A4 lsls r0, 4 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_0832DEF4 bl InitWindows lsls r0, 16 @@ -202711,7 +202711,7 @@ _08077B30: bl SetMainCallback2 _08077B46: bl RunTextPrinters - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -203325,7 +203325,7 @@ _080780E4: ldr r0, =sub_807825C bl SetMainCallback2 _080780F6: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -203502,7 +203502,7 @@ sub_807825C: ; 807825C movs r0, 0x1C bl SetGpuReg bl sub_8197224 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -204904,7 +204904,7 @@ _08078EB6: movs r1, 0x1 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r0, [r4] adds r0, 0x6F movs r1, 0x4 @@ -205539,7 +205539,7 @@ sub_80793C4: ; 80793C4 movs r1, 0x1 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r0, [r4] adds r0, 0xA8 movs r1, 0 @@ -209140,7 +209140,7 @@ _0807B110: ldr r0, =sub_807EA2C bl SetMainCallback2 _0807B116: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -209209,17 +209209,17 @@ sub_807B170: ; 807B170 bl Alloc adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r5, 0 bl Alloc adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r5, 0 bl Alloc adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl DeactivateAllTextPrinters ldr r0, =gUnknown_08C00000 mov r10, r0 @@ -209459,7 +209459,7 @@ _0807B438: ldr r0, =sub_807B60C bl SetMainCallback2 _0807B43E: - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -209673,7 +209673,7 @@ _0807B600: sub_807B60C: ; 807B60C push {lr} bl sub_807BBC8 - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -212276,13 +212276,13 @@ _0807CF5C: beq _0807CFAA bl FreeAllWindowBuffers movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free bl sub_805F094 ldr r0, [r7] @@ -214381,13 +214381,13 @@ _0807E3A8: beq _0807E3F6 bl FreeAllWindowBuffers movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free bl sub_805F094 ldr r0, [r7] @@ -214481,7 +214481,7 @@ _0807E4B4: lsls r0, 24 cmp r0, 0 bne _0807E4C2 - bl run_active_tasks + bl RunActiveTasks _0807E4C2: bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -215175,7 +215175,7 @@ _0807EA90: _0807EA96: bl sub_807B5B8 bl sub_807E4DC - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -215230,7 +215230,7 @@ _0807EAEC: adds r0, 0x73 strb r1, [r0] _0807EB2C: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -215724,7 +215724,7 @@ _0807F03A: lsls r0, 24 cmp r0, 0 bne _0807F048 - bl run_active_tasks + bl RunActiveTasks _0807F048: bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -215749,13 +215749,13 @@ c2_080543C4: ; 807F068 bne _0807F0BE bl FreeAllWindowBuffers movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free bl sub_805F094 ldr r4, =0x020322a0 @@ -215772,7 +215772,7 @@ _0807F0B6: ldr r0, [r0, 0x8] bl SetMainCallback2 _0807F0BE: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -216204,7 +216204,7 @@ _0807F44C: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits adds r0, r6, 0 bl remove_task _0807F45C: @@ -216508,7 +216508,7 @@ _0807F70C: lsls r0, 24 cmp r0, 0 bne _0807F71A - bl run_active_tasks + bl RunActiveTasks _0807F71A: bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -216943,12 +216943,12 @@ _0807FB08: lsls r0, 1 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x000009b8 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0 movs r1, 0x1 movs r2, 0xD0 @@ -217109,9 +217109,9 @@ _0807FCB0: bne _0807FCE2 bl FreeAllWindowBuffers movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl SetVBlankCallback ldr r0, =sub_807FFA4 @@ -218093,7 +218093,7 @@ _08080546: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -218128,12 +218128,12 @@ sub_8080588: ; 8080588 lsls r0, 1 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r3, =0x000009b8 adds r1, r3 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0 movs r1, 0x1 movs r2, 0xD0 @@ -219071,7 +219071,7 @@ _08080DAE: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -220367,7 +220367,7 @@ _0808191A: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -221602,7 +221602,7 @@ _080822E4: movs r1, 0x1 movs r2, 0xD movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r1, [r4] b _0808245C .pool @@ -221817,7 +221817,7 @@ _0808249E: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -222226,9 +222226,9 @@ _0808284C: bne _08082898 bl FreeAllWindowBuffers movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer ldr r0, [r6] bl Free str r4, [r6] @@ -222287,7 +222287,7 @@ _080828DC: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -222444,9 +222444,9 @@ _08082A70: _08082A76: bl FreeAllWindowBuffers movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer ldr r4, =0x020322a4 ldr r0, [r4] bl Free @@ -222467,7 +222467,7 @@ _08082A92: movs r2, 0 ldrsh r1, [r1, r2] bl nullsub_31 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -224137,7 +224137,7 @@ _080837EA: ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item adds r0, r7, 0 bl sub_8136F2C ldr r1, [r4] @@ -225694,7 +225694,7 @@ _080844B2: bl sub_8084390 bl sub_809D300 bl sub_80EBEE0 - bl sub_80EC21C + bl GabbyAndTyNewGameInitData bl sub_80E8B28 bl RemoveAllBerryTrees ldr r4, =0x03005d8c @@ -225703,7 +225703,7 @@ _080844B2: lsls r1, 3 adds r0, r1 ldr r1, =0x00000bb8 - bl encrypt_money + bl EncryptMoney movs r0, 0 bl SetCoins bl sub_80D766C @@ -225800,11 +225800,11 @@ sub_8084620: ; 8084620 lsls r0, 3 adds r4, r0 adds r0, r4, 0 - bl decrypt_money + bl DecryptMoney adds r1, r0, 0 lsrs r1, 1 adds r0, r4, 0 - bl encrypt_money + bl EncryptMoney bl sp000_heal_pokemon bl sub_8084720 bl copy_saved_warp3_bank_and_enter_x_to_warp1 @@ -227303,7 +227303,7 @@ _08085246: ldr r1, =0x03005dc0 ldr r0, [r1] ldr r1, [r1, 0x4] - bl per_step_2 + bl UpdateTVScreensOnMap movs r0, 0x1 bl sub_80E9238 _0808525E: @@ -228702,13 +228702,13 @@ overworld_bg_setup: ; 8085CA8 mov r0, r8 ldr r1, [r0] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r6] movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r5] movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_81971D0 pop {r3} mov r8, r3 @@ -228844,7 +228844,7 @@ _08085E18: c2_overworld_basic: ; 8085E24 push {lr} bl script_env_2_run_current_script - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl CameraUpdate bl UpdateCameraPanning @@ -232647,7 +232647,7 @@ sub_8087D74: ; 8087D74 ldr r1, =0x03005dc0 ldr r0, [r1] ldr r1, [r1, 0x4] - bl per_step_2 + bl UpdateTVScreensOnMap pop {r4} pop {r0} bx r0 @@ -233993,7 +233993,7 @@ GetPostCameraMoveMapBorderId: ; 8088788 thumb_func_end GetPostCameraMoveMapBorderId thumb_func_start CanCameraMoveInDirection -; BOOL32 CanCameraMoveInDirection(u8 direction) +; bool32 CanCameraMoveInDirection(u8 direction) CanCameraMoveInDirection: ; 80887B0 push {r4,r5,lr} ldr r1, =0x03005d8c @@ -235364,7 +235364,7 @@ _08089088: thumb_func_end sub_808904C thumb_func_start MetatileBehavior_IsIce_2 -; BOOL MetatileBehavior_IsIce_2(u8 metatileBehavior) +; bool8 MetatileBehavior_IsIce_2(u8 metatileBehavior) MetatileBehavior_IsIce_2: ; 808908C push {lr} lsls r0, 24 @@ -235381,7 +235381,7 @@ _0808909C: thumb_func_end MetatileBehavior_IsIce_2 thumb_func_start MetatileBehavior_IsTrickHouseSlipperyFloor -; BOOL MetatileBehavior_IsTrickHouseSlipperyFloor(u8 metatileBehavior) +; bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8 metatileBehavior) MetatileBehavior_IsTrickHouseSlipperyFloor: ; 80890A0 push {lr} lsls r0, 24 @@ -235414,7 +235414,7 @@ _080890C4: thumb_func_end MetatileBehavior_0x05 thumb_func_start MetatileBehavior_IsWalkNorth -; BOOL MetatileBehavior_IsWalkNorth(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWalkNorth(u8 metatileBehavior) MetatileBehavior_IsWalkNorth: ; 80890C8 push {lr} lsls r0, 24 @@ -235431,7 +235431,7 @@ _080890D8: thumb_func_end MetatileBehavior_IsWalkNorth thumb_func_start MetatileBehavior_IsWalkSouth -; BOOL MetatileBehavior_IsWalkSouth(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWalkSouth(u8 metatileBehavior) MetatileBehavior_IsWalkSouth: ; 80890DC push {lr} lsls r0, 24 @@ -235448,7 +235448,7 @@ _080890EC: thumb_func_end MetatileBehavior_IsWalkSouth thumb_func_start MetatileBehavior_IsWalkWest -; BOOL MetatileBehavior_IsWalkWest(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWalkWest(u8 metatileBehavior) MetatileBehavior_IsWalkWest: ; 80890F0 push {lr} lsls r0, 24 @@ -235465,7 +235465,7 @@ _08089100: thumb_func_end MetatileBehavior_IsWalkWest thumb_func_start MetatileBehavior_IsWalkEast -; BOOL MetatileBehavior_IsWalkEast(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWalkEast(u8 metatileBehavior) MetatileBehavior_IsWalkEast: ; 8089104 push {lr} lsls r0, 24 @@ -235482,7 +235482,7 @@ _08089114: thumb_func_end MetatileBehavior_IsWalkEast thumb_func_start MetatileBehavior_IsNorthwardCurrent -; BOOL MetatileBehavior_IsNorthwardCurrent(u8 metatileBehavior) +; bool8 MetatileBehavior_IsNorthwardCurrent(u8 metatileBehavior) MetatileBehavior_IsNorthwardCurrent: ; 8089118 push {lr} lsls r0, 24 @@ -235499,7 +235499,7 @@ _08089128: thumb_func_end MetatileBehavior_IsNorthwardCurrent thumb_func_start MetatileBehavior_IsSouthwardCurrent -; BOOL MetatileBehavior_IsSouthwardCurrent(u8 metatileBehavior) +; bool8 MetatileBehavior_IsSouthwardCurrent(u8 metatileBehavior) MetatileBehavior_IsSouthwardCurrent: ; 808912C push {lr} lsls r0, 24 @@ -235516,7 +235516,7 @@ _0808913C: thumb_func_end MetatileBehavior_IsSouthwardCurrent thumb_func_start MetatileBehavior_IsWestwardCurrent -; BOOL MetatileBehavior_IsWestwardCurrent(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWestwardCurrent(u8 metatileBehavior) MetatileBehavior_IsWestwardCurrent: ; 8089140 push {lr} lsls r0, 24 @@ -235533,7 +235533,7 @@ _08089150: thumb_func_end MetatileBehavior_IsWestwardCurrent thumb_func_start MetatileBehavior_IsEastwardCurrent -; BOOL MetatileBehavior_IsEastwardCurrent(u8 metatileBehavior) +; bool8 MetatileBehavior_IsEastwardCurrent(u8 metatileBehavior) MetatileBehavior_IsEastwardCurrent: ; 8089154 push {lr} lsls r0, 24 @@ -235550,7 +235550,7 @@ _08089164: thumb_func_end MetatileBehavior_IsEastwardCurrent thumb_func_start MetatileBehavior_IsSlideNorth -; BOOL MetatileBehavior_IsSlideNorth(u8 metatileBehavior) +; bool8 MetatileBehavior_IsSlideNorth(u8 metatileBehavior) MetatileBehavior_IsSlideNorth: ; 8089168 push {lr} lsls r0, 24 @@ -235567,7 +235567,7 @@ _08089178: thumb_func_end MetatileBehavior_IsSlideNorth thumb_func_start MetatileBehavior_IsSlideSouth -; BOOL MetatileBehavior_IsSlideSouth(u8 metatileBehavior) +; bool8 MetatileBehavior_IsSlideSouth(u8 metatileBehavior) MetatileBehavior_IsSlideSouth: ; 808917C push {lr} lsls r0, 24 @@ -235584,7 +235584,7 @@ _0808918C: thumb_func_end MetatileBehavior_IsSlideSouth thumb_func_start MetatileBehavior_IsSlideWest -; BOOL MetatileBehavior_IsSlideWest(u8 metatileBehavior) +; bool8 MetatileBehavior_IsSlideWest(u8 metatileBehavior) MetatileBehavior_IsSlideWest: ; 8089190 push {lr} lsls r0, 24 @@ -235601,7 +235601,7 @@ _080891A0: thumb_func_end MetatileBehavior_IsSlideWest thumb_func_start MetatileBehavior_IsSlideEast -; BOOL MetatileBehavior_IsSlideEast(u8 metatileBehavior) +; bool8 MetatileBehavior_IsSlideEast(u8 metatileBehavior) MetatileBehavior_IsSlideEast: ; 80891A4 push {lr} lsls r0, 24 @@ -235633,8 +235633,9 @@ _080891C8: bx r1 thumb_func_end MetatileBehavior_IsCounter - thumb_func_start is_tile_x86_and_npcunk2_is_x2 -is_tile_x86_and_npcunk2_is_x2: ; 80891CC + thumb_func_start MetatileBehavior_IsPlayerFacingTVScreen +; bool8 MetatileBehavior_IsPlayerFacingTVScreen(u8 behavior, u8 direction) +MetatileBehavior_IsPlayerFacingTVScreen: ; 80891CC push {lr} lsls r0, 24 lsrs r0, 24 @@ -235652,7 +235653,7 @@ _080891E2: _080891E4: pop {r1} bx r1 - thumb_func_end is_tile_x86_and_npcunk2_is_x2 + thumb_func_end MetatileBehavior_IsPlayerFacingTVScreen thumb_func_start MetatileBehavior_IsPC MetatileBehavior_IsPC: ; 80891E8 @@ -236665,7 +236666,7 @@ _08089738: thumb_func_end MetatileBehavior_IsHotSprings thumb_func_start MetatileBehavior_IsWaterfall -; BOOL MetatileBehavior_IsWaterfall(u8 metatileBehavior) +; bool8 MetatileBehavior_IsWaterfall(u8 metatileBehavior) MetatileBehavior_IsWaterfall: ; 808973C push {lr} lsls r0, 24 @@ -236877,7 +236878,7 @@ _08089844: thumb_func_end is_tile_x87 thumb_func_start MetatileBehavior_0xBB -; BOOL MetatileBehavior_0xBB(u8 metatileBehavior) +; bool8 MetatileBehavior_0xBB(u8 metatileBehavior) MetatileBehavior_0xBB: ; 8089848 push {lr} lsls r0, 24 @@ -236894,7 +236895,7 @@ _08089858: thumb_func_end MetatileBehavior_0xBB thumb_func_start MetatileBehavior_0xBC -; BOOL MetatileBehavior_0xBC(u8 metatileBehavior) +; bool8 MetatileBehavior_0xBC(u8 metatileBehavior) MetatileBehavior_0xBC: ; 808985C push {lr} lsls r0, 24 @@ -237069,7 +237070,7 @@ _0808993C: thumb_func_end sub_808992C thumb_func_start MetatileBehavior_IsMuddySlope -; BOOL MetatileBehavior_IsMuddySlope(u8 metatileBehavior) +; bool8 MetatileBehavior_IsMuddySlope(u8 metatileBehavior) MetatileBehavior_IsMuddySlope: ; 8089940 push {lr} lsls r0, 24 @@ -239456,7 +239457,7 @@ _0808AA26: thumb_func_end player_step thumb_func_start TryInterruptFieldObjectSpecialAnim -; BOOL TryInterruptFieldObjectSpecialAnim(struct npc_state *fieldObject, u8 direction) +; bool8 TryInterruptFieldObjectSpecialAnim(struct npc_state *fieldObject, u8 direction) TryInterruptFieldObjectSpecialAnim: ; 808AA38 push {r4-r6,lr} adds r4, r0, 0 @@ -239582,7 +239583,7 @@ _0808AB0A: thumb_func_end PlayerAllowForcedMovementIfMovingSameDirection thumb_func_start TryDoMetatileBehaviorForcedMovment -; BOOL TryDoMetatileBehaviorForcedMovment() +; bool8 TryDoMetatileBehaviorForcedMovment() TryDoMetatileBehaviorForcedMovment: ; 808AB14 push {r4,lr} ldr r4, =gUnknown_08497444 @@ -240463,7 +240464,7 @@ _0808B1B2: thumb_func_end sub_808B164 thumb_func_start sub_808B1BC -; BOOL sub_808B1BC(u16 x, u16 y, u8 direction) +; bool8 sub_808B1BC(u16 x, u16 y, u8 direction) sub_808B1BC: ; 808B1BC push {r4-r6,lr} lsls r0, 16 @@ -240509,7 +240510,7 @@ _0808B20E: thumb_func_end sub_808B1BC thumb_func_start ShouldJumpLedge -; BOOL ShouldJumpLedge(s16 x, s16 y, u8 direction) +; bool8 ShouldJumpLedge(s16 x, s16 y, u8 direction) ShouldJumpLedge: ; 808B214 push {lr} lsls r2, 24 @@ -240649,7 +240650,7 @@ _0808B31E: thumb_func_end check_acro_bike_metatile thumb_func_start IsPlayerCollidingWithFarawayIslandMew -; BOOL IsPlayerCollidingWithFarawayIslandMew(u8 direction) +; bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction) IsPlayerCollidingWithFarawayIslandMew: ; 808B324 push {r4-r6,lr} sub sp, 0x4 @@ -241058,7 +241059,7 @@ _0808B636: thumb_func_end sub_808B618 thumb_func_start PlayerIsAnimActive -; BOOL PlayerIsAnimActive() +; bool8 PlayerIsAnimActive() PlayerIsAnimActive: ; 808B63C push {lr} ldr r0, =0x02037590 @@ -241077,7 +241078,7 @@ PlayerIsAnimActive: ; 808B63C thumb_func_end PlayerIsAnimActive thumb_func_start PlayerCheckIfAnimFinishedOrInactive -; BOOL PlayerCheckIfAnimFinishedOrInactive() +; bool8 PlayerCheckIfAnimFinishedOrInactive() PlayerCheckIfAnimFinishedOrInactive: ; 808B660 push {lr} ldr r0, =0x02037590 @@ -242101,7 +242102,7 @@ _0808BDFC: thumb_func_end GetPlayerAvatarGenderByGraphicsId thumb_func_start PartyHasMonWithSurf -; BOOL PartyHasMonWithSurf() +; bool8 PartyHasMonWithSurf() PartyHasMonWithSurf: ; 808BE00 push {r4,r5,lr} movs r0, 0x8 @@ -242147,7 +242148,7 @@ _0808BE46: thumb_func_end PartyHasMonWithSurf thumb_func_start IsPlayerSurfingNorth -; BOOL IsPlayerSurfingNorth() +; bool8 IsPlayerSurfingNorth() IsPlayerSurfingNorth: ; 808BE50 push {lr} bl player_get_direction_upper_nybble @@ -242170,7 +242171,7 @@ _0808BE70: thumb_func_end IsPlayerSurfingNorth thumb_func_start IsPlayerFacingSurfableFishableWater -; BOOL IsPlayerFacingSurfableFishableWater() +; bool8 IsPlayerFacingSurfableFishableWater() IsPlayerFacingSurfableFishableWater: ; 808BE74 push {r4,r5,lr} sub sp, 0x4 @@ -245001,7 +245002,7 @@ _0808D540: thumb_func_end GetFieldObjectIdByLocalIdAndMap thumb_func_start TryGetFieldObjectIdByLocalIdAndMap -; BOOL TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) +; bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) TryGetFieldObjectIdByLocalIdAndMap: ; 808D548 push {r4,lr} adds r4, r3, 0 @@ -245385,7 +245386,7 @@ _0808D800: thumb_func_end sub_808D77C thumb_func_start GetAvailableFieldObjectSlot -; BOOL GetAvailableFieldObjectSlot(u16 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) +; bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) GetAvailableFieldObjectSlot: ; 808D810 push {r4-r7,lr} mov r12, r3 @@ -248134,7 +248135,7 @@ _0808ECD4: thumb_func_end GetFieldObjectIdByXYZ thumb_func_start FieldObjectDoesZCoordMatch -; BOOL FieldObjectDoesZCoordMatch(struct npc_state *fieldObject) +; bool8 FieldObjectDoesZCoordMatch(struct npc_state *fieldObject) FieldObjectDoesZCoordMatch: ; 808ECE0 push {lr} lsls r1, 24 @@ -249359,7 +249360,7 @@ _0808F582: thumb_func_end sub_808F564 thumb_func_start FieldObjectIsTrainerAndCloseToPlayer -; BOOL FieldObjectIsTrainerAndCloseToPlayer(struct npc_state *fieldObject) +; bool8 FieldObjectIsTrainerAndCloseToPlayer(struct npc_state *fieldObject) FieldObjectIsTrainerAndCloseToPlayer: ; 808F58C push {r4-r7,lr} sub sp, 0x4 @@ -249906,7 +249907,7 @@ FieldObjectCB_LookRandomDirections: ; 808F944 thumb_func_end FieldObjectCB_LookRandomDirections thumb_func_start FieldObjectCB2_LookRandomDirections -; BOOL FieldObjectCB2_LookRandomDirections(struct npc_state *fieldObject, struct obj *object) +; bool8 FieldObjectCB2_LookRandomDirections(struct npc_state *fieldObject, struct obj *object) FieldObjectCB2_LookRandomDirections: ; 808F968 push {r4,lr} ldr r3, =gUnknown_0850D740 @@ -249925,7 +249926,7 @@ FieldObjectCB2_LookRandomDirections: ; 808F968 thumb_func_end FieldObjectCB2_LookRandomDirections thumb_func_start sub_808F988 -; BOOL sub_808F988(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808F988(struct npc_state *fieldObject, struct obj *object) sub_808F988: ; 808F988 push {r4,lr} adds r4, r1, 0 @@ -249938,7 +249939,7 @@ sub_808F988: ; 808F988 thumb_func_end sub_808F988 thumb_func_start sub_808F99C -; BOOL sub_808F99C(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808F99C(struct npc_state *fieldObject, struct obj *object) sub_808F99C: ; 808F99C push {r4,r5,lr} adds r4, r0, 0 @@ -249962,7 +249963,7 @@ sub_808F99C: ; 808F99C thumb_func_end sub_808F99C thumb_func_start sub_808F9C8 -; BOOL sub_808F9C8(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808F9C8(struct npc_state *fieldObject, struct obj *object) sub_808F9C8: ; 808F9C8 push {r4-r7,lr} adds r6, r0, 0 @@ -249997,7 +249998,7 @@ _0808F9FE: thumb_func_end sub_808F9C8 thumb_func_start sub_808FA0C -; BOOL sub_808FA0C(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FA0C(struct npc_state *fieldObject, struct obj *object) sub_808FA0C: ; 808FA0C push {r4,r5,lr} adds r4, r0, 0 @@ -250026,7 +250027,7 @@ _0808FA34: thumb_func_end sub_808FA0C thumb_func_start sub_808FA3C -; BOOL sub_808FA3C(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FA3C(struct npc_state *fieldObject, struct obj *object) sub_808FA3C: ; 808FA3C push {r4,r5,lr} sub sp, 0x4 @@ -250133,7 +250134,7 @@ sub_808FADC: ; 808FADC thumb_func_end sub_808FADC thumb_func_start sub_808FB08 -; BOOL sub_808FB08(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FB08(struct npc_state *fieldObject, struct obj *object) sub_808FB08: ; 808FB08 push {r4-r6,lr} adds r6, r1, 0 @@ -250165,7 +250166,7 @@ _0808FB3E: thumb_func_end sub_808FB08 thumb_func_start sub_808FB44 -; BOOL sub_808FB44(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FB44(struct npc_state *fieldObject, struct obj *object) sub_808FB44: ; 808FB44 push {r4,lr} adds r4, r1, 0 @@ -250187,7 +250188,7 @@ _0808FB5E: thumb_func_end sub_808FB44 thumb_func_start sub_808FB64 -; BOOL sub_808FB64(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FB64(struct npc_state *fieldObject, struct obj *object) sub_808FB64: ; 808FB64 push {r4-r7,lr} sub sp, 0x4 @@ -250503,7 +250504,7 @@ FieldObjectCB_FaceFixedDirection: ; 808FD8C thumb_func_end FieldObjectCB_FaceFixedDirection thumb_func_start FieldObjectCB2_FaceFixedDirection -; BOOL FieldObjectCB2_FaceFixedDirection(struct npc_state *fieldObject, struct obj *object) +; bool8 FieldObjectCB2_FaceFixedDirection(struct npc_state *fieldObject, struct obj *object) FieldObjectCB2_FaceFixedDirection: ; 808FDB0 push {r4,lr} ldr r3, =gUnknown_0850D794 @@ -250522,7 +250523,7 @@ FieldObjectCB2_FaceFixedDirection: ; 808FDB0 thumb_func_end FieldObjectCB2_FaceFixedDirection thumb_func_start sub_808FDD0 -; BOOL sub_808FDD0(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FDD0(struct npc_state *fieldObject, struct obj *object) sub_808FDD0: ; 808FDD0 push {r4,r5,lr} adds r4, r0, 0 @@ -250546,7 +250547,7 @@ sub_808FDD0: ; 808FDD0 thumb_func_end sub_808FDD0 thumb_func_start sub_808FDFC -; BOOL sub_808FDFC(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FDFC(struct npc_state *fieldObject, struct obj *object) sub_808FDFC: ; 808FDFC push {r4,lr} adds r4, r1, 0 @@ -250567,7 +250568,7 @@ _0808FE14: thumb_func_end sub_808FDFC thumb_func_start sub_808FE1C -; BOOL sub_808FE1C(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FE1C(struct npc_state *fieldObject, struct obj *object) sub_808FE1C: ; 808FE1C ldrb r2, [r0] movs r1, 0x3 @@ -250631,7 +250632,7 @@ FieldObjectCB2_BerryTree: ; 808FE70 thumb_func_end FieldObjectCB2_BerryTree thumb_func_start do_berry_tree_growth_sparkle_1 -; BOOL do_berry_tree_growth_sparkle_1(struct npc_state *fieldObject, struct obj *object) +; bool8 do_berry_tree_growth_sparkle_1(struct npc_state *fieldObject, struct obj *object) do_berry_tree_growth_sparkle_1: ; 808FE90 push {r4-r7,lr} adds r4, r0, 0 @@ -250725,7 +250726,7 @@ _0808FF42: thumb_func_end do_berry_tree_growth_sparkle_1 thumb_func_start sub_808FF48 -; BOOL sub_808FF48(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FF48(struct npc_state *fieldObject, struct obj *object) sub_808FF48: ; 808FF48 push {r4,lr} adds r4, r1, 0 @@ -250746,7 +250747,7 @@ _0808FF60: thumb_func_end sub_808FF48 thumb_func_start do_berry_tree_growth_sparkle_2 -; BOOL do_berry_tree_growth_sparkle_2(struct npc_state *fieldObject, struct obj *object) +; bool8 do_berry_tree_growth_sparkle_2(struct npc_state *fieldObject, struct obj *object) do_berry_tree_growth_sparkle_2: ; 808FF68 push {r4,lr} ldrb r2, [r0] @@ -250787,7 +250788,7 @@ do_berry_tree_growth_sparkle_2: ; 808FF68 thumb_func_end do_berry_tree_growth_sparkle_2 thumb_func_start sub_808FFB4 -; BOOL sub_808FFB4(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_808FFB4(struct npc_state *fieldObject, struct obj *object) sub_808FFB4: ; 808FFB4 push {r4,lr} adds r3, r0, 0 @@ -250833,7 +250834,7 @@ _0808FFFE: thumb_func_end sub_808FFB4 thumb_func_start sub_8090004 -; BOOL sub_8090004(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8090004(struct npc_state *fieldObject, struct obj *object) sub_8090004: ; 8090004 push {r4,lr} adds r4, r1, 0 @@ -252661,7 +252662,7 @@ _08090D86: thumb_func_end sub_8090D64 thumb_func_start sub_8090D90 -; BOOL sub_8090D90(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8090D90(struct npc_state *fieldObject, struct obj *object) sub_8090D90: ; 8090D90 push {r4,r5,lr} sub sp, 0x8 @@ -252884,7 +252885,7 @@ sub_8090F1C: ; 8090F1C thumb_func_end sub_8090F1C thumb_func_start sub_8090F30 -; BOOL sub_8090F30(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8090F30(struct npc_state *fieldObject, struct obj *object) sub_8090F30: ; 8090F30 push {r4,r5,lr} adds r4, r0, 0 @@ -252915,7 +252916,7 @@ _08090F52: thumb_func_end sub_8090F30 thumb_func_start sub_8090F68 -; BOOL sub_8090F68(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8090F68(struct npc_state *fieldObject, struct obj *object) sub_8090F68: ; 8090F68 push {r4-r7,lr} adds r4, r0, 0 @@ -253004,7 +253005,7 @@ _08091000: thumb_func_end sub_8090F68 thumb_func_start sub_8091020 -; BOOL sub_8091020(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8091020(struct npc_state *fieldObject, struct obj *object) sub_8091020: ; 8091020 push {r4,r5,lr} adds r4, r0, 0 @@ -253028,7 +253029,7 @@ _0809103E: thumb_func_end sub_8091020 thumb_func_start sub_8091048 -; BOOL sub_8091048(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8091048(struct npc_state *fieldObject, struct obj *object) sub_8091048: ; 8091048 push {r4,lr} adds r4, r1, 0 @@ -253041,7 +253042,7 @@ sub_8091048: ; 8091048 thumb_func_end sub_8091048 thumb_func_start MoveFieldObjectInNextDirectionInSequence -; BOOL MoveFieldObjectInNextDirectionInSequence(struct npc_state *fieldObject, struct obj *object, u8 *directions) +; bool8 MoveFieldObjectInNextDirectionInSequence(struct npc_state *fieldObject, struct obj *object, u8 *directions) MoveFieldObjectInNextDirectionInSequence: ; 809105C push {r4-r7,lr} mov r7, r8 @@ -253130,7 +253131,7 @@ _080910EA: thumb_func_end MoveFieldObjectInNextDirectionInSequence thumb_func_start sub_8091110 -; BOOL sub_8091110(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8091110(struct npc_state *fieldObject, struct obj *object) sub_8091110: ; 8091110 push {r4,r5,lr} adds r4, r0, 0 @@ -253482,7 +253483,7 @@ sub_809138C: ; 809138C thumb_func_end sub_809138C thumb_func_start sub_80913AC -; BOOL sub_80913AC(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_80913AC(struct npc_state *fieldObject, struct obj *object) sub_80913AC: ; 80913AC push {r4,r5,lr} sub sp, 0x4 @@ -254943,7 +254944,7 @@ sub_8091E7C: ; 8091E7C thumb_func_end sub_8091E7C thumb_func_start mss_npc_reset_oampriv3_1_unk2_unk3 -; BOOL mss_npc_reset_oampriv3_1_unk2_unk3(struct npc_state *fieldObject, struct obj *object) +; bool8 mss_npc_reset_oampriv3_1_unk2_unk3(struct npc_state *fieldObject, struct obj *object) mss_npc_reset_oampriv3_1_unk2_unk3: ; 8091E9C push {r4,r5,lr} adds r4, r0, 0 @@ -254964,7 +254965,7 @@ _08091EB4: thumb_func_end mss_npc_reset_oampriv3_1_unk2_unk3 thumb_func_start sub_8091EC0 -; BOOL sub_8091EC0(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8091EC0(struct npc_state *fieldObject, struct obj *object) sub_8091EC0: ; 8091EC0 push {r4-r7,lr} adds r6, r0, 0 @@ -255963,7 +255964,7 @@ sub_80926AC: ; 80926AC thumb_func_end sub_80926AC thumb_func_start sub_80926B8 -; BOOL sub_80926B8(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_80926B8(struct npc_state *fieldObject, struct obj *object) sub_80926B8: ; 80926B8 push {r4,lr} adds r4, r1, 0 @@ -256135,7 +256136,7 @@ sub_80927D8: ; 80927D8 thumb_func_end sub_80927D8 thumb_func_start sub_80927F8 -; BOOL sub_80927F8(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_80927F8(struct npc_state *fieldObject, struct obj *object) sub_80927F8: ; 80927F8 push {r4,r5,lr} adds r4, r0, 0 @@ -256925,7 +256926,7 @@ _08092D48: thumb_func_end sub_8092C8C thumb_func_start IsCoordOutsideFieldObjectMovementRect -; BOOL IsCoordOutsideFieldObjectMovementRect(struct npc_state *fieldObject, u16 x, u16 y) +; bool8 IsCoordOutsideFieldObjectMovementRect(struct npc_state *fieldObject, u16 x, u16 y) IsCoordOutsideFieldObjectMovementRect: ; 8092D58 push {r4,r5,lr} adds r4, r0, 0 @@ -256990,7 +256991,7 @@ _08092DC2: thumb_func_end IsCoordOutsideFieldObjectMovementRect thumb_func_start IsMetatileDirectionallyImpassable -; BOOL IsMetatileDirectionallyImpassable(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) +; bool8 IsMetatileDirectionallyImpassable(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) IsMetatileDirectionallyImpassable: ; 8092DC8 push {r4-r7,lr} lsls r1, 16 @@ -257035,7 +257036,7 @@ _08092E1A: thumb_func_end IsMetatileDirectionallyImpassable thumb_func_start CheckForCollisionBetweenFieldObjects -; BOOL CheckForCollisionBetweenFieldObjects(struct npc_state *fieldObject, u16 x, u16 y) +; bool8 CheckForCollisionBetweenFieldObjects(struct npc_state *fieldObject, u16 x, u16 y) CheckForCollisionBetweenFieldObjects: ; 8092E20 push {r4-r7,lr} adds r6, r0, 0 @@ -257504,7 +257505,7 @@ FieldObjectMoveDestCoords: ; 809316C thumb_func_end FieldObjectMoveDestCoords thumb_func_start FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive -; BOOL FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct npc_state *fieldObject) +; bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct npc_state *fieldObject) FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive: ; 809318C push {lr} ldrb r1, [r0] @@ -257522,7 +257523,7 @@ _0809319E: thumb_func_end FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive thumb_func_start FieldObjectIsSpecialAnimActive -; BOOL FieldObjectIsSpecialAnimActive(struct npc_state *fieldObject) +; bool8 FieldObjectIsSpecialAnimActive(struct npc_state *fieldObject) FieldObjectIsSpecialAnimActive: ; 80931A4 push {lr} adds r1, r0, 0 @@ -257543,7 +257544,7 @@ _080931BC: thumb_func_end FieldObjectIsSpecialAnimActive thumb_func_start FieldObjectSetSpecialAnim -; BOOL FieldObjectSetSpecialAnim(struct npc_state *fieldObject, u8 animId) +; bool8 FieldObjectSetSpecialAnim(struct npc_state *fieldObject, u8 animId) FieldObjectSetSpecialAnim: ; 80931C0 push {r4-r6,lr} adds r4, r0, 0 @@ -257700,7 +257701,7 @@ _080932BA: thumb_func_end FieldObjectGetSpecialAnim thumb_func_start FieldObjectStep -; void FieldObjectStep(struct npc_state *fieldObject, struct obj *object, BOOL ( *callback)(struct npc_state *fieldObject, struct obj *object)) +; void FieldObjectStep(struct npc_state *fieldObject, struct obj *object, bool8 ( *callback)(struct npc_state *fieldObject, struct obj *object)) FieldObjectStep: ; 80932C0 push {r4-r6,lr} adds r4, r0, 0 @@ -258178,7 +258179,7 @@ _08093608: thumb_func_end GetStepInPlaceDelay4AnimId thumb_func_start FieldObjectFaceOppositeDirection -; BOOL FieldObjectFaceOppositeDirection(struct npc_state *fieldObject, u8 direction) +; bool8 FieldObjectFaceOppositeDirection(struct npc_state *fieldObject, u8 direction) FieldObjectFaceOppositeDirection: ; 809361C push {r4,lr} adds r4, r0, 0 @@ -258554,7 +258555,7 @@ _080938B8: thumb_func_end FieldObjectExecSpecialAnim thumb_func_start FieldObjectExecRegularAnim -; BOOL FieldObjectExecRegularAnim(struct npc_state *fieldObject, struct obj *object) +; bool8 FieldObjectExecRegularAnim(struct npc_state *fieldObject, struct obj *object) FieldObjectExecRegularAnim: ; 80938C4 push {r4,r5,lr} adds r4, r0, 0 @@ -258824,7 +258825,7 @@ do_run_anim: ; 8093A88 thumb_func_end do_run_anim thumb_func_start npc_obj_ministep_stop_on_arrival -; BOOL npc_obj_ministep_stop_on_arrival(struct npc_state *fieldObject, struct obj *object) +; bool8 npc_obj_ministep_stop_on_arrival(struct npc_state *fieldObject, struct obj *object) npc_obj_ministep_stop_on_arrival: ; 8093AB8 push {r4,r5,lr} adds r4, r0, 0 @@ -258938,7 +258939,7 @@ sub_8093B60: ; 8093B60 thumb_func_end sub_8093B60 thumb_func_start an_walk_any_2 -; BOOL an_walk_any_2(struct npc_state *fieldObject, struct obj *object) +; bool8 an_walk_any_2(struct npc_state *fieldObject, struct obj *object) an_walk_any_2: ; 8093B8C push {r4,r5,lr} adds r4, r0, 0 @@ -259119,7 +259120,7 @@ _08093CBC: thumb_func_end sub_8093CA4 thumb_func_start sub_8093CC4 -; BOOL sub_8093CC4(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8093CC4(struct npc_state *fieldObject, struct obj *object) sub_8093CC4: ; 8093CC4 push {r4,r5,lr} adds r4, r0, 0 @@ -259137,7 +259138,7 @@ sub_8093CC4: ; 8093CC4 thumb_func_end sub_8093CC4 thumb_func_start sub_8093CE4 -; BOOL sub_8093CE4(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8093CE4(struct npc_state *fieldObject, struct obj *object) sub_8093CE4: ; 8093CE4 push {r4,lr} adds r4, r1, 0 @@ -259287,7 +259288,7 @@ sub_8093DC4: ; 8093DC4 thumb_func_end sub_8093DC4 thumb_func_start sub_8093DE4 -; BOOL sub_8093DE4(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8093DE4(struct npc_state *fieldObject, struct obj *object) sub_8093DE4: ; 8093DE4 push {r4,lr} adds r4, r1, 0 @@ -261366,7 +261367,7 @@ _08094C78: thumb_func_end sub_8094C60 thumb_func_start do_run_south_anim -; BOOL do_run_south_anim(struct npc_state *fieldObject, struct obj *object) +; bool8 do_run_south_anim(struct npc_state *fieldObject, struct obj *object) do_run_south_anim: ; 8094C80 push {r4,r5,lr} adds r4, r0, 0 @@ -261384,7 +261385,7 @@ do_run_south_anim: ; 8094C80 thumb_func_end do_run_south_anim thumb_func_start sub_8094CA0 -; BOOL sub_8094CA0(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_8094CA0(struct npc_state *fieldObject, struct obj *object) sub_8094CA0: ; 8094CA0 push {r4,lr} adds r4, r1, 0 @@ -264865,7 +264866,7 @@ sub_80964B8: ; 80964B8 thumb_func_end sub_80964B8 thumb_func_start sub_80964BC -; BOOL sub_80964BC(struct npc_state *fieldObject, struct obj *object) +; bool8 sub_80964BC(struct npc_state *fieldObject, struct obj *object) sub_80964BC: ; 80964BC adds r1, 0x2C ldrb r0, [r1] @@ -265977,7 +265978,7 @@ _08096CBC: thumb_func_end FieldObjectSetSpriteOamTableForLongGrass thumb_func_start IsZCoordMismatchAt -; BOOL IsZCoordMismatchAt(u8 z, u16 x, u16 y) +; bool8 IsZCoordMismatchAt(u8 z, u16 x, u16 y) IsZCoordMismatchAt: ; 8096CC4 push {r4,lr} lsls r0, 24 @@ -266215,7 +266216,7 @@ _08096E6A: thumb_func_end FieldObjectUpdateSubpriority thumb_func_start AreZCoordsCompatible -; BOOL AreZCoordsCompatible(u8 z1, u8 z2) +; bool8 AreZCoordsCompatible(u8 z1, u8 z2) AreZCoordsCompatible: ; 8096E70 push {lr} lsls r0, 24 @@ -267003,7 +267004,7 @@ _080973FC: thumb_func_end DoGroundEffects_OnFinishStep thumb_func_start sub_8097404 -; BOOL sub_8097404(struct npc_state *fieldObject) +; bool8 sub_8097404(struct npc_state *fieldObject) sub_8097404: ; 8097404 push {r4,r5,lr} adds r5, r0, 0 @@ -267347,7 +267348,7 @@ oamt_npc_ministep_reset: ; 8097660 thumb_func_end oamt_npc_ministep_reset thumb_func_start obj_npc_ministep -; BOOL obj_npc_ministep(struct obj *object) +; bool8 obj_npc_ministep(struct obj *object) obj_npc_ministep: ; 8097674 push {r4,r5,lr} adds r4, r0, 0 @@ -267413,7 +267414,7 @@ sub_80976DC: ; 80976DC thumb_func_end sub_80976DC thumb_func_start sub_80976EC -; BOOL sub_80976EC(struct obj *object) +; bool8 sub_80976EC(struct obj *object) sub_80976EC: ; 80976EC push {r4,lr} adds r4, r0, 0 @@ -267774,7 +267775,7 @@ sub_8097978: ; 8097978 thumb_func_end sub_8097978 thumb_func_start sub_809797C -; BOOL sub_809797C(struct obj *object) +; bool8 sub_809797C(struct obj *object) sub_809797C: ; 809797C push {lr} ldrh r1, [r0, 0x34] @@ -272196,7 +272197,7 @@ sub_80999E4: ; 80999E4 lsls r1, 24 lsrs r1, 24 adds r0, r4, 0 - bl sub_80D6AA4 + bl remove_item lsls r0, 24 lsrs r0, 24 strh r0, [r5] @@ -272366,7 +272367,7 @@ sub_8099B64: ; 8099B64 ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 - bl sub_8161960 + bl IsThereStorageSpaceForDecoration lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -275626,7 +275627,7 @@ s92_check_money: ; 809B4C0 lsls r1, 3 adds r0, r1 adds r1, r2, 0 - bl is_money_greater_than + bl IsEnoughMoney lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -275659,7 +275660,7 @@ s93_display_money: ; 809B500 movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney adds r1, r5, 0 adds r2, r4, 0 bl sub_80E52EC @@ -275698,7 +275699,7 @@ s95_update_money: ; 809B548 movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney bl sub_80E52D4 _0809B56E: movs r0, 0 @@ -275791,7 +275792,7 @@ sub_809B5F0: ; 809B5F0 thumb_func_end sub_809B5F0 thumb_func_start sub_809B604 -; BOOL sub_809B604(struct script_env *env) +; bool8 sub_809B604(struct script_env *env) sub_809B604: ; 809B604 push {r4,lr} adds r4, r0, 0 @@ -275891,7 +275892,7 @@ sub_809B6A8: ; 809B6A8 s86_pokemart: ; 809B6B8 push {lr} bl script_read_word - bl sub_80E1284 + bl CreatePokemartMenu bl script_env_2_set_ctx_paused movs r0, 0x1 pop {r1} @@ -275902,7 +275903,7 @@ s86_pokemart: ; 809B6B8 s87_pokemartdecor: ; 809B6CC push {lr} bl script_read_word - bl sub_80E12A8 + bl CreateDecorationShop1Menu bl script_env_2_set_ctx_paused movs r0, 0x1 pop {r1} @@ -275913,7 +275914,7 @@ s87_pokemartdecor: ; 809B6CC s88_pokemartbp: ; 809B6E0 push {lr} bl script_read_word - bl sub_80E12C8 + bl CreateDecorationShop2Menu bl script_env_2_set_ctx_paused movs r0, 0x1 pop {r1} @@ -275939,7 +275940,7 @@ s89_open_casino_game1: ; 809B6F4 thumb_func_end s89_open_casino_game1 thumb_func_start berry_script_cmd -; BOOL berry_script_cmd(struct script_env *env) +; bool8 berry_script_cmd(struct script_env *env) berry_script_cmd: ; 809B71C push {r4,r5,lr} ldr r1, [r0, 0x8] @@ -275983,7 +275984,7 @@ sub_809B758: ; 809B758 ldr r4, =0x020375f0 lsls r0, 24 lsrs r0, 24 - bl sub_80EF038 + bl GetPriceReduction lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -277741,7 +277742,7 @@ TryGetMetatileBehaviorScript: ; 809C538 lsrs r4, r2, 24 adds r0, r5, 0 adds r1, r4, 0 - bl is_tile_x86_and_npcunk2_is_x2 + bl MetatileBehavior_IsPlayerFacingTVScreen lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -279840,7 +279841,7 @@ _0809D6AA: thumb_func_end VarGet thumb_func_start VarSet -; BOOL VarSet(u16 varId, u16 value) +; bool8 VarSet(u16 varId, u16 value) VarSet: ; 809D6B0 push {r4,lr} lsls r0, 16 @@ -279919,7 +279920,7 @@ _0809D72E: thumb_func_end GetFlagPointer thumb_func_start FlagSet -; BOOL FlagSet(u16 flagId) +; bool8 FlagSet(u16 flagId) FlagSet: ; 809D740 push {r4,lr} lsls r0, 16 @@ -279944,7 +279945,7 @@ _0809D760: thumb_func_end FlagSet thumb_func_start FlagReset -; BOOL FlagReset(u16 flagId) +; bool8 FlagReset(u16 flagId) FlagReset: ; 809D768 push {r4,lr} lsls r0, 16 @@ -279969,7 +279970,7 @@ _0809D788: thumb_func_end FlagReset thumb_func_start FlagGet -; BOOL FlagGet(u16 flagId) +; bool8 FlagGet(u16 flagId) FlagGet: ; 809D790 push {r4,lr} lsls r0, 16 @@ -283156,7 +283157,7 @@ sub_809F048: ; 809F048 thumb_func_start sub_809F090 sub_809F090: ; 809F090 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -284471,7 +284472,7 @@ _0809FC3C: bl play_some_sound bl RemoveExtraStartMenuWindows bl overworld_free_bg_tilemaps - ldr r0, =c2_bag + ldr r0, =CB2_BagMenuFromStartMenu bl SetMainCallback2 movs r0, 0x1 _0809FC50: @@ -285566,7 +285567,7 @@ _080A052E: thumb_func_start sub_80A0540 sub_80A0540: ; 80A0540 push {lr} - bl run_active_tasks + bl RunActiveTasks bl fade_and_return_progress_probably pop {r0} bx r0 @@ -303618,7 +303619,7 @@ _080AAB1E: ; void c2_title_screen_2() c2_title_screen_2: ; 80AAB2C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -314373,7 +314374,7 @@ _080B0368: movs r1, 0x80 lsls r1, 7 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits ldr r0, =gUnknown_82EC7CC ldrh r1, [r0] movs r0, 0x50 @@ -316012,7 +316013,7 @@ sub_80B1158: ; 80B1158 sub_80B11A8: ; 80B11A8 push {lr} bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks bl sub_8145F20 lsls r0, 24 lsrs r0, 24 @@ -320320,7 +320321,7 @@ _080B35F8: ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 _080B35FE: - bl run_active_tasks + bl RunActiveTasks pop {r4} pop {r0} bx r0 @@ -321020,7 +321021,7 @@ _080B3BD6: thumb_func_end sub_80B3BC4 thumb_func_start CheckForTrainersWantingBattle -; BOOL CheckForTrainersWantingBattle() +; bool8 CheckForTrainersWantingBattle() CheckForTrainersWantingBattle: ; 80B3BE8 push {r4-r7,lr} ldr r0, =0x030060a8 @@ -323671,8 +323672,8 @@ sub_80B5024: ; 80B5024 bx r1 thumb_func_end sub_80B5024 - thumb_func_start sub_80B505C -sub_80B505C: ; 80B505C + thumb_func_start SetUpMassOutbreakEncounter +SetUpMassOutbreakEncounter: ; 80B505C push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -323726,10 +323727,10 @@ _080B50C6: pop {r1} bx r1 .pool - thumb_func_end sub_80B505C + thumb_func_end SetUpMassOutbreakEncounter - thumb_func_start sub_80B50DC -sub_80B50DC: ; 80B50DC + thumb_func_start DoMassOutbreakEncounterTest +DoMassOutbreakEncounterTest: ; 80B50DC push {r4,lr} ldr r4, =0x03005d8c ldr r2, [r4] @@ -323774,7 +323775,7 @@ _080B513E: pop {r4} pop {r1} bx r1 - thumb_func_end sub_80B50DC + thumb_func_end DoMassOutbreakEncounterTest thumb_func_start DoWildEncounterRateDiceRoll DoWildEncounterRateDiceRoll: ; 80B5144 @@ -324120,13 +324121,13 @@ _080B53F2: lsrs r0, 24 cmp r0, 0x1 beq _080B54BA - bl sub_80B50DC + bl DoMassOutbreakEncounterTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne _080B5418 movs r0, 0x3 - bl sub_80B505C + bl SetUpMassOutbreakEncounter lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -324396,13 +324397,13 @@ _080B562C: lsrs r0, 24 cmp r0, 0x1 beq _080B56D4 - bl sub_80B50DC + bl DoMassOutbreakEncounterTest lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne _080B5680 movs r0, 0 - bl sub_80B505C + bl SetUpMassOutbreakEncounter b _080B56EA .pool _080B5680: @@ -325039,7 +325040,7 @@ _080B5B36: thumb_func_end FieldEffectStart thumb_func_start FieldEffectCmd_loadtiles -; BOOL FieldEffectCmd_loadtiles(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadtiles(u8 **script, u8 *returnValue) FieldEffectCmd_loadtiles: ; 80B5B60 push {lr} ldr r1, [r0] @@ -325052,7 +325053,7 @@ FieldEffectCmd_loadtiles: ; 80B5B60 thumb_func_end FieldEffectCmd_loadtiles thumb_func_start FieldEffectCmd_loadfadedpal -; BOOL FieldEffectCmd_loadfadedpal(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadfadedpal(u8 **script, u8 *returnValue) FieldEffectCmd_loadfadedpal: ; 80B5B74 push {lr} ldr r1, [r0] @@ -325065,7 +325066,7 @@ FieldEffectCmd_loadfadedpal: ; 80B5B74 thumb_func_end FieldEffectCmd_loadfadedpal thumb_func_start FieldEffectCmd_loadpal -; BOOL FieldEffectCmd_loadpal(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadpal(u8 **script, u8 *returnValue) FieldEffectCmd_loadpal: ; 80B5B88 push {lr} ldr r1, [r0] @@ -325078,7 +325079,7 @@ FieldEffectCmd_loadpal: ; 80B5B88 thumb_func_end FieldEffectCmd_loadpal thumb_func_start FieldEffectCmd_callnative -; BOOL FieldEffectCmd_callnative(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_callnative(u8 **script, u8 *returnValue) FieldEffectCmd_callnative: ; 80B5B9C push {lr} ldr r2, [r0] @@ -325091,14 +325092,14 @@ FieldEffectCmd_callnative: ; 80B5B9C thumb_func_end FieldEffectCmd_callnative thumb_func_start FieldEffectCmd_end -; BOOL FieldEffectCmd_end(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_end(u8 **script, u8 *returnValue) FieldEffectCmd_end: ; 80B5BB0 movs r0, 0 bx lr thumb_func_end FieldEffectCmd_end thumb_func_start FieldEffectCmd_loadgfx_callnative -; BOOL FieldEffectCmd_loadgfx_callnative(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadgfx_callnative(u8 **script, u8 *returnValue) FieldEffectCmd_loadgfx_callnative: ; 80B5BB4 push {r4,r5,lr} adds r4, r0, 0 @@ -325120,7 +325121,7 @@ FieldEffectCmd_loadgfx_callnative: ; 80B5BB4 thumb_func_end FieldEffectCmd_loadgfx_callnative thumb_func_start FieldEffectCmd_loadtiles_callnative -; BOOL FieldEffectCmd_loadtiles_callnative(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadtiles_callnative(u8 **script, u8 *returnValue) FieldEffectCmd_loadtiles_callnative: ; 80B5BDC push {r4,r5,lr} adds r4, r0, 0 @@ -325140,7 +325141,7 @@ FieldEffectCmd_loadtiles_callnative: ; 80B5BDC thumb_func_end FieldEffectCmd_loadtiles_callnative thumb_func_start FieldEffectCmd_loadfadedpal_callnative -; BOOL FieldEffectCmd_loadfadedpal_callnative(u8 **script, u8 *returnValue) +; bool8 FieldEffectCmd_loadfadedpal_callnative(u8 **script, u8 *returnValue) FieldEffectCmd_loadfadedpal_callnative: ; 80B5C00 push {r4,r5,lr} adds r4, r0, 0 @@ -334114,7 +334115,7 @@ _080BA47E: thumb_func_start sub_80BA4B0 sub_80BA4B0: ; 80BA4B0 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -336306,7 +336307,7 @@ _080BB74C: thumb_func_start sub_80BB774 sub_80BB774: ; 80BB774 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -337830,22 +337831,22 @@ _080BC56E: bl AllocZeroed adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08DC1934 movs r2, 0x80 lsls r2, 6 @@ -338117,25 +338118,25 @@ sub_80BC890: ; 80BC890 push {lr} bl FreeAllWindowBuffers movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BC8A4 bl Free _080BC8A4: movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BC8B2 bl Free _080BC8B2: movs r0, 0x2 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BC8C0 bl Free _080BC8C0: movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BC8CE bl Free @@ -342001,22 +342002,22 @@ sub_80BE91C: ; 80BE91C bl AllocZeroed adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_0856E640 bl InitWindows bl DeactivateAllTextPrinters @@ -342460,25 +342461,25 @@ sub_80BEDB0: ; 80BEDB0 push {lr} bl FreeAllWindowBuffers movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BEDC4 bl Free _080BEDC4: movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BEDD2 bl Free _080BEDD2: movs r0, 0x2 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BEDE0 bl Free _080BEDE0: movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080BEDEE bl Free @@ -344105,7 +344106,7 @@ sub_80BFD0C: ; 80BFD0C lsrs r0, 24 mov r8, r0 movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r7, r0, 0 movs r1, 0 _080BFD22: @@ -344165,7 +344166,7 @@ sub_80BFD7C: ; 80BFD7C lsrs r0, 24 mov r8, r0 movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r7, r0, 0 movs r1, 0 _080BFD92: @@ -344316,12 +344317,12 @@ _080BFE92: bl AllocZeroed adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_0856E670 bl InitWindows bl DeactivateAllTextPrinters @@ -344579,13 +344580,13 @@ blockset_load_palette_to_gpu: ; 80C012C bl SetGpuReg bl FreeAllWindowBuffers movs r0, 0x2 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C015A bl Free _080C015A: movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C0168 bl Free @@ -345657,7 +345658,7 @@ sub_80C09B0: ; 80C09B0 cmp r0, 0 bne _080C09E2 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0x8 movs r1, 0 bl SetGpuReg @@ -345675,7 +345676,7 @@ _080C09E2: cmp r0, 0 bne _080C0A0C movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0xA movs r1, 0 bl SetGpuReg @@ -345693,7 +345694,7 @@ _080C0A0C: cmp r0, 0 bne _080C0A36 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0xC movs r1, 0 bl SetGpuReg @@ -345711,7 +345712,7 @@ _080C0A36: cmp r0, 0 bne _080C0A60 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0xE movs r1, 0 bl SetGpuReg @@ -345728,7 +345729,7 @@ _080C0A60: cmp r5, 0 bne _080C0A7E movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits bl ResetAllObjectData bl ResetObjectPaletteAllocator ldr r1, =0x0300301c @@ -346906,22 +346907,22 @@ _080C1332: bl AllocZeroed adds r1, r0, 0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer adds r0, r4, 0 bl AllocZeroed adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_0856F008 bl InitWindows bl DeactivateAllTextPrinters @@ -347083,25 +347084,25 @@ sub_80C152C: ; 80C152C push {lr} bl FreeAllWindowBuffers movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C1540 bl Free _080C1540: movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C154E bl Free _080C154E: movs r0, 0x2 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C155C bl Free _080C155C: movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080C156A bl Free @@ -348048,7 +348049,7 @@ sub_80C1D98: ; 80C1D98 lsls r4, 24 lsrs r4, 24 movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r2, r0, 0 movs r3, 0 cmp r3, r4 @@ -348543,7 +348544,7 @@ sub_80C21D4: ; 80C21D4 lsls r4, 24 lsrs r4, 24 movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r5, r0, 0 cmp r4, 0 bne _080C2268 @@ -349219,7 +349220,7 @@ sub_80C26D4: ; 80C26D4 thumb_func_start sub_80C2710 sub_80C2710: ; 80C2710 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -350154,7 +350155,7 @@ _080C2F14: movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney str r0, [r5, 0x24] movs r2, 0 adds r7, r5, 0 @@ -352537,12 +352538,12 @@ _080C44D8: ldr r3, =0x00003ca8 adds r1, r3 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00005ca8 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer b _080C4536 .pool _080C4500: @@ -354395,7 +354396,7 @@ _080C5416: thumb_func_start sub_80C5438 sub_80C5438: ; 80C5438 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad pop {r0} @@ -354467,7 +354468,7 @@ _080C54D8: movs r0, 0 bl SetVBlankCallback bl remove_some_task - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull movs r0, 0x2 bl DisableInterrupts b _080C56F4 @@ -354495,17 +354496,17 @@ _080C5510: ldr r1, [r4] adds r1, 0x32 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001032 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00002032 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x2 movs r1, 0x6 movs r2, 0x1 @@ -354751,7 +354752,7 @@ _080C577C: movs r0, 0 bl SetVBlankCallback bl remove_some_task - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull b _080C57E4 _080C57A6: bl sub_80C63FC @@ -354764,11 +354765,11 @@ _080C57AC: b _080C57E4 _080C57BE: movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer bl sub_80C5340 ldr r0, =0x02039cec ldr r1, [r0] @@ -356346,7 +356347,7 @@ _080C6510: movs r0, 0 bl SetVBlankCallback bl remove_some_task - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull b _080C6694 _080C6520: bl sub_80C50D0 @@ -356368,17 +356369,17 @@ _080C6538: ldr r1, [r4] adds r1, 0x12 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001012 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00002012 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r5, 0x1E str r5, [sp] movs r4, 0x14 @@ -356557,7 +356558,7 @@ _080C6722: movs r0, 0 bl SetVBlankCallback bl remove_some_task - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull b _080C67A4 _080C6732: ldr r4, =0x02039cf4 @@ -356595,11 +356596,11 @@ _080C6774: b _080C67A4 _080C6782: movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer ldr r0, =0x02039cec ldr r1, [r0] movs r0, 0 @@ -359306,7 +359307,7 @@ sub_80C7D28: ; 80C7D28 thumb_func_start c2_Box c2_Box: ; 80C7D54 push {lr} - bl run_active_tasks + bl RunActiveTasks bl do_scheduled_bg_tilemap_copies_to_vram bl sub_80CA028 bl sub_80CAA14 @@ -363027,7 +363028,7 @@ _080C9F48: ldr r2, =c2_808CE60 movs r0, 0xB movs r1, 0 - bl sub_81AAC90 + bl GoToBagMenu _080C9F56: mov r0, r8 bl remove_task @@ -363075,7 +363076,7 @@ _080C9FB6: mov r0, sp ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item _080C9FC0: add sp, 0x4 pop {r0} @@ -363161,7 +363162,7 @@ sub_80CA044: ; 80CA044 ldr r1, [r5] adds r1, r4 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x1 bl ShowBg movs r0, 0x1 @@ -364673,7 +364674,7 @@ sub_80CAD9C: ; 80CAD9C movs r1, 0xB movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu lsls r4, 24 asrs r4, 24 adds r0, r4, 0 @@ -367461,7 +367462,7 @@ _080CC3E8: ldr r2, =0x00004ac4 adds r1, r2 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x2 bl ShowBg b _080CC458 @@ -375983,7 +375984,7 @@ sub_80D0B5C: ; 80D0B5C bl SetBgAttribute movs r0, 0x8 movs r1, 0x80 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0x20 str r0, [sp] str r0, [sp, 0x4] @@ -380534,7 +380535,7 @@ _080D2ED2: thumb_func_end sub_80D2E84 thumb_func_start sub_80D2EDC -; void *sub_80D2EDC(u16 speciesId, u32 personality, BOOL32) +; void *sub_80D2EDC(u16 speciesId, u32 personality, bool32) sub_80D2EDC: ; 80D2EDC push {r4,lr} adds r4, r2, 0 @@ -380710,7 +380711,7 @@ sub_80D3014: ; 80D3014 thumb_func_end sub_80D3014 thumb_func_start GetMonIconTiles -; void *GetMonIconTiles(u16 speciesId, BOOL32) +; void *GetMonIconTiles(u16 speciesId, bool32) GetMonIconTiles: ; 80D3020 push {lr} adds r3, r1, 0 @@ -383927,7 +383928,7 @@ HideMapNamePopUpWindow: ; 80D4974 bl RemoveMapNamePopUpWindow movs r0, 0x12 movs r1, 0 - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank ldr r0, =0x02039dd4 ldrb r0, [r0] bl remove_task @@ -384339,7 +384340,7 @@ AddBagVisualObject: ; 80D4D00 thumb_func_end AddBagVisualObject thumb_func_start SetBagVisualPocketId -; void SetBagVisualPocketId(u8 bagPocketId, BOOL isSwitchingPockets) +; void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets) SetBagVisualPocketId: ; 80D4D38 push {lr} lsls r0, 24 @@ -387567,7 +387568,7 @@ _080D66CE: thumb_func_end GetBerryCountString thumb_func_start IsBagPocketNonEmpty -; BOOL IsBagPocketNonEmpty(u8 pocketId) +; bool8 IsBagPocketNonEmpty(u8 pocketId) IsBagPocketNonEmpty: ; 80D66EC push {lr} lsls r0, 24 @@ -388056,8 +388057,9 @@ _080D6A92: bx r1 thumb_func_end bag_add_item - thumb_func_start sub_80D6AA4 -sub_80D6AA4: ; 80D6AA4 + thumb_func_start remove_item +; pokescrcmd +remove_item: ; 80D6AA4 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -388277,7 +388279,7 @@ _080D6C5A: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_80D6AA4 + thumb_func_end remove_item thumb_func_start sub_80D6C68 sub_80D6C68: ; 80D6C68 @@ -388885,8 +388887,9 @@ _080D709A: .pool thumb_func_end sub_80D7094 - thumb_func_start sub_80D70BC -sub_80D70BC: ; 80D70BC + thumb_func_start CountTotalItemQuantityInBag +; u16 CountTotalItemQuantityInBag(u16 itemId) +CountTotalItemQuantityInBag: ; 80D70BC push {r4-r7,lr} lsls r0, 16 lsrs r6, r0, 16 @@ -388926,7 +388929,7 @@ _080D70FE: pop {r1} bx r1 .pool - thumb_func_end sub_80D70BC + thumb_func_end CountTotalItemQuantityInBag thumb_func_start sub_80D710C sub_80D710C: ; 80D710C @@ -389766,7 +389769,7 @@ _080D77BA: adds r1, 0x24 adds r1, r2 ldr r1, [r1] - bl SetBgTilemap + bl SetBgTilemapBuffer adds r4, 0x1 cmp r4, 0x3 ble _080D77BA @@ -390908,7 +390911,7 @@ _080D822C: sub_80D823C: ; 80D823C push {r4,r5,lr} bl CallObjectCallbacks - bl run_active_tasks + bl RunActiveTasks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably movs r4, 0 @@ -405491,9 +405494,9 @@ _080DFA70: bx r0 thumb_func_end sub_80DFA08 - thumb_func_start CreateShopMainMenu -; s8 CreateShopMainMenu(s8 type) -CreateShopMainMenu: ; 80DFA78 + thumb_func_start CreateShopMenu +; s8 CreateShopMenu(s8 type) +CreateShopMenu: ; 80DFA78 push {r4,r5,lr} sub sp, 0x10 adds r4, r0, 0 @@ -405575,7 +405578,7 @@ _080DFAF8: pop {r1} bx r1 .pool - thumb_func_end CreateShopMainMenu + thumb_func_end CreateShopMenu thumb_func_start SetShopMenuCallback ; void SetShopMenuCallback() @@ -405617,6 +405620,7 @@ _080DFB80: thumb_func_end SetShopItemsForSale thumb_func_start Task_ShopMenu +; void Task_ShopMenu(u8 taskId) Task_ShopMenu: ; 80DFB88 push {r4,r5,lr} lsls r0, 24 @@ -405635,7 +405639,7 @@ Task_ShopMenu: ; 80DFB88 movs r0, 0x5 bl audio_play adds r0, r4, 0 - bl HandleShopQuit + bl HandleShopMenuQuit b _080DFBC4 _080DFBB4: ldr r0, =0x02039f60 @@ -405652,8 +405656,9 @@ _080DFBC4: .pool thumb_func_end Task_ShopMenu - thumb_func_start HandleShopBuy -HandleShopBuy: ; 80DFBD0 + thumb_func_start HandleShopMenuBuy +; void HandleShopMenuBuy(u8 taskId) +HandleShopMenuBuy: ; 80DFBD0 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -405662,13 +405667,13 @@ HandleShopBuy: ; 80DFBD0 lsls r1, 3 ldr r2, =0x03005e08 adds r4, r1, r2 - ldr r3, =sub_80DFD94 + ldr r3, =CB2_InitBuyMenu lsrs r0, r3, 16 strh r0, [r4, 0x10] strh r3, [r4, 0x12] subs r2, 0x8 adds r1, r2 - ldr r0, =sub_80DFCA4 + ldr r0, =Task_GoToBuyOrSellMenu str r0, [r1] movs r0, 0x1 movs r1, 0 @@ -405677,10 +405682,11 @@ HandleShopBuy: ; 80DFBD0 pop {r0} bx r0 .pool - thumb_func_end HandleShopBuy + thumb_func_end HandleShopMenuBuy - thumb_func_start HandleShopSell -HandleShopSell: ; 80DFC0C + thumb_func_start HandleShopMenuSell +; void HandleShopMenuSell(u8 taskId) +HandleShopMenuSell: ; 80DFC0C push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -405689,13 +405695,13 @@ HandleShopSell: ; 80DFC0C lsls r1, 3 ldr r2, =0x03005e08 adds r4, r1, r2 - ldr r3, =sub_81AAC00 + ldr r3, =CB2_GoToSellMenu lsrs r0, r3, 16 strh r0, [r4, 0x10] strh r3, [r4, 0x12] subs r2, 0x8 adds r1, r2 - ldr r0, =sub_80DFCA4 + ldr r0, =Task_GoToBuyOrSellMenu str r0, [r1] movs r0, 0x1 movs r1, 0 @@ -405704,23 +405710,25 @@ HandleShopSell: ; 80DFC0C pop {r0} bx r0 .pool - thumb_func_end HandleShopSell + thumb_func_end HandleShopMenuSell - thumb_func_start sub_80DFC48 -sub_80DFC48: ; 80DFC48 + thumb_func_start CB2_ExitSellMenu +; int CB2_ExitSellMenu() +CB2_ExitSellMenu: ; 80DFC48 push {lr} ldr r0, =0x03005dac - ldr r1, =sub_80DFCE0 + ldr r1, =MapPostLoadHook_ExitBuyOrSellMenu str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 pop {r0} bx r0 .pool - thumb_func_end sub_80DFC48 + thumb_func_end CB2_ExitSellMenu - thumb_func_start HandleShopQuit -HandleShopQuit: ; 80DFC68 + thumb_func_start HandleShopMenuQuit +; void HandleShopMenuQuit(u8 taskId) +HandleShopMenuQuit: ; 80DFC68 push {r4,r5,lr} adds r4, r0, 0 lsls r4, 24 @@ -405731,7 +405739,7 @@ HandleShopQuit: ; 80DFC68 bl sub_8198070 ldrb r0, [r5, 0xE] bl RemoveWindow - bl sub_80ED238 + bl SaveRecordedItemPurchasesForTVShow bl script_env_2_disable adds r0, r4, 0 bl remove_task @@ -405744,10 +405752,11 @@ _080DFC98: pop {r0} bx r0 .pool - thumb_func_end HandleShopQuit + thumb_func_end HandleShopMenuQuit - thumb_func_start sub_80DFCA4 -sub_80DFCA4: ; 80DFCA4 + thumb_func_start Task_GoToBuyOrSellMenu +; int Task_GoToBuyOrSellMenu(u8 taskId) +Task_GoToBuyOrSellMenu: ; 80DFCA4 push {r4,lr} lsls r0, 24 lsrs r2, r0, 24 @@ -405774,22 +405783,24 @@ _080DFCD2: pop {r0} bx r0 .pool - thumb_func_end sub_80DFCA4 + thumb_func_end Task_GoToBuyOrSellMenu - thumb_func_start sub_80DFCE0 -sub_80DFCE0: ; 80DFCE0 + thumb_func_start MapPostLoadHook_ExitBuyOrSellMenu +; void MapPostLoadHook_ExitBuyOrSellMenu() +MapPostLoadHook_ExitBuyOrSellMenu: ; 80DFCE0 push {lr} bl pal_fill_black - ldr r0, =sub_80DFCF8 + ldr r0, =Task_ExitSellMenu movs r1, 0x8 bl AddTask pop {r0} bx r0 .pool - thumb_func_end sub_80DFCE0 + thumb_func_end MapPostLoadHook_ExitBuyOrSellMenu - thumb_func_start sub_80DFCF8 -sub_80DFCF8: ; 80DFCF8 + thumb_func_start Task_ExitSellMenu +; void Task_ExitSellMenu(u8 taskId) +Task_ExitSellMenu: ; 80DFCF8 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -405804,14 +405815,14 @@ sub_80DFCF8: ; 80DFCF8 cmp r0, 0x2 bne _080DFD2C ldr r1, =gUnknown_085E95C7 - ldr r2, =sub_80DFD44 + ldr r2, =ReturnToShopMenuAfterExitingSellMenu adds r0, r4, 0 bl DisplayItemMessageOnField b _080DFD36 .pool _080DFD2C: ldr r1, =gUnknown_085E959B - ldr r2, =sub_80DFD44 + ldr r2, =ReturnToShopMenuAfterExitingSellMenu adds r0, r5, 0 bl DisplayItemMessageOnField _080DFD36: @@ -405819,49 +405830,53 @@ _080DFD36: pop {r0} bx r0 .pool - thumb_func_end sub_80DFCF8 + thumb_func_end Task_ExitSellMenu - thumb_func_start sub_80DFD44 -sub_80DFD44: ; 80DFD44 + thumb_func_start ReturnToShopMenuAfterExitingSellMenu +; void ReturnToShopMenuAfterExitingSellMenu(u8 taskId) +ReturnToShopMenuAfterExitingSellMenu: ; 80DFD44 push {r4,lr} adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 ldr r0, =0x02039f60 ldrb r0, [r0, 0xF] - bl CreateShopMainMenu + bl CreateShopMenu adds r0, r4, 0 bl remove_task pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80DFD44 + thumb_func_end ReturnToShopMenuAfterExitingSellMenu - thumb_func_start sub_80DFD64 -sub_80DFD64: ; 80DFD64 + thumb_func_start CB2_BuyMenu +; void CB2_BuyMenu() +CB2_BuyMenu: ; 80DFD64 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram bl fade_and_return_progress_probably pop {r0} bx r0 - thumb_func_end sub_80DFD64 + thumb_func_end CB2_BuyMenu - thumb_func_start sub_80DFD80 -sub_80DFD80: ; 80DFD80 + thumb_func_start VBlankCB_BuyMenu +; void VBlankCB_BuyMenu() +VBlankCB_BuyMenu: ; 80DFD80 push {lr} bl LoadOamFromSprites bl ProcessObjectCopyRequests bl copy_pal_bg_faded_to_pal_ram pop {r0} bx r0 - thumb_func_end sub_80DFD80 + thumb_func_end VBlankCB_BuyMenu - thumb_func_start sub_80DFD94 -sub_80DFD94: ; 80DFD94 + thumb_func_start CB2_InitBuyMenu +; void CB2_InitBuyMenu() +CB2_InitBuyMenu: ; 80DFD94 push {r4,r5,lr} sub sp, 0xC ldr r0, =0x030022c0 @@ -405875,9 +405890,9 @@ sub_80DFD94: ; 80DFD94 bne _080DFDAC b _080DFEE4 _080DFDAC: - bl CreateShopMoneyBox - bl sub_80E01C8 - ldr r0, =sub_80E0AC8 + bl BuyMenuDrawGraphics + bl BuyMenuAddScrollIndicatorArrows + ldr r0, =Task_BuyMenu movs r1, 0x8 bl AddTask adds r4, r0, 0 @@ -405886,7 +405901,7 @@ _080DFDAC: ldr r0, =0x03006310 movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit ldr r2, =0x03005e00 lsls r1, r4, 2 adds r1, r4 @@ -405908,14 +405923,14 @@ _080DFDAC: movs r2, 0x10 movs r3, 0 bl pal_fade_maybe - ldr r0, =sub_80DFD80 + ldr r0, =VBlankCB_BuyMenu bl SetVBlankCallback - ldr r0, =sub_80DFD64 + ldr r0, =CB2_BuyMenu bl SetMainCallback2 b _080DFEF4 .pool _080DFE20: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull str r4, [sp, 0x8] movs r1, 0xE0 lsls r1, 19 @@ -405949,8 +405964,8 @@ _080DFE20: movs r1, 0x1 negs r1, r1 strb r1, [r0] - bl GetShopItemNames - bl sub_80E036C + bl BuyMenuBuildListMenuTemplate + bl BuyMenuInitBgs movs r4, 0x20 str r4, [sp] str r4, [sp, 0x4] @@ -405980,8 +405995,8 @@ _080DFE20: movs r2, 0 movs r3, 0 bl FillBgTilemapBufferRect_Palette0 - bl sub_80E0468 - bl sub_80E0424 + bl BuyMenuInitWindows + bl BuyMenuDecompressBgGraphics b _080DFEEE .pool _080DFEE4: @@ -405998,10 +406013,11 @@ _080DFEF4: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_80DFD94 + thumb_func_end CB2_InitBuyMenu - thumb_func_start FreeShopItemNames -FreeShopItemNames: ; 80DFEFC + thumb_func_start BuyMenuFreeMemory +; void BuyMenuFreeMemory() +BuyMenuFreeMemory: ; 80DFEFC push {lr} ldr r0, =0x02039f70 ldr r0, [r0] @@ -406016,10 +406032,11 @@ FreeShopItemNames: ; 80DFEFC pop {r0} bx r0 .pool - thumb_func_end FreeShopItemNames + thumb_func_end BuyMenuFreeMemory - thumb_func_start GetShopItemNames -GetShopItemNames: ; 80DFF2C + thumb_func_start BuyMenuBuildListMenuTemplate +; void BuyMenuBuildListMenuTemplate() +BuyMenuBuildListMenuTemplate: ; 80DFF2C push {r4-r7,lr} ldr r7, =0x02039f74 ldr r4, =0x02039f60 @@ -406049,7 +406066,7 @@ _080DFF54: lsls r3, r6, 4 ldr r2, [r5] adds r2, r3 - bl GetShopItemName + bl BuyMenuSetListEntry adds r0, r6, 0x1 lsls r0, 16 lsrs r6, r0, 16 @@ -406108,11 +406125,11 @@ _080DFFDE: pop {r0} bx r0 .pool - thumb_func_end GetShopItemNames + thumb_func_end BuyMenuBuildListMenuTemplate - thumb_func_start GetShopItemName -; void GetShopItemName(ShopItem *items1, s16 itemId, char *name) -GetShopItemName: ; 80E0000 + thumb_func_start BuyMenuSetListEntry +; void BuyMenuSetListEntry(struct ListMenuEntry *entry, u16 code, u8 *str) +BuyMenuSetListEntry: ; 80E0000 push {r4-r6,lr} adds r6, r0, 0 adds r5, r2, 0 @@ -406140,10 +406157,11 @@ _080E002C: pop {r0} bx r0 .pool - thumb_func_end GetShopItemName + thumb_func_end BuyMenuSetListEntry - thumb_func_start PrintShopItemDescription -PrintShopItemDescription: ; 80E003C + thumb_func_start BuyMenuPrintItemDescriptionAndShowItemIcon +; void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 menuEntryCode, bool8 isInitialSelection, struct ListMenu *listMenu) +BuyMenuPrintItemDescriptionAndShowItemIcon: ; 80E003C push {r4-r7,lr} mov r7, r8 push {r7} @@ -406167,7 +406185,7 @@ _080E0054: ldr r2, =0x0000200c adds r1, r2 ldrb r1, [r1] - bl AddItemIconObjectInShop + bl BuyMenuAddItemIcon b _080E008A .pool _080E0078: @@ -406177,7 +406195,7 @@ _080E0078: ldr r2, =0x0000200c adds r1, r2 ldrb r1, [r1] - bl AddItemIconObjectInShop + bl BuyMenuAddItemIcon lsls r4, r7, 16 _080E008A: lsrs r4, 16 @@ -406191,7 +406209,7 @@ _080E008A: adds r1, r4, 0 eors r1, r0 mov r0, r8 - bl sub_80E031C + bl BuyMenuRemoveItemIcon ldr r1, [r6] adds r1, r5 ldrb r0, [r1] @@ -406231,7 +406249,7 @@ _080E00EA: adds r1, r4, 0 movs r2, 0x3 movs r3, 0x1 - bl sub_80E04A4 + bl BuyMenuPrint add sp, 0x8 pop {r3} mov r8, r3 @@ -406239,10 +406257,11 @@ _080E00EA: pop {r0} bx r0 .pool - thumb_func_end PrintShopItemDescription + thumb_func_end BuyMenuPrintItemDescriptionAndShowItemIcon - thumb_func_start PrintShopBuyPrice -PrintShopBuyPrice: ; 80E0114 + thumb_func_start BuyMenuPrintPriceInList +; void BuyMenuPrintPriceInList(u8 windowId, s32 menuEntryCode, u8 y) +BuyMenuPrintPriceInList: ; 80E0114 push {r4-r7,lr} sub sp, 0x14 lsls r0, 24 @@ -406263,7 +406282,7 @@ PrintShopBuyPrice: ; 80E0114 bl itemid_get_market_price adds r4, r0, 0 movs r0, 0x1 - bl sub_80EF038 + bl GetPriceReduction lsls r4, 16 lsrs r4, 16 lsls r0, 24 @@ -406316,10 +406335,11 @@ _080E01AC: pop {r0} bx r0 .pool - thumb_func_end PrintShopBuyPrice + thumb_func_end BuyMenuPrintPriceInList - thumb_func_start sub_80E01C8 -sub_80E01C8: ; 80E01C8 + thumb_func_start BuyMenuAddScrollIndicatorArrows +; void BuyMenuAddScrollIndicatorArrows() +BuyMenuAddScrollIndicatorArrows: ; 80E01C8 push {r4,r5,lr} sub sp, 0x10 ldr r5, =0x02039f70 @@ -406346,7 +406366,7 @@ sub_80E01C8: ; 80E01C8 movs r1, 0xAC movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized ldr r1, [r5] adds r1, r4 strb r0, [r1] @@ -406356,10 +406376,11 @@ _080E0206: pop {r0} bx r0 .pool - thumb_func_end sub_80E01C8 + thumb_func_end BuyMenuAddScrollIndicatorArrows - thumb_func_start sub_80E0224 -sub_80E0224: ; 80E0224 + thumb_func_start BuyMenuRemoveScrollIndicatorArrows +; void BuyMenuRemoveScrollIndicatorArrows() +BuyMenuRemoveScrollIndicatorArrows: ; 80E0224 push {r4,lr} ldr r4, =0x02039f70 ldr r0, [r4] @@ -406368,7 +406389,7 @@ sub_80E0224: ; 80E0224 ldrb r0, [r1] cmp r0, 0xFF beq _080E0242 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x0000200b adds r0, r1 @@ -406379,10 +406400,11 @@ _080E0242: pop {r0} bx r0 .pool - thumb_func_end sub_80E0224 + thumb_func_end BuyMenuRemoveScrollIndicatorArrows - thumb_func_start sub_80E0250 -sub_80E0250: ; 80E0250 + thumb_func_start BuyMenuPrintCursor +; void BuyMenuPrintCursor(u8 taskId, u8 colorSetId) +BuyMenuPrintCursor: ; 80E0250 push {r4,lr} sub sp, 0x8 adds r4, r1, 0 @@ -406390,7 +406412,7 @@ sub_80E0250: ; 80E0250 lsrs r0, 24 lsls r4, 24 lsrs r4, 24 - bl sub_81AE88C + bl ListMenuGetYCoordForPrintingArrowCursor adds r3, r0, 0 lsls r3, 24 lsrs r3, 24 @@ -406400,16 +406422,17 @@ sub_80E0250: ; 80E0250 str r4, [sp, 0x4] movs r0, 0x1 movs r2, 0 - bl sub_80E04A4 + bl BuyMenuPrint add sp, 0x8 pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80E0250 + thumb_func_end BuyMenuPrintCursor - thumb_func_start AddItemIconObjectInShop -AddItemIconObjectInShop: ; 80E0284 + thumb_func_start BuyMenuAddItemIcon +; void BuyMenuAddItemIcon(u16 id, u8 iconSlot) +BuyMenuAddItemIcon: ; 80E0284 push {r4,lr} sub sp, 0x8 lsls r0, 16 @@ -406474,10 +406497,11 @@ _080E0310: pop {r0} bx r0 .pool - thumb_func_end AddItemIconObjectInShop + thumb_func_end BuyMenuAddItemIcon - thumb_func_start sub_80E031C -sub_80E031C: ; 80E031C + thumb_func_start BuyMenuRemoveItemIcon +; void BuyMenuRemoveItemIcon(u16 id, u8 iconSlot) +BuyMenuRemoveItemIcon: ; 80E031C push {r4,r5,lr} lsls r1, 24 lsrs r4, r1, 24 @@ -406509,10 +406533,11 @@ _080E0356: pop {r0} bx r0 .pool - thumb_func_end sub_80E031C + thumb_func_end BuyMenuRemoveItemIcon - thumb_func_start sub_80E036C -sub_80E036C: ; 80E036C + thumb_func_start BuyMenuInitBgs +; void BuyMenuInitBgs() +BuyMenuInitBgs: ; 80E036C push {r4,lr} movs r0, 0 bl ResetBgsAndClearDma3BusyFlags @@ -406526,19 +406551,19 @@ sub_80E036C: ; 80E036C lsls r0, 4 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0xC0 lsls r0, 5 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0x80 lsls r0, 5 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x10 movs r1, 0 bl SetGpuReg @@ -406582,10 +406607,11 @@ sub_80E036C: ; 80E036C pop {r0} bx r0 .pool - thumb_func_end sub_80E036C + thumb_func_end BuyMenuInitBgs - thumb_func_start sub_80E0424 -sub_80E0424: ; 80E0424 + thumb_func_start BuyMenuDecompressBgGraphics +; void BuyMenuDecompressBgGraphics() +BuyMenuDecompressBgGraphics: ; 80E0424 push {lr} sub sp, 0x4 ldr r1, =gUnknown_08D9AFBC @@ -406608,10 +406634,11 @@ sub_80E0424: ; 80E0424 pop {r0} bx r0 .pool - thumb_func_end sub_80E0424 + thumb_func_end BuyMenuDecompressBgGraphics - thumb_func_start sub_80E0468 -sub_80E0468: ; 80E0468 + thumb_func_start BuyMenuInitWindows +; void BuyMenuInitWindows() +BuyMenuInitWindows: ; 80E0468 push {lr} ldr r0, =gUnknown_08589A70 bl InitWindows @@ -406633,10 +406660,11 @@ sub_80E0468: ; 80E0468 pop {r0} bx r0 .pool - thumb_func_end sub_80E0468 + thumb_func_end BuyMenuInitWindows - thumb_func_start sub_80E04A4 -sub_80E04A4: ; 80E04A4 + thumb_func_start BuyMenuPrint +; void BuyMenuPrint(u8 windowId, u8 *str, u8 x, u8 y, u8 speed, u8 colorSetId) +BuyMenuPrint: ; 80E04A4 push {r4-r6,lr} sub sp, 0x14 ldr r6, [sp, 0x24] @@ -406668,10 +406696,11 @@ sub_80E04A4: ; 80E04A4 pop {r0} bx r0 .pool - thumb_func_end sub_80E04A4 + thumb_func_end BuyMenuPrint - thumb_func_start sub_80E04E8 -sub_80E04E8: ; 80E04E8 + thumb_func_start BuyMenuDisplayMessage +; void BuyMenuDisplayMessage(u8 taskId, u8 *str, void ( *callback)(u8 taskId)) +BuyMenuDisplayMessage: ; 80E04E8 push {r4-r6,lr} sub sp, 0x10 adds r4, r0, 0 @@ -406698,22 +406727,23 @@ sub_80E04E8: ; 80E04E8 pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_80E04E8 + thumb_func_end BuyMenuDisplayMessage - thumb_func_start CreateShopMoneyBox -CreateShopMoneyBox: ; 80E0524 + thumb_func_start BuyMenuDrawGraphics +; void BuyMenuDrawGraphics() +BuyMenuDrawGraphics: ; 80E0524 push {lr} - bl sub_80E0570 - bl sub_80E0A40 + bl BuyMenuDrawMapGraphics + bl BuyMenuCopyMenuBgToBg1TilemapBuffer movs r0, 0x13 movs r1, 0xB - bl AddMoneyTextObject + bl AddMoneyLabelObject ldr r0, =0x03005d8c ldr r0, [r0] movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney adds r3, r0, 0 movs r0, 0 movs r1, 0x1 @@ -406730,20 +406760,22 @@ CreateShopMoneyBox: ; 80E0524 pop {r0} bx r0 .pool - thumb_func_end CreateShopMoneyBox + thumb_func_end BuyMenuDrawGraphics - thumb_func_start sub_80E0570 -sub_80E0570: ; 80E0570 + thumb_func_start BuyMenuDrawMapGraphics +; void BuyMenuDrawMapGraphics() +BuyMenuDrawMapGraphics: ; 80E0570 push {lr} - bl sub_80E075C - bl sub_80E08F0 - bl sub_80E0584 + bl BuyMenuCollectFieldObjectData + bl BuyMenuDrawFieldObjects + bl BuyMenuDrawMapBg pop {r0} bx r0 - thumb_func_end sub_80E0570 + thumb_func_end BuyMenuDrawMapGraphics - thumb_func_start sub_80E0584 -sub_80E0584: ; 80E0584 + thumb_func_start BuyMenuDrawMapBg +; void BuyMenuDrawMapBg() +BuyMenuDrawMapBg: ; 80E0584 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -406789,7 +406821,7 @@ _080E05BE: lsrs r6, r0, 16 adds r0, r5, 0 mov r1, r8 - bl sub_80E0A88 + bl BuyMenuCheckForOverlapWithMenuBg lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -406821,7 +406853,7 @@ _080E060A: adds r2, r3 asrs r1, r7, 16 adds r3, r5, 0 - bl sub_80E0670 + bl BuyMenuDrawMapMetatile b _080E0644 .pool _080E062C: @@ -406835,7 +406867,7 @@ _080E062C: adds r2, r1 asrs r1, r7, 16 adds r3, r5, 0 - bl sub_80E0670 + bl BuyMenuDrawMapMetatile _080E0644: movs r1, 0x80 lsls r1, 9 @@ -406858,10 +406890,11 @@ _080E0644: pop {r0} bx r0 .pool - thumb_func_end sub_80E0584 + thumb_func_end BuyMenuDrawMapBg - thumb_func_start sub_80E0670 -sub_80E0670: ; 80E0670 + thumb_func_start BuyMenuDrawMapMetatile +; void BuyMenuDrawMapMetatile(u16 x, u16 y, u16 *src, u8 metatileLayerType) +BuyMenuDrawMapMetatile: ; 80E0670 push {r4-r7,lr} adds r7, r2, 0 lsls r3, 24 @@ -406895,7 +406928,7 @@ _080E0696: adds r1, r5, 0 adds r2, r4, 0 adds r3, r7, 0 - bl sub_80E0734 + bl BuyMenuDrawMapMetatileLayer ldr r0, [r6] movs r1, 0x80 lsls r1, 4 @@ -406914,7 +406947,7 @@ _080E06C0: adds r1, r5, 0 adds r2, r4, 0 adds r3, r7, 0 - bl sub_80E0734 + bl BuyMenuDrawMapMetatileLayer ldr r0, [r6] movs r1, 0xC0 lsls r1, 5 @@ -406924,7 +406957,7 @@ _080E06E2: adds r3, 0x8 adds r1, r5, 0 adds r2, r4, 0 - bl sub_80E0734 + bl BuyMenuDrawMapMetatileLayer b _080E0728 .pool _080E06F8: @@ -406940,7 +406973,7 @@ _080E06F8: adds r1, r5, 0 adds r2, r4, 0 adds r3, r7, 0 - bl sub_80E0734 + bl BuyMenuDrawMapMetatileLayer ldr r0, [r6] movs r1, 0x80 lsls r1, 4 @@ -406949,16 +406982,17 @@ _080E06F8: adds r3, 0x8 adds r1, r5, 0 adds r2, r4, 0 - bl sub_80E0734 + bl BuyMenuDrawMapMetatileLayer _080E0728: pop {r4-r7} pop {r0} bx r0 .pool - thumb_func_end sub_80E0670 + thumb_func_end BuyMenuDrawMapMetatile - thumb_func_start sub_80E0734 -sub_80E0734: ; 80E0734 + thumb_func_start BuyMenuDrawMapMetatileLayer +; int BuyMenuDrawMapMetatileLayer(void *tilemapBuffer, s16 xOffset, s16 yOffset, u16 *src) +BuyMenuDrawMapMetatileLayer: ; 80E0734 lsls r1, 16 asrs r1, 16 lsls r2, 16 @@ -406978,10 +407012,11 @@ sub_80E0734: ; 80E0734 ldrh r0, [r3, 0x6] strh r0, [r1] bx lr - thumb_func_end sub_80E0734 + thumb_func_end BuyMenuDrawMapMetatileLayer - thumb_func_start sub_80E075C -sub_80E075C: ; 80E075C + thumb_func_start BuyMenuCollectFieldObjectData +; void BuyMenuCollectFieldObjectData() +BuyMenuCollectFieldObjectData: ; 80E075C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -407170,10 +407205,11 @@ _080E08DA: pop {r0} bx r0 .pool - thumb_func_end sub_80E075C + thumb_func_end BuyMenuCollectFieldObjectData - thumb_func_start sub_80E08F0 -sub_80E08F0: ; 80E08F0 + thumb_func_start BuyMenuDrawFieldObjects +; void BuyMenuDrawFieldObjects() +BuyMenuDrawFieldObjects: ; 80E08F0 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -407254,7 +407290,7 @@ _080E090A: mov r3, r8 ldr r0, [r3] adds r0, r1 - bl sub_80E0A14 + bl BuyMenuCheckIfFieldObjectOverlapsMenuBg lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -407303,10 +407339,10 @@ _080E09D8: pop {r0} bx r0 .pool - thumb_func_end sub_80E08F0 + thumb_func_end BuyMenuDrawFieldObjects - thumb_func_start sub_80E0A14 -sub_80E0A14: ; 80E0A14 + thumb_func_start BuyMenuCheckIfFieldObjectOverlapsMenuBg +BuyMenuCheckIfFieldObjectOverlapsMenuBg: ; 80E0A14 push {r4,lr} adds r4, r0, 0 movs r1, 0x2 @@ -407314,7 +407350,7 @@ sub_80E0A14: ; 80E0A14 movs r2, 0x4 ldrsh r1, [r4, r2] adds r1, 0x2 - bl sub_80E0A88 + bl BuyMenuCheckForOverlapWithMenuBg lsls r0, 24 cmp r0, 0 bne _080E0A38 @@ -407330,10 +407366,11 @@ _080E0A3A: pop {r4} pop {r1} bx r1 - thumb_func_end sub_80E0A14 + thumb_func_end BuyMenuCheckIfFieldObjectOverlapsMenuBg - thumb_func_start sub_80E0A40 -sub_80E0A40: ; 80E0A40 + thumb_func_start BuyMenuCopyMenuBgToBg1TilemapBuffer +; void BuyMenuCopyMenuBgToBg1TilemapBuffer() +BuyMenuCopyMenuBgToBg1TilemapBuffer: ; 80E0A40 push {r4-r6,lr} ldr r0, =0x02039f70 ldr r0, [r0] @@ -407367,10 +407404,11 @@ _080E0A6A: pop {r0} bx r0 .pool - thumb_func_end sub_80E0A40 + thumb_func_end BuyMenuCopyMenuBgToBg1TilemapBuffer - thumb_func_start sub_80E0A88 -sub_80E0A88: ; 80E0A88 + thumb_func_start BuyMenuCheckForOverlapWithMenuBg +; bool8 BuyMenuCheckForOverlapWithMenuBg(u16 x, u16 y) +BuyMenuCheckForOverlapWithMenuBg: ; 80E0A88 push {lr} ldr r2, =0x02039f70 ldr r2, [r2] @@ -407403,10 +407441,11 @@ _080E0AC0: _080E0AC2: pop {r1} bx r1 - thumb_func_end sub_80E0A88 + thumb_func_end BuyMenuCheckForOverlapWithMenuBg - thumb_func_start sub_80E0AC8 -sub_80E0AC8: ; 80E0AC8 + thumb_func_start Task_BuyMenu +; void Task_BuyMenu(u8 taskId) +Task_BuyMenu: ; 80E0AC8 push {r4-r7,lr} mov r7, r8 push {r7} @@ -407426,7 +407465,7 @@ sub_80E0AC8: ; 80E0AC8 b _080E0C8E _080E0AEA: ldrb r0, [r4, 0xE] - bl sub_81AE604 + bl ListMenuHandleInput adds r5, r0, 0 ldrb r0, [r4, 0xE] ldr r7, =0x02039f70 @@ -407449,7 +407488,7 @@ _080E0B24: movs r0, 0x5 bl audio_play adds r0, r6, 0 - bl sub_80E1168 + bl ExitBuyMenu b _080E0C8E _080E0B32: movs r0, 0x5 @@ -407457,10 +407496,10 @@ _080E0B32: strh r5, [r4, 0xA] movs r0, 0x2 bl ClearWindowTilemap - bl sub_80E0224 + bl BuyMenuRemoveScrollIndicatorArrows ldrb r0, [r4, 0xE] movs r1, 0x2 - bl sub_80E0250 + bl BuyMenuPrintCursor ldr r0, =0x02039f60 ldrb r0, [r0, 0xF] cmp r0, 0 @@ -407470,7 +407509,7 @@ _080E0B32: bl itemid_get_market_price adds r4, r0, 0 movs r0, 0x1 - bl sub_80EF038 + bl GetPriceReduction ldr r1, [r7] movs r2, 0x80 lsls r2, 6 @@ -407506,12 +407545,12 @@ _080E0B92: lsls r7, 6 adds r1, r7 ldr r1, [r1] - bl is_money_greater_than + bl IsEnoughMoney lsls r0, 24 cmp r0, 0 bne _080E0BD0 ldr r1, =gUnknown_085E9539 - ldr r2, =sub_80E10A0 + ldr r2, =BuyMenuReturnToItemList b _080E0C28 .pool _080E0BD0: @@ -407532,7 +407571,7 @@ _080E0BD0: bne _080E0C24 ldr r4, =0x02021dc4 adds r0, r5, 0 - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r0, 16 movs r1, 0xD @@ -407547,10 +407586,10 @@ _080E0BD0: _080E0C24: ldr r1, =gUnknown_085E93EF _080E0C26: - ldr r2, =sub_80E0CA4 + ldr r2, =Task_BuyHowManyDialogueInit _080E0C28: adds r0, r6, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage b _080E0C8E .pool _080E0C38: @@ -407581,9 +407620,9 @@ _080E0C7C: bl ExpandStringRefs _080E0C84: ldr r1, =0x02021fc4 - ldr r2, =sub_80E0EAC + ldr r2, =BuyMenuConfirmPurchase adds r0, r6, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage _080E0C8E: pop {r3} mov r8, r3 @@ -407591,10 +407630,11 @@ _080E0C8E: pop {r0} bx r0 .pool - thumb_func_end sub_80E0AC8 + thumb_func_end Task_BuyMenu - thumb_func_start sub_80E0CA4 -sub_80E0CA4: ; 80E0CA4 + thumb_func_start Task_BuyHowManyDialogueInit +; void Task_BuyHowManyDialogueInit(u8 taskId) +Task_BuyHowManyDialogueInit: ; 80E0CA4 push {r4-r6,lr} sub sp, 0x8 lsls r0, 24 @@ -407605,7 +407645,7 @@ sub_80E0CA4: ; 80E0CA4 ldr r0, =0x03005e08 adds r5, r0 ldrh r0, [r5, 0xA] - bl sub_80D70BC + bl CountTotalItemQuantityInBag adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -407630,7 +407670,7 @@ sub_80E0CA4: ; 80E0CA4 adds r1, r4, 0 movs r2, 0 movs r3, 0x1 - bl sub_80E04A4 + bl BuyMenuPrint movs r0, 0x1 strh r0, [r5, 0x2] movs r0, 0x4 @@ -407639,7 +407679,7 @@ sub_80E0CA4: ; 80E0CA4 movs r3, 0xD bl SetWindowBorderStyle adds r0, r6, 0 - bl sub_80E10EC + bl BuyMenuPrintItemQuantityAndPrice movs r0, 0 bl schedule_bg_copy_tilemap_to_vram ldr r0, =0x03005d8c @@ -407647,7 +407687,7 @@ sub_80E0CA4: ; 80E0CA4 movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney ldr r1, =0x02039f70 ldr r4, [r1] movs r2, 0x80 @@ -407675,17 +407715,18 @@ _080E0D66: adds r1, r6 lsls r1, 3 adds r1, r0 - ldr r0, =sub_80E0D88 + ldr r0, =Task_BuyHowManyDialogueHandleInput str r0, [r1] add sp, 0x8 pop {r4-r6} pop {r0} bx r0 .pool - thumb_func_end sub_80E0CA4 + thumb_func_end Task_BuyHowManyDialogueInit - thumb_func_start sub_80E0D88 -sub_80E0D88: ; 80E0D88 + thumb_func_start Task_BuyHowManyDialogueHandleInput +; void Task_BuyHowManyDialogueHandleInput(u8 taskId) +Task_BuyHowManyDialogueHandleInput: ; 80E0D88 push {r4-r7,lr} lsls r0, 24 lsrs r6, r0, 24 @@ -407701,7 +407742,7 @@ sub_80E0D88: ; 80E0D88 ldr r2, =0x0000200a adds r1, r2 ldrb r1, [r1] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -407710,7 +407751,7 @@ sub_80E0D88: ; 80E0D88 bl itemid_get_market_price adds r4, r0, 0 movs r0, 0x1 - bl sub_80EF038 + bl GetPriceReduction ldr r1, [r7] movs r2, 0x80 lsls r2, 6 @@ -407725,7 +407766,7 @@ sub_80E0D88: ; 80E0D88 muls r0, r4 str r0, [r1] adds r0, r6, 0 - bl sub_80E10EC + bl BuyMenuPrintItemQuantityAndPrice b _080E0EA4 .pool _080E0DF0: @@ -407768,9 +407809,9 @@ _080E0DF0: movs r3, 0x6 bl ConvertIntToDecimalString ldr r1, =gUnknown_085E943F - ldr r2, =sub_80E0EAC + ldr r2, =BuyMenuConfirmPurchase adds r0, r6, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage b _080E0EA4 .pool _080E0E74: @@ -407791,15 +407832,16 @@ _080E0E74: movs r0, 0x3 bl ClearWindowTilemap adds r0, r4, 0 - bl sub_80E10A0 + bl BuyMenuReturnToItemList _080E0EA4: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_80E0D88 + thumb_func_end Task_BuyHowManyDialogueHandleInput - thumb_func_start sub_80E0EAC -sub_80E0EAC: ; 80E0EAC + thumb_func_start BuyMenuConfirmPurchase +; void BuyMenuConfirmPurchase(u8 taskId) +BuyMenuConfirmPurchase: ; 80E0EAC push {lr} sub sp, 0x10 lsls r0, 24 @@ -407815,15 +407857,16 @@ sub_80E0EAC: ; 80E0EAC str r2, [sp, 0xC] movs r2, 0x1 movs r3, 0 - bl sub_8121F94 + bl CreateYesNoMenuWithCallbacks add sp, 0x10 pop {r0} bx r0 .pool - thumb_func_end sub_80E0EAC + thumb_func_end BuyMenuConfirmPurchase - thumb_func_start sub_80E0EDC -sub_80E0EDC: ; 80E0EDC + thumb_func_start BuyMenuTryMakePurchase +; void BuyMenuTryMakePurchase(u8 taskId) +BuyMenuTryMakePurchase: ; 80E0EDC push {r4-r7,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -407847,21 +407890,21 @@ sub_80E0EDC: ; 80E0EDC cmp r0, 0x1 bne _080E0F30 ldr r1, =gUnknown_085E94C5 - ldr r2, =sub_80E0F88 + ldr r2, =BuyMenuSubtractMoney adds r0, r5, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage adds r0, r5, 0 - bl sub_80E1204 + bl RecordItemPurchase b _080E0F7A .pool _080E0F30: ldr r1, =gUnknown_085E9558 - ldr r2, =sub_80E10A0 + ldr r2, =BuyMenuReturnToItemList b _080E0F60 .pool _080E0F40: ldrb r0, [r4, 0xA] - bl sub_8161960 + bl IsThereStorageSpaceForDecoration lsls r0, 24 cmp r0, 0 beq _080E0F70 @@ -407874,26 +407917,27 @@ _080E0F40: _080E0F5C: ldr r1, =gUnknown_085E9510 _080E0F5E: - ldr r2, =sub_80E0F88 + ldr r2, =BuyMenuSubtractMoney _080E0F60: adds r0, r5, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage b _080E0F7A .pool _080E0F70: ldr r1, =gUnknown_085E957F - ldr r2, =sub_80E10A0 + ldr r2, =BuyMenuReturnToItemList adds r0, r7, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage _080E0F7A: pop {r4-r7} pop {r0} bx r0 .pool - thumb_func_end sub_80E0EDC + thumb_func_end BuyMenuTryMakePurchase - thumb_func_start sub_80E0F88 -sub_80E0F88: ; 80E0F88 + thumb_func_start BuyMenuSubtractMoney +; void BuyMenuSubtractMoney(u8 taskId) +BuyMenuSubtractMoney: ; 80E0F88 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 @@ -407915,7 +407959,7 @@ sub_80E0F88: ; 80E0F88 bl audio_play ldr r0, [r5] adds r0, r4 - bl decrypt_money + bl DecryptMoney adds r1, r0, 0 movs r0, 0 movs r2, 0 @@ -407929,7 +407973,7 @@ sub_80E0F88: ; 80E0F88 adds r1, r6 lsls r1, 3 adds r1, r0 - ldr r0, =sub_80E100C + ldr r0, =Task_ReturnToItemListAfterItemPurchase b _080E0FFC .pool _080E0FF0: @@ -407938,17 +407982,18 @@ _080E0FF0: adds r1, r6 lsls r1, 3 adds r1, r0 - ldr r0, =sub_80E1078 + ldr r0, =Task_ReturnToItemListAfterDecorationPurchase _080E0FFC: str r0, [r1] pop {r4-r6} pop {r0} bx r0 .pool - thumb_func_end sub_80E0F88 + thumb_func_end BuyMenuSubtractMoney - thumb_func_start sub_80E100C -sub_80E100C: ; 80E100C + thumb_func_start Task_ReturnToItemListAfterItemPurchase +; void Task_ReturnToItemListAfterItemPurchase(u8 taskId) +Task_ReturnToItemListAfterItemPurchase: ; 80E100C push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -407981,22 +408026,23 @@ sub_80E100C: ; 80E100C cmp r0, 0x1 bne _080E106C ldr r1, =gUnknown_085E95EA - ldr r2, =sub_80E10A0 + ldr r2, =BuyMenuReturnToItemList adds r0, r4, 0 - bl sub_80E04E8 + bl BuyMenuDisplayMessage b _080E1072 .pool _080E106C: adds r0, r4, 0 - bl sub_80E10A0 + bl BuyMenuReturnToItemList _080E1072: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_80E100C + thumb_func_end Task_ReturnToItemListAfterItemPurchase - thumb_func_start sub_80E1078 -sub_80E1078: ; 80E1078 + thumb_func_start Task_ReturnToItemListAfterDecorationPurchase +; void Task_ReturnToItemListAfterDecorationPurchase(u8 taskId) +Task_ReturnToItemListAfterDecorationPurchase: ; 80E1078 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -408009,16 +408055,17 @@ sub_80E1078: ; 80E1078 movs r0, 0x5 bl audio_play adds r0, r4, 0 - bl sub_80E10A0 + bl BuyMenuReturnToItemList _080E1096: pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80E1078 + thumb_func_end Task_ReturnToItemListAfterDecorationPurchase - thumb_func_start sub_80E10A0 -sub_80E10A0: ; 80E10A0 + thumb_func_start BuyMenuReturnToItemList +; void BuyMenuReturnToItemList(u8 taskId) +BuyMenuReturnToItemList: ; 80E10A0 push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 @@ -408032,26 +408079,27 @@ sub_80E10A0: ; 80E10A0 bl sub_8197DF8 ldrb r0, [r6, 0xE] movs r1, 0x1 - bl sub_80E0250 + bl BuyMenuPrintCursor movs r0, 0x1 bl PutWindowTilemap movs r0, 0x2 bl PutWindowTilemap movs r0, 0 bl schedule_bg_copy_tilemap_to_vram - bl sub_80E01C8 + bl BuyMenuAddScrollIndicatorArrows subs r5, 0x8 adds r4, r5 - ldr r0, =sub_80E0AC8 + ldr r0, =Task_BuyMenu str r0, [r4] pop {r4-r6} pop {r0} bx r0 .pool - thumb_func_end sub_80E10A0 + thumb_func_end BuyMenuReturnToItemList - thumb_func_start sub_80E10EC -sub_80E10EC: ; 80E10EC + thumb_func_start BuyMenuPrintItemQuantityAndPrice +; void BuyMenuPrintItemQuantityAndPrice(u8 taskId) +BuyMenuPrintItemQuantityAndPrice: ; 80E10EC push {r4,lr} sub sp, 0x8 lsls r0, 24 @@ -408093,23 +408141,24 @@ sub_80E10EC: ; 80E10EC adds r1, r4, 0 movs r2, 0 movs r3, 0x1 - bl sub_80E04A4 + bl BuyMenuPrint add sp, 0x8 pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80E10EC + thumb_func_end BuyMenuPrintItemQuantityAndPrice - thumb_func_start sub_80E1168 -sub_80E1168: ; 80E1168 + thumb_func_start ExitBuyMenu +; void ExitBuyMenu(u8 taskId) +ExitBuyMenu: ; 80E1168 push {r4,lr} sub sp, 0x4 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 ldr r1, =0x03005dac - ldr r0, =sub_80DFCE0 + ldr r0, =MapPostLoadHook_ExitBuyOrSellMenu str r0, [r1] movs r0, 0x1 negs r0, r0 @@ -408123,17 +408172,18 @@ sub_80E1168: ; 80E1168 adds r0, r4 lsls r0, 3 adds r0, r1 - ldr r1, =sub_80E11B0 + ldr r1, =Task_ExitBuyMenu str r1, [r0] add sp, 0x4 pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80E1168 + thumb_func_end ExitBuyMenu - thumb_func_start sub_80E11B0 -sub_80E11B0: ; 80E11B0 + thumb_func_start Task_ExitBuyMenu +; void Task_ExitBuyMenu(u8 taskId) +Task_ExitBuyMenu: ; 80E11B0 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -408143,8 +408193,8 @@ sub_80E11B0: ; 80E11B0 ands r0, r1 cmp r0, 0 bne _080E11D6 - bl sub_80E53F4 - bl FreeShopItemNames + bl RemoveMoneyLabelObject + bl BuyMenuFreeMemory ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 adds r0, r4, 0 @@ -408154,10 +408204,11 @@ _080E11D6: pop {r0} bx r0 .pool - thumb_func_end sub_80E11B0 + thumb_func_end Task_ExitBuyMenu - thumb_func_start sub_80E11E4 -sub_80E11E4: ; 80E11E4 + thumb_func_start ClearItemPurchases +; void ClearItemPurchases() +ClearItemPurchases: ; 80E11E4 push {lr} ldr r0, =0x02039f7c movs r1, 0 @@ -408169,10 +408220,11 @@ sub_80E11E4: ; 80E11E4 pop {r0} bx r0 .pool - thumb_func_end sub_80E11E4 + thumb_func_end ClearItemPurchases - thumb_func_start sub_80E1204 -sub_80E1204: ; 80E1204 + thumb_func_start RecordItemPurchase +; void RecordItemPurchase(u8 taskId) +RecordItemPurchase: ; 80E1204 push {r4-r7,lr} lsls r0, 24 lsrs r0, 24 @@ -408237,31 +408289,33 @@ _080E127A: pop {r0} bx r0 .pool - thumb_func_end sub_80E1204 + thumb_func_end RecordItemPurchase - thumb_func_start sub_80E1284 -sub_80E1284: ; 80E1284 + thumb_func_start CreatePokemartMenu +; void CreatePokemartMenu(u16 *itemsForSale) +CreatePokemartMenu: ; 80E1284 push {r4,lr} adds r4, r0, 0 movs r0, 0 - bl CreateShopMainMenu + bl CreateShopMenu adds r0, r4, 0 bl SetShopItemsForSale - bl sub_80E11E4 + bl ClearItemPurchases ldr r0, =script_env_2_enable_and_set_ctx_running bl SetShopMenuCallback pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_80E1284 + thumb_func_end CreatePokemartMenu - thumb_func_start sub_80E12A8 -sub_80E12A8: ; 80E12A8 + thumb_func_start CreateDecorationShop1Menu +; void CreateDecorationShop1Menu(u16 *itemsForSale) +CreateDecorationShop1Menu: ; 80E12A8 push {r4,lr} adds r4, r0, 0 movs r0, 0x1 - bl CreateShopMainMenu + bl CreateShopMenu adds r0, r4, 0 bl SetShopItemsForSale ldr r0, =script_env_2_enable_and_set_ctx_running @@ -408270,14 +408324,15 @@ sub_80E12A8: ; 80E12A8 pop {r0} bx r0 .pool - thumb_func_end sub_80E12A8 + thumb_func_end CreateDecorationShop1Menu - thumb_func_start sub_80E12C8 -sub_80E12C8: ; 80E12C8 + thumb_func_start CreateDecorationShop2Menu +; void CreateDecorationShop2Menu(u16 *itemsForSale) +CreateDecorationShop2Menu: ; 80E12C8 push {r4,lr} adds r4, r0, 0 movs r0, 0x2 - bl CreateShopMainMenu + bl CreateShopMenu adds r0, r4, 0 bl SetShopItemsForSale ldr r0, =script_env_2_enable_and_set_ctx_running @@ -408286,7 +408341,7 @@ sub_80E12C8: ; 80E12C8 pop {r0} bx r0 .pool - thumb_func_end sub_80E12C8 + thumb_func_end CreateDecorationShop2Menu thumb_func_start sub_80E12E8 sub_80E12E8: ; 80E12E8 @@ -408798,7 +408853,7 @@ GetBerryTreeInfo: ; 80E16C0 thumb_func_end GetBerryTreeInfo thumb_func_start FieldObjectInteractionWaterBerryTree -; BOOL FieldObjectInteractionWaterBerryTree() +; bool8 FieldObjectInteractionWaterBerryTree() FieldObjectInteractionWaterBerryTree: ; 80E16DC push {lr} ldr r0, =0x03005df0 @@ -408855,7 +408910,7 @@ _080E1734: thumb_func_end FieldObjectInteractionWaterBerryTree thumb_func_start IsPlayerFacingPlantedBerryTree -; BOOL IsPlayerFacingPlantedBerryTree() +; bool8 IsPlayerFacingPlantedBerryTree() IsPlayerFacingPlantedBerryTree: ; 80E1738 push {lr} bl GetFieldObjectScriptPointerForComparison @@ -408882,7 +408937,7 @@ _080E176A: thumb_func_end IsPlayerFacingPlantedBerryTree thumb_func_start WaterBerryTree -; BOOL WaterBerryTree() +; bool8 WaterBerryTree() WaterBerryTree: ; 80E1770 push {lr} bl GetFieldObjectScriptPointerForComparison @@ -408928,7 +408983,7 @@ _080E17A2: thumb_func_end RemoveAllBerryTrees thumb_func_start BerryTreeGrow -; BOOL BerryTreeGrow(struct BerryTreeInfo *berryTree) +; bool8 BerryTreeGrow(struct BerryTreeInfo *berryTree) BerryTreeGrow: ; 80E17C8 push {r4,lr} adds r4, r0, 0 @@ -409669,7 +409724,7 @@ FieldObjectInteractionRemoveBerryTree: ; 80E1D28 thumb_func_end FieldObjectInteractionRemoveBerryTree thumb_func_start PlayerHasBerries -; BOOL PlayerHasBerries() +; bool8 PlayerHasBerries() PlayerHasBerries: ; 80E1D5C push {lr} movs r0, 0x4 @@ -409763,7 +409818,7 @@ _080E1DEC: thumb_func_end ResetBerryTreeSparkleFlags thumb_func_start Multichoice -; BOOL Multichoice(u8 x, u8 y, u8 menuId, BOOL noCancelling) +; bool8 Multichoice(u8 x, u8 y, u8 menuId, bool8 noCancelling) Multichoice: ; 80E1E08 push {r4-r7,lr} sub sp, 0x4 @@ -409889,7 +409944,7 @@ _080E1EEC: thumb_func_end sub_80E1EB8 thumb_func_start DoMultichoice -; void DoMultichoice(u8 x, u8 y, u8 menuId, BOOL noCancelling) +; void DoMultichoice(u8 x, u8 y, u8 menuId, bool8 noCancelling) DoMultichoice: ; 80E1EFC push {r4-r7,lr} mov r7, r10 @@ -412051,19 +412106,19 @@ _080E30D8: bl SetGpuReg ldr r1, [r5] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r5] movs r0, 0x80 lsls r0, 4 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r5] movs r2, 0x80 lsls r2, 5 adds r1, r2 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r4, 0x20 str r4, [sp] str r4, [sp, 0x4] @@ -412434,7 +412489,7 @@ sub_80E347C: ; 80E347C ldrb r0, [r0] cmp r0, 0 bne _080E34A0 - bl SetRngAndSetTrainerId + bl SeedRngAndSetTrainerId _080E34A0: ldr r0, [r4] ldr r1, =0x00001e3c @@ -415690,7 +415745,7 @@ sub_80E4EF0: ; 80E4EF0 thumb_func_start sub_80E4F58 sub_80E4F58: ; 80E4F58 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -415896,9 +415951,9 @@ sub_80E50EC: ; 80E50EC .pool thumb_func_end sub_80E50EC - thumb_func_start decrypt_money -; int decrypt_money(int *money_ptr) -decrypt_money: ; 80E5114 + thumb_func_start DecryptMoney +; int DecryptMoney(u32 *moneyPointer) +DecryptMoney: ; 80E5114 ldr r1, =0x03005d90 ldr r1, [r1] adds r1, 0xAC @@ -415907,11 +415962,11 @@ decrypt_money: ; 80E5114 eors r0, r1 bx lr .pool - thumb_func_end decrypt_money + thumb_func_end DecryptMoney - thumb_func_start encrypt_money -; void encrypt_money(int *money_ptr, int value) -encrypt_money: ; 80E5128 + thumb_func_start EncryptMoney +; void EncryptMoney(u32 *moneyPointer, u32 moneyAmount) +EncryptMoney: ; 80E5128 ldr r2, =0x03005d90 ldr r2, [r2] adds r2, 0xAC @@ -415920,14 +415975,14 @@ encrypt_money: ; 80E5128 str r2, [r0] bx lr .pool - thumb_func_end encrypt_money + thumb_func_end EncryptMoney - thumb_func_start is_money_greater_than -; int is_money_greater_than(int *money_ptr, int amount) -is_money_greater_than: ; 80E513C + thumb_func_start IsEnoughMoney +; bool8 IsEnoughMoney(u32 *moneyPointer, u32 price) +IsEnoughMoney: ; 80E513C push {r4,lr} adds r4, r1, 0 - bl decrypt_money + bl DecryptMoney cmp r0, r4 bcs _080E514C movs r0, 0 @@ -415938,7 +415993,7 @@ _080E514E: pop {r4} pop {r1} bx r1 - thumb_func_end is_money_greater_than + thumb_func_end IsEnoughMoney thumb_func_start add_money ; void add_money(int *money_ptr, int amount) @@ -415946,7 +416001,7 @@ add_money: ; 80E5154 push {r4-r6,lr} adds r6, r0, 0 adds r4, r1, 0 - bl decrypt_money + bl DecryptMoney adds r5, r0, 0 adds r0, r5, r4 ldr r5, =0x000f423f @@ -415955,14 +416010,14 @@ add_money: ; 80E5154 bhi _080E5178 adds r5, r0, 0 adds r0, r6, 0 - bl decrypt_money + bl DecryptMoney cmp r5, r0 bcs _080E5178 adds r5, r4, 0 _080E5178: adds r0, r6, 0 adds r1, r5, 0 - bl encrypt_money + bl EncryptMoney pop {r4-r6} pop {r0} bx r0 @@ -415975,7 +416030,7 @@ subtract_money: ; 80E518C push {r4,r5,lr} adds r5, r0, 0 adds r4, r1, 0 - bl decrypt_money + bl DecryptMoney adds r1, r0, 0 cmp r1, r4 bcs _080E51A0 @@ -415985,7 +416040,7 @@ _080E51A0: subs r1, r4 _080E51A2: adds r0, r5, 0 - bl encrypt_money + bl EncryptMoney pop {r4,r5} pop {r0} bx r0 @@ -416001,7 +416056,7 @@ sub_80E51B0: ; 80E51B0 adds r0, r1 ldr r1, =0x020375e2 ldrh r1, [r1] - bl is_money_greater_than + bl IsEnoughMoney lsls r0, 24 lsrs r0, 24 pop {r1} @@ -416215,7 +416270,7 @@ sub_80E52EC: ; 80E52EC lsrs r5, 16 adds r0, r6, 0 adds r1, r5, 0 - bl AddMoneyTextObject + bl AddMoneyLabelObject add sp, 0x18 pop {r3} mov r8, r3 @@ -416228,7 +416283,7 @@ sub_80E52EC: ; 80E52EC thumb_func_start sub_80E5384 sub_80E5384: ; 80E5384 push {r4,lr} - bl sub_80E53F4 + bl RemoveMoneyLabelObject ldr r4, =0x02039f98 ldrb r0, [r4] movs r1, 0 @@ -416244,8 +416299,8 @@ sub_80E5384: ; 80E5384 .pool thumb_func_end sub_80E5384 - thumb_func_start AddMoneyTextObject -AddMoneyTextObject: ; 80E53AC + thumb_func_start AddMoneyLabelObject +AddMoneyLabelObject: ; 80E53AC push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -416272,10 +416327,10 @@ AddMoneyTextObject: ; 80E53AC pop {r0} bx r0 .pool - thumb_func_end AddMoneyTextObject + thumb_func_end AddMoneyLabelObject - thumb_func_start sub_80E53F4 -sub_80E53F4: ; 80E53F4 + thumb_func_start RemoveMoneyLabelObject +RemoveMoneyLabelObject: ; 80E53F4 push {lr} ldr r0, =0x02039f99 ldrb r1, [r0] @@ -416288,7 +416343,7 @@ sub_80E53F4: ; 80E53F4 pop {r0} bx r0 .pool - thumb_func_end sub_80E53F4 + thumb_func_end RemoveMoneyLabelObject thumb_func_start AreMovesContestCombo ; u8 AreMovesContestCombo(u16 moveId1, u16 moveId2) @@ -425497,7 +425552,7 @@ sub_80E9E00: ; 80E9E00 ldr r0, =0x03006310 ldrh r1, [r4, 0x4] ldrh r2, [r4, 0x2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0xA] @@ -425537,7 +425592,7 @@ sub_80E9E44: ; 80E9E44 movs r1, 0xBC movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x10] @@ -425559,7 +425614,7 @@ sub_80E9E90: ; 80E9E90 ldr r1, =0x03005e08 adds r4, r0, r1 ldrb r0, [r4, 0xA] - bl sub_81AE604 + bl ListMenuHandleInput adds r5, r0, 0 ldrb r0, [r4, 0xA] adds r1, r4, 0x4 @@ -425582,7 +425637,7 @@ _080E9EC8: movs r2, 0 bl sub_81AE6C8 ldrb r0, [r4, 0x10] - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldrb r0, [r4, 0xC] movs r1, 0 bl sub_819746C @@ -425625,7 +425680,7 @@ sub_80E9F20: ; 80E9F20 ldr r6, =0x03005e08 adds r5, r4, r6 ldrb r0, [r5, 0x10] - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, =gUnknown_0858D06C ldr r1, [r0, 0xC] ldr r0, [r0, 0x8] @@ -429070,8 +429125,8 @@ _080EBF0A: .pool thumb_func_end sub_80EBEE0 - thumb_func_start sub_80EBF3C -sub_80EBF3C: ; 80EBF3C + thumb_func_start special_0x44 +special_0x44: ; 80EBF3C push {r4-r7,lr} movs r4, 0x5 ldr r1, =0x03005d8c @@ -429162,12 +429217,12 @@ _080EBFEC: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_80EBF3C + thumb_func_end special_0x44 thumb_func_start sub_80EBFF4 sub_80EBFF4: ; 80EBFF4 push {lr} - bl sub_80EBF3C + bl special_0x44 lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0xFF @@ -429203,14 +429258,15 @@ _080EC03E: bx r1 thumb_func_end sub_80EBFF4 - thumb_func_start per_step_2 -per_step_2: ; 80EC044 + thumb_func_start UpdateTVScreensOnMap +; void UpdateTVScreensOnMap(s32 mapWidth, s32 mapHeight) +UpdateTVScreensOnMap: ; 80EC044 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 ldr r0, =0x00000891 bl FlagSet - bl sub_80F0040 + bl CheckForBigMovieOrEmergencyNewsOnTV lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -429226,7 +429282,7 @@ _080EC06A: adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x3 - bl sub_80EC0CC + bl SetTVMetatilesOnMap b _080EC0BE .pool _080EC080: @@ -429245,7 +429301,7 @@ _080EC080: lsrs r0, 24 cmp r0, 0xFF bne _080EC0AE - bl is_tile_XX_prevent_per_step_scripts + bl IsTVShowInSearchOfTrainersAiring lsls r0, 24 cmp r0, 0 beq _080EC0BE @@ -429255,16 +429311,17 @@ _080EC0AE: adds r0, r4, 0 adds r1, r5, 0 movs r2, 0x3 - bl sub_80EC0CC + bl SetTVMetatilesOnMap _080EC0BE: pop {r4,r5} pop {r0} bx r0 .pool - thumb_func_end per_step_2 + thumb_func_end UpdateTVScreensOnMap - thumb_func_start sub_80EC0CC -sub_80EC0CC: ; 80EC0CC + thumb_func_start SetTVMetatilesOnMap +; void SetTVMetatilesOnMap(s32 mapWidth, s32 mapHeight, u16 metatileId) +SetTVMetatilesOnMap: ; 80EC0CC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -429317,38 +429374,38 @@ _080EC120: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_80EC0CC + thumb_func_end SetTVMetatilesOnMap - thumb_func_start sub_80EC130 -sub_80EC130: ; 80EC130 + thumb_func_start TurnOffTVScreen +TurnOffTVScreen: ; 80EC130 push {lr} ldr r1, =0x03005dc0 ldr r0, [r1] ldr r1, [r1, 0x4] movs r2, 0x2 - bl sub_80EC0CC + bl SetTVMetatilesOnMap bl DrawWholeMapView pop {r0} bx r0 .pool - thumb_func_end sub_80EC130 + thumb_func_end TurnOffTVScreen - thumb_func_start cut -cut: ; 80EC14C + thumb_func_start TurnOnTVScreen +TurnOnTVScreen: ; 80EC14C push {lr} ldr r1, =0x03005dc0 ldr r0, [r1] ldr r1, [r1, 0x4] movs r2, 0x3 - bl sub_80EC0CC + bl SetTVMetatilesOnMap bl DrawWholeMapView pop {r0} bx r0 .pool - thumb_func_end cut + thumb_func_end TurnOnTVScreen - thumb_func_start sub_80EC168 -sub_80EC168: ; 80EC168 + thumb_func_start special_0x45 +special_0x45: ; 80EC168 ldr r0, =0x03005d8c ldr r1, [r0] ldr r0, =0x020375e0 @@ -429362,7 +429419,7 @@ sub_80EC168: ; 80EC168 ldrb r0, [r1] bx lr .pool - thumb_func_end sub_80EC168 + thumb_func_end special_0x45 thumb_func_start sub_80EC18C sub_80EC18C: ; 80EC18C @@ -429403,8 +429460,8 @@ _080EC1CC: bx r1 thumb_func_end sub_80EC18C - thumb_func_start sub_80EC1D4 -sub_80EC1D4: ; 80EC1D4 + thumb_func_start special_0x4a +special_0x4a: ; 80EC1D4 push {lr} ldr r3, =0x03005d8c ldr r2, =0x020375e0 @@ -429434,10 +429491,10 @@ _080EC214: _080EC216: pop {r1} bx r1 - thumb_func_end sub_80EC1D4 + thumb_func_end special_0x4a - thumb_func_start sub_80EC21C -sub_80EC21C: ; 80EC21C + thumb_func_start GabbyAndTyNewGameInitData +GabbyAndTyNewGameInitData: ; 80EC21C push {r4-r6,lr} mov r6, r10 mov r5, r9 @@ -429552,10 +429609,10 @@ sub_80EC21C: ; 80EC21C pop {r0} bx r0 .pool - thumb_func_end sub_80EC21C + thumb_func_end GabbyAndTyNewGameInitData - thumb_func_start sub_80EC31C -sub_80EC31C: ; 80EC31C + thumb_func_start GabbyAndTyBeforeInterview +GabbyAndTyBeforeInterview: ; 80EC31C push {r4,lr} ldr r3, =0x03005d8c ldr r2, [r3] @@ -429681,7 +429738,7 @@ _080EC416: orrs r1, r2 strb r1, [r0] _080EC41E: - bl sub_80EC4E8 + bl TakeTVShowInSearchOfTrainersOffTheAir ldr r0, =0x03005d8c ldr r0, [r0] ldr r4, =0x00002ba8 @@ -429696,10 +429753,10 @@ _080EC436: pop {r0} bx r0 .pool - thumb_func_end sub_80EC31C + thumb_func_end GabbyAndTyBeforeInterview - thumb_func_start sub_80EC448 -sub_80EC448: ; 80EC448 + thumb_func_start GabbyAndTyAfterInterview +GabbyAndTyAfterInterview: ; 80EC448 push {r4-r6,lr} ldr r5, =0x03005d8c ldr r2, [r5] @@ -429770,10 +429827,10 @@ sub_80EC448: ; 80EC448 pop {r0} bx r0 .pool - thumb_func_end sub_80EC448 + thumb_func_end GabbyAndTyAfterInterview - thumb_func_start sub_80EC4E8 -sub_80EC4E8: ; 80EC4E8 + thumb_func_start TakeTVShowInSearchOfTrainersOffTheAir +TakeTVShowInSearchOfTrainersOffTheAir: ; 80EC4E8 ldr r0, =0x03005d8c ldr r1, [r0] ldr r0, =0x00002bae @@ -429785,10 +429842,10 @@ sub_80EC4E8: ; 80EC4E8 strb r0, [r1] bx lr .pool - thumb_func_end sub_80EC4E8 + thumb_func_end TakeTVShowInSearchOfTrainersOffTheAir - thumb_func_start sub_80EC504 -sub_80EC504: ; 80EC504 + thumb_func_start GabbyAndTyGetBattleNum +GabbyAndTyGetBattleNum: ; 80EC504 push {lr} ldr r0, =0x03005d8c ldr r0, [r0] @@ -429807,10 +429864,10 @@ _080EC522: pop {r1} bx r1 .pool - thumb_func_end sub_80EC504 + thumb_func_end GabbyAndTyGetBattleNum - thumb_func_start is_tile_XX_prevent_per_step_scripts -is_tile_XX_prevent_per_step_scripts: ; 80EC530 + thumb_func_start IsTVShowInSearchOfTrainersAiring +IsTVShowInSearchOfTrainersAiring: ; 80EC530 ldr r0, =0x03005d8c ldr r0, [r0] ldr r1, =0x00002bae @@ -429820,10 +429877,10 @@ is_tile_XX_prevent_per_step_scripts: ; 80EC530 lsrs r0, 31 bx lr .pool - thumb_func_end is_tile_XX_prevent_per_step_scripts + thumb_func_end IsTVShowInSearchOfTrainersAiring - thumb_func_start sub_80EC548 -sub_80EC548: ; 80EC548 + thumb_func_start GabbyAndTyGetLastQuote +GabbyAndTyGetLastQuote: ; 80EC548 push {r4,r5,lr} ldr r5, =0x03005d8c ldr r0, [r5] @@ -429852,10 +429909,10 @@ _080EC586: pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_80EC548 + thumb_func_end GabbyAndTyGetLastQuote - thumb_func_start sub_80EC58C -sub_80EC58C: ; 80EC58C + thumb_func_start GabbyAndTyGetLastBattleTrivia +GabbyAndTyGetLastBattleTrivia: ; 80EC58C push {lr} ldr r0, =0x03005d8c ldr r0, [r0] @@ -429895,12 +429952,12 @@ _080EC5D0: _080EC5D2: pop {r1} bx r1 - thumb_func_end sub_80EC58C + thumb_func_end GabbyAndTyGetLastBattleTrivia - thumb_func_start sub_80EC5D8 -sub_80EC5D8: ; 80EC5D8 + thumb_func_start GabbyAndTySetScriptVarsToFieldObjectLocalIds +GabbyAndTySetScriptVarsToFieldObjectLocalIds: ; 80EC5D8 push {lr} - bl sub_80EC504 + bl GabbyAndTyGetBattleNum lsls r0, 24 lsrs r0, 24 subs r0, 0x1 @@ -429990,10 +430047,10 @@ _080EC6B0: pop {r0} bx r0 .pool - thumb_func_end sub_80EC5D8 + thumb_func_end GabbyAndTySetScriptVarsToFieldObjectLocalIds - thumb_func_start sub_80EC6BC -sub_80EC6BC: ; 80EC6BC + thumb_func_start InterviewAfter +InterviewAfter: ; 80EC6BC push {lr} ldr r0, =0x020375e2 ldrh r0, [r0] @@ -430039,7 +430096,7 @@ _080EC720: _080EC724: pop {r0} bx r0 - thumb_func_end sub_80EC6BC + thumb_func_end InterviewAfter thumb_func_start sub_80EC728 sub_80EC728: ; 80EC728 @@ -431274,8 +431331,9 @@ _080ED21E: .pool thumb_func_end sub_80ED164 - thumb_func_start sub_80ED238 -sub_80ED238: ; 80ED238 + thumb_func_start SaveRecordedItemPurchasesForTVShow +; void SaveRecordedItemPurchasesForTVShow() +SaveRecordedItemPurchasesForTVShow: ; 80ED238 push {r4-r7,lr} ldr r5, =0x03005d8c ldr r0, [r5] @@ -431351,7 +431409,7 @@ _080ED2B6: cmp r4, 0x2 bls _080ED2B6 movs r0, 0x1 - bl sub_80EF038 + bl GetPriceReduction strb r0, [r5, 0x2] adds r0, r5, 0 adds r0, 0x13 @@ -431368,7 +431426,7 @@ _080ED2F2: pop {r0} bx r0 .pool - thumb_func_end sub_80ED238 + thumb_func_end SaveRecordedItemPurchasesForTVShow thumb_func_start sub_80ED320 sub_80ED320: ; 80ED320 @@ -431480,8 +431538,8 @@ _080ED400: .pool thumb_func_end sub_80ED320 - thumb_func_start sub_80ED430 -sub_80ED430: ; 80ED430 + thumb_func_start StartMassOutbreak +StartMassOutbreak: ; 80ED430 push {r4,r5,lr} ldr r4, =0x03005d8c ldr r0, =0x020375e0 @@ -431555,7 +431613,7 @@ sub_80ED430: ; 80ED430 pop {r0} bx r0 .pool - thumb_func_end sub_80ED430 + thumb_func_end StartMassOutbreak thumb_func_start sub_80ED4DC sub_80ED4DC: ; 80ED4DC @@ -431904,8 +431962,8 @@ _080ED7E4: .pool thumb_func_end sub_80ED718 - thumb_func_start sub_80ED808 -sub_80ED808: ; 80ED808 + thumb_func_start EndMassOutbreak +EndMassOutbreak: ; 80ED808 push {r4,r5,lr} ldr r3, =0x03005d8c ldr r0, [r3] @@ -431960,7 +432018,7 @@ sub_80ED808: ; 80ED808 pop {r0} bx r0 .pool - thumb_func_end sub_80ED808 + thumb_func_end EndMassOutbreak thumb_func_start sub_80ED888 sub_80ED888: ; 80ED888 @@ -431971,7 +432029,7 @@ sub_80ED888: ; 80ED888 adds r0, r4, 0 bl sub_80ED8B4 adds r0, r4, 0 - bl sub_80ED924 + bl UpdateMassOutbreakTimeLeft adds r0, r4, 0 bl sub_80EF120 adds r0, r4, 0 @@ -432039,8 +432097,8 @@ _080ED91C: bx r0 thumb_func_end sub_80ED8B4 - thumb_func_start sub_80ED924 -sub_80ED924: ; 80ED924 + thumb_func_start UpdateMassOutbreakTimeLeft +UpdateMassOutbreakTimeLeft: ; 80ED924 push {lr} lsls r0, 16 lsrs r2, r0, 16 @@ -432051,7 +432109,7 @@ sub_80ED924: ; 80ED924 ldrh r0, [r1] cmp r0, r2 bhi _080ED948 - bl sub_80ED808 + bl EndMassOutbreak b _080ED94C .pool _080ED948: @@ -432060,7 +432118,7 @@ _080ED948: _080ED94C: pop {r0} bx r0 - thumb_func_end sub_80ED924 + thumb_func_end UpdateMassOutbreakTimeLeft thumb_func_start sub_80ED950 sub_80ED950: ; 80ED950 @@ -434751,8 +434809,8 @@ _080EF01A: .pool thumb_func_end sub_80EEF6C - thumb_func_start sub_80EF038 -sub_80EF038: ; 80EF038 + thumb_func_start GetPriceReduction +GetPriceReduction: ; 80EF038 push {r4,r5,lr} lsls r0, 24 lsrs r3, r0, 24 @@ -434780,7 +434838,7 @@ _080EF04C: cmp r0, 0x2 bne _080EF08A adds r0, r3, 0 - bl sub_80EF094 + bl IsPriceDiscounted lsls r0, 24 cmp r0, 0 bne _080EF044 @@ -434798,10 +434856,10 @@ _080EF08C: pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_80EF038 + thumb_func_end GetPriceReduction - thumb_func_start sub_80EF094 -sub_80EF094: ; 80EF094 + thumb_func_start IsPriceDiscounted +IsPriceDiscounted: ; 80EF094 push {lr} lsls r0, 24 lsrs r0, 24 @@ -434839,7 +434897,7 @@ _080EF0D6: pop {r1} bx r1 .pool - thumb_func_end sub_80EF094 + thumb_func_end IsPriceDiscounted thumb_func_start sub_80EF0E4 sub_80EF0E4: ; 80EF0E4 @@ -435012,8 +435070,9 @@ _080EF244: .pool thumb_func_end sub_80EF1BC - thumb_func_start sub_80EF250 -sub_80EF250: ; 80EF250 + thumb_func_start CopyContestCategoryToStringVar +; void CopyContestCategoryToStringVar(u8 stringVarIndex, u8 contestCategoryId) +CopyContestCategoryToStringVar: ; 80EF250 push {lr} lsls r0, 24 lsrs r2, r0, 24 @@ -435086,10 +435145,11 @@ _080EF300: pop {r0} bx r0 .pool - thumb_func_end sub_80EF250 + thumb_func_end CopyContestCategoryToStringVar - thumb_func_start sub_80EF30C -sub_80EF30C: ; 80EF30C + thumb_func_start SetContestCategoryStringVarForInterview +; void SetContestCategoryStringVarForInterview() +SetContestCategoryStringVarForInterview: ; 80EF30C push {lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -435105,11 +435165,11 @@ sub_80EF30C: ; 80EF30C lsls r1, 29 lsrs r1, 29 movs r0, 0x1 - bl sub_80EF250 + bl CopyContestCategoryToStringVar pop {r0} bx r0 .pool - thumb_func_end sub_80EF30C + thumb_func_end SetContestCategoryStringVarForInterview thumb_func_start sub_80EF340 sub_80EF340: ; 80EF340 @@ -435435,8 +435495,8 @@ _080EF5B2: bx r0 thumb_func_end sub_80EF550 - thumb_func_start sub_80EF5B8 -sub_80EF5B8: ; 80EF5B8 + thumb_func_start InterviewBefore +InterviewBefore: ; 80EF5B8 push {lr} ldr r1, =0x020375f0 movs r0, 0 @@ -435497,7 +435557,7 @@ _080EF642: _080EF646: pop {r0} bx r0 - thumb_func_end sub_80EF5B8 + thumb_func_end InterviewBefore thumb_func_start sub_80EF64C sub_80EF64C: ; 80EF64C @@ -436754,8 +436814,8 @@ sub_80F0020: ; 80F0020 .pool thumb_func_end sub_80F0020 - thumb_func_start sub_80F0040 -sub_80F0040: ; 80F0040 + thumb_func_start CheckForBigMovieOrEmergencyNewsOnTV +CheckForBigMovieOrEmergencyNewsOnTV: ; 80F0040 push {lr} ldr r0, =0x03005d8c ldr r1, [r0] @@ -436804,10 +436864,10 @@ _080F009C: _080F009E: pop {r1} bx r1 - thumb_func_end sub_80F0040 + thumb_func_end CheckForBigMovieOrEmergencyNewsOnTV - thumb_func_start sub_80F00A4 -sub_80F00A4: ; 80F00A4 + thumb_func_start GetMomOrDadStringForTVMessage +GetMomOrDadStringForTVMessage: ; 80F00A4 push {r4,lr} ldr r0, =0x03005d8c ldr r1, [r0] @@ -436911,7 +436971,7 @@ _080F01A8: pop {r0} bx r0 .pool - thumb_func_end sub_80F00A4 + thumb_func_end GetMomOrDadStringForTVMessage thumb_func_start sub_80F01B8 sub_80F01B8: ; 80F01B8 @@ -439387,107 +439447,107 @@ _080F1584: .4byte _080F16E6 .4byte _080F1640 _080F1628: - bl sub_80F24D8 + bl DoTVShowPokemonFanClubLetter b _080F16E6 _080F162E: - bl sub_80F2708 + bl DoTVShowRecentHappenings b _080F16E6 _080F1634: - bl sub_80F28A4 + bl DoTVShowPokemonFanClubOpinions b _080F16E6 _080F163A: - bl nullsub_46 + bl DoTVShowDummiedOut b _080F16E6 _080F1640: - bl sub_80F29A0 + bl DoTVShowPokemonNewsMassOutbreak b _080F16E6 _080F1646: - bl sub_80F16EC + bl DoTVShowBravoTrainerPokemonProfile b _080F16E6 _080F164C: - bl sub_80F1974 + bl DoTVShowBravoTrainerBattleTower b _080F16E6 _080F1652: - bl sub_80F211C + bl DoTVShowPokemonTodaySuccessfulCapture b _080F16E6 _080F1658: - bl sub_80F1C0C + bl DoTVShowTodaysSmartShopper b _080F16E6 _080F165E: - bl sub_80F1E48 + bl DoTVShowTheNameRaterShow b _080F16E6 _080F1664: - bl sub_80F2A10 + bl DoTVShowPokemonContestLiveUpdates b _080F16E6 _080F166A: - bl sub_80F3140 + bl DoTVShowPokemonBattleUpdate b _080F16E6 _080F1670: - bl sub_80F3388 + bl DoTVShow3CheersForPokeblocks b _080F16E6 _080F1676: - bl sub_80F2370 + bl DoTVShowPokemonTodayFailedCapture b _080F16E6 _080F167C: - bl sub_80F3828 + bl DoTVShowPokemonAngler b _080F16E6 _080F1682: - bl sub_80F3904 + bl DoTVShowTheWorldOfMasters b _080F16E6 _080F1688: - bl sub_80F39E4 + bl DoTVShowTodaysRivalTrainer b _080F16E6 _080F168E: - bl sub_80F3C04 + bl DoTVShowDewfordTrendWatcherNetwork b _080F16E6 _080F1694: - bl sub_80F3D74 + bl DoTVShowHoennTreasureInvestigators b _080F16E6 _080F169A: - bl sub_80F3E7C + bl DoTVShowFindThatGamer b _080F16E6 _080F16A0: - bl sub_80F4028 + bl DoTVShowBreakingNewsTV b _080F16E6 _080F16A6: - bl sub_80F4360 + bl DoTVShowSecretBaseVisit b _080F16E6 _080F16AC: - bl sub_80F45A0 + bl DoTVShowPokemonLotterWinnerFlashReport b _080F16E6 _080F16B2: - bl sub_80F466C + bl DoTVShowThePokemonBattleSeminar b _080F16E6 _080F16B8: - bl sub_80F487C + bl DoTVShowTrainerFanClubSpecial b _080F16E6 _080F16BE: - bl sub_80F49BC + bl DoTVShowTrainerFanClub b _080F16E6 _080F16C4: - bl sub_80F4B5C + bl DoTVShowSpotTheCuties b _080F16E6 _080F16CA: - bl sub_80F4D9C + bl DoTVShowPokemonNewsBattleFrontier b _080F16E6 _080F16D0: - bl sub_80F5030 + bl DoTVShowWhatsNo1InHoennToday b _080F16E6 _080F16D6: - bl sub_80F51EC + bl DoTVShowSecretBaseSecrets b _080F16E6 _080F16DC: - bl sub_80F5548 + bl DoTVShowSafariFanClub b _080F16E6 _080F16E2: - bl sub_80F56D4 + bl DoTVShowPokemonContestLiveUpdates2 _080F16E6: pop {r0} bx r0 thumb_func_end sub_80F153C - thumb_func_start sub_80F16EC -sub_80F16EC: ; 80F16EC + thumb_func_start DoTVShowBravoTrainerPokemonProfile +DoTVShowBravoTrainerPokemonProfile: ; 80F16EC push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -439535,7 +439595,7 @@ _080F1758: lsls r1, 29 lsrs r1, 29 movs r0, 0x1 - bl sub_80EF250 + bl CopyContestCategoryToStringVar ldrb r1, [r4, 0x13] lsls r1, 27 lsrs r1, 30 @@ -439577,7 +439637,7 @@ _080F17B0: lsls r1, 29 lsrs r1, 29 movs r0, 0x2 - bl sub_80EF250 + bl CopyContestCategoryToStringVar b _080F194C .pool _080F17E8: @@ -439648,7 +439708,7 @@ _080F1880: lsls r1, 29 lsrs r1, 29 movs r0, 0x1 - bl sub_80EF250 + bl CopyContestCategoryToStringVar ldr r0, =0x02021ec4 ldrh r1, [r4, 0x6] bl CopyEasyChatWord @@ -439699,7 +439759,7 @@ _080F190C: ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C + bl TVShowDone b _080F1952 .pool _080F193C: @@ -439725,10 +439785,10 @@ _080F1952: pop {r0} bx r0 .pool - thumb_func_end sub_80F16EC + thumb_func_end DoTVShowBravoTrainerPokemonProfile - thumb_func_start sub_80F1974 -sub_80F1974: ; 80F1974 + thumb_func_start DoTVShowBravoTrainerBattleTower +DoTVShowBravoTrainerBattleTower: ; 80F1974 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -439966,7 +440026,7 @@ _080F1BCC: ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C + bl TVShowDone _080F1BEA: ldr r0, =gUnknown_0858D240 lsls r1, r5, 2 @@ -439977,10 +440037,10 @@ _080F1BEA: pop {r0} bx r0 .pool - thumb_func_end sub_80F1974 + thumb_func_end DoTVShowBravoTrainerBattleTower - thumb_func_start sub_80F1C0C -sub_80F1C0C: ; 80F1C0C + thumb_func_start DoTVShowTodaysSmartShopper +DoTVShowTodaysSmartShopper: ; 80F1C0C push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -440152,7 +440212,7 @@ _080F1DB8: movs r0, 0x1 adds r1, r5, 0 bl sub_80EF40C - bl sub_80F577C + bl TVShowDone b _080F1E2C _080F1DC6: ldrb r0, [r5, 0x2] @@ -440198,7 +440258,7 @@ _080F1E1C: adds r1, 0x13 ldrb r2, [r5, 0x3] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F1E2C: ldr r0, =gUnknown_0858D1D0 lsls r1, r6, 2 @@ -440209,10 +440269,10 @@ _080F1E2C: pop {r0} bx r0 .pool - thumb_func_end sub_80F1C0C + thumb_func_end DoTVShowTodaysSmartShopper - thumb_func_start sub_80F1E48 -sub_80F1E48: ; 80F1E48 + thumb_func_start DoTVShowTheNameRaterShow +DoTVShowTheNameRaterShow: ; 80F1E48 push {r4-r6,lr} sub sp, 0x8 ldr r2, =0x03005d8c @@ -440493,7 +440553,7 @@ _080F20F0: adds r1, r5, 0x4 ldrb r2, [r5, 0x1F] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F20FE: ldr r0, =gUnknown_0858D338 lsls r1, r6, 2 @@ -440505,10 +440565,10 @@ _080F20FE: pop {r0} bx r0 .pool - thumb_func_end sub_80F1E48 + thumb_func_end DoTVShowTheNameRaterShow - thumb_func_start sub_80F211C -sub_80F211C: ; 80F211C + thumb_func_start DoTVShowPokemonTodaySuccessfulCapture +DoTVShowPokemonTodaySuccessfulCapture: ; 80F211C push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -440715,7 +440775,7 @@ _080F233E: b _080F2358 .pool _080F2354: - bl sub_80F577C + bl TVShowDone _080F2358: ldr r0, =gUnknown_0858D1A0 lsls r1, r6, 2 @@ -440726,10 +440786,10 @@ _080F2358: pop {r0} bx r0 .pool - thumb_func_end sub_80F211C + thumb_func_end DoTVShowPokemonTodaySuccessfulCapture - thumb_func_start sub_80F2370 -sub_80F2370: ; 80F2370 + thumb_func_start DoTVShowPokemonTodayFailedCapture +DoTVShowPokemonTodayFailedCapture: ; 80F2370 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -440854,7 +440914,7 @@ _080F24A0: b _080F24C0 .pool _080F24BC: - bl sub_80F577C + bl TVShowDone _080F24C0: ldr r0, =gUnknown_0858D394 lsls r1, r5, 2 @@ -440865,10 +440925,10 @@ _080F24C0: pop {r0} bx r0 .pool - thumb_func_end sub_80F2370 + thumb_func_end DoTVShowPokemonTodayFailedCapture - thumb_func_start sub_80F24D8 -sub_80F24D8: ; 80F24D8 + thumb_func_start DoTVShowPokemonFanClubLetter +DoTVShowPokemonFanClubLetter: ; 80F24D8 push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -441023,7 +441083,7 @@ _080F2684: movs r0, 0x2 adds r1, r2, 0 bl sub_80EF340 - bl sub_80F577C + bl TVShowDone b _080F26F0 _080F26A6: ldr r4, =0x02021fc4 @@ -441064,10 +441124,10 @@ _080F26FC: pop {r0} bx r0 .pool - thumb_func_end sub_80F24D8 + thumb_func_end DoTVShowPokemonFanClubLetter - thumb_func_start sub_80F2708 -sub_80F2708: ; 80F2708 + thumb_func_start DoTVShowRecentHappenings +DoTVShowRecentHappenings: ; 80F2708 push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -441177,7 +441237,7 @@ _080F285C: strb r0, [r7] b _080F288C _080F2862: - bl sub_80F577C + bl TVShowDone b _080F288C _080F2868: ldr r4, =0x02021fc4 @@ -441204,10 +441264,10 @@ _080F2898: pop {r0} bx r0 .pool - thumb_func_end sub_80F2708 + thumb_func_end DoTVShowRecentHappenings - thumb_func_start sub_80F28A4 -sub_80F28A4: ; 80F28A4 + thumb_func_start DoTVShowPokemonFanClubOpinions +DoTVShowPokemonFanClubOpinions: ; 80F28A4 push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -441286,7 +441346,7 @@ _080F2968: ldr r0, =0x02021ec4 ldrh r1, [r4, 0x1E] bl CopyEasyChatWord - bl sub_80F577C + bl TVShowDone _080F297E: ldr r0, =gUnknown_0858D188 lsls r1, r5, 2 @@ -441297,15 +441357,15 @@ _080F297E: pop {r0} bx r0 .pool - thumb_func_end sub_80F28A4 + thumb_func_end DoTVShowPokemonFanClubOpinions - thumb_func_start nullsub_46 -nullsub_46: ; 80F299C + thumb_func_start DoTVShowDummiedOut +DoTVShowDummiedOut: ; 80F299C bx lr - thumb_func_end nullsub_46 + thumb_func_end DoTVShowDummiedOut - thumb_func_start sub_80F29A0 -sub_80F29A0: ; 80F29A0 + thumb_func_start DoTVShowPokemonNewsMassOutbreak +DoTVShowPokemonNewsMassOutbreak: ; 80F29A0 push {r4,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -441328,8 +441388,8 @@ sub_80F29A0: ; 80F29A0 ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C - bl sub_80ED430 + bl TVShowDone + bl StartMassOutbreak ldr r1, =gUnknown_0858D19C ldr r0, =0x0203a030 ldrb r0, [r0] @@ -441341,10 +441401,10 @@ sub_80F29A0: ; 80F29A0 pop {r0} bx r0 .pool - thumb_func_end sub_80F29A0 + thumb_func_end DoTVShowPokemonNewsMassOutbreak - thumb_func_start sub_80F2A10 -sub_80F2A10: ; 80F2A10 + thumb_func_start DoTVShowPokemonContestLiveUpdates +DoTVShowPokemonContestLiveUpdates: ; 80F2A10 push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -442083,7 +442143,7 @@ _080F30FC: ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C + bl TVShowDone _080F311C: ldr r0, =gUnknown_0858D27C lsls r1, r7, 2 @@ -442094,10 +442154,10 @@ _080F311C: pop {r0} bx r0 .pool - thumb_func_end sub_80F2A10 + thumb_func_end DoTVShowPokemonContestLiveUpdates - thumb_func_start sub_80F3140 -sub_80F3140: ; 80F3140 + thumb_func_start DoTVShowPokemonBattleUpdate +DoTVShowPokemonBattleUpdate: ; 80F3140 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -442234,7 +442294,7 @@ _080F329C: adds r1, 0xC ldrb r2, [r4, 0x1A] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone b _080F3362 .pool _080F32C0: @@ -442293,7 +442353,7 @@ _080F3338: ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C + bl TVShowDone _080F3362: ldr r0, =gUnknown_0858D300 lsls r1, r5, 2 @@ -442304,10 +442364,10 @@ _080F3362: pop {r0} bx r0 .pool - thumb_func_end sub_80F3140 + thumb_func_end DoTVShowPokemonBattleUpdate - thumb_func_start sub_80F3388 -sub_80F3388: ; 80F3388 + thumb_func_start DoTVShow3CheersForPokeblocks +DoTVShow3CheersForPokeblocks: ; 80F3388 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -442543,7 +442603,7 @@ _080F3606: b _080F3624 .pool _080F3620: - bl sub_80F577C + bl TVShowDone _080F3624: ldr r0, =gUnknown_0858D228 lsls r1, r5, 2 @@ -442554,10 +442614,10 @@ _080F3624: pop {r0} bx r0 .pool - thumb_func_end sub_80F3388 + thumb_func_end DoTVShow3CheersForPokeblocks - thumb_func_start sub_80F363C -sub_80F363C: ; 80F363C + thumb_func_start DoTVShowInSearchOfTrainers +DoTVShowInSearchOfTrainers: ; 80F363C push {r4-r7,lr} ldr r0, =0x020375f0 movs r1, 0 @@ -442729,7 +442789,7 @@ _080F37A2: ldr r1, =0x0203a030 movs r0, 0 strb r0, [r1] - bl sub_80EC4E8 + bl TakeTVShowInSearchOfTrainersOffTheAir _080F37EA: ldr r0, =gUnknown_0858D66C lsls r1, r7, 2 @@ -442740,10 +442800,10 @@ _080F37EA: pop {r0} bx r0 .pool - thumb_func_end sub_80F363C + thumb_func_end DoTVShowInSearchOfTrainers - thumb_func_start sub_80F3828 -sub_80F3828: ; 80F3828 + thumb_func_start DoTVShowPokemonAngler +DoTVShowPokemonAngler: ; 80F3828 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -442795,7 +442855,7 @@ _080F3880: ldrb r1, [r4, 0x3] movs r0, 0x2 bl sub_80EF340 - bl sub_80F577C + bl TVShowDone b _080F38E0 .pool _080F38B8: @@ -442814,7 +442874,7 @@ _080F38B8: ldrb r1, [r4, 0x2] movs r0, 0x2 bl sub_80EF340 - bl sub_80F577C + bl TVShowDone _080F38E0: ldr r0, =gUnknown_0858D3B0 lsls r1, r5, 2 @@ -442825,10 +442885,10 @@ _080F38E0: pop {r0} bx r0 .pool - thumb_func_end sub_80F3828 + thumb_func_end DoTVShowPokemonAngler - thumb_func_start sub_80F3904 -sub_80F3904: ; 80F3904 + thumb_func_start DoTVShowTheWorldOfMasters +DoTVShowTheWorldOfMasters: ; 80F3904 push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -442902,7 +442962,7 @@ _080F3994: ldr r2, =gSpeciesNames adds r1, r2 bl CopyString - bl sub_80F577C + bl TVShowDone _080F39BE: ldr r0, =gUnknown_0858D3B8 lsls r1, r5, 2 @@ -442913,10 +442973,10 @@ _080F39BE: pop {r0} bx r0 .pool - thumb_func_end sub_80F3904 + thumb_func_end DoTVShowTheWorldOfMasters - thumb_func_start sub_80F39E4 -sub_80F39E4: ; 80F39E4 + thumb_func_start DoTVShowTodaysRivalTrainer +DoTVShowTodaysRivalTrainer: ; 80F39E4 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -443132,7 +443192,7 @@ _080F3BD8: adds r1, 0x13 ldrb r2, [r4, 0xC] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F3BE8: ldr r0, =gUnknown_0858D3C4 lsls r1, r5, 2 @@ -443143,10 +443203,10 @@ _080F3BE8: pop {r0} bx r0 .pool - thumb_func_end sub_80F39E4 + thumb_func_end DoTVShowTodaysRivalTrainer - thumb_func_start sub_80F3C04 -sub_80F3C04: ; 80F3C04 + thumb_func_start DoTVShowDewfordTrendWatcherNetwork +DoTVShowDewfordTrendWatcherNetwork: ; 80F3C04 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -443265,7 +443325,7 @@ _080F3D40: ldr r0, =0x02021dc4 ldrh r1, [r4, 0x6] bl CopyEasyChatWord - bl sub_80F577C + bl TVShowDone _080F3D54: ldr r0, =gUnknown_0858D3F0 lsls r1, r5, 2 @@ -443276,10 +443336,10 @@ _080F3D54: pop {r0} bx r0 .pool - thumb_func_end sub_80F3C04 + thumb_func_end DoTVShowDewfordTrendWatcherNetwork - thumb_func_start sub_80F3D74 -sub_80F3D74: ; 80F3D74 + thumb_func_start DoTVShowHoennTreasureInvestigators +DoTVShowHoennTreasureInvestigators: ; 80F3D74 push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -443355,7 +443415,7 @@ _080F3E02: ldrb r1, [r5, 0x4] movs r2, 0 bl GetMapName - bl sub_80F577C + bl TVShowDone b _080F3E5C .pool _080F3E3C: @@ -443370,7 +443430,7 @@ _080F3E3C: adds r1, 0x13 ldrb r2, [r5, 0x5] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F3E5C: ldr r0, =gUnknown_0858D40C lsls r1, r6, 2 @@ -443381,10 +443441,10 @@ _080F3E5C: pop {r0} bx r0 .pool - thumb_func_end sub_80F3D74 + thumb_func_end DoTVShowHoennTreasureInvestigators - thumb_func_start sub_80F3E7C -sub_80F3E7C: ; 80F3E7C + thumb_func_start DoTVShowFindThatGamer +DoTVShowFindThatGamer: ; 80F3E7C push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -443481,7 +443541,7 @@ _080F3F60: ldrh r1, [r4, 0x4] movs r0, 0x2 bl sub_80EF340 - bl sub_80F577C + bl TVShowDone b _080F4008 .pool _080F3F78: @@ -443540,7 +443600,7 @@ _080F3FFC: ldr r1, =gUnknown_085ECB0C bl CopyString _080F4004: - bl sub_80F577C + bl TVShowDone _080F4008: ldr r0, =gUnknown_0858D418 lsls r1, r5, 2 @@ -443551,10 +443611,10 @@ _080F4008: pop {r0} bx r0 .pool - thumb_func_end sub_80F3E7C + thumb_func_end DoTVShowFindThatGamer - thumb_func_start sub_80F4028 -sub_80F4028: ; 80F4028 + thumb_func_start DoTVShowBreakingNewsTV +DoTVShowBreakingNewsTV: ; 80F4028 push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -443678,7 +443738,7 @@ _080F4168: ldrb r1, [r6, 0x4] movs r2, 0 bl GetMapName - bl sub_80F577C + bl TVShowDone b _080F4344 .pool _080F418C: @@ -443843,7 +443903,7 @@ _080F4334: adds r1, 0x13 ldrb r2, [r6, 0xE] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F4344: ldr r0, =gUnknown_0858D428 lsls r1, r7, 2 @@ -443854,10 +443914,10 @@ _080F4344: pop {r0} bx r0 .pool - thumb_func_end sub_80F4028 + thumb_func_end DoTVShowBreakingNewsTV - thumb_func_start sub_80F4360 -sub_80F4360: ; 80F4360 + thumb_func_start DoTVShowSecretBaseVisit +DoTVShowSecretBaseVisit: ; 80F4360 push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444071,7 +444131,7 @@ _080F4538: b _080F4588 .pool _080F4584: - bl sub_80F577C + bl TVShowDone _080F4588: ldr r0, =gUnknown_0858D45C lsls r1, r6, 2 @@ -444082,10 +444142,10 @@ _080F4588: pop {r0} bx r0 .pool - thumb_func_end sub_80F4360 + thumb_func_end DoTVShowSecretBaseVisit - thumb_func_start sub_80F45A0 -sub_80F45A0: ; 80F45A0 + thumb_func_start DoTVShowPokemonLotterWinnerFlashReport +DoTVShowPokemonLotterWinnerFlashReport: ; 80F45A0 push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444142,7 +444202,7 @@ _080F4634: adds r1, r0, 0 adds r0, r4, 0 bl CopyString - bl sub_80F577C + bl TVShowDone ldr r1, =gUnknown_0858D494 lsls r0, r6, 2 adds r0, r1 @@ -444152,10 +444212,10 @@ _080F4634: pop {r0} bx r0 .pool - thumb_func_end sub_80F45A0 + thumb_func_end DoTVShowPokemonLotterWinnerFlashReport - thumb_func_start sub_80F466C -sub_80F466C: ; 80F466C + thumb_func_start DoTVShowThePokemonBattleSeminar +DoTVShowThePokemonBattleSeminar: ; 80F466C push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444338,7 +444398,7 @@ _080F4838: muls r1, r5 adds r1, r4 bl CopyString - bl sub_80F577C + bl TVShowDone _080F4858: ldr r0, =gUnknown_0858D498 lsls r1, r7, 2 @@ -444349,10 +444409,10 @@ _080F4858: pop {r0} bx r0 .pool - thumb_func_end sub_80F466C + thumb_func_end DoTVShowThePokemonBattleSeminar - thumb_func_start sub_80F487C -sub_80F487C: ; 80F487C + thumb_func_start DoTVShowTrainerFanClubSpecial +DoTVShowTrainerFanClubSpecial: ; 80F487C push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444461,7 +444521,7 @@ _080F4978: ldr r0, =0x02021ec4 ldrh r1, [r4, 0x14] bl CopyEasyChatWord - bl sub_80F577C + bl TVShowDone _080F499A: ldr r0, =gUnknown_0858D320 lsls r1, r5, 2 @@ -444472,10 +444532,10 @@ _080F499A: pop {r0} bx r0 .pool - thumb_func_end sub_80F487C + thumb_func_end DoTVShowTrainerFanClubSpecial - thumb_func_start sub_80F49BC -sub_80F49BC: ; 80F49BC + thumb_func_start DoTVShowTrainerFanClub +DoTVShowTrainerFanClub: ; 80F49BC push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444631,7 +444691,7 @@ _080F4B1A: ldr r0, =0x02021ec4 ldrh r1, [r4, 0x6] bl CopyEasyChatWord - bl sub_80F577C + bl TVShowDone _080F4B3A: ldr r0, =gUnknown_0858D4B4 lsls r1, r5, 2 @@ -444642,10 +444702,10 @@ _080F4B3A: pop {r0} bx r0 .pool - thumb_func_end sub_80F49BC + thumb_func_end DoTVShowTrainerFanClub - thumb_func_start sub_80F4B5C -sub_80F4B5C: ; 80F4B5C + thumb_func_start DoTVShowSpotTheCuties +DoTVShowSpotTheCuties: ; 80F4B5C push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -444854,7 +444914,7 @@ _080F4D64: b _080F4D84 .pool _080F4D80: - bl sub_80F577C + bl TVShowDone _080F4D84: ldr r0, =gUnknown_0858D4E4 lsls r1, r5, 2 @@ -444865,10 +444925,10 @@ _080F4D84: pop {r0} bx r0 .pool - thumb_func_end sub_80F4B5C + thumb_func_end DoTVShowSpotTheCuties - thumb_func_start sub_80F4D9C -sub_80F4D9C: ; 80F4D9C + thumb_func_start DoTVShowPokemonNewsBattleFrontier +DoTVShowPokemonNewsBattleFrontier: ; 80F4D9C push {r4-r7,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -445115,7 +445175,7 @@ _080F5004: adds r1, 0x13 ldrb r2, [r6, 0xC] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F5014: ldr r0, =gUnknown_0858D524 lsls r1, r7, 2 @@ -445126,10 +445186,10 @@ _080F5014: pop {r0} bx r0 .pool - thumb_func_end sub_80F4D9C + thumb_func_end DoTVShowPokemonNewsBattleFrontier - thumb_func_start sub_80F5030 -sub_80F5030: ; 80F5030 + thumb_func_start DoTVShowWhatsNo1InHoennToday +DoTVShowWhatsNo1InHoennToday: ; 80F5030 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -445253,7 +445313,7 @@ _080F5154: adds r1, 0x13 ldrb r2, [r4, 0x5] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F5164: ldr r0, =gUnknown_0858D570 lsls r1, r5, 2 @@ -445264,7 +445324,7 @@ _080F5164: pop {r0} bx r0 .pool - thumb_func_end sub_80F5030 + thumb_func_end DoTVShowWhatsNo1InHoennToday thumb_func_start sub_80F5180 sub_80F5180: ; 80F5180 @@ -445333,8 +445393,8 @@ _080F51E6: bx r1 thumb_func_end sub_80F51AC - thumb_func_start sub_80F51EC -sub_80F51EC: ; 80F51EC + thumb_func_start DoTVShowSecretBaseSecrets +DoTVShowSecretBaseSecrets: ; 80F51EC push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -445620,7 +445680,7 @@ _080F54C4: adds r1, 0x13 ldrb r2, [r5, 0x1B] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone b _080F552A .pool _080F54E8: @@ -445672,10 +445732,10 @@ _080F552A: pop {r0} bx r0 .pool - thumb_func_end sub_80F51EC + thumb_func_end DoTVShowSecretBaseSecrets - thumb_func_start sub_80F5548 -sub_80F5548: ; 80F5548 + thumb_func_start DoTVShowSafariFanClub +DoTVShowSafariFanClub: ; 80F5548 push {r4,r5,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -445829,7 +445889,7 @@ _080F569A: b _080F56BC .pool _080F56B8: - bl sub_80F577C + bl TVShowDone _080F56BC: ldr r0, =gUnknown_0858D640 lsls r1, r5, 2 @@ -445840,10 +445900,10 @@ _080F56BC: pop {r0} bx r0 .pool - thumb_func_end sub_80F5548 + thumb_func_end DoTVShowSafariFanClub - thumb_func_start sub_80F56D4 -sub_80F56D4: ; 80F56D4 + thumb_func_start DoTVShowPokemonContestLiveUpdates2 +DoTVShowPokemonContestLiveUpdates2: ; 80F56D4 push {r4-r6,lr} ldr r2, =0x03005d8c ldr r0, =0x020375e0 @@ -445903,7 +445963,7 @@ _080F574E: adds r1, 0xB ldrb r2, [r4, 0x18] bl sub_81DB5E8 - bl sub_80F577C + bl TVShowDone _080F575E: ldr r0, =gUnknown_0858D384 lsls r1, r5, 2 @@ -445914,10 +445974,10 @@ _080F575E: pop {r0} bx r0 .pool - thumb_func_end sub_80F56D4 + thumb_func_end DoTVShowPokemonContestLiveUpdates2 - thumb_func_start sub_80F577C -sub_80F577C: ; 80F577C + thumb_func_start TVShowDone +TVShowDone: ; 80F577C ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] @@ -445938,16 +445998,16 @@ sub_80F577C: ; 80F577C strb r0, [r2] bx lr .pool - thumb_func_end sub_80F577C + thumb_func_end TVShowDone - thumb_func_start sub_80F57B8 -sub_80F57B8: ; 80F57B8 + thumb_func_start ResetTVShowState +ResetTVShowState: ; 80F57B8 ldr r1, =0x0203a030 movs r0, 0 strb r0, [r1] bx lr .pool - thumb_func_end sub_80F57B8 + thumb_func_end ResetTVShowState thumb_func_start sub_80F57C4 sub_80F57C4: ; 80F57C4 @@ -445971,7 +446031,7 @@ _080F57E0: adds r1, 0xC adds r1, r2 ldr r1, [r1] - bl SetBgTilemap + bl SetBgTilemapBuffer adds r4, 0x1 cmp r4, 0x3 ble _080F57E0 @@ -446372,7 +446432,7 @@ sub_80F5C00: ; 80F5C00 push {lr} bl CallObjectCallbacks bl PrepareSpritesForOamLoad - bl run_active_tasks + bl RunActiveTasks bl fade_and_return_progress_probably movs r0, 0x1 bl CopyBgTilemapBufferToVram @@ -446491,12 +446551,12 @@ _080F5D2A: ldr r1, =0x020375e2 movs r0, 0x8 strh r0, [r1] - bl sub_80EF5B8 + bl InterviewBefore ldr r0, =0x020375f0 ldrh r0, [r0] cmp r0, 0x1 beq _080F5D58 - bl sub_80EC6BC + bl InterviewAfter _080F5D58: movs r0, 0x2 bl sub_813BADC @@ -454299,7 +454359,7 @@ _080F9DB0: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits _080F9DC2: ldrh r1, [r4, 0x12] lsls r1, 8 @@ -454485,7 +454545,7 @@ _080F9F2C: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r0, 0x54 movs r1, 0 bl SetGpuReg @@ -460458,7 +460518,7 @@ _080FD08A: ldr r0, [r0] str r0, [r2] adds r0, r5, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FD0CC .pool _080FD0B8: @@ -460547,7 +460607,7 @@ _080FD158: thumb_func_end Task_CallItemUseOnFieldCallback thumb_func_start DisplayCannotUseItemMessage -; void DisplayCannotUseItemMessage(u8 taskId, BOOL isUsingRegisteredKeyItemOnField, u8 *str) +; void DisplayCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnField, u8 *str) DisplayCannotUseItemMessage: ; 80FD164 push {r4-r6,lr} adds r4, r1, 0 @@ -460565,7 +460625,7 @@ DisplayCannotUseItemMessage: ; 80FD164 lsls r0, 24 cmp r0, 0 bne _080FD1A0 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 adds r2, r6, 0 @@ -460592,7 +460652,7 @@ _080FD1BE: thumb_func_end DisplayCannotUseItemMessage thumb_func_start DisplayDadsAdviceCannotUseItemMessage -; void DisplayDadsAdviceCannotUseItemMessage(u8 taskId, BOOL isUsingRegisteredKeyItemOnField) +; void DisplayDadsAdviceCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnField) DisplayDadsAdviceCannotUseItemMessage: ; 80FD1C8 push {lr} lsls r0, 24 @@ -460607,7 +460667,7 @@ DisplayDadsAdviceCannotUseItemMessage: ; 80FD1C8 thumb_func_end DisplayDadsAdviceCannotUseItemMessage thumb_func_start DisplayCannotDismountBikeMessage -; void DisplayCannotDismountBikeMessage(u8 taskId, BOOL isUsingRegisteredKeyItemOnField) +; void DisplayCannotDismountBikeMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnField) DisplayCannotDismountBikeMessage: ; 80FD1E0 push {lr} lsls r0, 24 @@ -460679,7 +460739,7 @@ sub_80FD254: ; 80FD254 ldr r0, =0x0203ce7c ldrh r0, [r0] strh r0, [r1, 0x20] - ldr r1, =sub_81AD40C + ldr r1, =bag_menu_mail_related mov r0, sp movs r2, 0 bl sub_8121478 @@ -460699,7 +460759,7 @@ ItemUseOutOfBattle_Mail: ; 80FD278 ldr r2, [r1] ldr r1, =sub_80FD254 str r1, [r2] - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm pop {r0} bx r0 .pool @@ -460821,7 +460881,7 @@ _080FD37E: thumb_func_end ItemUseOnFieldCB_Bike thumb_func_start CanFish -; BOOL CanFish() +; bool8 CanFish() CanFish: ; 80FD394 push {r4-r6,lr} sub sp, 0x4 @@ -461112,7 +461172,7 @@ sub_80FD5CC: ; 80FD5CC thumb_func_end sub_80FD5CC thumb_func_start ItemfinderCheckForHiddenItems -; BOOL ItemfinderCheckForHiddenItems(struct map_events *events, u8 taskId) +; bool8 ItemfinderCheckForHiddenItems(struct map_events *events, u8 taskId) ItemfinderCheckForHiddenItems: ; 80FD5F0 push {r4-r7,lr} mov r7, r9 @@ -461889,7 +461949,7 @@ _080FDB98: ldr r0, =sub_80FDBEC str r0, [r1] adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FDBDA .pool _080FDBC8: @@ -461911,7 +461971,7 @@ _080FDBDA: thumb_func_start sub_80FDBEC sub_80FDBEC: ; 80FDBEC push {lr} - ldr r1, =sub_81AD40C + ldr r1, =bag_menu_mail_related movs r0, 0 bl sub_81357FC pop {r0} @@ -461970,7 +462030,7 @@ ItemUseOutOfBattle_CoinCase: ; 80FDC34 ldrsh r0, [r0, r1] cmp r0, 0 bne _080FDC90 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 adds r2, r4, 0 @@ -462014,7 +462074,7 @@ ItemUseOutOfBattle_PowderJar: ; 80FDCA4 ldrsh r0, [r0, r1] cmp r0, 0 bne _080FDCFC - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 adds r2, r4, 0 @@ -462054,7 +462114,7 @@ sub_80FDD10: ; 80FDD10 ldr r0, =c2_exit_to_overworld_2_switch str r0, [r1] adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FDD68 .pool _080FDD58: @@ -462080,7 +462140,7 @@ sub_80FDD74: ; 80FDD74 ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item bl script_env_2_enable ldr r0, =gUnknown_08274482 bl script_env_1_execute_new_script @@ -462363,7 +462423,7 @@ task08_0809AD8C: ; 80FDFBC ldr r4, =0x02021cc4 ldr r0, =0x0203ce7c ldrh r0, [r0] - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r0, 16 movs r1, 0xD @@ -462395,7 +462455,7 @@ sub_80FE024: ; 80FE024 lsrs r0, 24 ldr r2, =gUnknown_085920E8 movs r1, 0x6 - bl sub_81AE238 + bl bag_menu_yes_no pop {r0} bx r0 .pool @@ -462421,7 +462481,7 @@ sub_80FE058: ; 80FE058 ldr r4, =0x0203ce7c ldrh r0, [r4] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldrh r0, [r4] ldr r1, =0x02021dc4 bl itemid_get_name @@ -462479,7 +462539,7 @@ _080FE0EC: cmp r0, 0 bne _080FE10C ldr r2, =gUnknown_085E9092 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 bl DisplayItemMessage @@ -462555,7 +462615,7 @@ sub_80FE164: ; 80FE164 cmp r0, 0 bne _080FE1B8 ldr r2, =0x02021fc4 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 bl DisplayItemMessage @@ -462598,7 +462658,7 @@ sub_80FE1D0: ; 80FE1D0 cmp r0, 0 bne _080FE21C ldr r2, =0x02021fc4 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 bl DisplayItemMessage @@ -462780,13 +462840,13 @@ ItemUseInBattle_PokeBall: ; 80FE394 ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item bl InBattlePyramid lsls r0, 24 cmp r0, 0 bne _080FE3C8 adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FE3FA .pool _080FE3C8: @@ -462799,7 +462859,7 @@ _080FE3D0: cmp r0, 0 bne _080FE3F0 ldr r2, =gUnknown_085E9125 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 bl DisplayItemMessage @@ -462834,7 +462894,7 @@ sub_80FE408: ; 80FE408 cmp r0, 0 bne _080FE434 adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FE43A .pool _080FE434: @@ -462869,7 +462929,7 @@ sub_80FE440: ; 80FE440 ldr r4, =0x0203ce7c ldrh r0, [r4] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item bl InBattlePyramid lsls r0, 24 cmp r0, 0 @@ -462927,7 +462987,7 @@ ItemUseInBattle_StatIncrease: ; 80FE4B8 cmp r0, 0 bne _080FE518 ldr r2, =gUnknown_085E96F6 - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 bl DisplayItemMessage @@ -462970,7 +463030,7 @@ sub_80FE54C: ; 80FE54C ldr r0, =sub_81B89F0 str r0, [r1] adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _080FE582 .pool _080FE574: @@ -463046,7 +463106,7 @@ ItemUseInBattle_Escape: ; 80FE5E4 cmp r0, 0 bne _080FE620 ldr r2, =0x02021fc4 - ldr r3, =sub_81AB8F8 + ldr r3, =unknown_ItemMenu_Confirm adds r0, r4, 0 movs r1, 0x1 bl DisplayItemMessage @@ -471614,14 +471674,14 @@ _08102A9A: movs r1, 0x80 lsls r1, 2 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits b _08102AD2 .pool _08102AC8: movs r1, 0x80 lsls r1, 3 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits _08102AD2: pop {r3,r4} mov r8, r3 @@ -501923,7 +501983,7 @@ _08111FC4: lsls r1, 3 _08111FC8: movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits b _081120C6 _08111FD0: movs r1, 0x24 @@ -502174,7 +502234,7 @@ _081121D0: lsls r1, 3 _081121D4: movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits b _08112258 _081121DC: ldrh r0, [r4, 0x10] @@ -517309,7 +517369,7 @@ _08119F12: thumb_func_end sub_8119EF0 thumb_func_start IsRunningDisallowedByMetatile -; BOOL IsRunningDisallowedByMetatile(u8 metatileBehavior) +; bool8 IsRunningDisallowedByMetatile(u8 metatileBehavior) IsRunningDisallowedByMetatile: ; 8119F18 push {r4,lr} lsls r0, 24 @@ -517686,7 +517746,7 @@ _0811A1D0: thumb_func_end sub_811A188 thumb_func_start IsRunningDisallowed -; BOOL IsRunningDisallowed(u8 metatileBehavior) +; bool8 IsRunningDisallowed(u8 metatileBehavior) IsRunningDisallowed: ; 811A1DC push {lr} lsls r0, 24 @@ -517764,7 +517824,7 @@ sub_811A20C: ; 811A20C thumb_func_start sub_811A278 sub_811A278: ; 811A278 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -518065,8 +518125,8 @@ sub_811A4D0: ; 811A4D0 bx r0 thumb_func_end sub_811A4D0 - thumb_func_start sub_811A4F0 -sub_811A4F0: ; 811A4F0 + thumb_func_start easy_chat_input_maybe +easy_chat_input_maybe: ; 811A4F0 push {r4,r5,lr} movs r5, 0x3 ldr r0, =0x020375e0 @@ -518341,7 +518401,7 @@ _0811A7D4: pop {r0} bx r0 .pool - thumb_func_end sub_811A4F0 + thumb_func_end easy_chat_input_maybe thumb_func_start sub_811A7E4 sub_811A7E4: ; 811A7E4 @@ -521653,13 +521713,13 @@ _0811BFE0: lsls r0, 4 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0xC0 lsls r0, 2 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_08597C64 bl InitWindows bl DeactivateAllTextPrinters @@ -523844,7 +523904,7 @@ sub_811D214: ; 811D214 ldr r0, =gUnknown_08597C84 movs r1, 0x1 movs r2, 0xE - bl sub_81996C0 + bl CreateYesNoMenu pop {r0} bx r0 .pool @@ -524324,7 +524384,7 @@ sub_811D60C: ; 811D60C push {r4,lr} sub sp, 0x8 movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r4, r0, 0 bl sub_811BA68 lsls r0, 24 @@ -532610,12 +532670,12 @@ _081216F4: lsls r2, 2 adds r1, r2 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x0000122c adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer b _081219D4 .pool _08121730: @@ -533348,9 +533408,9 @@ _08121D58: bl memset bl sub_80A1A74 movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl ResetBgsAndClearDma3BusyFlags bl FreeAllWindowBuffers @@ -533451,8 +533511,9 @@ sub_8121E10: ; 8121E10 bx r0 thumb_func_end sub_8121E10 - thumb_func_start vblank_hblank_handler_set_zero -vblank_hblank_handler_set_zero: ; 8121E68 + thumb_func_start SetVBlankHBlankCallbacksToNull +; void SetVBlankHBlankCallbacksToNull() +SetVBlankHBlankCallbacksToNull: ; 8121E68 push {lr} movs r0, 0 bl SetVBlankCallback @@ -533460,7 +533521,7 @@ vblank_hblank_handler_set_zero: ; 8121E68 bl SetHBlankCallback pop {r0} bx r0 - thumb_func_end vblank_hblank_handler_set_zero + thumb_func_end SetVBlankHBlankCallbacksToNull thumb_func_start DisplayMessageAndContinueTask ; void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 windowBorderFirstTileNum, u8 windowBorderPalette, u8 fontId, u8 speed, u8 *str, void ( *callback)(u8 taskId)) @@ -533589,14 +533650,15 @@ sub_8121F68: ; 8121F68 adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r0, =sub_8121FDC + ldr r0, =Task_CallYesOrNoCallback str r0, [r1] bx lr .pool thumb_func_end sub_8121F68 - thumb_func_start sub_8121F94 -sub_8121F94: ; 8121F94 + thumb_func_start CreateYesNoMenuWithCallbacks +; void CreateYesNoMenuWithCallbacks(u8 taskId, struct WindowTemplate *windowTemplate, int a3, int a4, int a5, u16 borderFirstTileNum, u8 borderPalette, void ( **callbacks)(u8 taskId)) +CreateYesNoMenuWithCallbacks: ; 8121F94 push {r4,r5,lr} adds r4, r0, 0 adds r0, r1, 0 @@ -533610,7 +533672,7 @@ sub_8121F94: ; 8121F94 lsls r2, 24 lsrs r2, 24 movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r2, =0x0203a138 ldr r0, [r5] ldr r1, [r5, 0x4] @@ -533621,16 +533683,17 @@ sub_8121F94: ; 8121F94 adds r0, r4 lsls r0, 3 adds r0, r1 - ldr r1, =sub_8121FDC + ldr r1, =Task_CallYesOrNoCallback str r1, [r0] pop {r4,r5} pop {r0} bx r0 .pool - thumb_func_end sub_8121F94 + thumb_func_end CreateYesNoMenuWithCallbacks - thumb_func_start sub_8121FDC -sub_8121FDC: ; 8121FDC + thumb_func_start Task_CallYesOrNoCallback +; void Task_CallYesOrNoCallback(u8 taskId) +Task_CallYesOrNoCallback: ; 8121FDC push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -533671,10 +533734,11 @@ _08122028: pop {r0} bx r0 .pool - thumb_func_end sub_8121FDC + thumb_func_end Task_CallYesOrNoCallback - thumb_func_start sub_8122034 -sub_8122034: ; 8122034 + thumb_func_start AdjustQuantityAccordingToDPadInput +; bool8 AdjustQuantityAccordingToDPadInput(u16 *quantity, u16 maxQuantity) +AdjustQuantityAccordingToDPadInput: ; 8122034 push {r4-r6,lr} adds r2, r0, 0 lsls r1, 16 @@ -533760,7 +533824,7 @@ _081220C8: pop {r4-r6} pop {r1} bx r1 - thumb_func_end sub_8122034 + thumb_func_end AdjustQuantityAccordingToDPadInput thumb_func_start GetLRKeysState GetLRKeysState: ; 81220D0 @@ -544300,7 +544364,7 @@ sub_81274A0: ; 81274A0 adds r0, r6, 0 movs r1, 0x18 movs r2, 0x5C - bl sub_819A2F8 + bl blit_move_info_icon b _081274F6 _081274DC: adds r0, r4, 0 @@ -544313,7 +544377,7 @@ _081274DC: mov r0, r8 movs r1, 0x19 movs r2, 0x5C - bl sub_819A2F8 + bl blit_move_info_icon _081274F6: pop {r3} mov r8, r3 @@ -544350,7 +544414,7 @@ sub_8127500: ; 8127500 movs r1, 0x3C movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized ldr r1, [r4] ldr r2, =0x00000522 adds r1, r2 @@ -544373,7 +544437,7 @@ sub_8127554: ; 8127554 ldrb r0, [r1] cmp r0, 0xFF beq _08127572 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x00000522 adds r0, r1 @@ -544435,7 +544499,7 @@ sub_812759C: ; 812759C ldrh r1, [r1] ldr r2, =0x0203a16e ldrh r2, [r2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x1A] @@ -544486,7 +544550,7 @@ sub_812764C: ; 812764C cmp r0, 0 bne _08127700 ldrb r0, [r5, 0x1A] - bl sub_81AE604 + bl ListMenuHandleInput adds r4, r0, 0 ldrb r0, [r5, 0x1A] ldr r7, =0x0203a170 @@ -550328,7 +550392,7 @@ _0812A666: thumb_func_start sub_812A670 sub_812A670: ; 812A670 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -561423,7 +561487,7 @@ sub_812FE0C: ; 812FE0C ldrb r0, [r0] bl RemoveWindow movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free bl sub_805F094 pop {r4,r5} @@ -561695,7 +561759,7 @@ sub_8130098: ; 8130098 bl AllocZeroed adds r1, r0, 0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r4, =0x030011f7 ldr r0, =gUnknown_085B07EC bl AddWindow @@ -569243,7 +569307,7 @@ sub_8133E38: ; 8133E38 bl sub_81619DC ldr r0, =0x020375e0 ldrb r0, [r0] - bl sub_8161960 + bl IsThereStorageSpaceForDecoration ldr r4, =0x020375e2 ldrh r1, [r4] movs r0, 0xB @@ -569588,7 +569652,7 @@ set_256color_bg_bg0: ; 8133F0C thumb_func_start sub_81341E0 sub_81341E0: ; 81341E0 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -569811,7 +569875,7 @@ sub_8134390: ; 8134390 lsls r1, 2 movs r2, 0xD movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r0, =sub_8134400 str r0, [r4] add sp, 0xC @@ -570792,7 +570856,7 @@ _08134BA4: thumb_func_start sub_8134C9C sub_8134C9C: ; 8134C9C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -570965,7 +571029,7 @@ sub_8134DC4: ; 8134DC4 adds r1, r5, 0 movs r2, 0xD movs r3, 0x1 - bl sub_81996C0 + bl CreateYesNoMenu ldr r1, =0x03005e00 lsls r0, r4, 2 adds r0, r4 @@ -572341,7 +572405,7 @@ sub_8135908: ; 8135908 thumb_func_start sub_813591C sub_813591C: ; 813591C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -572425,7 +572489,7 @@ _081359A0: .4byte _08135B6A .4byte _08135B84 _081359EC: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl clear_scheduled_bg_copies_to_vram b _08135B9E _081359F6: @@ -572557,7 +572621,7 @@ _08135B1A: ldr r2, =0x0203ab48 ldrh r1, [r2, 0x6] ldrh r2, [r2, 0x4] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit ldr r2, =0x03005e00 lsls r1, r4, 2 adds r1, r4 @@ -572641,7 +572705,7 @@ sub_8135BDC: ; 8135BDC ldr r0, =0x0203ab50 ldr r1, [r0] movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x2 bl schedule_bg_copy_tilemap_to_vram @@ -573578,7 +573642,7 @@ sub_81363BC: ; 81363BC movs r1, 0xB0 movs r2, 0x8 movs r3, 0x98 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized ldr r1, [r4] ldr r2, =0x00000e7c adds r1, r2 @@ -573601,7 +573665,7 @@ sub_8136418: ; 8136418 ldrb r0, [r1] cmp r0, 0xFF beq _08136436 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x00000e7c adds r0, r1 @@ -573880,7 +573944,7 @@ _08136688: ldrh r2, [r5, 0x4] mov r8, r2 ldrb r0, [r6] - bl sub_81AE604 + bl ListMenuHandleInput adds r4, r0, 0 ldrb r0, [r6] adds r1, r5, 0x6 @@ -573977,7 +574041,7 @@ _0813676C: ldrh r4, [r6, 0x6] ldrh r5, [r6, 0x4] ldrb r0, [r7] - bl sub_81AE604 + bl ListMenuHandleInput mov r9, r0 ldrb r0, [r7] adds r1, r6, 0x6 @@ -574135,7 +574199,7 @@ _081368BA: ldr r2, =0x0203ab48 ldrh r1, [r2, 0x6] ldrh r2, [r2, 0x4] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r6] @@ -574411,7 +574475,7 @@ sub_8136B48: ; 8136B48 str r2, [sp, 0xC] movs r2, 0x1 movs r3, 0 - bl sub_8121F94 + bl CreateYesNoMenuWithCallbacks add sp, 0x10 pop {r0} bx r0 @@ -574486,7 +574550,7 @@ sub_8136BC0: ; 8136BC0 ldr r0, =0x03006310 ldrh r1, [r5] ldrh r2, [r6] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -575189,7 +575253,7 @@ sub_81371B4: ; 81371B4 thumb_func_start sub_81371D4 sub_81371D4: ; 81371D4 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -579146,7 +579210,7 @@ sub_8139248: ; 8139248 ldrb r0, [r0] adds r5, r1, r0 movs r0, 0x2 - bl sub_80EF038 + bl GetPriceReduction lsls r0, 24 cmp r0, 0 bne _08139294 @@ -579956,7 +580020,7 @@ sub_81398C0: ; 81398C0 _081398E0: ldr r4, =0x02021dc4 ldrh r0, [r1] - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r0, 16 movs r1, 0xD @@ -581288,7 +581352,7 @@ _0813A38C: ldrh r1, [r6, 0x16] ldrh r2, [r6, 0x18] adds r0, r4, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r6, 0x24] @@ -581409,7 +581473,7 @@ sub_813A4EC: ; 813A4EC ldrh r0, [r6, 0x24] lsls r0, 24 lsrs r0, 24 - bl sub_81AE604 + bl ListMenuHandleInput adds r4, r0, 0 movs r0, 0x2 negs r0, r0 @@ -581665,7 +581729,7 @@ sub_813A694: ; 813A694 strh r0, [r2, 0x8] ldr r1, =0x0203ab68 mov r0, sp - bl sub_81AF380 + bl AddScrollIndicatorArrowPair lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x20] @@ -581696,7 +581760,7 @@ sub_813A738: ; 813A738 ldrh r0, [r2, 0x20] lsls r0, 24 lsrs r0, 24 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair _0813A75E: pop {r0} bx r0 @@ -585673,7 +585737,7 @@ sub_813C8D8: ; 813C8D8 thumb_func_start sub_813C8EC sub_813C8EC: ; 813C8EC push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -585744,7 +585808,7 @@ _0813C976: bl InitBgsFromTemplates ldr r1, [r4] movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_813C828 b _0813CA00 .pool @@ -587706,7 +587770,7 @@ _0813D9A4: sub_813D9B0: ; 813D9B0 push {lr} bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_813D9B0 @@ -588684,7 +588748,7 @@ sub_813E3A4: ; 813E3A4 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_813E3A4 @@ -588696,7 +588760,7 @@ sub_813E3C0: ; 813E3C0 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_813E3C0 @@ -590956,7 +591020,7 @@ _0813F928: movs r1, 0xA8 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu ldr r3, =0x02024332 strb r4, [r3, 0x1] ldr r0, =0x03005e00 @@ -591063,13 +591127,13 @@ _0813FA32: bl sub_800E084 _0813FA3E: movs r0, 0x3 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer bl Free bl FreeAllWindowBuffers ldr r0, =0x020244ec @@ -591913,7 +591977,7 @@ _08140232: thumb_func_start sub_8140238 sub_8140238: ; 8140238 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad ldr r0, =0x0203ab88 @@ -592074,17 +592138,17 @@ sub_8140388: ; 8140388 lsls r0, 1 adds r1, r0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r2, =0x0000117c adds r1, r2 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x0000317c adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_085B614C bl InitWindows bl sub_8197200 @@ -592119,11 +592183,11 @@ sub_8140418: ; 8140418 str r4, [r0] bl FreeAllWindowBuffers movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl ResetBgsAndClearDma3BusyFlags ldr r0, [r5] @@ -592329,7 +592393,7 @@ _08140618: movs r0, 0 bl SetVBlankCallback bl remove_some_task - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl sub_8121DA0 bl sub_8121E10 b _081407F8 @@ -602588,7 +602652,7 @@ SetCoins: ; 8145C58 thumb_func_end SetCoins thumb_func_start AddCoins -; BOOL AddCoins(u16 amount) +; bool8 AddCoins(u16 amount) AddCoins: ; 8145C80 push {r4,lr} lsls r0, 16 @@ -602629,7 +602693,7 @@ _08145CC0: thumb_func_end AddCoins thumb_func_start SubtractCoins -; BOOL SubtractCoins(u16 amount) +; bool8 SubtractCoins(u16 amount) SubtractCoins: ; 8145CCC push {r4,lr} lsls r0, 16 @@ -602888,7 +602952,7 @@ _08145EAC: ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 _08145EC0: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -609496,7 +609560,7 @@ _081494C4: strh r1, [r4, 0xC] strh r2, [r4, 0x16] movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits _081494F0: movs r0, 0 pop {r4,r5} @@ -611430,7 +611494,7 @@ sub_814A42C: ; 814A42C movs r1, 0xC0 lsls r1, 7 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r5, 0 movs r0, 0x80 lsls r0, 6 @@ -621589,22 +621653,22 @@ _0814FDFC: ldr r1, [r4] adds r1, 0xFC movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r3, =0x000010fc adds r1, r3 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x000020fc adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r2, =0x000030fc adds r1, r2 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r2, =0x02021bbc ldr r1, =0x02021bbe movs r0, 0 @@ -621702,7 +621766,7 @@ _0814FF5C: .pool _0814FF7C: bl sub_8150D28 - bl run_active_tasks + bl RunActiveTasks ldr r1, =0x030022c0 movs r0, 0x87 lsls r0, 3 @@ -622008,7 +622072,7 @@ _08150226: thumb_func_start mainloop mainloop: ; 815023C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -622058,13 +622122,13 @@ _08150298: bl ResetAllObjectData bl sub_80A1A74 movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x2 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x3 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl ResetBgsAndClearDma3BusyFlags ldr r6, =0x0203abac @@ -643497,7 +643561,7 @@ sub_815AC8C: ; 815AC8C movs r1, 0x80 lsls r1, 7 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits _0815ACB8: adds r0, r4, 0 bl move_anim_task_del @@ -654591,7 +654655,7 @@ sub_81606A0: ; 81606A0 ldr r0, =0x03006310 ldrh r1, [r4] ldrh r2, [r4, 0x2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit ldr r1, [r6] movs r2, 0x89 lsls r2, 1 @@ -654648,7 +654712,7 @@ sub_8160740: ; 8160740 ldr r0, =0x03006310 ldrh r1, [r4] ldrh r2, [r4, 0x2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit ldr r1, [r5] movs r2, 0x89 lsls r2, 1 @@ -654697,7 +654761,7 @@ sub_81607EC: ; 81607EC sub_816082C: ; 816082C push {lr} bl sub_8160868 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -655474,7 +655538,7 @@ sub_8160F50: ; 8160F50 lsls r4, 1 adds r0, r4 ldrb r0, [r0] - bl sub_81AE604 + bl ListMenuHandleInput adds r5, r0, 0 ldr r0, [r6] adds r0, r4 @@ -655751,7 +655815,7 @@ sub_81611AC: ; 81611AC movs r3, 0x8B lsls r3, 1 adds r1, r3 - bl sub_81AF380 + bl AddScrollIndicatorArrowPair ldr r1, [r4] movs r5, 0x8A lsls r5, 1 @@ -655782,7 +655846,7 @@ _081611D4: subs r1, r2 strh r1, [r0, 0x8] ldr r1, =0x0203bc38 - bl sub_81AF380 + bl AddScrollIndicatorArrowPair ldr r1, [r4] ldr r6, =0x00000113 adds r1, r6 @@ -655805,7 +655869,7 @@ sub_8161234: ; 8161234 ldrb r0, [r1] cmp r0, 0xFF beq _08161256 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] movs r1, 0x8A lsls r1, 1 @@ -655819,7 +655883,7 @@ _08161256: ldrb r0, [r1] cmp r0, 0xFF beq _08161270 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r2, =0x00000113 adds r1, r0, r2 @@ -656657,8 +656721,8 @@ _08161958: bx r1 thumb_func_end sub_8161918 - thumb_func_start sub_8161960 -sub_8161960: ; 8161960 + thumb_func_start IsThereStorageSpaceForDecoration +IsThereStorageSpaceForDecoration: ; 8161960 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 @@ -656692,7 +656756,7 @@ _081619A2: pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_8161960 + thumb_func_end IsThereStorageSpaceForDecoration thumb_func_start sub_81619A8 sub_81619A8: ; 81619A8 @@ -666430,7 +666494,7 @@ sub_8166D44: ; 8166D44 movs r1, 0x97 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu add sp, 0x4C pop {r4} pop {r0} @@ -667971,7 +668035,7 @@ _08167AEC: ldr r0, =0x0203bca0 ldr r1, [r0] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08DCDA30 movs r0, 0xC str r0, [sp] @@ -669250,7 +669314,7 @@ sub_81685D4: ; 81685D4 str r1, [r0] bl nullsub_35 bl FreeAllWindowBuffers - bl sub_81ADD70 + bl DoWallyTutorialBagMenu _081685FC: pop {r0} bx r0 @@ -674754,7 +674818,7 @@ sub_816B674: ; 816B674 cmp r0, 0 bne _0816B71E ldrb r0, [r4, 0xA] - bl sub_81AE604 + bl ListMenuHandleInput adds r6, r0, 0 ldrb r0, [r4, 0xA] ldr r7, =0x0203bcba @@ -674777,7 +674841,7 @@ _0816B6D4: bl audio_play mov r1, r8 ldrb r0, [r1, 0x9] - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair adds r0, r5, 0 bl sub_816B798 b _0816B71E @@ -674796,7 +674860,7 @@ _0816B6EA: bl schedule_bg_copy_tilemap_to_vram mov r1, r8 ldrb r0, [r1, 0x9] - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair mov r0, r10 subs r0, 0x8 add r0, r9 @@ -675789,7 +675853,7 @@ sub_816BF60: ; 816BF60 movs r1, 0xB0 movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized strb r0, [r4, 0x9] _0816BF8C: add sp, 0x10 @@ -675806,7 +675870,7 @@ sub_816BF9C: ; 816BF9C ldrb r0, [r4, 0x9] cmp r0, 0xFF beq _0816BFAE - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair movs r0, 0xFF strb r0, [r4, 0x9] _0816BFAE: @@ -675827,7 +675891,7 @@ sub_816BFB8: ; 816BFB8 lsrs r4, 24 lsls r5, 24 lsrs r5, 24 - bl sub_81AE88C + bl ListMenuGetYCoordForPrintingArrowCursor lsls r0, 24 lsrs r0, 24 adds r1, r4, 0 @@ -676072,7 +676136,7 @@ _0816C186: ldr r2, =0x0203bcb8 ldrh r1, [r2, 0x2] ldrh r2, [r2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r7, 0xA] @@ -676233,7 +676297,7 @@ sub_816C30C: ; 816C30C .pool _0816C35C: ldrb r0, [r4, 0xA] - bl sub_81AE604 + bl ListMenuHandleInput adds r6, r0, 0 ldrb r0, [r4, 0xA] ldr r1, =0x0203bcba @@ -676437,7 +676501,7 @@ sub_816C4FC: ; 816C4FC .pool _0816C530: ldrb r0, [r4, 0xA] - bl sub_81AE604 + bl ListMenuHandleInput adds r6, r0, 0 ldrb r0, [r4, 0xA] ldr r1, =0x0203bcba @@ -676570,7 +676634,7 @@ _0816C622: ldr r2, =0x0203bcb8 ldrh r1, [r2, 0x2] ldrh r2, [r2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 mov r1, r8 @@ -676788,7 +676852,7 @@ sub_816C818: ; 816C818 ldr r2, =0x0000049a adds r1, r2 ldrh r1, [r1] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r4, r0, 24 cmp r4, 0x1 @@ -676998,7 +677062,7 @@ sub_816C9B8: ; 816C9B8 adds r0, r5, 0 movs r2, 0x1 movs r3, 0 - bl sub_8121F94 + bl CreateYesNoMenuWithCallbacks b _0816CA7C .pool _0816CA64: @@ -677107,7 +677171,7 @@ sub_816CB04: ; 816CB04 ldr r0, =0x03006310 ldrh r1, [r4, 0x2] ldrh r2, [r4] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0xA] @@ -677188,7 +677252,7 @@ sub_816CBE8: ; 816CBE8 thumb_func_start sub_816CC00 sub_816CC00: ; 816CC00 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -683447,7 +683511,7 @@ sub_81700F8: ; 81700F8 bl RegisterRamReset movs r0, 0 movs r1, 0x80 - bl ResetGpuRegBits + bl ClearGpuRegBits strh r4, [r5] ldr r1, =0x030022c0 ldr r0, =0x00000439 @@ -689646,7 +689710,7 @@ sub_817354C: ; 817354C thumb_func_start sub_8173560 sub_8173560: ; 8173560 push {lr} - bl run_active_tasks + bl RunActiveTasks bl RunTextPrinters bl CallObjectCallbacks bl PrepareSpritesForOamLoad @@ -690161,9 +690225,9 @@ sub_81739C4: ; 81739C4 cmp r0, 0 beq _08173A34 movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x3 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer bl FreeAllWindowBuffers ldr r5, =0x0203bcdc ldr r0, [r5] @@ -691007,9 +691071,9 @@ _081740FA: bl HideBg bl FreeAllWindowBuffers movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x3 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl ResetBgsAndClearDma3BusyFlags adds r0, r7, 0 @@ -691140,7 +691204,7 @@ _08174240: b _081742A2 .pool _08174280: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -691909,9 +691973,9 @@ _08174928: bl sub_8198314 bl FreeAllWindowBuffers movs r0, 0x1 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0x3 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer movs r0, 0 bl ResetBgsAndClearDma3BusyFlags adds r0, r6, 0 @@ -692634,12 +692698,12 @@ sub_8174FAC: ; 8174FAC ldr r1, [r4] adds r1, 0x12 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001012 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0 movs r1, 0 movs r2, 0 @@ -693241,7 +693305,7 @@ sub_81754C8: ; 81754C8 thumb_func_start sub_81754DC sub_81754DC: ; 81754DC push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks ldr r0, =0x030022c0 ldrh r1, [r0, 0x2C] @@ -693265,7 +693329,7 @@ sub_81754DC: ; 81754DC cmp r1, r0 bne _08175522 bl sub_81754C8 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks ldr r1, =0x0203bce5 movs r0, 0x1 @@ -693292,7 +693356,7 @@ sub_8175548: ; 8175548 bl AllocZeroed adds r1, r0, 0 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_085E56F0 movs r1, 0x80 movs r2, 0x40 @@ -693317,7 +693381,7 @@ sub_81755A4: ; 81755A4 push {lr} bl FreeAllWindowBuffers movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _081755B8 bl Free @@ -697649,7 +697713,7 @@ _0817797C: thumb_func_start sub_8177A08 sub_8177A08: ; 8177A08 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -697796,7 +697860,7 @@ sub_8177B44: ; 8177B44 ldr r0, =0x0203bcf0 ldr r1, [r0] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r1, 0x82 lsls r1, 5 movs r0, 0 @@ -697903,7 +697967,7 @@ sub_8177C14: ; 8177C14 thumb_func_start sub_8177C54 sub_8177C54: ; 8177C54 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -697984,7 +698048,7 @@ _08177CD8: .4byte _08177DB4 .4byte _08177DC2 _08177D18: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl sub_8121DA0 bl clear_scheduled_bg_copies_to_vram b _08177DDC @@ -698109,13 +698173,13 @@ sub_8177E14: ; 8177E14 ldr r4, =0x0203bcf4 ldr r1, [r4] movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] movs r0, 0x80 lsls r0, 4 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x2 bl schedule_bg_copy_tilemap_to_vram @@ -698369,7 +698433,7 @@ sub_8178090: ; 8178090 push {r4,lr} sub sp, 0x8 movs r0, 0 - bl GetBgTilemap + bl GetBgTilemapBuffer ldr r1, =0x0203bcf4 ldr r1, [r1] movs r2, 0x80 @@ -699011,7 +699075,7 @@ sub_8178610: ; 8178610 ldr r0, [r0] bl Free bl FreeAllWindowBuffers - ldr r0, =sub_81AD40C + ldr r0, =bag_menu_mail_related bl SetMainCallback2 adds r0, r4, 0 bl remove_task @@ -699488,7 +699552,7 @@ _081789AC: movs r1, 0 bl AddTask bl sub_80A2F30 - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -699989,7 +700053,7 @@ _08178E58: movs r1, 0xD strb r1, [r0] _08178E98: - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl RunTextPrinters @@ -700249,7 +700313,7 @@ _08178FF8: ldr r5, =0x0201e000 movs r0, 0 adds r1, r5, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer mov r0, r8 str r0, [sp, 0x8] ldr r2, =0x05000200 @@ -701387,7 +701451,7 @@ _08179B5C: thumb_func_start sub_8179B68 sub_8179B68: ; 8179B68 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -701446,7 +701510,7 @@ _08179BF8: ldr r0, =0x00001084 bl AllocZeroed str r0, [r4] - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl clear_scheduled_bg_copies_to_vram ldr r1, =0x030022c0 movs r2, 0x87 @@ -701636,7 +701700,7 @@ sub_8179D9C: ; 8179D9C ldr r1, [r0] adds r1, 0x48 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x1 bl schedule_bg_copy_tilemap_to_vram @@ -703290,7 +703354,7 @@ sub_817ACE4: ; 817ACE4 movs r1, 0x2 movs r2, 0xE movs r3, 0x1 - bl sub_81996C0 + bl CreateYesNoMenu ldr r1, =0x03005e00 lsls r0, r4, 2 adds r0, r4 @@ -703384,7 +703448,7 @@ sub_817ADC0: ; 817ADC0 thumb_func_start sub_817ADE4 sub_817ADE4: ; 817ADE4 push {lr} - bl run_active_tasks + bl RunActiveTasks bl fade_and_return_progress_probably pop {r0} bx r0 @@ -725223,7 +725287,7 @@ sub_8185E8C: ; 8185E8C push {lr} bl CallObjectCallbacks bl PrepareSpritesForOamLoad - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_8185E8C @@ -740545,7 +740609,7 @@ sub_818E2D8: ; 818E2D8 thumb_func_start sub_818E2FC sub_818E2FC: ; 818E2FC push {lr} - bl sub_811A4F0 + bl easy_chat_input_maybe pop {r0} bx r0 thumb_func_end sub_818E2FC @@ -740722,7 +740786,7 @@ sub_818E47C: ; 818E47C ldr r1, =0x020375e0 movs r0, 0x11 strh r0, [r1] - bl sub_811A4F0 + bl easy_chat_input_maybe pop {r0} bx r0 .pool @@ -740734,7 +740798,7 @@ sub_818E490: ; 818E490 ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item pop {r0} bx r0 .pool @@ -751810,7 +751874,7 @@ _0819438C: bl LZDecompressWram ldr r1, [r4] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x1 bl CopyBgTilemapBufferToVram ldr r1, =gUnknown_08D82F10 @@ -752672,7 +752736,7 @@ sub_8194B54: ; 8194B54 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_8194B54 @@ -758312,7 +758376,7 @@ sub_8197930: ; 8197930 lsls r1, 2 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu pop {r0} bx r0 .pool @@ -758328,7 +758392,7 @@ sub_8197948: ; 8197948 movs r1, 0x85 lsls r1, 2 movs r2, 0xE - bl sub_81996C0 + bl CreateYesNoMenu pop {r0} bx r0 .pool @@ -762147,8 +762211,9 @@ _081996A6: bx r0 thumb_func_end sub_81995E4 - thumb_func_start sub_81996C0 -sub_81996C0: ; 81996C0 + thumb_func_start CreateYesNoMenu +; void CreateYesNoMenu(struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos) +CreateYesNoMenu: ; 81996C0 push {r4-r6,lr} mov r6, r9 mov r5, r8 @@ -762256,7 +762321,7 @@ sub_81996C0: ; 81996C0 pop {r0} bx r0 .pool - thumb_func_end sub_81996C0 + thumb_func_end CreateYesNoMenu thumb_func_start sub_81997AC sub_81997AC: ; 81997AC @@ -762902,7 +762967,7 @@ sub_8199C30: ; 8199C30 lsls r2, 24 lsrs r2, 24 mov r10, r2 - bl GetBgTilemap + bl GetBgTilemapBuffer mov r8, r0 adds r0, r5, r4 cmp r5, r0 @@ -762976,7 +763041,7 @@ sub_8199CBC: ; 8199CBC lsls r4, 24 lsrs r4, 24 mov r8, r4 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r7, r0, 0 movs r0, 0 cmp r0, r8 @@ -763780,8 +763845,9 @@ _0819A2E6: .pool thumb_func_end sub_819A2BC - thumb_func_start sub_819A2F8 -sub_819A2F8: ; 819A2F8 + thumb_func_start blit_move_info_icon +; void blit_move_info_icon(u8 windowId, u8 a2, u16 x, u16 y) +blit_move_info_icon: ; 819A2F8 push {r4,r5,lr} sub sp, 0x18 lsls r0, 24 @@ -763816,7 +763882,7 @@ sub_819A2F8: ; 819A2F8 pop {r0} bx r0 .pool - thumb_func_end sub_819A2F8 + thumb_func_end blit_move_info_icon thumb_func_start sub_819A344 sub_819A344: ; 819A344 @@ -764013,7 +764079,7 @@ sub_819A4C8: ; 819A4C8 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_819A4C8 @@ -764266,7 +764332,7 @@ _0819A77C: ldr r0, =0x0203ce38 ldr r1, [r0] movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r5, =gUnknown_0861023C movs r4, 0x8 str r4, [sp] @@ -767446,7 +767512,7 @@ _0819C28C: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits _0819C29E: ldrh r1, [r4, 0x12] lsls r1, 8 @@ -767611,7 +767677,7 @@ _0819C2FC: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits adds r0, r7, 0 bl remove_task b _0819C4A4 @@ -768086,7 +768152,7 @@ sub_819C7E0: ; 819C7E0 bl PrepareSpritesForOamLoad bl RunTextPrinters bl fade_and_return_progress_probably - bl run_active_tasks + bl RunActiveTasks pop {r0} bx r0 thumb_func_end sub_819C7E0 @@ -770708,7 +770774,7 @@ _0819DE68: ldr r0, =0x0203ce4c ldr r1, [r0] movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_0861023C movs r0, 0x8 str r0, [sp] @@ -773799,7 +773865,7 @@ sub_819F7B4: ; 819F7B4 movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits adds r0, r5, 0 bl remove_task b _0819F8D8 @@ -774865,7 +774931,7 @@ _081A006C: beq _081A006C ldr r2, =0x00000121 adds r0, r4, r2 - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r7, r0, 16 movs r2, 0x1 @@ -795356,18 +795422,18 @@ sub_81AAB70: ; 81AAB70 .pool thumb_func_end sub_81AAB70 - thumb_func_start c2_bag -; void c2_bag() -c2_bag: ; 81AAB9C + thumb_func_start CB2_BagMenuFromStartMenu +; void CB2_BagMenuFromStartMenu() +CB2_BagMenuFromStartMenu: ; 81AAB9C push {lr} ldr r2, =sub_8086194 movs r0, 0 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 .pool - thumb_func_end c2_bag + thumb_func_end CB2_BagMenuFromStartMenu thumb_func_start sub_81AABB0 sub_81AABB0: ; 81AABB0 @@ -795379,7 +795445,7 @@ sub_81AABB0: ; 81AABB0 ldr r2, =sub_8059D50 movs r0, 0x1 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu b _081AABD4 .pool _081AABCC: @@ -795398,7 +795464,7 @@ CB2_ChooseBerry: ; 81AABDC ldr r2, =sub_80861B0 movs r0, 0x4 movs r1, 0x3 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 .pool @@ -795410,22 +795476,23 @@ sub_81AABF0: ; 81AABF0 adds r2, r0, 0 movs r0, 0x5 movs r1, 0x3 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 thumb_func_end sub_81AABF0 - thumb_func_start sub_81AAC00 -sub_81AAC00: ; 81AAC00 + thumb_func_start CB2_GoToSellMenu +; void CB2_GoToSellMenu() +CB2_GoToSellMenu: ; 81AAC00 push {lr} - ldr r2, =sub_80DFC48 + ldr r2, =CB2_ExitSellMenu movs r0, 0x3 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 .pool - thumb_func_end sub_81AAC00 + thumb_func_end CB2_GoToSellMenu thumb_func_start sub_81AAC14 sub_81AAC14: ; 81AAC14 @@ -795433,7 +795500,7 @@ sub_81AAC14: ; 81AAC14 ldr r2, =sub_816B31C movs r0, 0x6 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 .pool @@ -795442,10 +795509,10 @@ sub_81AAC14: ; 81AAC14 thumb_func_start sub_81AAC28 sub_81AAC28: ; 81AAC28 push {lr} - ldr r2, =sub_81ADE6C + ldr r2, =bag_menu_leave_maybe_3 movs r0, 0x9 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu ldr r0, =0x020375e2 movs r1, 0 strh r1, [r0] @@ -795459,10 +795526,10 @@ sub_81AAC28: ; 81AAC28 thumb_func_start sub_81AAC50 sub_81AAC50: ; 81AAC50 push {lr} - ldr r2, =sub_81ADEBC + ldr r2, =bag_menu_leave_maybe_2 movs r0, 0x7 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu ldr r1, =0x020375f0 movs r0, 0 strh r0, [r1] @@ -795474,10 +795541,10 @@ sub_81AAC50: ; 81AAC50 thumb_func_start sub_81AAC70 sub_81AAC70: ; 81AAC70 push {lr} - ldr r2, =sub_81ADF00 + ldr r2, =bag_menu_leave_maybe movs r0, 0x8 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu ldr r1, =0x020375f0 movs r0, 0 strh r0, [r1] @@ -795486,8 +795553,9 @@ sub_81AAC70: ; 81AAC70 .pool thumb_func_end sub_81AAC70 - thumb_func_start sub_81AAC90 -sub_81AAC90: ; 81AAC90 + thumb_func_start GoToBagMenu +; void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)()) +GoToBagMenu: ; 81AAC90 push {r4-r7,lr} adds r4, r2, 0 lsls r0, 24 @@ -795567,19 +795635,19 @@ _081AACF0: movs r1, 0xFF movs r2, 0xA bl memset - ldr r0, =c2_bag_2 + ldr r0, =CB2_Bag bl SetMainCallback2 _081AAD3A: pop {r4-r7} pop {r0} bx r0 .pool - thumb_func_end sub_81AAC90 + thumb_func_end GoToBagMenu thumb_func_start c2_bag_3 c2_bag_3: ; 81AAD5C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -795598,8 +795666,8 @@ vblank_cb_bag_menu: ; 81AAD78 bx r0 thumb_func_end vblank_cb_bag_menu - thumb_func_start c2_bag_2 -c2_bag_2: ; 81AAD8C + thumb_func_start CB2_Bag +CB2_Bag: ; 81AAD8C push {lr} _081AAD8E: bl sub_81221EC @@ -795620,7 +795688,7 @@ _081AAD8E: _081AADB2: pop {r0} bx r0 - thumb_func_end c2_bag_2 + thumb_func_end CB2_Bag thumb_func_start setup_bag_menu setup_bag_menu: ; 81AADB8 @@ -795666,7 +795734,7 @@ _081AADE0: .4byte _081AAFDE .4byte _081AAFF8 _081AAE34: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl clear_scheduled_bg_copies_to_vram b _081AB012 _081AAE3E: @@ -795771,9 +795839,9 @@ _081AAF1C: adds r0, r1 ldr r0, [r0] movs r1, 0 - bl sub_81ADF20 + bl bag_menu_print_pocket_names movs r0, 0 - bl sub_81ADFF8 + bl bag_menu_copy_pocket_name_to_window ldrb r0, [r4, 0x5] movs r1, 0x1 bl bag_menu_draw_pocket_indicator_square @@ -795800,7 +795868,7 @@ _081AAF54: adds r4, 0x8 adds r2, r4 ldrh r2, [r2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit ldr r2, =0x03005e00 lsls r1, r5, 2 adds r1, r5 @@ -795828,8 +795896,8 @@ _081AAFBC: bl sub_80D4FAC b _081AB012 _081AAFC2: - bl sub_81AB7BC - bl sub_81AB854 + bl bag_menu_add_pocket_scroll_arrow_indicators_maybe + bl bag_menu_add_list_scroll_arrow_indicators_maybe ldr r1, =0x030022c0 movs r2, 0x87 lsls r2, 3 @@ -795837,7 +795905,7 @@ _081AAFC2: b _081AB01A .pool _081AAFD8: - bl sub_81AE2B4 + bl bag_menu_prepare_tmhm_move_window b _081AB012 _081AAFDE: movs r0, 0x1 @@ -795912,7 +795980,7 @@ bag_menu_init_bgs: ; 81AB050 ldr r1, [r4] adds r1, 0x4 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x2 bl schedule_bg_copy_tilemap_to_vram @@ -795988,7 +796056,7 @@ _081AB118: b _081AB1B2 .pool _081AB13C: - bl sub_81ADC54 + bl IsWallysBag lsls r0, 24 cmp r0, 0 bne _081AB164 @@ -796011,7 +796079,7 @@ _081AB164: b _081AB1AE .pool _081AB174: - bl sub_81ADC54 + bl IsWallysBag lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -796071,7 +796139,7 @@ sub_81AB1F0: ; 81AB1F0 lsrs r0, 24 cmp r0, 0xA bne _081AB204 - ldr r0, =sub_81ADD98 + ldr r0, =Task_WallyTutorialBagMenu b _081AB206 .pool _081AB204: @@ -796280,7 +796348,7 @@ get_name: ; 81AB39C _081AB3C0: ldr r4, =0x02021dc4 adds r0, r5, 0 - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r0, 16 movs r1, 0xD @@ -796457,13 +796525,13 @@ _081AB540: bne _081AB568 adds r0, r7, 0 movs r1, 0x2 - bl sub_81AB75C + bl bag_menu_print_cursor b _081AB570 .pool _081AB568: adds r0, r7, 0 movs r1, 0xFF - bl sub_81AB75C + bl bag_menu_print_cursor _081AB570: ldr r5, =0x0203ce58 ldrb r0, [r5, 0x5] @@ -796563,7 +796631,7 @@ _081AB652: mov r0, r8 movs r1, 0x7 adds r2, r4, 0 - bl sub_81AE0BC + bl bag_menu_print b _081AB696 .pool _081AB66C: @@ -796650,7 +796718,7 @@ _081AB6FC: movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print add sp, 0x14 pop {r4} pop {r0} @@ -796658,26 +796726,26 @@ _081AB6FC: .pool thumb_func_end bag_menu_print_description_box_text - thumb_func_start sub_81AB73C -sub_81AB73C: ; 81AB73C + thumb_func_start bag_menu_print_cursor_ +bag_menu_print_cursor_: ; 81AB73C push {r4,lr} adds r4, r1, 0 lsls r0, 24 lsrs r0, 24 lsls r4, 24 lsrs r4, 24 - bl sub_81AE88C + bl ListMenuGetYCoordForPrintingArrowCursor lsls r0, 24 lsrs r0, 24 adds r1, r4, 0 - bl sub_81AB75C + bl bag_menu_print_cursor pop {r4} pop {r0} bx r0 - thumb_func_end sub_81AB73C + thumb_func_end bag_menu_print_cursor_ - thumb_func_start sub_81AB75C -sub_81AB75C: ; 81AB75C + thumb_func_start bag_menu_print_cursor +bag_menu_print_cursor: ; 81AB75C push {r4,r5,lr} sub sp, 0x14 lsls r0, 24 @@ -796715,17 +796783,17 @@ _081AB798: str r1, [sp, 0x10] movs r1, 0x1 movs r3, 0 - bl sub_81AE0BC + bl bag_menu_print _081AB7AE: add sp, 0x14 pop {r4,r5} pop {r0} bx r0 .pool - thumb_func_end sub_81AB75C + thumb_func_end bag_menu_print_cursor - thumb_func_start sub_81AB7BC -sub_81AB7BC: ; 81AB7BC + thumb_func_start bag_menu_add_pocket_scroll_arrow_indicators_maybe +bag_menu_add_pocket_scroll_arrow_indicators_maybe: ; 81AB7BC push {r4-r6,lr} sub sp, 0x10 ldr r5, =0x0203ce54 @@ -796759,7 +796827,7 @@ sub_81AB7BC: ; 81AB7BC movs r1, 0xAC movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized ldr r1, [r5] ldr r2, =0x0000081e adds r1, r2 @@ -796770,7 +796838,7 @@ _081AB80A: pop {r0} bx r0 .pool - thumb_func_end sub_81AB7BC + thumb_func_end bag_menu_add_pocket_scroll_arrow_indicators_maybe thumb_func_start sub_81AB824 sub_81AB824: ; 81AB824 @@ -796782,7 +796850,7 @@ sub_81AB824: ; 81AB824 ldrb r0, [r1] cmp r0, 0xFF beq _081AB842 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x0000081e adds r0, r1 @@ -796796,8 +796864,8 @@ _081AB842: .pool thumb_func_end sub_81AB824 - thumb_func_start sub_81AB854 -sub_81AB854: ; 81AB854 + thumb_func_start bag_menu_add_list_scroll_arrow_indicators_maybe +bag_menu_add_list_scroll_arrow_indicators_maybe: ; 81AB854 push {r4,lr} ldr r4, =0x0203ce54 ldr r2, [r4] @@ -796815,7 +796883,7 @@ sub_81AB854: ; 81AB854 bne _081AB882 ldr r0, =gUnknown_08614094 ldr r1, =0x0203ce5e - bl sub_81AF380 + bl AddScrollIndicatorArrowPair ldr r1, [r4] ldr r2, =0x0000081f adds r1, r2 @@ -796825,7 +796893,7 @@ _081AB882: pop {r0} bx r0 .pool - thumb_func_end sub_81AB854 + thumb_func_end bag_menu_add_list_scroll_arrow_indicators_maybe thumb_func_start sub_81AB89C sub_81AB89C: ; 81AB89C @@ -796837,7 +796905,7 @@ sub_81AB89C: ; 81AB89C ldrb r0, [r1] cmp r0, 0xFF beq _081AB8BA - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x0000081f adds r0, r1 @@ -796868,8 +796936,8 @@ free_bag_item_list_buffers: ; 81AB8C8 .pool thumb_func_end free_bag_item_list_buffers - thumb_func_start sub_81AB8F8 -sub_81AB8F8: ; 81AB8F8 + thumb_func_start unknown_ItemMenu_Confirm +unknown_ItemMenu_Confirm: ; 81AB8F8 push {r4,lr} sub sp, 0x4 adds r4, r0, 0 @@ -796894,7 +796962,7 @@ sub_81AB8F8: ; 81AB8F8 pop {r0} bx r0 .pool - thumb_func_end sub_81AB8F8 + thumb_func_end unknown_ItemMenu_Confirm thumb_func_start task_close_bag_menu_2 task_close_bag_menu_2: ; 81AB930 @@ -797216,8 +797284,8 @@ DisplayItemMessage: ; 81ABB4C .pool thumb_func_end DisplayItemMessage - thumb_func_start sub_81ABBBC -sub_81ABBBC: ; 81ABBBC + thumb_func_start bag_menu_inits_lists_menu +bag_menu_inits_lists_menu: ; 81ABBBC push {r4-r7,lr} mov r7, r8 push {r7} @@ -797240,7 +797308,7 @@ sub_81ABBBC: ; 81ABBBC adds r0, 0x8 adds r4, r0 movs r0, 0x4 - bl sub_81AE1F8 + bl bag_menu_remove_item_message_window ldrb r0, [r5] mov r1, r8 adds r2, r4, 0 @@ -797255,7 +797323,7 @@ sub_81ABBBC: ; 81ABBBC mov r2, r8 ldrh r1, [r2] ldrh r2, [r4] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r5] @@ -797269,14 +797337,14 @@ sub_81ABBBC: ; 81ABBBC pop {r0} bx r0 .pool - thumb_func_end sub_81ABBBC + thumb_func_end bag_menu_inits_lists_menu thumb_func_start sub_81ABC3C sub_81ABC3C: ; 81ABC3C push {lr} lsls r0, 24 lsrs r0, 24 - bl sub_81AE13C + bl bag_menu_add_window lsls r0, 24 lsrs r0, 24 movs r1, 0x1 @@ -797484,7 +797552,7 @@ _081ABDCC: .pool _081ABE10: ldrb r0, [r6] - bl sub_81AE604 + bl ListMenuHandleInput adds r4, r0, 0 ldrb r0, [r6] adds r1, r7, 0 @@ -797515,7 +797583,7 @@ _081ABE40: subs r0, 0x8 ldr r3, [sp] adds r0, r3, r0 - ldr r1, =sub_81AB8F8 + ldr r1, =unknown_ItemMenu_Confirm str r1, [r0] b _081ABEB2 .pool @@ -797525,7 +797593,7 @@ _081ABE68: bl sub_81AB824 ldrb r0, [r6] movs r1, 0x2 - bl sub_81AB73C + bl bag_menu_print_cursor_ strh r4, [r6, 0x2] ldrb r0, [r5, 0x5] adds r0, 0x1 @@ -797569,8 +797637,8 @@ set_callback3_to_bag: ; 81ABECC adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - bl sub_81AB7BC - bl sub_81AB854 + bl bag_menu_add_pocket_scroll_arrow_indicators_maybe + bl bag_menu_add_list_scroll_arrow_indicators_maybe movs r0, 0x3 bl ClearWindowTilemap movs r0, 0x4 @@ -797760,9 +797828,9 @@ _081AC026: lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl sub_81ADF20 + bl bag_menu_print_pocket_names movs r0, 0 - bl sub_81ADFF8 + bl bag_menu_copy_pocket_name_to_window b _081AC09A .pool _081AC07C: @@ -797776,9 +797844,9 @@ _081AC07C: lsls r1, 2 adds r1, r2 ldr r1, [r1] - bl sub_81ADF20 + bl bag_menu_print_pocket_names movs r0, 0x8 - bl sub_81ADFF8 + bl bag_menu_copy_pocket_name_to_window _081AC09A: ldr r0, =0x0203ce58 ldrb r0, [r0, 0x5] @@ -797837,7 +797905,7 @@ sub_81AC10C: ; 81AC10C lsls r0, 24 cmp r0, 0 bne _081AC184 - bl sub_81ADC54 + bl IsWallysBag lsls r0, 24 cmp r0, 0 bne _081AC184 @@ -797902,7 +797970,7 @@ _081AC192: asrs r0, 17 lsls r0, 24 lsrs r0, 24 - bl sub_81ADFF8 + bl bag_menu_copy_pocket_name_to_window b _081AC1CC _081AC1BC: lsls r1, 16 @@ -797911,7 +797979,7 @@ _081AC1BC: subs r0, r1 lsls r0, 24 lsrs r0, 24 - bl sub_81ADFF8 + bl bag_menu_copy_pocket_name_to_window _081AC1CC: movs r1, 0x18 ldrsh r0, [r6, r1] @@ -797940,7 +798008,7 @@ _081AC1DC: adds r4, 0x3 adds r2, r4 ldrh r2, [r2] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r6] @@ -797950,8 +798018,8 @@ _081AC1DC: bl PutWindowTilemap movs r0, 0 bl schedule_bg_copy_tilemap_to_vram - bl sub_81AB7BC - bl sub_81AB854 + bl bag_menu_add_pocket_scroll_arrow_indicators_maybe + bl bag_menu_add_list_scroll_arrow_indicators_maybe adds r0, r7, 0 bl set_task_function_to_args_14_15 _081AC22E: @@ -798115,13 +798183,13 @@ bag_menu_swap_items: ; 81AC2E8 movs r1, 0x1 mov r2, r8 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print ldrb r0, [r6, 0x2] bl sub_80D4FEC bl sub_81AB89C ldrb r0, [r6] movs r1, 0x2 - bl sub_81AB73C + bl bag_menu_print_cursor_ movs r2, 0x8 negs r2, r2 add r9, r2 @@ -798179,7 +798247,7 @@ sub_81AC3C0: ; 81AC3C0 .pool _081AC418: ldrb r0, [r4] - bl sub_81AE604 + bl ListMenuHandleInput adds r7, r0, 0 ldrb r0, [r4] ldr r5, =0x0203ce58 @@ -798320,14 +798388,14 @@ _081AC538: mov r2, r8 ldrh r1, [r2] ldrh r2, [r7] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 mov r1, r9 strh r0, [r1] movs r0, 0x1 bl sub_80D4FC8 - bl sub_81AB854 + bl bag_menu_add_list_scroll_arrow_indicators_maybe ldr r0, =0x03005e08 subs r0, 0x8 add r0, r10 @@ -798400,13 +798468,13 @@ _081AC5F2: ldr r0, =0x03006310 ldrh r1, [r6] ldrh r2, [r5] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r7] movs r0, 0x1 bl sub_80D4FC8 - bl sub_81AB854 + bl bag_menu_add_list_scroll_arrow_indicators_maybe mov r0, r10 subs r0, 0x8 add r0, r9 @@ -798801,7 +798869,7 @@ _081ACA12: bl ClearWindowTilemap ldr r0, =0x0203ce7c ldrh r0, [r0] - bl sub_81AE2FC + bl PrintTMHMMoveData movs r0, 0x3 bl PutWindowTilemap movs r0, 0x4 @@ -798833,7 +798901,7 @@ _081ACA50: movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print _081ACA86: ldr r0, =0x0203ce54 ldr r0, [r0] @@ -798850,7 +798918,7 @@ _081ACAB0: bne _081ACAC4 movs r0, 0x1 _081ACAB6: - bl sub_81AE13C + bl bag_menu_add_window lsls r0, 24 lsrs r0, 24 bl sub_81ACAF8 @@ -798859,7 +798927,7 @@ _081ACAC4: cmp r0, 0x4 bne _081ACADC movs r0, 0x2 - bl sub_81AE13C + bl bag_menu_add_window lsls r0, 24 lsrs r0, 24 movs r1, 0x2 @@ -798868,7 +798936,7 @@ _081ACAC4: b _081ACAEE _081ACADC: movs r0, 0x3 - bl sub_81AE13C + bl bag_menu_add_window lsls r0, 24 lsrs r0, 24 movs r1, 0x2 @@ -798968,8 +799036,8 @@ sub_81ACB54: ; 81ACB54 .pool thumb_func_end sub_81ACB54 - thumb_func_start sub_81ACBB0 -sub_81ACBB0: ; 81ACBB0 + thumb_func_start unknown_item_menu_type +unknown_item_menu_type: ; 81ACBB0 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -799003,7 +799071,7 @@ _081ACBF4: pop {r0} bx r0 .pool - thumb_func_end sub_81ACBB0 + thumb_func_end unknown_item_menu_type thumb_func_start Task_HandleInBattleItemMenuInput Task_HandleInBattleItemMenuInput: ; 81ACC04 @@ -799272,8 +799340,8 @@ _081ACE32: bx r1 thumb_func_end sub_81ACDFC - thumb_func_start sub_81ACE38 -sub_81ACE38: ; 81ACE38 + thumb_func_start bag_menu_remove_some_window +bag_menu_remove_some_window: ; 81ACE38 push {lr} ldr r0, =0x0203ce54 ldr r0, [r0] @@ -799283,28 +799351,28 @@ sub_81ACE38: ; 81ACE38 cmp r0, 0x1 bne _081ACE58 movs r0, 0 - bl sub_81AE184 + bl bag_menu_remove_window b _081ACE76 .pool _081ACE58: cmp r0, 0x2 bne _081ACE64 movs r0, 0x1 - bl sub_81AE184 + bl bag_menu_remove_window b _081ACE76 _081ACE64: cmp r0, 0x4 bne _081ACE70 movs r0, 0x2 - bl sub_81AE184 + bl bag_menu_remove_window b _081ACE76 _081ACE70: movs r0, 0x3 - bl sub_81AE184 + bl bag_menu_remove_window _081ACE76: pop {r0} bx r0 - thumb_func_end sub_81ACE38 + thumb_func_end bag_menu_remove_some_window thumb_func_start ItemMenu_UseOutOfBattle ; void ItemMenu_UseOutOfBattle(u8 taskId) @@ -799317,7 +799385,7 @@ ItemMenu_UseOutOfBattle: ; 81ACE7C bl itemid_get_overworld_function cmp r0, 0 beq _081ACEEE - bl sub_81ACE38 + bl bag_menu_remove_some_window bl calc_player_party_count lsls r0, 24 cmp r0, 0 @@ -799329,7 +799397,7 @@ ItemMenu_UseOutOfBattle: ; 81ACE7C cmp r0, 0x1 bne _081ACEB8 adds r0, r4, 0 - bl sub_81AD2F0 + bl bag_menu_print_there_is_no_pokemon b _081ACEEE .pool _081ACEB8: @@ -799370,7 +799438,7 @@ ItemMenu_Toss: ; 81ACEF4 lsls r6, r0, 3 ldr r7, =0x03005e08 adds r4, r6, r7 - bl sub_81ACE38 + bl bag_menu_remove_some_window movs r0, 0x1 strh r0, [r4, 0x10] movs r1, 0x4 @@ -799378,7 +799446,7 @@ ItemMenu_Toss: ; 81ACEF4 cmp r0, 0x1 bne _081ACF24 adds r0, r5, 0 - bl sub_81ACF88 + bl BagMenuConfirmToss b _081ACF6A .pool _081ACF24: @@ -799404,13 +799472,13 @@ _081ACF24: movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print movs r0, 0x7 bl sub_81ABC3C adds r0, r7, 0 subs r0, 0x8 adds r0, r6, r0 - ldr r1, =sub_81AD044 + ldr r1, =Task_ChooseHowManyToToss str r1, [r0] _081ACF6A: add sp, 0x14 @@ -799420,8 +799488,8 @@ _081ACF6A: .pool thumb_func_end ItemMenu_Toss - thumb_func_start sub_81ACF88 -sub_81ACF88: ; 81ACF88 + thumb_func_start BagMenuConfirmToss +BagMenuConfirmToss: ; 81ACF88 push {r4,r5,lr} sub sp, 0x14 adds r5, r0, 0 @@ -799460,20 +799528,20 @@ sub_81ACF88: ; 81ACF88 movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print ldr r2, =gUnknown_08614084 adds r0, r5, 0 movs r1, 0x5 - bl sub_81AE238 + bl bag_menu_yes_no add sp, 0x14 pop {r4,r5} pop {r0} bx r0 .pool - thumb_func_end sub_81ACF88 + thumb_func_end BagMenuConfirmToss - thumb_func_start sub_81AD010 -sub_81AD010: ; 81AD010 + thumb_func_start BagMenuCancelToss +BagMenuCancelToss: ; 81AD010 push {r4,r5,lr} adds r5, r0, 0 lsls r5, 24 @@ -799488,17 +799556,17 @@ sub_81AD010: ; 81AD010 bl bag_menu_print_description_box_text ldrb r0, [r4] movs r1, 0 - bl sub_81AB73C + bl bag_menu_print_cursor_ adds r0, r5, 0 bl set_callback3_to_bag pop {r4,r5} pop {r0} bx r0 .pool - thumb_func_end sub_81AD010 + thumb_func_end BagMenuCancelToss - thumb_func_start sub_81AD044 -sub_81AD044: ; 81AD044 + thumb_func_start Task_ChooseHowManyToToss +Task_ChooseHowManyToToss: ; 81AD044 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -799511,7 +799579,7 @@ sub_81AD044: ; 81AD044 adds r0, r4, 0 adds r0, 0x10 ldrh r1, [r4, 0x4] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -799536,9 +799604,9 @@ _081AD088: movs r0, 0x5 bl audio_play movs r0, 0x7 - bl sub_81AE184 + bl bag_menu_remove_window adds r0, r5, 0 - bl sub_81ACF88 + bl BagMenuConfirmToss b _081AD0C6 .pool _081AD0AC: @@ -799549,17 +799617,17 @@ _081AD0AC: movs r0, 0x5 bl audio_play movs r0, 0x7 - bl sub_81AE184 + bl bag_menu_remove_window adds r0, r6, 0 - bl sub_81AD010 + bl BagMenuCancelToss _081AD0C6: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_81AD044 + thumb_func_end Task_ChooseHowManyToToss - thumb_func_start display_threw_away_item_str -display_threw_away_item_str: ; 81AD0CC + thumb_func_start BagMenuActuallyToss +BagMenuActuallyToss: ; 81AD0CC push {r4-r6,lr} sub sp, 0x14 lsls r0, 24 @@ -799597,20 +799665,20 @@ display_threw_away_item_str: ; 81AD0CC movs r1, 0x1 adds r2, r6, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print subs r5, 0x8 adds r4, r5 - ldr r0, =sub_81AD150 + ldr r0, =Task_ActuallyToss str r0, [r4] add sp, 0x14 pop {r4-r6} pop {r0} bx r0 .pool - thumb_func_end display_threw_away_item_str + thumb_func_end BagMenuActuallyToss - thumb_func_start sub_81AD150 -sub_81AD150: ; 81AD150 + thumb_func_start Task_ActuallyToss +Task_ActuallyToss: ; 81AD150 push {r4-r7,lr} mov r7, r8 push {r7} @@ -799642,7 +799710,7 @@ sub_81AD150: ; 81AD150 ldr r0, =0x0203ce7c ldrh r0, [r0] ldrh r1, [r5, 0x10] - bl sub_80D6AA4 + bl remove_item ldrb r0, [r5] mov r1, r8 adds r2, r7, 0 @@ -799657,7 +799725,7 @@ sub_81AD150: ; 81AD150 mov r2, r8 ldrh r1, [r2] ldrh r2, [r7] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r5] @@ -799672,7 +799740,7 @@ _081AD1CE: pop {r0} bx r0 .pool - thumb_func_end sub_81AD150 + thumb_func_end Task_ActuallyToss thumb_func_start ItemMenu_Register ItemMenu_Register: ; 81AD1EC @@ -799718,7 +799786,7 @@ _081AD23A: ldr r0, =0x03006310 ldrh r1, [r6] ldrh r2, [r5] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r7] @@ -799738,7 +799806,7 @@ ItemMenu_Give: ; 81AD278 lsls r0, 24 lsrs r4, r0, 24 adds r6, r4, 0 - bl sub_81ACE38 + bl bag_menu_remove_some_window ldr r5, =0x0203ce7c ldrh r0, [r5] bl itemid_80BF6D8_mail_related @@ -799763,7 +799831,7 @@ _081AD2AC: cmp r0, 0 bne _081AD2CA adds r0, r4, 0 - bl sub_81AD2F0 + bl bag_menu_print_there_is_no_pokemon b _081AD2EA _081AD2CA: ldr r0, =0x0203ce54 @@ -799771,20 +799839,20 @@ _081AD2CA: ldr r0, =sub_81B7F60 str r0, [r1] adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _081AD2EA .pool _081AD2E4: adds r0, r6, 0 - bl sub_81AD30C + bl bag_menu_print_cant_be_held_msg _081AD2EA: pop {r4-r6} pop {r0} bx r0 thumb_func_end ItemMenu_Give - thumb_func_start sub_81AD2F0 -sub_81AD2F0: ; 81AD2F0 + thumb_func_start bag_menu_print_there_is_no_pokemon +bag_menu_print_there_is_no_pokemon: ; 81AD2F0 push {lr} lsls r0, 24 lsrs r0, 24 @@ -799795,10 +799863,10 @@ sub_81AD2F0: ; 81AD2F0 pop {r0} bx r0 .pool - thumb_func_end sub_81AD2F0 + thumb_func_end bag_menu_print_there_is_no_pokemon - thumb_func_start sub_81AD30C -sub_81AD30C: ; 81AD30C + thumb_func_start bag_menu_print_cant_be_held_msg +bag_menu_print_cant_be_held_msg: ; 81AD30C push {r4,r5,lr} adds r4, r0, 0 lsls r4, 24 @@ -799820,7 +799888,7 @@ sub_81AD30C: ; 81AD30C pop {r0} bx r0 .pool - thumb_func_end sub_81AD30C + thumb_func_end bag_menu_print_cant_be_held_msg thumb_func_start sub_81AD350 sub_81AD350: ; 81AD350 @@ -799836,7 +799904,7 @@ sub_81AD350: ; 81AD350 movs r0, 0x5 bl audio_play adds r0, r4, 0 - bl sub_81ABBBC + bl bag_menu_inits_lists_menu _081AD36E: pop {r4} pop {r0} @@ -799853,7 +799921,7 @@ ItemMenu_CheckTag: ; 81AD378 ldr r2, [r1] ldr r1, =sub_8177C14 str r1, [r2] - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm pop {r0} bx r0 .pool @@ -799870,7 +799938,7 @@ ItemMenu_Cancel: ; 81AD398 lsls r4, 3 ldr r0, =0x03005e08 adds r4, r0 - bl sub_81ACE38 + bl bag_menu_remove_some_window movs r1, 0x2 ldrsh r0, [r4, r1] bl bag_menu_print_description_box_text @@ -799880,7 +799948,7 @@ ItemMenu_Cancel: ; 81AD398 bl schedule_bg_copy_tilemap_to_vram ldrb r0, [r4] movs r1, 0 - bl sub_81AB73C + bl bag_menu_print_cursor_ adds r0, r5, 0 bl set_callback3_to_bag pop {r4,r5} @@ -799899,7 +799967,7 @@ ItemMenu_UseInBattle: ; 81AD3DC bl itemid_get_battle_function cmp r0, 0 beq _081AD400 - bl sub_81ACE38 + bl bag_menu_remove_some_window ldrh r0, [r4] bl itemid_get_battle_function adds r1, r0, 0 @@ -799912,19 +799980,19 @@ _081AD400: .pool thumb_func_end ItemMenu_UseInBattle - thumb_func_start sub_81AD40C -sub_81AD40C: ; 81AD40C + thumb_func_start bag_menu_mail_related +bag_menu_mail_related: ; 81AD40C push {lr} movs r0, 0xC movs r1, 0x5 movs r2, 0 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 - thumb_func_end sub_81AD40C + thumb_func_end bag_menu_mail_related - thumb_func_start sub_81AD41C -sub_81AD41C: ; 81AD41C + thumb_func_start item_menu_type_2 +item_menu_type_2: ; 81AD41C push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -799972,20 +800040,20 @@ _081AD488: cmp r0, 0 bne _081AD4A8 adds r0, r5, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _081AD4AE .pool _081AD4A8: adds r0, r5, 0 - bl sub_81AD30C + bl bag_menu_print_cant_be_held_msg _081AD4AE: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_81AD41C + thumb_func_end item_menu_type_2 - thumb_func_start sub_81AD4B4 -sub_81AD4B4: ; 81AD4B4 + thumb_func_start item_menu_type_b +item_menu_type_b: ; 81AD4B4 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -800018,21 +800086,21 @@ _081AD4E4: adds r1, r4 lsls r1, 3 adds r1, r0 - ldr r0, =sub_81AB8F8 + ldr r0, =unknown_ItemMenu_Confirm str r0, [r1] b _081AD51A .pool _081AD514: adds r0, r4, 0 - bl sub_81AD30C + bl bag_menu_print_cant_be_held_msg _081AD51A: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_81AD4B4 + thumb_func_end item_menu_type_b thumb_func_start UseRegisteredKeyItemOnField -; BOOL UseRegisteredKeyItemOnField() +; bool8 UseRegisteredKeyItemOnField() UseRegisteredKeyItemOnField: ; 81AD520 push {r4-r7,lr} bl InUnionRoom @@ -800138,7 +800206,7 @@ display_sell_item_ask_str: ; 81AD5DC ldr r1, =gUnknown_085E960F adds r0, r4, 0 bl ExpandStringRefs - ldr r3, =sub_81ABBBC + ldr r3, =bag_menu_inits_lists_menu adds r0, r5, 0 movs r1, 0x1 adds r2, r4, 0 @@ -800152,7 +800220,7 @@ _081AD634: ldrsh r0, [r4, r1] cmp r0, 0x1 bne _081AD64C - bl sub_81AE268 + bl bag_menu_add_money_window adds r0, r5, 0 bl sub_81AD680 b _081AD66A @@ -800222,7 +800290,7 @@ sub_81AD6E4: ; 81AD6E4 lsrs r0, 24 ldr r2, =gUnknown_0861408C movs r1, 0x6 - bl sub_81AE238 + bl bag_menu_yes_no pop {r0} bx r0 .pool @@ -800239,12 +800307,12 @@ sub_81AD6FC: ; 81AD6FC lsls r4, 3 ldr r0, =0x03005e08 adds r4, r0 - bl sub_81AE2A4 + bl bag_menu_remove_money_window movs r0, 0x4 - bl sub_81AE1F8 + bl bag_menu_remove_item_message_window ldrb r0, [r4] movs r1, 0 - bl sub_81AB73C + bl bag_menu_print_cursor_ adds r0, r5, 0 bl set_callback3_to_bag pop {r4,r5} @@ -800267,7 +800335,7 @@ sub_81AD730: ; 81AD730 adds r0, r4, r6 mov r8, r0 movs r0, 0x8 - bl sub_81AE13C + bl bag_menu_add_window adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 @@ -800284,7 +800352,7 @@ sub_81AD730: ; 81AD730 adds r0, r5, 0 movs r1, 0x1 bl sub_81ABCC0 - bl sub_81AE268 + bl bag_menu_add_money_window subs r6, 0x8 adds r4, r6 ldr r0, =sub_81AD794 @@ -800311,7 +800379,7 @@ sub_81AD794: ; 81AD794 adds r0, r6, 0 adds r0, 0x10 ldrh r1, [r6, 0x4] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -800347,7 +800415,7 @@ _081AD7F4: movs r0, 0x5 bl audio_play movs r0, 0x8 - bl sub_81AE184 + bl bag_menu_remove_window adds r0, r4, 0 bl sub_81AD680 b _081AD844 @@ -800361,12 +800429,12 @@ _081AD818: bl audio_play ldrb r0, [r6] movs r1, 0 - bl sub_81AB73C - bl sub_81AE2A4 + bl bag_menu_print_cursor_ + bl bag_menu_remove_money_window movs r0, 0x8 - bl sub_81AE184 + bl bag_menu_remove_window movs r0, 0x4 - bl sub_81AE1F8 + bl bag_menu_remove_item_message_window adds r0, r5, 0 bl set_callback3_to_bag _081AD844: @@ -800454,7 +800522,7 @@ sub_81AD8C8: ; 81AD8C8 ldrh r0, [r2] mov r3, r10 ldrh r1, [r3, 0x10] - bl sub_80D6AA4 + bl remove_item ldr r0, =0x03005d8c ldr r4, [r0] movs r1, 0x92 @@ -800486,13 +800554,13 @@ sub_81AD8C8: ; 81AD8C8 mov r2, r9 ldrh r1, [r2] ldrh r2, [r5] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 mov r3, r10 strh r0, [r3] movs r1, 0x2 - bl sub_81AB73C + bl bag_menu_print_cursor_ ldr r0, =0x0203ce54 ldr r0, [r0] ldr r1, =0x00000819 @@ -800503,7 +800571,7 @@ sub_81AD8C8: ; 81AD8C8 movs r3, 0x92 lsls r3, 3 adds r0, r3 - bl decrypt_money + bl DecryptMoney adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 @@ -800536,9 +800604,9 @@ sub_81AD9C0: ; 81AD9C0 beq _081AD9E2 movs r0, 0x5 bl audio_play - bl sub_81AE2A4 + bl bag_menu_remove_money_window adds r0, r4, 0 - bl sub_81ABBBC + bl bag_menu_inits_lists_menu _081AD9E2: pop {r4} pop {r0} @@ -800590,7 +800658,7 @@ _081ADA18: movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print movs r0, 0x7 bl sub_81ABC3C adds r0, r6, 0 @@ -800620,7 +800688,7 @@ sub_81ADA7C: ; 81ADA7C adds r0, r5, 0 adds r0, 0x10 ldrh r1, [r5, 0x4] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -800645,7 +800713,7 @@ _081ADAC0: movs r0, 0x5 bl audio_play movs r0, 0x7 - bl sub_81AE184 + bl bag_menu_remove_window adds r0, r4, 0 bl sub_81ADB14 b _081ADB0E @@ -800662,9 +800730,9 @@ _081ADAE4: bl bag_menu_print_description_box_text ldrb r0, [r5] movs r1, 0 - bl sub_81AB73C + bl bag_menu_print_cursor_ movs r0, 0x7 - bl sub_81AE184 + bl bag_menu_remove_window adds r0, r6, 0 bl set_callback3_to_bag _081ADB0E: @@ -800743,11 +800811,11 @@ _081ADB6C: movs r1, 0x1 adds r2, r4, 0 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print mov r0, r9 subs r0, 0x8 adds r0, r7, r0 - ldr r1, =sub_81AD150 + ldr r1, =Task_ActuallyToss b _081ADBF2 .pool _081ADBD4: @@ -800761,7 +800829,7 @@ _081ADBD4: _081ADBE2: movs r1, 0x1 movs r3, 0x3 - bl sub_81AE0BC + bl bag_menu_print mov r0, r9 subs r0, 0x8 adds r0, r7, r0 @@ -800801,7 +800869,7 @@ sub_81ADC0C: ; 81ADC0C bl bag_menu_print_description_box_text ldrb r0, [r5] movs r1, 0 - bl sub_81AB73C + bl bag_menu_print_cursor_ adds r0, r4, 0 bl set_callback3_to_bag _081ADC44: @@ -800811,8 +800879,9 @@ _081ADC44: .pool thumb_func_end sub_81ADC0C - thumb_func_start sub_81ADC54 -sub_81ADC54: ; 81ADC54 + thumb_func_start IsWallysBag +; bool8 IsWallysBag() +IsWallysBag: ; 81ADC54 push {lr} ldr r0, =0x0203ce58 ldrb r0, [r0, 0x4] @@ -800826,10 +800895,11 @@ _081ADC68: _081ADC6A: pop {r1} bx r1 - thumb_func_end sub_81ADC54 + thumb_func_end IsWallysBag - thumb_func_start sub_81ADC70 -sub_81ADC70: ; 81ADC70 + thumb_func_start PrepareBagForWallyTutorial +; void PrepareBagForWallyTutorial() +PrepareBagForWallyTutorial: ; 81ADC70 push {r4-r6,lr} ldr r4, =0x0203ce80 movs r0, 0xD0 @@ -800892,10 +800962,11 @@ _081ADCAE: pop {r0} bx r0 .pool - thumb_func_end sub_81ADC70 + thumb_func_end PrepareBagForWallyTutorial - thumb_func_start sub_81ADD00 -sub_81ADD00: ; 81ADD00 + thumb_func_start RestoreBagAfterWallyTutorial +; void RestoreBagAfterWallyTutorial() +RestoreBagAfterWallyTutorial: ; 81ADD00 push {r4-r6,lr} ldr r5, =0x03005d8c ldr r0, [r5] @@ -800945,12 +801016,13 @@ _081ADD3A: pop {r0} bx r0 .pool - thumb_func_end sub_81ADD00 + thumb_func_end RestoreBagAfterWallyTutorial - thumb_func_start sub_81ADD70 -sub_81ADD70: ; 81ADD70 + thumb_func_start DoWallyTutorialBagMenu +; void DoWallyTutorialBagMenu() +DoWallyTutorialBagMenu: ; 81ADD70 push {lr} - bl sub_81ADC70 + bl PrepareBagForWallyTutorial movs r0, 0xD movs r1, 0x1 bl bag_add_item @@ -800960,14 +801032,15 @@ sub_81ADD70: ; 81ADD70 ldr r2, =sub_8059D50 movs r0, 0xA movs r1, 0 - bl sub_81AAC90 + bl GoToBagMenu pop {r0} bx r0 .pool - thumb_func_end sub_81ADD70 + thumb_func_end DoWallyTutorialBagMenu - thumb_func_start sub_81ADD98 -sub_81ADD98: ; 81ADD98 + thumb_func_start Task_WallyTutorialBagMenu +; void Task_WallyTutorialBagMenu(u8 taskId) +Task_WallyTutorialBagMenu: ; 81ADD98 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -801011,7 +801084,7 @@ _081ADDEC: bl audio_play ldrb r0, [r4] movs r1, 0x2 - bl sub_81AB73C + bl bag_menu_print_cursor_ ldr r1, =0x0203ce7c movs r0, 0x4 strh r0, [r1] @@ -801022,14 +801095,14 @@ _081ADDEC: _081ADE0C: movs r0, 0x5 bl audio_play - bl sub_81ACE38 + bl bag_menu_remove_some_window ldrb r0, [r4] movs r1, 0 movs r2, 0 bl sub_81AE6C8 - bl sub_81ADD00 + bl RestoreBagAfterWallyTutorial adds r0, r5, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm b _081ADE32 _081ADE2C: ldrh r0, [r4, 0x10] @@ -801039,10 +801112,10 @@ _081ADE32: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_81ADD98 + thumb_func_end Task_WallyTutorialBagMenu - thumb_func_start sub_81ADE38 -sub_81ADE38: ; 81ADE38 + thumb_func_start unknown_ItemMenu_Show +unknown_ItemMenu_Show: ; 81ADE38 push {r4,lr} adds r4, r0, 0 lsls r4, 24 @@ -801054,17 +801127,17 @@ sub_81ADE38: ; 81ADE38 ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] - bl sub_81ACE38 + bl bag_menu_remove_some_window adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_81ADE38 + thumb_func_end unknown_ItemMenu_Show - thumb_func_start sub_81ADE6C -sub_81ADE6C: ; 81ADE6C + thumb_func_start bag_menu_leave_maybe_3 +bag_menu_leave_maybe_3: ; 81ADE6C push {lr} ldr r0, =0x03005dac ldr r1, =sub_819FA50 @@ -801074,10 +801147,10 @@ sub_81ADE6C: ; 81ADE6C pop {r0} bx r0 .pool - thumb_func_end sub_81ADE6C + thumb_func_end bag_menu_leave_maybe_3 - thumb_func_start sub_81ADE8C -sub_81ADE8C: ; 81ADE8C + thumb_func_start unknown_ItemMenu_Give2 +unknown_ItemMenu_Give2: ; 81ADE8C push {r4,lr} adds r4, r0, 0 lsls r4, 24 @@ -801085,21 +801158,21 @@ sub_81ADE8C: ; 81ADE8C ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] - bl sub_81ACE38 + bl bag_menu_remove_some_window adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_81ADE8C + thumb_func_end unknown_ItemMenu_Give2 - thumb_func_start sub_81ADEBC -sub_81ADEBC: ; 81ADEBC + thumb_func_start bag_menu_leave_maybe_2 +bag_menu_leave_maybe_2: ; 81ADEBC push {lr} ldr r0, =0x03005dac ldr r1, =sub_818DEF4 @@ -801109,10 +801182,10 @@ sub_81ADEBC: ; 81ADEBC pop {r0} bx r0 .pool - thumb_func_end sub_81ADEBC + thumb_func_end bag_menu_leave_maybe_2 - thumb_func_start sub_81ADEDC -sub_81ADEDC: ; 81ADEDC + thumb_func_start unknown_ItemMenu_Confirm2 +unknown_ItemMenu_Confirm2: ; 81ADEDC push {r4,lr} adds r4, r0, 0 lsls r4, 24 @@ -801120,17 +801193,17 @@ sub_81ADEDC: ; 81ADEDC ldr r1, =0x020375f0 movs r0, 0x1 strh r0, [r1] - bl sub_81ACE38 + bl bag_menu_remove_some_window adds r0, r4, 0 - bl sub_81AB8F8 + bl unknown_ItemMenu_Confirm pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_81ADEDC + thumb_func_end unknown_ItemMenu_Confirm2 - thumb_func_start sub_81ADF00 -sub_81ADF00: ; 81ADF00 + thumb_func_start bag_menu_leave_maybe +bag_menu_leave_maybe: ; 81ADF00 push {lr} ldr r0, =0x03005dac ldr r1, =sub_818E564 @@ -801140,10 +801213,10 @@ sub_81ADF00: ; 81ADF00 pop {r0} bx r0 .pool - thumb_func_end sub_81ADF00 + thumb_func_end bag_menu_leave_maybe - thumb_func_start sub_81ADF20 -sub_81ADF20: ; 81ADF20 + thumb_func_start bag_menu_print_pocket_names +bag_menu_print_pocket_names: ; 81ADF20 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -801193,7 +801266,7 @@ sub_81ADF20: ; 81ADF20 adds r0, r6, 0 movs r1, 0x1 adds r2, r4, 0 - bl sub_81AE0BC + bl bag_menu_print mov r2, r8 cmp r2, 0 beq _081ADFBA @@ -801214,7 +801287,7 @@ sub_81ADF20: ; 81ADF20 adds r0, r6, 0 movs r1, 0x1 mov r2, r8 - bl sub_81AE0BC + bl bag_menu_print _081ADFBA: adds r0, r6, 0 movs r1, 0x7 @@ -801235,10 +801308,10 @@ _081ADFBA: pop {r0} bx r0 .pool - thumb_func_end sub_81ADF20 + thumb_func_end bag_menu_print_pocket_names - thumb_func_start sub_81ADFF8 -sub_81ADFF8: ; 81ADFF8 + thumb_func_start bag_menu_copy_pocket_name_to_window +bag_menu_copy_pocket_name_to_window: ; 81ADFF8 push {r4-r7,lr} adds r7, r0, 0 cmp r7, 0x8 @@ -801277,7 +801350,7 @@ _081AE002: pop {r0} bx r0 .pool - thumb_func_end sub_81ADFF8 + thumb_func_end bag_menu_copy_pocket_name_to_window thumb_func_start setup_bag_menu_textboxes setup_bag_menu_textboxes: ; 81AE054 @@ -801322,8 +801395,8 @@ _081AE088: .pool thumb_func_end setup_bag_menu_textboxes - thumb_func_start sub_81AE0BC -sub_81AE0BC: ; 81AE0BC + thumb_func_start bag_menu_print +bag_menu_print: ; 81AE0BC push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -801374,7 +801447,7 @@ sub_81AE0BC: ; 81AE0BC pop {r0} bx r0 .pool - thumb_func_end sub_81AE0BC + thumb_func_end bag_menu_print thumb_func_start sub_81AE124 sub_81AE124: ; 81AE124 @@ -801391,8 +801464,8 @@ sub_81AE124: ; 81AE124 .pool thumb_func_end sub_81AE124 - thumb_func_start sub_81AE13C -sub_81AE13C: ; 81AE13C + thumb_func_start bag_menu_add_window +bag_menu_add_window: ; 81AE13C push {r4,lr} lsls r0, 24 lsrs r2, r0, 24 @@ -801423,10 +801496,10 @@ _081AE172: pop {r1} bx r1 .pool - thumb_func_end sub_81AE13C + thumb_func_end bag_menu_add_window - thumb_func_start sub_81AE184 -sub_81AE184: ; 81AE184 + thumb_func_start bag_menu_remove_window +bag_menu_remove_window: ; 81AE184 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -801454,7 +801527,7 @@ _081AE1B8: pop {r0} bx r0 .pool - thumb_func_end sub_81AE184 + thumb_func_end bag_menu_remove_window thumb_func_start AddItemMessageWindow ; u8 AddItemMessageWindow(u8 a1) @@ -801484,8 +801557,8 @@ _081AE1E8: .pool thumb_func_end AddItemMessageWindow - thumb_func_start sub_81AE1F8 -sub_81AE1F8: ; 81AE1F8 + thumb_func_start bag_menu_remove_item_message_window +bag_menu_remove_item_message_window: ; 81AE1F8 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -801513,10 +801586,10 @@ _081AE22C: pop {r0} bx r0 .pool - thumb_func_end sub_81AE1F8 + thumb_func_end bag_menu_remove_item_message_window - thumb_func_start sub_81AE238 -sub_81AE238: ; 81AE238 + thumb_func_start bag_menu_yes_no +bag_menu_yes_no: ; 81AE238 push {lr} sub sp, 0x10 lsls r0, 24 @@ -801534,18 +801607,18 @@ sub_81AE238: ; 81AE238 str r2, [sp, 0xC] movs r2, 0x1 movs r3, 0 - bl sub_8121F94 + bl CreateYesNoMenuWithCallbacks add sp, 0x10 pop {r0} bx r0 .pool - thumb_func_end sub_81AE238 + thumb_func_end bag_menu_yes_no - thumb_func_start sub_81AE268 -sub_81AE268: ; 81AE268 + thumb_func_start bag_menu_add_money_window +bag_menu_add_money_window: ; 81AE268 push {r4,lr} movs r0, 0x9 - bl sub_81AE13C + bl bag_menu_add_window adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -801554,7 +801627,7 @@ sub_81AE268: ; 81AE268 movs r1, 0x92 lsls r1, 3 adds r0, r1 - bl decrypt_money + bl DecryptMoney adds r3, r0, 0 adds r0, r4, 0 movs r1, 0x1 @@ -801562,25 +801635,25 @@ sub_81AE268: ; 81AE268 bl set_window_border_style_and_print_money_box movs r0, 0x13 movs r1, 0xB - bl AddMoneyTextObject + bl AddMoneyLabelObject pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_81AE268 + thumb_func_end bag_menu_add_money_window - thumb_func_start sub_81AE2A4 -sub_81AE2A4: ; 81AE2A4 + thumb_func_start bag_menu_remove_money_window +bag_menu_remove_money_window: ; 81AE2A4 push {lr} movs r0, 0x9 - bl sub_81AE184 - bl sub_80E53F4 + bl bag_menu_remove_window + bl RemoveMoneyLabelObject pop {r0} bx r0 - thumb_func_end sub_81AE2A4 + thumb_func_end bag_menu_remove_money_window - thumb_func_start sub_81AE2B4 -sub_81AE2B4: ; 81AE2B4 + thumb_func_start bag_menu_prepare_tmhm_move_window +bag_menu_prepare_tmhm_move_window: ; 81AE2B4 push {lr} movs r0, 0x3 movs r1, 0 @@ -801589,31 +801662,31 @@ sub_81AE2B4: ; 81AE2B4 movs r1, 0x13 movs r2, 0 movs r3, 0 - bl sub_819A2F8 + bl blit_move_info_icon movs r0, 0x3 movs r1, 0x14 movs r2, 0 movs r3, 0xC - bl sub_819A2F8 + bl blit_move_info_icon movs r0, 0x3 movs r1, 0x15 movs r2, 0 movs r3, 0x18 - bl sub_819A2F8 + bl blit_move_info_icon movs r0, 0x3 movs r1, 0x16 movs r2, 0 movs r3, 0x24 - bl sub_819A2F8 + bl blit_move_info_icon movs r0, 0x3 movs r1, 0x2 bl CopyWindowToVram pop {r0} bx r0 - thumb_func_end sub_81AE2B4 + thumb_func_end bag_menu_prepare_tmhm_move_window - thumb_func_start sub_81AE2FC -sub_81AE2FC: ; 81AE2FC + thumb_func_start PrintTMHMMoveData +PrintTMHMMoveData: ; 81AE2FC push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -801643,7 +801716,7 @@ _081AE31A: movs r1, 0x1 ldr r2, =gUnknown_085E8D45 movs r3, 0x7 - bl sub_81AE0BC + bl bag_menu_print adds r0, r4, 0x1 lsls r0, 24 lsrs r4, r0, 24 @@ -801656,7 +801729,7 @@ _081AE31A: .pool _081AE354: adds r0, r4, 0 - bl sub_81B6CFC + bl ItemIdToBattleMoveId lsls r0, 16 lsrs r7, r0, 16 ldr r1, =gBattleMoves @@ -801671,7 +801744,7 @@ _081AE354: movs r0, 0x4 movs r2, 0 movs r3, 0 - bl sub_819A2F8 + bl blit_move_info_icon ldrb r0, [r5, 0x1] cmp r0, 0x1 bhi _081AE38C @@ -801698,7 +801771,7 @@ _081AE39C: str r0, [sp, 0x10] movs r1, 0x1 movs r3, 0x7 - bl sub_81AE0BC + bl bag_menu_print ldr r2, =gBattleMoves lsls r1, r7, 1 adds r0, r1, r7 @@ -801733,7 +801806,7 @@ _081AE3E8: str r0, [sp, 0x10] movs r1, 0x1 movs r3, 0x7 - bl sub_81AE0BC + bl bag_menu_print ldr r5, =0x02021cc4 ldr r1, =gBattleMoves adds r0, r6, r7 @@ -801756,7 +801829,7 @@ _081AE3E8: movs r1, 0x1 adds r2, r5, 0 movs r3, 0x7 - bl sub_81AE0BC + bl bag_menu_print movs r0, 0x4 movs r1, 0x2 bl CopyWindowToVram @@ -801769,15 +801842,17 @@ _081AE440: pop {r0} bx r0 .pool - thumb_func_end sub_81AE2FC + thumb_func_end PrintTMHMMoveData - thumb_func_start nullsub_125 -nullsub_125: ; 81AE458 + thumb_func_start ListMenuDummyTask +; void ListMenuDummyTask(u8 taskId) +ListMenuDummyTask: ; 81AE458 bx lr - thumb_func_end nullsub_125 + thumb_func_end ListMenuDummyTask - thumb_func_start sub_81AE45C -sub_81AE45C: ; 81AE45C + thumb_func_start DoMysteryGiftListMenu +; int DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, int a3, int a4, int a5) +DoMysteryGiftListMenu: ; 81AE45C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -801840,7 +801915,7 @@ _081AE4C0: strb r1, [r0, 0x10] movs r1, 0 movs r2, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit strb r0, [r4, 0x6] ldrb r0, [r4, 0x5] movs r1, 0x1 @@ -801851,7 +801926,7 @@ _081AE4C0: .pool _081AE4F4: ldrb r0, [r5, 0x6] - bl sub_81AE604 + bl ListMenuHandleInput str r0, [r5] ldr r1, =0x030022c0 ldrh r0, [r1, 0x2E] @@ -801920,17 +801995,18 @@ _081AE574: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_81AE45C + thumb_func_end DoMysteryGiftListMenu - thumb_func_start calls_per_item_funcs_in_list_outer -calls_per_item_funcs_in_list_outer: ; 81AE584 + thumb_func_start ListMenuInit +; u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow) +ListMenuInit: ; 81AE584 push {r4,r5,lr} adds r5, r0, 0 lsls r1, 16 lsrs r1, 16 lsls r2, 16 lsrs r2, 16 - bl calls_per_item_funcs_in_list + bl ListMenuInitInternal adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -801943,10 +802019,11 @@ calls_per_item_funcs_in_list_outer: ; 81AE584 pop {r4,r5} pop {r1} bx r1 - thumb_func_end calls_per_item_funcs_in_list_outer + thumb_func_end ListMenuInit - thumb_func_start sub_81AE5B0 -sub_81AE5B0: ; 81AE5B0 + thumb_func_start Unused_ListMenuInit2 +; u8 Unused_ListMenuInit2(struct ListMenuTemplate *listMenuTemplate, int a2, u16 scrollOffset, u16 selectedRow) +Unused_ListMenuInit2: ; 81AE5B0 push {r4-r7,lr} sub sp, 0x8 adds r6, r0, 0 @@ -801957,7 +802034,7 @@ sub_81AE5B0: ; 81AE5B0 lsrs r1, 16 lsls r2, 16 lsrs r2, 16 - bl calls_per_item_funcs_in_list + bl ListMenuInitInternal lsls r0, 24 lsrs r7, r0, 24 ldrb r0, [r4, 0x4] @@ -801987,11 +802064,11 @@ _081AE5F0: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_81AE5B0 + thumb_func_end Unused_ListMenuInit2 - thumb_func_start sub_81AE604 -; int sub_81AE604(u8 taskId) -sub_81AE604: ; 81AE604 + thumb_func_start ListMenuHandleInput +; int ListMenuHandleInput(u8 taskId) +ListMenuHandleInput: ; 81AE604 push {lr} lsls r0, 24 lsrs r0, 24 @@ -802092,14 +802169,14 @@ _081AE6AE: _081AE6B8: movs r3, 0x1 _081AE6BA: - bl sub_81AEF28 + bl ListMenuChangeSelection _081AE6BE: movs r0, 0x1 negs r0, r0 _081AE6C2: pop {r1} bx r1 - thumb_func_end sub_81AE604 + thumb_func_end ListMenuHandleInput thumb_func_start sub_81AE6C8 sub_81AE6C8: ; 81AE6C8 @@ -802129,7 +802206,7 @@ _081AE6EC: ldrb r1, [r1, 0x17] lsrs r1, 6 subs r1, 0x2 - bl sub_81AF6C4 + bl ListMenuRemoveCursorObject _081AE6FC: adds r0, r4, 0 bl remove_task @@ -802160,9 +802237,9 @@ sub_81AE70C: ; 81AE70C ldrh r3, [r4, 0xE] adds r0, r4, 0 movs r2, 0 - bl calls_printshopbuyprice + bl ListMenuPrintEntries adds r0, r4, 0 - bl DrawListMenuCursor + bl ListMenuDrawCursor ldrb r0, [r4, 0x10] movs r1, 0x2 bl CopyWindowToVram @@ -802265,7 +802342,7 @@ sub_81AE7D0: ; 81AE7D0 movs r1, 0 movs r2, 0x1 movs r3, 0 - bl sub_81AEF28 + bl ListMenuChangeSelection _081AE804: cmp r4, 0x80 bne _081AE814 @@ -802273,7 +802350,7 @@ _081AE804: movs r1, 0 movs r2, 0x1 movs r3, 0x1 - bl sub_81AEF28 + bl ListMenuChangeSelection _081AE814: cmp r5, 0 beq _081AE81E @@ -802345,8 +802422,9 @@ _081AE882: .pool thumb_func_end get_coro_args_x18_x1A - thumb_func_start sub_81AE88C -sub_81AE88C: ; 81AE88C + thumb_func_start ListMenuGetYCoordForPrintingArrowCursor +; u8 ListMenuGetYCoordForPrintingArrowCursor(u8 taskId) +ListMenuGetYCoordForPrintingArrowCursor: ; 81AE88C push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -802380,10 +802458,11 @@ sub_81AE88C: ; 81AE88C pop {r1} bx r1 .pool - thumb_func_end sub_81AE88C + thumb_func_end ListMenuGetYCoordForPrintingArrowCursor - thumb_func_start calls_per_item_funcs_in_list -calls_per_item_funcs_in_list: ; 81AE8D4 + thumb_func_start ListMenuInitInternal +; u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow) +ListMenuInitInternal: ; 81AE8D4 push {r4-r7,lr} mov r7, r8 push {r7} @@ -802394,7 +802473,7 @@ calls_per_item_funcs_in_list: ; 81AE8D4 lsrs r5, 16 lsls r6, 16 lsrs r6, 16 - ldr r0, =nullsub_125 + ldr r0, =ListMenuDummyTask movs r1, 0 bl AddTask lsls r0, 24 @@ -802471,12 +802550,12 @@ _081AE96C: ldrh r3, [r7, 0xE] adds r0, r7, 0 movs r2, 0 - bl calls_printshopbuyprice + bl ListMenuPrintEntries adds r0, r7, 0 - bl DrawListMenuCursor + bl ListMenuDrawCursor adds r0, r7, 0 movs r1, 0x1 - bl calls_printshopitemdescription + bl ListMenuCallSelectionChangedCallback mov r0, r8 pop {r3} mov r8, r3 @@ -802484,11 +802563,11 @@ _081AE96C: pop {r1} bx r1 .pool - thumb_func_end calls_per_item_funcs_in_list + thumb_func_end ListMenuInitInternal - thumb_func_start sub_81AE9B4 -; int sub_81AE9B4(int a1, u8 *str, u8 x, u8 y) -sub_81AE9B4: ; 81AE9B4 + thumb_func_start ListMenuPrint +; void ListMenuPrint(struct ListMenu *listMenu, u8 *str, u8 x, u8 y) +ListMenuPrint: ; 81AE9B4 push {r4-r7,lr} sub sp, 0x18 adds r4, r0, 0 @@ -802576,10 +802655,11 @@ _081AEA5E: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_81AE9B4 + thumb_func_end ListMenuPrint - thumb_func_start calls_printshopbuyprice -calls_printshopbuyprice: ; 81AEA68 + thumb_func_start ListMenuPrintEntries +; void ListMenuPrintEntries(struct ListMenu *listMenu, u16 startIndex, u16 yOffset, u16 count) +ListMenuPrintEntries: ; 81AEA68 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -802655,7 +802735,7 @@ _081AEAEE: adds r0, r4, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_81AE9B4 + bl ListMenuPrint mov r0, r9 adds r0, 0x1 lsls r0, 16 @@ -802674,10 +802754,11 @@ _081AEB10: pop {r4-r7} pop {r0} bx r0 - thumb_func_end calls_printshopbuyprice + thumb_func_end ListMenuPrintEntries - thumb_func_start DrawListMenuCursor -DrawListMenuCursor: ; 81AEB20 + thumb_func_start ListMenuDrawCursor +; void ListMenuDrawCursor(struct ListMenu *listMenu) +ListMenuDrawCursor: ; 81AEB20 push {r4-r7,lr} mov r7, r8 push {r7} @@ -802723,7 +802804,7 @@ _081AEB70: adds r0, r6, 0 mov r2, r8 adds r3, r7, 0 - bl sub_81AE9B4 + bl ListMenuPrint b _081AEC0C .pool _081AEB84: @@ -802732,7 +802813,7 @@ _081AEB84: bne _081AEB94 adds r0, r6, 0 movs r1, 0 - bl sub_81AEC18 + bl ListMenuAddCursorObject strb r0, [r6, 0x1E] _081AEB94: ldrb r5, [r6, 0x1E] @@ -802756,7 +802837,7 @@ _081AEB94: adds r0, r5, 0 adds r1, r4, 0 movs r3, 0 - bl sub_81AF69C + bl ListMenuUpdateCursorObject b _081AEC0C .pool _081AEBCC: @@ -802765,7 +802846,7 @@ _081AEBCC: bne _081AEBDC adds r0, r6, 0 movs r1, 0x1 - bl sub_81AEC18 + bl ListMenuAddCursorObject strb r0, [r6, 0x1E] _081AEBDC: ldrb r5, [r6, 0x1E] @@ -802788,17 +802869,17 @@ _081AEBDC: adds r0, r5, 0 adds r1, r4, 0 movs r3, 0x1 - bl sub_81AF69C + bl ListMenuUpdateCursorObject _081AEC0C: pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 - thumb_func_end DrawListMenuCursor + thumb_func_end ListMenuDrawCursor - thumb_func_start sub_81AEC18 -sub_81AEC18: ; 81AEC18 + thumb_func_start ListMenuAddCursorObject +ListMenuAddCursorObject: ; 81AEC18 push {r4,r5,lr} sub sp, 0xC adds r4, r0, 0 @@ -802834,7 +802915,7 @@ sub_81AEC18: ; 81AEC18 strb r0, [r1, 0xA] mov r0, sp adds r1, r5, 0 - bl sub_81AF680 + bl ListMenuAddCursorObjectInternal lsls r0, 24 lsrs r0, 24 add sp, 0xC @@ -802842,10 +802923,10 @@ sub_81AEC18: ; 81AEC18 pop {r1} bx r1 .pool - thumb_func_end sub_81AEC18 + thumb_func_end ListMenuAddCursorObject - thumb_func_start sub_81AEC78 -sub_81AEC78: ; 81AEC78 + thumb_func_start ListMenuErasePrintedCursor +ListMenuErasePrintedCursor: ; 81AEC78 push {r4-r7,lr} mov r7, r8 push {r7} @@ -802911,10 +802992,10 @@ _081AECF4: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_81AEC78 + thumb_func_end ListMenuErasePrintedCursor thumb_func_start ListMenuUpdateSelectedRowIndexAndScrollOffset -; u8 ListMenuUpdateSelectedRowIndexAndScrollOffset(int, BOOL goingDown) +; u8 ListMenuUpdateSelectedRowIndexAndScrollOffset(int, bool8 movingDown) ListMenuUpdateSelectedRowIndexAndScrollOffset: ; 81AED00 push {r4-r6,lr} adds r4, r0, 0 @@ -803054,8 +803135,9 @@ _081AEDE8: bx r1 thumb_func_end ListMenuUpdateSelectedRowIndexAndScrollOffset - thumb_func_start sub_81AEDF0 -sub_81AEDF0: ; 81AEDF0 + thumb_func_start ListMenuScroll +; void ListMenuScroll(struct ListMenu *listMenu, int a2, bool8 movingDown) +ListMenuScroll: ; 81AEDF0 push {r4-r7,lr} mov r7, r8 push {r7} @@ -803081,7 +803163,7 @@ sub_81AEDF0: ; 81AEDF0 ldrh r3, [r6, 0xE] adds r0, r6, 0 movs r2, 0 - bl calls_printshopbuyprice + bl ListMenuPrintEntries b _081AEF1A _081AEE2A: ldrb r0, [r6, 0x17] @@ -803114,7 +803196,7 @@ _081AEE2A: adds r0, r6, 0 movs r2, 0 adds r3, r5, 0 - bl calls_printshopbuyprice + bl ListMenuPrintEntries ldrh r0, [r6, 0xE] adds r1, r0, 0 muls r1, r4 @@ -803174,7 +803256,7 @@ _081AEEBC: lsrs r2, 16 adds r0, r6, 0 adds r3, r7, 0 - bl calls_printshopbuyprice + bl ListMenuPrintEntries ldrb r0, [r6, 0x10] movs r1, 0x3 bl GetWindowAttribute @@ -803202,10 +803284,11 @@ _081AEF1A: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_81AEDF0 + thumb_func_end ListMenuScroll - thumb_func_start sub_81AEF28 -sub_81AEF28: ; 81AEF28 + thumb_func_start ListMenuChangeSelection +; bool8 ListMenuChangeSelection(struct ListMenu *listMenu, bool8 updateCursorAndCallCallback, u8 count, bool8 movingDown) +ListMenuChangeSelection: ; 81AEF28 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -803277,12 +803360,12 @@ _081AEFA2: _081AEFA6: adds r0, r4, 0 mov r1, r10 - bl sub_81AEC78 + bl ListMenuErasePrintedCursor adds r0, r4, 0 - bl DrawListMenuCursor + bl ListMenuDrawCursor adds r0, r4, 0 movs r1, 0 - bl calls_printshopitemdescription + bl ListMenuCallSelectionChangedCallback ldrb r0, [r4, 0x10] movs r1, 0x2 bl CopyWindowToVram @@ -803290,16 +803373,16 @@ _081AEFA6: _081AEFC6: adds r0, r4, 0 mov r1, r10 - bl sub_81AEC78 + bl ListMenuErasePrintedCursor adds r0, r4, 0 adds r1, r7, 0 mov r2, r9 - bl sub_81AEDF0 + bl ListMenuScroll adds r0, r4, 0 - bl DrawListMenuCursor + bl ListMenuDrawCursor adds r0, r4, 0 movs r1, 0 - bl calls_printshopitemdescription + bl ListMenuCallSelectionChangedCallback ldrb r0, [r4, 0x10] movs r1, 0x2 bl CopyWindowToVram @@ -803314,10 +803397,11 @@ _081AEFF0: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_81AEF28 + thumb_func_end ListMenuChangeSelection - thumb_func_start calls_printshopitemdescription -calls_printshopitemdescription: ; 81AF000 + thumb_func_start ListMenuCallSelectionChangedCallback +; void ListMenuCallSelectionChangedCallback(struct ListMenu *listMenu, u8 a2) +ListMenuCallSelectionChangedCallback: ; 81AF000 push {r4,lr} adds r2, r0, 0 lsls r1, 24 @@ -803338,7 +803422,7 @@ _081AF022: pop {r4} pop {r0} bx r0 - thumb_func_end calls_printshopitemdescription + thumb_func_end ListMenuCallSelectionChangedCallback thumb_func_start sub_81AF028 sub_81AF028: ; 81AF028 @@ -803717,8 +803801,8 @@ _081AF2E4: .pool thumb_func_end sub_81AF264 - thumb_func_start sub_81AF2F0 -sub_81AF2F0: ; 81AF2F0 + thumb_func_start AddScrollIndicatorArrowObject +AddScrollIndicatorArrowObject: ; 81AF2F0 push {r4-r7,lr} mov r7, r8 push {r7} @@ -803784,10 +803868,10 @@ sub_81AF2F0: ; 81AF2F0 pop {r1} bx r1 .pool - thumb_func_end sub_81AF2F0 + thumb_func_end AddScrollIndicatorArrowObject - thumb_func_start sub_81AF380 -sub_81AF380: ; 81AF380 + thumb_func_start AddScrollIndicatorArrowPair +AddScrollIndicatorArrowPair: ; 81AF380 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -803835,7 +803919,7 @@ _081AF3DC: str r1, [r0, 0x4] bl LoadTaggedObjectPalette _081AF3EE: - ldr r0, =sub_81AF504 + ldr r0, =Task_ScrollIndicatorArrowPair movs r1, 0 bl AddTask lsls r0, 24 @@ -803864,7 +803948,7 @@ _081AF3EE: ldrh r3, [r6, 0xA] ldrh r4, [r6, 0xC] str r4, [sp] - bl sub_81AF2F0 + bl AddScrollIndicatorArrowObject strb r0, [r7, 0xC] ldrb r0, [r6, 0x3] ldrb r1, [r6, 0x4] @@ -803872,7 +803956,7 @@ _081AF3EE: ldrh r3, [r6, 0xA] ldrh r4, [r6, 0xC] str r4, [sp] - bl sub_81AF2F0 + bl AddScrollIndicatorArrowObject strb r0, [r7, 0xD] ldrh r1, [r6, 0xC] ldr r0, =0x0000ffff @@ -803913,10 +803997,10 @@ _081AF47C: pop {r1} bx r1 .pool - thumb_func_end sub_81AF380 + thumb_func_end AddScrollIndicatorArrowPair - thumb_func_start sub_81AF4A0 -sub_81AF4A0: ; 81AF4A0 + thumb_func_start AddScrollIndicatorArrowPairParametrized +AddScrollIndicatorArrowPairParametrized: ; 81AF4A0 push {r4,lr} adds r4, r1, 0 subs r0, 0x2 @@ -803957,17 +804041,17 @@ _081AF4D6: strb r1, [r2, 0xE] adds r0, r2, 0 ldr r1, [sp, 0x14] - bl sub_81AF380 + bl AddScrollIndicatorArrowPair lsls r0, 24 lsrs r0, 24 pop {r4} pop {r1} bx r1 .pool - thumb_func_end sub_81AF4A0 + thumb_func_end AddScrollIndicatorArrowPairParametrized - thumb_func_start sub_81AF504 -sub_81AF504: ; 81AF504 + thumb_func_start Task_ScrollIndicatorArrowPair +Task_ScrollIndicatorArrowPair: ; 81AF504 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 @@ -804040,10 +804124,10 @@ _081AF594: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_81AF504 + thumb_func_end Task_ScrollIndicatorArrowPair - thumb_func_start sub_81AF59C -sub_81AF59C: ; 81AF59C + thumb_func_start Task_ScrollIndicatorArrowPairOnMainMenu +Task_ScrollIndicatorArrowPairOnMainMenu: ; 81AF59C push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -804107,10 +804191,10 @@ _081AF612: pop {r0} bx r0 .pool - thumb_func_end sub_81AF59C + thumb_func_end Task_ScrollIndicatorArrowPairOnMainMenu - thumb_func_start sub_81AF620 -sub_81AF620: ; 81AF620 + thumb_func_start RemoveScrollIndicatorArrowPair +RemoveScrollIndicatorArrowPair: ; 81AF620 push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 @@ -804150,30 +804234,30 @@ _081AF648: pop {r0} bx r0 .pool - thumb_func_end sub_81AF620 + thumb_func_end RemoveScrollIndicatorArrowPair - thumb_func_start sub_81AF680 -sub_81AF680: ; 81AF680 + thumb_func_start ListMenuAddCursorObjectInternal +ListMenuAddCursorObjectInternal: ; 81AF680 push {lr} cmp r1, 0 beq _081AF68A cmp r1, 0x1 beq _081AF690 _081AF68A: - bl sub_81AF828 + bl ListMenuAddRedOutlineCursorObject b _081AF694 _081AF690: - bl sub_81AFA60 + bl ListMenuAddRedArrowCursorObject _081AF694: lsls r0, 24 lsrs r0, 24 pop {r1} bx r1 - thumb_func_end sub_81AF680 + thumb_func_end ListMenuAddCursorObjectInternal - thumb_func_start sub_81AF69C -; void sub_81AF69C(u8 taskId, u16 x, u16 y, u32 a4) -sub_81AF69C: ; 81AF69C + thumb_func_start ListMenuUpdateCursorObject +; void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 a4) +ListMenuUpdateCursorObject: ; 81AF69C push {lr} lsls r0, 24 lsrs r0, 24 @@ -804187,17 +804271,17 @@ sub_81AF69C: ; 81AF69C beq _081AF6BA b _081AF6BE _081AF6B4: - bl sub_81AF994 + bl ListMenuUpdateRedOutlineCursorObject b _081AF6BE _081AF6BA: - bl sub_81AFB68 + bl ListMenuUpdateRedArrowCursorObject _081AF6BE: pop {r0} bx r0 - thumb_func_end sub_81AF69C + thumb_func_end ListMenuUpdateCursorObject - thumb_func_start sub_81AF6C4 -sub_81AF6C4: ; 81AF6C4 + thumb_func_start ListMenuRemoveCursorObject +ListMenuRemoveCursorObject: ; 81AF6C4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -804207,22 +804291,22 @@ sub_81AF6C4: ; 81AF6C4 beq _081AF6DA b _081AF6DE _081AF6D4: - bl sub_81AF9D8 + bl ListMenuRemoveRedOutlineCursorObject b _081AF6DE _081AF6DA: - bl sub_81AFBA0 + bl ListMenuRemoveRedArrowCursorObject _081AF6DE: pop {r0} bx r0 - thumb_func_end sub_81AF6C4 + thumb_func_end ListMenuRemoveCursorObject - thumb_func_start nullsub_126 -nullsub_126: ; 81AF6E4 + thumb_func_start Task_RedOutlineCursor +Task_RedOutlineCursor: ; 81AF6E4 bx lr - thumb_func_end nullsub_126 + thumb_func_end Task_RedOutlineCursor - thumb_func_start sub_81AF6E8 -sub_81AF6E8: ; 81AF6E8 + thumb_func_start ListMenuGetRedOutlineCursorSpriteCount +ListMenuGetRedOutlineCursorSpriteCount: ; 81AF6E8 push {lr} lsls r0, 16 lsrs r0, 16 @@ -804257,10 +804341,10 @@ _081AF71C: lsrs r0, 24 pop {r1} bx r1 - thumb_func_end sub_81AF6E8 + thumb_func_end ListMenuGetRedOutlineCursorSpriteCount - thumb_func_start sub_81AF724 -sub_81AF724: ; 81AF724 + thumb_func_start ListMenuSetUpRedOutlineCursorSpriteOamTable +ListMenuSetUpRedOutlineCursorSpriteOamTable: ; 81AF724 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -804379,10 +804463,10 @@ _081AF7F6: pop {r0} bx r0 .pool - thumb_func_end sub_81AF724 + thumb_func_end ListMenuSetUpRedOutlineCursorSpriteOamTable - thumb_func_start sub_81AF828 -sub_81AF828: ; 81AF828 + thumb_func_start ListMenuAddRedOutlineCursorObject +ListMenuAddRedOutlineCursorObject: ; 81AF828 push {r4-r7,lr} mov r7, r8 push {r7} @@ -804429,7 +804513,7 @@ _081AF884: str r1, [r0, 0x4] bl LoadTaggedObjectPalette _081AF896: - ldr r0, =nullsub_126 + ldr r0, =Task_RedOutlineCursor movs r1, 0 bl AddTask lsls r0, 24 @@ -804448,7 +804532,7 @@ _081AF896: strh r0, [r5, 0x10] ldrh r0, [r6, 0x2] ldrh r1, [r6, 0x4] - bl sub_81AF6E8 + bl ListMenuGetRedOutlineCursorSpriteCount strb r0, [r5] ldrb r0, [r5] lsls r0, 2 @@ -804458,7 +804542,7 @@ _081AF896: str r2, [r5, 0x4] ldrh r0, [r6, 0x2] ldrh r1, [r6, 0x4] - bl sub_81AF724 + bl ListMenuSetUpRedOutlineCursorSpriteOamTable mov r1, sp ldr r0, =gUnknown_082EC6AC ldm r0!, {r2,r3,r7} @@ -804540,11 +804624,11 @@ _081AF96E: pop {r1} bx r1 .pool - thumb_func_end sub_81AF828 + thumb_func_end ListMenuAddRedOutlineCursorObject - thumb_func_start sub_81AF994 -; void sub_81AF994(u8 taskId, u16 x, u16 y) -sub_81AF994: ; 81AF994 + thumb_func_start ListMenuUpdateRedOutlineCursorObject +; void ListMenuUpdateRedOutlineCursorObject(u8 taskId, u16 x, u16 y) +ListMenuUpdateRedOutlineCursorObject: ; 81AF994 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 @@ -804576,10 +804660,10 @@ sub_81AF994: ; 81AF994 pop {r0} bx r0 .pool - thumb_func_end sub_81AF994 + thumb_func_end ListMenuUpdateRedOutlineCursorObject - thumb_func_start sub_81AF9D8 -sub_81AF9D8: ; 81AF9D8 + thumb_func_start ListMenuRemoveRedOutlineCursorObject +ListMenuRemoveRedOutlineCursorObject: ; 81AF9D8 push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 @@ -804615,10 +804699,10 @@ _081AFA06: pop {r0} bx r0 .pool - thumb_func_end sub_81AF9D8 + thumb_func_end ListMenuRemoveRedOutlineCursorObject - thumb_func_start sub_81AFA30 -sub_81AFA30: ; 81AFA30 + thumb_func_start ObjectCB_RedArrowCursor +ObjectCB_RedArrowCursor: ; 81AFA30 push {lr} adds r2, r0, 0 ldr r1, =gUnknown_08329F40 @@ -804640,15 +804724,15 @@ _081AFA48: pop {r0} bx r0 .pool - thumb_func_end sub_81AFA30 + thumb_func_end ObjectCB_RedArrowCursor - thumb_func_start nullsub_127 -nullsub_127: ; 81AFA5C + thumb_func_start Task_RedArrowCursor +Task_RedArrowCursor: ; 81AFA5C bx lr - thumb_func_end nullsub_127 + thumb_func_end Task_RedArrowCursor - thumb_func_start sub_81AFA60 -sub_81AFA60: ; 81AFA60 + thumb_func_start ListMenuAddRedArrowCursorObject +ListMenuAddRedArrowCursorObject: ; 81AFA60 push {r4-r7,lr} sub sp, 0x28 adds r5, r0, 0 @@ -804691,7 +804775,7 @@ _081AFAB4: str r1, [r0, 0x4] bl LoadTaggedObjectPalette _081AFAC6: - ldr r0, =nullsub_127 + ldr r0, =Task_RedArrowCursor movs r1, 0 bl AddTask lsls r0, 24 @@ -804760,11 +804844,11 @@ _081AFB46: pop {r1} bx r1 .pool - thumb_func_end sub_81AFA60 + thumb_func_end ListMenuAddRedArrowCursorObject - thumb_func_start sub_81AFB68 -; void sub_81AFB68(u8 taskId, u16 x, u16 y) -sub_81AFB68: ; 81AFB68 + thumb_func_start ListMenuUpdateRedArrowCursorObject +; void ListMenuUpdateRedArrowCursorObject(u8 taskId, u16 x, u16 y) +ListMenuUpdateRedArrowCursorObject: ; 81AFB68 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 @@ -804790,10 +804874,10 @@ sub_81AFB68: ; 81AFB68 pop {r0} bx r0 .pool - thumb_func_end sub_81AFB68 + thumb_func_end ListMenuUpdateRedArrowCursorObject - thumb_func_start sub_81AFBA0 -sub_81AFBA0: ; 81AFBA0 + thumb_func_start ListMenuRemoveRedArrowCursorObject +ListMenuRemoveRedArrowCursorObject: ; 81AFBA0 push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 @@ -804827,7 +804911,7 @@ _081AFBC8: pop {r0} bx r0 .pool - thumb_func_end sub_81AFBA0 + thumb_func_end ListMenuRemoveRedArrowCursorObject thumb_func_start sub_81AFBF0 sub_81AFBF0: ; 81AFBF0 @@ -805118,7 +805202,7 @@ sub_81AFDD0: ; 81AFDD0 thumb_func_end sub_81AFDD0 thumb_func_start AllocItemIconTemporaryBuffers -; BOOL AllocItemIconTemporaryBuffers() +; bool8 AllocItemIconTemporaryBuffers() AllocItemIconTemporaryBuffers: ; 81AFDE4 push {r4,r5,lr} ldr r5, =0x0203cebc @@ -805580,7 +805664,7 @@ _081B0194: thumb_func_start sub_81B01B0 sub_81B01B0: ; 81B01B0 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -805669,7 +805753,7 @@ _081B0234: .4byte _081B044C .4byte _081B0474 _081B0290: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl sub_8121DA0 bl clear_scheduled_bg_copies_to_vram ldr r1, =0x030022c0 @@ -806000,7 +806084,7 @@ sub_81B0550: ; 81B0550 bl InitBgsFromTemplates ldr r1, [r5] movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x1 bl schedule_bg_copy_tilemap_to_vram @@ -809656,7 +809740,7 @@ _081B22FA: cmp r0, 0 beq _081B2334 adds r0, r7, 0 - bl sub_81B6CFC + bl ItemIdToBattleMoveId b _081B233E _081B231C: adds r0, r5, 0 @@ -811594,7 +811678,7 @@ sub_81B334C: ; 81B334C movs r1, 0x4F movs r2, 0xD movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu pop {r0} bx r0 .pool @@ -813292,7 +813376,7 @@ sub_81B41C4: ; 81B41C4 ldr r2, =c2_8123744 movs r0, 0x2 movs r1, 0x5 - bl sub_81AAC90 + bl GoToBagMenu b _081B41E8 .pool _081B41E0: @@ -813369,7 +813453,7 @@ _081B4278: beq _081B42A4 ldrh r0, [r6] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item movs r0, 0x9 ldrsb r0, [r5, r0] mov r1, r8 @@ -813441,7 +813525,7 @@ sub_81B42D0: ; 81B42D0 bl sub_81B1DB8 adds r0, r4, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldr r1, =0x03005e00 lsls r0, r7, 2 adds r0, r7 @@ -813544,7 +813628,7 @@ _081B4402: ldr r5, =0x0203ce7c ldrh r0, [r5] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldr r6, =0x0203cefc ldrh r0, [r6] movs r1, 0x1 @@ -813720,7 +813804,7 @@ sub_81B4578: ; 81B4578 bl pokemon_setattr ldrh r0, [r4] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item mov r0, r8 movs r1, 0x1 bl bag_add_item @@ -817009,7 +817093,7 @@ c2_815ABFC: ; 81B6254 movs r0, 0xC movs r1, 0x5 movs r2, 0 - bl sub_81AAC90 + bl GoToBagMenu b _081B6276 _081B626C: ldr r0, =0x0203cf30 @@ -817056,7 +817140,7 @@ _081B62B2: thumb_func_end sub_81B6280 thumb_func_start IsHPRecoveryItem -; BOOL IsHPRecoveryItem(u16 itemId) +; bool8 IsHPRecoveryItem(u16 itemId) IsHPRecoveryItem: ; 81B62D0 push {lr} lsls r0, 16 @@ -817238,7 +817322,7 @@ _081B64C4: thumb_func_end GetMedicineItemEffectMessage thumb_func_start UsingHPEVItemOnShedinja -; BOOL UsingHPEVItemOnShedinja(struct pokemon *mon, u16 itemId) +; bool8 UsingHPEVItemOnShedinja(struct pokemon *mon, u16 itemId) UsingHPEVItemOnShedinja: ; 81B64D0 push {r4,lr} adds r4, r0, 0 @@ -817267,7 +817351,7 @@ _081B64FE: thumb_func_end UsingHPEVItemOnShedinja thumb_func_start IsBlueYellowRedFlute -; BOOL IsBlueYellowRedFlute(u16 itemId) +; bool8 IsBlueYellowRedFlute(u16 itemId) IsBlueYellowRedFlute: ; 81B6504 push {lr} lsls r0, 16 @@ -817289,7 +817373,7 @@ _081B651C: thumb_func_end IsBlueYellowRedFlute thumb_func_start ExecuteTableBasedItemEffect__ -; BOOL ExecuteTableBasedItemEffect__(u8 partyMonIndex, u16 itemId, u8 monMoveIndex) +; bool8 ExecuteTableBasedItemEffect__(u8 partyMonIndex, u16 itemId, u8 monMoveIndex) ExecuteTableBasedItemEffect__: ; 81B6520 push {r4-r6,lr} lsls r0, 24 @@ -817421,7 +817505,7 @@ _081B6624: beq _081B6656 adds r0, r6, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item b _081B6656 .pool _081B6650: @@ -817666,7 +817750,7 @@ _081B6874: bl audio_play adds r0, r6, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldr r1, =0x02021cc4 adds r0, r5, 0 bl GetMonNickname @@ -818108,7 +818192,7 @@ _081B6C34: bl audio_play adds r0, r5, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item movs r0, 0 ldrsh r1, [r7, r0] adds r1, 0xD @@ -818171,8 +818255,8 @@ dp05_pp_up: ; 81B6CC0 .pool thumb_func_end dp05_pp_up - thumb_func_start sub_81B6CFC -sub_81B6CFC: ; 81B6CFC + thumb_func_start ItemIdToBattleMoveId +ItemIdToBattleMoveId: ; 81B6CFC lsls r0, 16 ldr r1, =0xfedf0000 adds r0, r1 @@ -818182,7 +818266,7 @@ sub_81B6CFC: ; 81B6CFC ldrh r0, [r0] bx lr .pool - thumb_func_end sub_81B6CFC + thumb_func_end ItemIdToBattleMoveId thumb_func_start sub_81B6D14 sub_81B6D14: ; 81B6D14 @@ -818307,7 +818391,7 @@ sub_81B6DC4: ; 81B6DC4 adds r0, r5, 0 bl GetMonNickname adds r0, r4, 0 - bl sub_81B6CFC + bl ItemIdToBattleMoveId strh r0, [r7, 0xE] ldr r0, =0x02021dc4 movs r1, 0xE @@ -818405,7 +818489,7 @@ sub_81B6EB4: ; 81B6EB4 bhi _081B6EF0 adds r0, r4, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item _081B6EF0: ldr r1, =0x02021cc4 adds r0, r5, 0 @@ -819042,7 +819126,7 @@ _081B74B4: ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item ldr r1, =0x02021cc4 adds r0, r5, 0 bl GetMonNickname @@ -819811,7 +819895,7 @@ _081B7BC8: ldr r0, =0x0203ce7c ldrh r0, [r0] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item _081B7BD8: ldr r1, =0x03005e00 lsls r0, r4, 2 @@ -819910,7 +819994,7 @@ sub_81B7C74: ; 81B7C74 _081B7CD8: ldrh r0, [r4] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item bl sub_81B06F4 _081B7CE4: pop {r4-r6} @@ -820518,7 +820602,7 @@ sub_81B81A8: ; 81B81A8 bl pokemon_setattr ldrh r0, [r4] movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item adds r0, r7, 0 bl sub_81B841C ldr r0, [r6] @@ -820760,7 +820844,7 @@ sub_81B83F0: ; 81B83F0 _081B8410: adds r0, r1, 0 movs r1, 0x1 - bl sub_80D6AA4 + bl remove_item _081B8418: pop {r0} bx r0 @@ -832157,7 +832241,7 @@ _081BECB0: ldr r0, =0x0203cf08 ldr r1, [r0] movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08617B94 movs r0, 0x6 str r0, [sp] @@ -832476,7 +832560,7 @@ _081BEF32: .pool _081BEF64: movs r0, 0 - bl UnsetBgTilemap + bl UnsetBgTilemapBuffer ldr r0, =sub_81BEBB4 bl get_task_id_by_function lsls r0, 24 @@ -833747,7 +833831,7 @@ sub_81BFA80: ; 81BFA80 thumb_func_start sub_81BFAB4 sub_81BFAB4: ; 81BFAB4 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -833837,7 +833921,7 @@ _081BFB38: .4byte _081BFDB0 .4byte _081BFDCC _081BFB9C: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl sub_8121DA0 bl clear_scheduled_bg_copies_to_vram b _081BFDE6 @@ -834119,16 +834203,16 @@ sub_81BFE24: ; 81BFE24 ldr r0, =0x000020bc adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x000010bc adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] adds r1, 0xBC movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x1 bl schedule_bg_copy_tilemap_to_vram @@ -834696,11 +834780,11 @@ _081C037C: ldr r1, [r6] adds r1, r4 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r6] adds r1, r5 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r1, 0x80 lsls r1, 9 movs r0, 0x2 @@ -835653,7 +835737,7 @@ _081C0BFE: lsls r2, 12 adds r2, 0xBC adds r1, r2 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x1 bl ShowBg movs r0, 0x2 @@ -835837,7 +835921,7 @@ _081C0DA6: ldr r3, =0xfffff0bc adds r1, r3 adds r1, r2, r1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldrb r0, [r4, 0x2] movs r1, 0x80 lsls r1, 9 @@ -838405,7 +838489,7 @@ _081C23C8: cmp r0, 0x7 bls _081C2356 movs r0, 0x1 - bl GetBgTilemap + bl GetBgTilemapBuffer ldr r1, =0x0203cf1c ldr r1, [r1] ldr r2, =0x000010bc @@ -843516,7 +843600,7 @@ _081C4FBA: thumb_func_start sub_81C501C sub_81C501C: ; 81C501C push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -843598,7 +843682,7 @@ _081C50A0: .4byte _081C517A .4byte _081C5188 _081C50E4: - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl clear_scheduled_bg_copies_to_vram b _081C51A2 _081C50EE: @@ -843725,7 +843809,7 @@ sub_81C51DC: ; 81C51DC ldr r1, [r0] adds r1, 0x4 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0x2 bl schedule_bg_copy_tilemap_to_vram @@ -844232,7 +844316,7 @@ sub_81C5674: ; 81C5674 movs r1, 0xAC movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized ldr r1, [r4] ldr r2, =0x00000816 adds r1, r2 @@ -844255,7 +844339,7 @@ sub_81C56CC: ; 81C56CC ldrb r0, [r1] cmp r0, 0xFF beq _081C56EA - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair ldr r0, [r4] ldr r1, =0x00000816 adds r0, r1 @@ -844285,7 +844369,7 @@ sub_81C56F8: ; 81C56F8 ldr r2, =0x0203cf30 ldrh r1, [r2, 0x8] ldrh r2, [r2, 0x6] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -844727,7 +844811,7 @@ sub_81C5A98: ; 81C5A98 lsrs r0, 24 lsls r4, 24 lsrs r4, 24 - bl sub_81AE88C + bl ListMenuGetYCoordForPrintingArrowCursor lsls r0, 24 lsrs r0, 24 adds r1, r4, 0 @@ -844928,7 +845012,7 @@ _081C5C12: .pool _081C5C5C: ldrb r0, [r7] - bl sub_81AE604 + bl ListMenuHandleInput adds r6, r0, 0 ldrb r0, [r7] ldr r1, =0x0203cf38 @@ -845877,7 +845961,7 @@ sub_81C64B4: ; 81C64B4 adds r0, r4, 0 adds r0, 0x10 ldrh r1, [r4, 0x4] - bl sub_8122034 + bl AdjustQuantityAccordingToDPadInput lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -846012,7 +846096,7 @@ sub_81C65CC: ; 81C65CC ldr r0, =0x03006310 ldrh r1, [r6] ldrh r2, [r7] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -846321,7 +846405,7 @@ sub_81C68B0: ; 81C68B0 .pool _081C68F8: ldrb r0, [r4] - bl sub_81AE604 + bl ListMenuHandleInput adds r6, r0, 0 ldrb r0, [r4] ldr r4, =0x0203cf38 @@ -846433,7 +846517,7 @@ _081C69E0: ldrh r1, [r7] mov r3, r8 ldrh r2, [r3] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r5] @@ -846490,7 +846574,7 @@ _081C6A5E: ldr r0, =0x03006310 ldrh r1, [r5] ldrh r2, [r7] - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 strh r0, [r4] @@ -846890,7 +846974,7 @@ sub_81C6DAC: ; 81C6DAC str r3, [sp, 0xC] movs r2, 0x1 movs r3, 0 - bl sub_8121F94 + bl CreateYesNoMenuWithCallbacks add sp, 0x10 pop {r0} bx r0 @@ -847640,7 +847724,7 @@ _081C73FA: thumb_func_start sub_81C7400 sub_81C7400: ; 81C7400 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -848125,7 +848209,7 @@ _081C77B0: adds r4, 0x2C movs r0, 0 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08DC7D84 movs r0, 0 movs r2, 0 @@ -849600,7 +849684,7 @@ sub_81C82E4: ; 81C82E4 ldrb r0, [r5] adds r1, r5, 0 adds r1, 0x88 - bl SetBgTilemap + bl SetBgTilemapBuffer ldrb r0, [r5] movs r1, 0x20 str r1, [sp] @@ -850823,7 +850907,7 @@ sub_81C8C64: ; 81C8C64 bl GetWindowAttribute lsls r0, 24 lsrs r0, 24 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r2, r0, 0 ldrh r0, [r5, 0xA] lsls r0, 6 @@ -852641,7 +852725,7 @@ _081C9A5C: adds r1, r5, 0 adds r1, 0x8C movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08DC9130 movs r0, 0x1 movs r2, 0 @@ -854554,7 +854638,7 @@ sub_81CA994: ; 81CA994 movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits bl remove_some_task ldr r0, =sub_81CA9EC bl get_task_id_by_function @@ -855876,7 +855960,7 @@ _081CB368: ldr r0, =0x00001024 adds r1, r5, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_086225D4 movs r0, 0x2 movs r2, 0 @@ -855906,7 +855990,7 @@ _081CB3E0: adds r1, r5, 0 adds r1, 0x24 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r1, 0x80 lsls r1, 5 movs r0, 0x20 @@ -857065,7 +857149,7 @@ sub_81CBCEC: ; 81CBCEC bl GetWindowAttribute lsls r0, 24 lsrs r0, 24 - bl GetBgTilemap + bl GetBgTilemapBuffer adds r6, r0, 0 lsls r4, 7 adds r4, 0x3A @@ -857109,7 +857193,7 @@ sub_81CBD48: ; 81CBD48 bl GetWindowAttribute lsls r0, 24 lsrs r0, 24 - bl GetBgTilemap + bl GetBgTilemapBuffer lsls r4, 7 adds r4, 0x3A adds r0, r4 @@ -858775,7 +858859,7 @@ sub_81CCA1C: ; 81CCA1C bl CpuSet movs r0, 0x1 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r0, =gUnknown_08623110 bl AddWindow movs r4, 0 @@ -861412,7 +861496,7 @@ _081CDFC4: bl LZ77UnCompVram movs r0, 0x3 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_81CDD5C cmp r0, 0x1 bne _081CDFF2 @@ -861456,7 +861540,7 @@ _081CE03C: bl LZ77UnCompVram movs r0, 0x2 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x2 bl CopyBgTilemapBufferToVram ldr r0, =gUnknown_086231E8 @@ -861488,7 +861572,7 @@ _081CE074: bl CpuSet movs r0, 0x1 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer b _081CDFB0 .pool _081CE0B0: @@ -863899,7 +863983,7 @@ _081CF454: adds r1, r5, 0 adds r1, 0x10 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_086234AC movs r0, 0x1 movs r2, 0 @@ -865285,7 +865369,7 @@ _081CFEF4: adds r1, r5, 0 adds r1, 0x10 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_086236CC movs r0, 0x1 movs r2, 0 @@ -866822,7 +866906,7 @@ _081D0AB8: adds r1, r5, 0 adds r1, 0x1C movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, =gUnknown_08DDE12C movs r0, 0x2 movs r2, 0 @@ -866856,7 +866940,7 @@ _081D0B12: ldr r0, =0x0000081c adds r1, r5, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer movs r0, 0x20 str r0, [sp] movs r0, 0x14 @@ -869415,7 +869499,7 @@ _081D1E02: ldrh r1, [r5, 0x2] ldrh r2, [r5] adds r0, r4, 0 - bl calls_per_item_funcs_in_list_outer + bl ListMenuInit lsls r0, 24 lsrs r0, 24 pop {r3-r5} @@ -869461,7 +869545,7 @@ sub_81D1E90: ; 81D1E90 movs r1, 0xC8 movs r2, 0xC movs r3, 0x94 - bl sub_81AF4A0 + bl AddScrollIndicatorArrowPairParametrized strb r0, [r4, 0x9] add sp, 0x10 pop {r4} @@ -871225,7 +871309,7 @@ sub_81D2C50: ; 81D2C50 movs r1, 0x1 movs r2, 0xE movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu pop {r0} bx r0 .pool @@ -874964,7 +875048,7 @@ _081D49E0: thumb_func_end sub_81D4998 thumb_func_start FieldObjectIsFarawayIslandMew -; BOOL FieldObjectIsFarawayIslandMew(struct npc_state *fieldObject) +; bool8 FieldObjectIsFarawayIslandMew(struct npc_state *fieldObject) FieldObjectIsFarawayIslandMew: ; 81D49E8 push {lr} adds r2, r0, 0 @@ -878522,7 +878606,7 @@ sub_81D6720: ; 81D6720 thumb_func_start sub_81D6774 sub_81D6774: ; 81D6774 push {lr} - bl vblank_hblank_handler_set_zero + bl SetVBlankHBlankCallbacksToNull bl clear_scheduled_bg_copies_to_vram bl remove_some_task bl ResetObjectPaletteAllocator @@ -878554,7 +878638,7 @@ sub_81D6774: ; 81D6774 thumb_func_start sub_81D67D0 sub_81D67D0: ; 81D67D0 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl do_scheduled_bg_tilemap_copies_to_vram @@ -879556,17 +879640,17 @@ sub_81D6FE0: ; 81D6FE0 ldr r1, [r4] adds r1, 0x4 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000804 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001004 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0 bl schedule_bg_copy_tilemap_to_vram @@ -881248,17 +881332,17 @@ sub_81D7E10: ; 81D7E10 ldr r1, [r4] adds r1, 0x4 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000804 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001004 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0 bl schedule_bg_copy_tilemap_to_vram @@ -881782,22 +881866,22 @@ sub_81D82B0: ; 81D82B0 ldr r1, [r4] adds r1, 0x4 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000804 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001004 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001804 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0 bl schedule_bg_copy_tilemap_to_vram @@ -882389,22 +882473,22 @@ sub_81D8828: ; 81D8828 ldr r1, [r4] adds r1, 0x4 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000804 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001004 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001804 adds r1, r0 movs r0, 0x3 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0 bl schedule_bg_copy_tilemap_to_vram @@ -882844,17 +882928,17 @@ sub_81D8C38: ; 81D8C38 ldr r1, [r4] adds r1, 0x4 movs r0, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00000804 adds r1, r0 movs r0, 0x1 - bl SetBgTilemap + bl SetBgTilemapBuffer ldr r1, [r4] ldr r0, =0x00001004 adds r1, r0 movs r0, 0x2 - bl SetBgTilemap + bl SetBgTilemapBuffer bl sub_8121E10 movs r0, 0 bl schedule_bg_copy_tilemap_to_vram @@ -882966,7 +883050,7 @@ sub_81D8DB4: ; 81D8DB4 movs r1, 0x80 lsls r1, 3 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits ldr r1, =0x00000241 movs r0, 0x50 bl SetGpuReg @@ -884437,7 +884521,7 @@ _081D99A4: movs r1, 0x80 lsls r1, 3 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits adds r0, r5, 0 bl remove_task _081D99B4: @@ -886604,15 +886688,15 @@ _081DAB20: movs r1, 0x80 lsls r1, 6 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r1, 0x80 lsls r1, 7 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits movs r1, 0x80 lsls r1, 1 movs r0, 0 - bl ResetGpuRegBits + bl ClearGpuRegBits ldrh r0, [r4, 0xA] adds r0, 0x1 strh r0, [r4, 0xA] diff --git a/asm/gpu_bg.s b/asm/gpu_bg.s index 3edc8c458..13b69dab9 100644 --- a/asm/gpu_bg.s +++ b/asm/gpu_bg.s @@ -635,7 +635,7 @@ _08001796: thumb_func_end SetBgAffineInternal thumb_func_start IsInvalidBg -; BOOL IsInvalidBg(u8 bg) +; bool8 IsInvalidBg(u8 bg) IsInvalidBg: ; 80017A4 push {lr} lsls r0, 24 @@ -1062,7 +1062,7 @@ _08001AC8: thumb_func_end Unused_LoadBgPalette thumb_func_start IsDma3ManagerBusyWithBgCopy -; BOOL IsDma3ManagerBusyWithBgCopy() +; bool8 IsDma3ManagerBusyWithBgCopy() IsDma3ManagerBusyWithBgCopy: ; 8001AD4 push {r4-r7,lr} movs r5, 0 @@ -1776,7 +1776,7 @@ _0800204A: lsls r0, 8 lsrs r1, r0, 16 movs r0, 0x12 - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank b _080020E0 .pool _08002060: @@ -1785,7 +1785,7 @@ _08002060: lsls r0, 8 lsrs r1, r0, 16 movs r0, 0x16 - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank b _080020E0 .pool _08002074: @@ -1796,7 +1796,7 @@ _08002074: lsls r0, 8 lsrs r1, r0, 16 movs r0, 0x1A - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank b _080020E0 .pool _0800208C: @@ -1806,10 +1806,10 @@ _0800208C: lsls r0, 16 lsrs r4, r0, 16 movs r0, 0x2E - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank movs r0, 0x2C adds r1, r4, 0 - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank b _080020E0 .pool _080020AC: @@ -1820,7 +1820,7 @@ _080020AC: lsls r0, 8 lsrs r1, r0, 16 movs r0, 0x1E - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank b _080020E0 .pool _080020C4: @@ -1832,10 +1832,10 @@ _080020C4: lsls r0, 16 lsrs r4, r0, 16 movs r0, 0x3E - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank movs r0, 0x3C adds r1, r4, 0 - bl SetGpuReg_ScreenOff + bl SetGpuReg_ForcedBlank _080020E0: ldr r0, =0x030008f8 adds r0, 0xC @@ -2038,9 +2038,9 @@ _08002226: bx r1 thumb_func_end Unused_AdjustBgMosaic - thumb_func_start SetBgTilemap -; void SetBgTilemap(u8 bg, void *tilemap) -SetBgTilemap: ; 8002250 + thumb_func_start SetBgTilemapBuffer +; void SetBgTilemapBuffer(u8 bg, void *tilemap) +SetBgTilemapBuffer: ; 8002250 push {r4,r5,lr} adds r5, r1, 0 lsls r0, 24 @@ -2065,11 +2065,11 @@ _0800227A: pop {r0} bx r0 .pool - thumb_func_end SetBgTilemap + thumb_func_end SetBgTilemapBuffer - thumb_func_start UnsetBgTilemap -; void UnsetBgTilemap(u8 bg) -UnsetBgTilemap: ; 8002284 + thumb_func_start UnsetBgTilemapBuffer +; void UnsetBgTilemapBuffer(u8 bg) +UnsetBgTilemapBuffer: ; 8002284 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -2094,11 +2094,11 @@ _080022AE: pop {r0} bx r0 .pool - thumb_func_end UnsetBgTilemap + thumb_func_end UnsetBgTilemapBuffer - thumb_func_start GetBgTilemap -; void *GetBgTilemap(u8 bg) -GetBgTilemap: ; 80022B8 + thumb_func_start GetBgTilemapBuffer +; void *GetBgTilemapBuffer(u8 bg) +GetBgTilemapBuffer: ; 80022B8 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -2125,7 +2125,7 @@ _080022EA: pop {r4} pop {r1} bx r1 - thumb_func_end GetBgTilemap + thumb_func_end GetBgTilemapBuffer thumb_func_start CopyToBgTilemapBuffer ; void CopyToBgTilemapBuffer(u8 bg, void *src, u16 mode, u16 destOffset) @@ -3314,7 +3314,7 @@ _08002B90: thumb_func_end GetBgType thumb_func_start IsInvalidBg_ -; BOOL IsInvalidBg_(u8 bg) +; bool8 IsInvalidBg_(u8 bg) IsInvalidBg_: ; 8002B9C push {lr} lsls r0, 24 @@ -3331,7 +3331,7 @@ _08002BAC: thumb_func_end IsInvalidBg_ thumb_func_start IsTileMapOutsideWram -; BOOL IsTileMapOutsideWram(u8 bg) +; bool8 IsTileMapOutsideWram(u8 bg) IsTileMapOutsideWram: ; 8002BB0 push {lr} lsls r0, 24 diff --git a/asm/gpu_reg_manager.s b/asm/gpu_reg_manager.s index 0af0efef1..368ceaa22 100644 --- a/asm/gpu_reg_manager.s +++ b/asm/gpu_reg_manager.s @@ -174,9 +174,9 @@ _08001130: .pool thumb_func_end SetGpuReg - thumb_func_start SetGpuReg_ScreenOff -; void SetGpuReg_ScreenOff(u8 reg, u16 value) -SetGpuReg_ScreenOff: ; 8001140 + thumb_func_start SetGpuReg_ForcedBlank +; void SetGpuReg_ForcedBlank(u8 reg, u16 value) +SetGpuReg_ForcedBlank: ; 8001140 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 @@ -235,7 +235,7 @@ _080011A8: pop {r0} bx r0 .pool - thumb_func_end SetGpuReg_ScreenOff + thumb_func_end SetGpuReg_ForcedBlank thumb_func_start GetGpuReg ; u16 GetGpuReg(u8 reg) @@ -286,9 +286,9 @@ SetGpuRegBits: ; 80011E8 .pool thumb_func_end SetGpuRegBits - thumb_func_start ResetGpuRegBits -; void ResetGpuRegBits(u8 reg, u16 mask) -ResetGpuRegBits: ; 8001208 + thumb_func_start ClearGpuRegBits +; void ClearGpuRegBits(u8 reg, u16 mask) +ClearGpuRegBits: ; 8001208 push {lr} adds r2, r1, 0 lsls r0, 24 @@ -303,11 +303,11 @@ ResetGpuRegBits: ; 8001208 pop {r0} bx r0 .pool - thumb_func_end ResetGpuRegBits + thumb_func_end ClearGpuRegBits - thumb_func_start SyncIEReg -; void SyncIEReg() -SyncIEReg: ; 8001228 + thumb_func_start SyncRegIE +; void SyncRegIE() +SyncRegIE: ; 8001228 push {r4,r5,lr} ldr r5, =0x030008d9 ldrb r0, [r5] @@ -328,7 +328,7 @@ _08001246: pop {r0} bx r0 .pool - thumb_func_end SyncIEReg + thumb_func_end SyncRegIE thumb_func_start EnableInterrupts ; void EnableInterrupts(u16 mask) @@ -343,9 +343,9 @@ EnableInterrupts: ; 800125C ldr r1, =0x030008d9 movs r0, 0x1 strb r0, [r1] - bl SyncIEReg + bl SyncRegIE ldrh r0, [r4] - bl SetDispstatVBlankHBlankInterrupts + bl UpdateRegDispstatIntrBits pop {r4} pop {r0} bx r0 @@ -365,18 +365,18 @@ DisableInterrupts: ; 8001288 ldr r1, =0x030008d9 movs r0, 0x1 strb r0, [r1] - bl SyncIEReg + bl SyncRegIE ldrh r0, [r4] - bl SetDispstatVBlankHBlankInterrupts + bl UpdateRegDispstatIntrBits pop {r4} pop {r0} bx r0 .pool thumb_func_end DisableInterrupts - thumb_func_start SetDispstatVBlankHBlankInterrupts -; void SetDispstatVBlankHBlankInterrupts(u16 mask) -SetDispstatVBlankHBlankInterrupts: ; 80012B4 + thumb_func_start UpdateRegDispstatIntrBits +; void UpdateRegDispstatIntrBits(u16 mask) +UpdateRegDispstatIntrBits: ; 80012B4 push {r4,lr} adds r4, r0, 0 lsls r4, 16 @@ -407,4 +407,4 @@ _080012EA: pop {r4} pop {r0} bx r0 - thumb_func_end SetDispstatVBlankHBlankInterrupts + thumb_func_end UpdateRegDispstatIntrBits diff --git a/asm/main.s b/asm/main.s index 6d1528045..2572cdbbf 100644 --- a/asm/main.s +++ b/asm/main.s @@ -187,9 +187,9 @@ StartTimer1: ; 8000554 .pool thumb_func_end StartTimer1 - thumb_func_start SetRngAndSetTrainerId -; void SetRngAndSetTrainerId() -SetRngAndSetTrainerId: ; 8000560 + thumb_func_start SeedRngAndSetTrainerId +; void SeedRngAndSetTrainerId() +SeedRngAndSetTrainerId: ; 8000560 push {r4,lr} ldr r0, =0x04000104 ldrh r4, [r0] @@ -204,7 +204,7 @@ SetRngAndSetTrainerId: ; 8000560 pop {r0} bx r0 .pool - thumb_func_end SetRngAndSetTrainerId + thumb_func_end SeedRngAndSetTrainerId thumb_func_start GetTrainerId ; u16 GetTrainerId() diff --git a/asm/main_menu.s b/asm/main_menu.s index 12fde9e95..00933ced3 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -2,7 +2,7 @@ ; void CB2_MainMenu() CB2_MainMenu: ; 802F6B0 push {lr} - bl run_active_tasks + bl RunActiveTasks bl CallObjectCallbacks bl PrepareSpritesForOamLoad bl fade_and_return_progress_probably @@ -42,7 +42,7 @@ CB2_ReinitMainMenu: ; 802F6E8 thumb_func_end CB2_ReinitMainMenu thumb_func_start InitMainMenu -; void InitMainMenu(BOOL affects_palette_maybe) +; void InitMainMenu(bool8 affects_palette_maybe) InitMainMenu: ; 802F6F4 push {r4,r5,lr} sub sp, 0xC @@ -702,7 +702,7 @@ _0802FCBC: ldr r5, =0x000001d5 adds r0, r4, 0 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r4, 0x8 b _0802FED4 .pool @@ -766,11 +766,11 @@ _0802FD44: ldr r5, =0x000001d5 adds r0, r4, 0 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r4, 0 adds r0, 0x8 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r4, 0x10 b _0802FED4 .pool @@ -851,20 +851,20 @@ _0802FE00: ldr r5, =0x000001d5 adds r0, r4, 0 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r4, 0 adds r0, 0x8 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r4, 0 adds r0, 0x10 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r4, 0x18 _0802FED4: adds r0, r4, 0 adds r1, r5, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder b _0803005E .pool _0802FEFC: @@ -961,27 +961,27 @@ _0802FEFC: ldr r4, =0x000001d5 adds r0, r5, 0 adds r1, r4, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r5, 0 adds r0, 0x8 adds r1, r4, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r5, 0 adds r0, 0x10 adds r1, r4, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r5, 0 adds r0, 0x18 adds r1, r4, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder adds r0, r5, 0 adds r0, 0x20 adds r1, r4, 0 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder ldr r0, =gUnknown_082FF0F4 ldr r4, =0x02022d06 adds r1, r4, 0 - bl sub_81AF380 + bl AddScrollIndicatorArrowPair lsls r0, 24 lsrs r0, 24 strh r0, [r6, 0x1A] @@ -991,7 +991,7 @@ _0802FEFC: adds r0, r1 lsls r0, 3 add r0, r8 - ldr r1, =sub_81AF59C + ldr r1, =Task_ScrollIndicatorArrowPairOnMainMenu str r1, [r0] ldrh r0, [r4] cmp r0, 0x4 @@ -1283,7 +1283,7 @@ _08030292: ldrh r0, [r4, 0x22] lsls r0, 24 lsrs r0, 24 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair _080302B0: movs r0, 0 movs r1, 0x1 @@ -1596,7 +1596,7 @@ Task_HandleMainMenuBPressed: ; 8030544 ldrh r0, [r1, 0x22] lsls r0, 24 lsrs r0, 24 - bl sub_81AF620 + bl RemoveScrollIndicatorArrowPair _08030578: ldr r0, =0x02022d06 strh r4, [r0] @@ -4408,7 +4408,7 @@ sub_8031D74: ; 8031D74 push {lr} ldr r0, =gUnknown_082FF088 movs r1, 0xF3 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder movs r0, 0x1 movs r1, 0x11 bl FillWindowPixelBuffer @@ -4510,7 +4510,7 @@ CreateMainMenuErrorWindow: ; 8031E18 bl CopyWindowToVram ldr r0, =gUnknown_082FF070 ldr r1, =0x000001d5 - bl DrawMainMenuWindowFrame + bl DrawMainMenuWindowBorder ldr r1, =0x000009e7 movs r0, 0x40 bl SetGpuReg @@ -4797,9 +4797,9 @@ LoadMainMenuWindowFrameTiles: ; 80320A4 .pool thumb_func_end LoadMainMenuWindowFrameTiles - thumb_func_start DrawMainMenuWindowFrame -; void DrawMainMenuWindowFrame(struct WindowTemplate *template, u16 baseTileNum) -DrawMainMenuWindowFrame: ; 80320EC + thumb_func_start DrawMainMenuWindowBorder +; void DrawMainMenuWindowBorder(struct WindowTemplate *template, u16 baseTileNum) +DrawMainMenuWindowBorder: ; 80320EC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -4969,7 +4969,7 @@ DrawMainMenuWindowFrame: ; 80320EC pop {r4-r7} pop {r0} bx r0 - thumb_func_end DrawMainMenuWindowFrame + thumb_func_end DrawMainMenuWindowBorder thumb_func_start sub_8032250 sub_8032250: ; 8032250 @@ -5212,7 +5212,7 @@ sub_80323CC: ; 80323CC mov r1, r8 adds r2, r6, 0 movs r3, 0 - bl sub_81996C0 + bl CreateYesNoMenu add sp, 0x20 pop {r3} mov r8, r3 diff --git a/asm/malloc.s b/asm/malloc.s index 32f538132..a66839966 100644 --- a/asm/malloc.s +++ b/asm/malloc.s @@ -184,7 +184,7 @@ _08000AB8: thumb_func_end AllocZeroedInternal thumb_func_start CheckMemBlockInternal -; BOOL CheckMemBlockInternal(struct MemBlock *head, struct MemBlock *node) +; bool8 CheckMemBlockInternal(struct MemBlock *head, struct MemBlock *node) CheckMemBlockInternal: ; 8000AC4 push {r4,r5,lr} adds r5, r0, 0 @@ -289,7 +289,7 @@ Free: ; 8000B60 thumb_func_end Free thumb_func_start CheckMemBlock -; BOOL CheckMemBlock(void *pointer) +; bool8 CheckMemBlock(void *pointer) CheckMemBlock: ; 8000B74 push {lr} adds r1, r0, 0 @@ -302,7 +302,7 @@ CheckMemBlock: ; 8000B74 thumb_func_end CheckMemBlock thumb_func_start CheckHeap -; BOOL CheckHeap() +; bool8 CheckHeap() CheckHeap: ; 8000B88 push {r4,r5,lr} ldr r0, =0x03000004 diff --git a/asm/rtc.s b/asm/rtc.s index dd25ace60..3c8a285e9 100644 --- a/asm/rtc.s +++ b/asm/rtc.s @@ -51,7 +51,7 @@ _0802F11C: thumb_func_end GameFreakRTC_ConvertFromBCD thumb_func_start GameFreakRTC_IsLeapYear -; BOOL GameFreakRTC_IsLeapYear(u32 year) +; bool8 GameFreakRTC_IsLeapYear(u32 year) GameFreakRTC_IsLeapYear: ; 802F120 push {r4,lr} adds r4, r0, 0 diff --git a/asm/string_util.s b/asm/string_util.s index f3d3736cb..84486a211 100644 --- a/asm/string_util.s +++ b/asm/string_util.s @@ -263,7 +263,7 @@ _08008C8E: thumb_func_end CompareString_LimitN thumb_func_start IsStringLengthLessThanN -; BOOL IsStringLengthLessThanN(u8 *s, s32 n) +; bool8 IsStringLengthLessThanN(u8 *s, s32 n) IsStringLengthLessThanN: ; 8008C94 push {lr} adds r3, r0, 0 @@ -1106,7 +1106,7 @@ _08009218: thumb_func_end WriteColorChangeControlCode thumb_func_start sub_8009228 -; BOOL sub_8009228(u8 *s) +; bool8 sub_8009228(u8 *s) sub_8009228: ; 8009228 push {lr} adds r2, r0, 0 @@ -1133,7 +1133,7 @@ _08009248: thumb_func_end sub_8009228 thumb_func_start sub_800924C -; BOOL sub_800924C(u8 *s, u32 n) +; bool8 sub_800924C(u8 *s, u32 n) sub_800924C: ; 800924C push {r4,lr} adds r3, r0, 0 @@ -1252,7 +1252,7 @@ _080092FE: thumb_func_end CompareStringWithoutExtendedControlCodes thumb_func_start StopMusicWhileStringIsPrinted -; void StopMusicWhileStringIsPrinted(u8 *s, BOOL stopMusic) +; void StopMusicWhileStringIsPrinted(u8 *s, bool8 stopMusic) StopMusicWhileStringIsPrinted: ; 8009308 push {r4,lr} adds r4, r0, 0 diff --git a/asm/task.s b/asm/task.s index 9deaabd20..fbfdd1e70 100644 --- a/asm/task.s +++ b/asm/task.s @@ -235,9 +235,9 @@ _080A9106: bx r0 thumb_func_end remove_task - thumb_func_start run_active_tasks -; void run_active_tasks() -run_active_tasks: ; 80A910C + thumb_func_start RunActiveTasks +; void RunActiveTasks() +RunActiveTasks: ; 80A910C push {r4,r5,lr} bl get_first_active_task lsls r0, 24 @@ -260,7 +260,7 @@ _080A9130: pop {r0} bx r0 .pool - thumb_func_end run_active_tasks + thumb_func_end RunActiveTasks thumb_func_start get_first_active_task ; int get_first_active_task() diff --git a/asm/text_renderer.s b/asm/text_renderer.s index e54b6ceff..6e5c9a929 100644 --- a/asm/text_renderer.s +++ b/asm/text_renderer.s @@ -309,7 +309,7 @@ _080047F6: thumb_func_end RunTextPrinters thumb_func_start IsTextPrinterActive -; BOOL IsTextPrinterActive(u8 id) +; bool8 IsTextPrinterActive(u8 id) IsTextPrinterActive: ; 8004800 lsls r0, 24 lsrs r0, 24 @@ -2219,7 +2219,7 @@ TextPrinterClearDownArrow: ; 8005600 thumb_func_end TextPrinterClearDownArrow thumb_func_start TextPrinterWaitAutoMode -; BOOL TextPrinterWaitAutoMode(struct TextPrinter *textPrinter) +; bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter) TextPrinterWaitAutoMode: ; 8005634 push {lr} adds r1, r0, 0 @@ -2239,7 +2239,7 @@ _0800564A: thumb_func_end TextPrinterWaitAutoMode thumb_func_start TextPrinterWaitWithDownArrow -; BOOL TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) +; bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) TextPrinterWaitWithDownArrow: ; 8005650 push {r4,lr} adds r2, r0, 0 @@ -2277,7 +2277,7 @@ _0800568E: thumb_func_end TextPrinterWaitWithDownArrow thumb_func_start TextPrinterWait -; BOOL TextPrinterWait(struct TextPrinter *textPrinter) +; bool8 TextPrinterWait(struct TextPrinter *textPrinter) TextPrinterWait: ; 800569C push {r4,lr} adds r2, r0, 0 @@ -2313,7 +2313,7 @@ _080056D4: thumb_func_end TextPrinterWait thumb_func_start DrawDownArrow -; void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, BOOL drawArrow, u8 *counter, u8 *yCoordIndex) +; void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex) DrawDownArrow: ; 80056E0 push {r4-r7,lr} mov r7, r10 @@ -4029,7 +4029,7 @@ GetMenuCursorDimensionByFont: ; 8006460 thumb_func_end GetMenuCursorDimensionByFont thumb_func_start DecompressGlyphFont0 -; void DecompressGlyphFont0(u16 glyphId, BOOL isJapanese) +; void DecompressGlyphFont0(u16 glyphId, bool8 isJapanese) DecompressGlyphFont0: ; 8006478 push {r4,r5,lr} lsls r0, 16 @@ -4118,7 +4118,7 @@ _08006534: thumb_func_end DecompressGlyphFont0 thumb_func_start GetGlyphWidthFont0 -; u8 GetGlyphWidthFont0(u16 glyphId, BOOL isJapanese) +; u8 GetGlyphWidthFont0(u16 glyphId, bool8 isJapanese) GetGlyphWidthFont0: ; 8006540 push {lr} lsls r0, 16 @@ -4138,7 +4138,7 @@ _0800655A: thumb_func_end GetGlyphWidthFont0 thumb_func_start DecompressGlyphFont7 -; void DecompressGlyphFont7(u16 glyphId, BOOL isJapanese) +; void DecompressGlyphFont7(u16 glyphId, bool8 isJapanese) DecompressGlyphFont7: ; 8006560 push {r4-r6,lr} lsls r0, 16 @@ -4227,7 +4227,7 @@ _0800661C: thumb_func_end DecompressGlyphFont7 thumb_func_start GetGlyphWidthFont7 -; u8 GetGlyphWidthFont7(u16 glyphId, BOOL isJapanese) +; u8 GetGlyphWidthFont7(u16 glyphId, bool8 isJapanese) GetGlyphWidthFont7: ; 8006628 push {lr} lsls r0, 16 @@ -4247,7 +4247,7 @@ _08006642: thumb_func_end GetGlyphWidthFont7 thumb_func_start DecompressGlyphFont8 -; void DecompressGlyphFont8(u16 glyphId, BOOL isJapanese) +; void DecompressGlyphFont8(u16 glyphId, bool8 isJapanese) DecompressGlyphFont8: ; 8006648 push {r4,r5,lr} lsls r0, 16 @@ -4336,7 +4336,7 @@ _08006704: thumb_func_end DecompressGlyphFont8 thumb_func_start GetGlyphWidthFont8 -; u8 GetGlyphWidthFont8(u16 glyphId, BOOL isJapanese) +; u8 GetGlyphWidthFont8(u16 glyphId, bool8 isJapanese) GetGlyphWidthFont8: ; 8006710 push {lr} lsls r0, 16 @@ -4356,7 +4356,7 @@ _0800672A: thumb_func_end GetGlyphWidthFont8 thumb_func_start DecompressGlyphFont2 -; void DecompressGlyphFont2(u16 glyphId, BOOL isJapanese) +; void DecompressGlyphFont2(u16 glyphId, bool8 isJapanese) DecompressGlyphFont2: ; 8006730 push {r4-r6,lr} lsls r0, 16 @@ -4459,7 +4459,7 @@ _08006810: thumb_func_end DecompressGlyphFont2 thumb_func_start GetGlyphWidthFont2 -; u8 GetGlyphWidthFont2(u16 glyphId, BOOL isJapanese) +; u8 GetGlyphWidthFont2(u16 glyphId, bool8 isJapanese) GetGlyphWidthFont2: ; 800681C push {lr} lsls r0, 16 @@ -4480,7 +4480,7 @@ _08006832: thumb_func_end GetGlyphWidthFont2 thumb_func_start DecompressGlyphFont1 -; void DecompressGlyphFont1(u16 glyphId, BOOL isJapanese) +; void DecompressGlyphFont1(u16 glyphId, bool8 isJapanese) DecompressGlyphFont1: ; 8006840 push {r4-r6,lr} lsls r0, 16 @@ -4569,7 +4569,7 @@ _080068FC: thumb_func_end DecompressGlyphFont1 thumb_func_start GetGlyphWidthFont1 -; u8 GetGlyphWidthFont1(u16 glyphId, BOOL isJapanese) +; u8 GetGlyphWidthFont1(u16 glyphId, bool8 isJapanese) GetGlyphWidthFont1: ; 8006908 push {lr} lsls r0, 16 diff --git a/asm/window.s b/asm/window.s index 1819ab1ac..bbeabe6d1 100644 --- a/asm/window.s +++ b/asm/window.s @@ -4,7 +4,7 @@ nullsub_8: ; 80031BC thumb_func_end nullsub_8 thumb_func_start InitWindows -; BOOL16 InitWindows(struct WindowTemplate *templates) +; bool16 InitWindows(struct WindowTemplate *templates) InitWindows: ; 80031C0 push {r4-r7,lr} mov r7, r10 @@ -20,7 +20,7 @@ _080031D4: mov r1, r8 lsls r0, r1, 24 lsrs r0, 24 - bl GetBgTilemap + bl GetBgTilemapBuffer cmp r0, 0 beq _080031E4 ldr r0, =nullsub_8 @@ -129,7 +129,7 @@ _080032BC: str r4, [r0] adds r0, r7, 0 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer _080032CA: ldrb r1, [r6, 0x3] ldrb r0, [r6, 0x4] @@ -307,7 +307,7 @@ _08003424: str r4, [r0] adds r0, r7, 0 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer _08003432: mov r2, r8 ldrb r1, [r2, 0x3] @@ -1042,7 +1042,7 @@ BlitBitmapToWindow: ; 80039A4 thumb_func_end BlitBitmapToWindow thumb_func_start BlitBitmapRectToWindow -; void BlitBitmapRectToWindow(u8 rbox_id, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight) +; void BlitBitmapRectToWindow(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight) BlitBitmapRectToWindow: ; 80039DC push {r4-r7,lr} mov r7, r10 @@ -1347,7 +1347,7 @@ _08003C3C: thumb_func_end CopyToWindowPixelBuffer thumb_func_start FillWindowPixelBuffer -; void FillWindowPixelBuffer(u8 rbox_id, u32 fillValue) +; void FillWindowPixelBuffer(u8 windowId, u32 fillValue) FillWindowPixelBuffer: ; 8003C48 push {r4,r5,lr} sub sp, 0x4 @@ -1955,7 +1955,7 @@ CallWindowFunction: ; 8004058 thumb_func_end CallWindowFunction thumb_func_start SetWindowAttribute -; BOOL SetWindowAttribute(u8 windowId, u8 attributeId, u32 value) +; bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value) SetWindowAttribute: ; 80040A8 push {lr} lsls r0, 24 @@ -2247,7 +2247,7 @@ _080042DC: str r4, [r0] adds r0, r7, 0 adds r1, r4, 0 - bl SetBgTilemap + bl SetBgTilemapBuffer _080042EA: mov r2, r9 ldrb r1, [r2, 0x3] diff --git a/include/global.h b/include/global.h index 4354c8651..ee2c795d0 100644 --- a/include/global.h +++ b/include/global.h @@ -5,6 +5,16 @@ typedef signed char s8; typedef signed short s16; typedef signed int s32; +typedef volatile u8 vu8; +typedef volatile u16 vu16; +typedef volatile u32 vu32; +typedef volatile s8 vs8; +typedef volatile s16 vs16; +typedef volatile s32 vs32; + +typedef float f32; +typedef double f64; + typedef u8 bool8; typedef u16 bool16; typedef u32 bool32; @@ -14,6 +24,8 @@ typedef u32 bool32; #define TRUE 1 #define FALSE 0 +#include "io_regs.h" + #define CPU_SET_SRC_FIX (1 << 24) #define CPU_SET_32BIT (1 << 26) diff --git a/include/io_regs.h b/include/io_regs.h new file mode 100644 index 000000000..a497a0a51 --- /dev/null +++ b/include/io_regs.h @@ -0,0 +1,337 @@ +#define REG_BASE 0x4000000 // I/O register base address + +// I/O register offsets + +#define REG_OFFSET_DISPCNT 0x0 +#define REG_OFFSET_DISPSTAT 0x4 +#define REG_OFFSET_VCOUNT 0x6 +#define REG_OFFSET_BG0CNT 0x8 +#define REG_OFFSET_BG1CNT 0xa +#define REG_OFFSET_BG2CNT 0xc +#define REG_OFFSET_BG3CNT 0xe +#define REG_OFFSET_BG0HOFS 0x10 +#define REG_OFFSET_BG0VOFS 0x12 +#define REG_OFFSET_BG1HOFS 0x14 +#define REG_OFFSET_BG1VOFS 0x16 +#define REG_OFFSET_BG2HOFS 0x18 +#define REG_OFFSET_BG2VOFS 0x1a +#define REG_OFFSET_BG3HOFS 0x1c +#define REG_OFFSET_BG3VOFS 0x1e +#define REG_OFFSET_BG2PA 0x20 +#define REG_OFFSET_BG2PB 0x22 +#define REG_OFFSET_BG2PC 0x24 +#define REG_OFFSET_BG2PD 0x26 +#define REG_OFFSET_BG2X_L 0x28 +#define REG_OFFSET_BG2X_H 0x2a +#define REG_OFFSET_BG2Y_L 0x2c +#define REG_OFFSET_BG2Y_H 0x2e +#define REG_OFFSET_BG3PA 0x30 +#define REG_OFFSET_BG3PB 0x32 +#define REG_OFFSET_BG3PC 0x34 +#define REG_OFFSET_BG3PD 0x36 +#define REG_OFFSET_BG3X_L 0x38 +#define REG_OFFSET_BG3X_H 0x3a +#define REG_OFFSET_BG3Y_L 0x3c +#define REG_OFFSET_BG3Y_H 0x3e +#define REG_OFFSET_WIN0H 0x40 +#define REG_OFFSET_WIN1H 0x42 +#define REG_OFFSET_WIN0V 0x44 +#define REG_OFFSET_WIN1V 0x46 +#define REG_OFFSET_WININ 0x48 +#define REG_OFFSET_WINOUT 0x4a +#define REG_OFFSET_MOSAIC 0x4c +#define REG_OFFSET_BLDCNT 0x50 +#define REG_OFFSET_BLDALPHA 0x52 +#define REG_OFFSET_BLDY 0x54 + +#define REG_OFFSET_SOUND1CNT 0x60 +#define REG_OFFSET_SOUND1CNT_L 0x60 +#define REG_OFFSET_SOUND1CNT_H 0x62 +#define REG_OFFSET_SOUND1CNT_X 0x64 +#define REG_OFFSET_SOUND2CNT 0x68 +#define REG_OFFSET_SOUND2CNT_L 0x68 +#define REG_OFFSET_SOUND2CNT_H 0x6c +#define REG_OFFSET_SOUND3CNT 0x70 +#define REG_OFFSET_SOUND3CNT_L 0x70 +#define REG_OFFSET_SOUND3CNT_H 0x72 +#define REG_OFFSET_SOUND3CNT_X 0x74 +#define REG_OFFSET_SOUND4CNT 0x78 +#define REG_OFFSET_SOUND4CNT_L 0x78 +#define REG_OFFSET_SOUND4CNT_H 0x7c +#define REG_OFFSET_SOUNDCNT 0x80 +#define REG_OFFSET_SOUNDCNT_L 0x80 +#define REG_OFFSET_SOUNDCNT_H 0x82 +#define REG_OFFSET_SOUNDCNT_X 0x84 +#define REG_OFFSET_SOUNDBIAS 0x88 +#define REG_OFFSET_WAVE_RAM 0x90 +#define REG_OFFSET_WAVE_RAM0 0x90 +#define REG_OFFSET_WAVE_RAM0_L 0x90 +#define REG_OFFSET_WAVE_RAM0_H 0x92 +#define REG_OFFSET_WAVE_RAM1 0x94 +#define REG_OFFSET_WAVE_RAM1_L 0x94 +#define REG_OFFSET_WAVE_RAM1_H 0x96 +#define REG_OFFSET_WAVE_RAM2 0x98 +#define REG_OFFSET_WAVE_RAM2_L 0x98 +#define REG_OFFSET_WAVE_RAM2_H 0x9a +#define REG_OFFSET_WAVE_RAM3 0x9c +#define REG_OFFSET_WAVE_RAM3_L 0x9c +#define REG_OFFSET_WAVE_RAM3_H 0x9e +#define REG_OFFSET_FIFO 0xa0 +#define REG_OFFSET_FIFO_A 0xa0 +#define REG_OFFSET_FIFO_A_L 0xa0 +#define REG_OFFSET_FIFO_A_H 0xa2 +#define REG_OFFSET_FIFO_B 0xa4 +#define REG_OFFSET_FIFO_B_L 0xa4 +#define REG_OFFSET_FIFO_B_H 0xa6 + +#define REG_OFFSET_DMA0 0xb0 +#define REG_OFFSET_DMA0SAD 0xb0 +#define REG_OFFSET_DMA0SAD_L 0xb0 +#define REG_OFFSET_DMA0SAD_H 0xb2 +#define REG_OFFSET_DMA0DAD 0xb4 +#define REG_OFFSET_DMA0DAD_L 0xb4 +#define REG_OFFSET_DMA0DAD_H 0xb6 +#define REG_OFFSET_DMA0CNT 0xb8 +#define REG_OFFSET_DMA0CNT_L 0xb8 +#define REG_OFFSET_DMA0CNT_H 0xba +#define REG_OFFSET_DMA1 0xbc +#define REG_OFFSET_DMA1SAD 0xbc +#define REG_OFFSET_DMA1SAD_L 0xbc +#define REG_OFFSET_DMA1SAD_H 0xbe +#define REG_OFFSET_DMA1DAD 0xc0 +#define REG_OFFSET_DMA1DAD_L 0xc0 +#define REG_OFFSET_DMA1DAD_H 0xc2 +#define REG_OFFSET_DMA1CNT 0xc4 +#define REG_OFFSET_DMA1CNT_L 0xc4 +#define REG_OFFSET_DMA1CNT_H 0xc6 +#define REG_OFFSET_DMA2 0xc8 +#define REG_OFFSET_DMA2SAD 0xc8 +#define REG_OFFSET_DMA2SAD_L 0xc8 +#define REG_OFFSET_DMA2SAD_H 0xca +#define REG_OFFSET_DMA2DAD 0xcc +#define REG_OFFSET_DMA2DAD_L 0xcc +#define REG_OFFSET_DMA2DAD_H 0xce +#define REG_OFFSET_DMA2CNT 0xd0 +#define REG_OFFSET_DMA2CNT_L 0xd0 +#define REG_OFFSET_DMA2CNT_H 0xd2 +#define REG_OFFSET_DMA3 0xd4 +#define REG_OFFSET_DMA3SAD 0xd4 +#define REG_OFFSET_DMA3SAD_L 0xd4 +#define REG_OFFSET_DMA3SAD_H 0xd6 +#define REG_OFFSET_DMA3DAD 0xd8 +#define REG_OFFSET_DMA3DAD_L 0xd8 +#define REG_OFFSET_DMA3DAD_H 0xda +#define REG_OFFSET_DMA3CNT 0xdc +#define REG_OFFSET_DMA3CNT_L 0xdc +#define REG_OFFSET_DMA3CNT_H 0xde + +#define REG_OFFSET_TM0CNT 0x100 +#define REG_OFFSET_TM0CNT_L 0x100 +#define REG_OFFSET_TM0CNT_H 0x102 +#define REG_OFFSET_TM1CNT 0x104 +#define REG_OFFSET_TM1CNT_L 0x104 +#define REG_OFFSET_TM1CNT_H 0x106 +#define REG_OFFSET_TM2CNT 0x108 +#define REG_OFFSET_TM2CNT_L 0x108 +#define REG_OFFSET_TM2CNT_H 0x10a +#define REG_OFFSET_TM3CNT 0x10c +#define REG_OFFSET_TM3CNT_L 0x10c +#define REG_OFFSET_TM3CNT_H 0x10e + +#define REG_OFFSET_SIOCNT 0x128 +#define REG_OFFSET_SIODATA8 0x12a +#define REG_OFFSET_SIODATA32 0x120 +#define REG_OFFSET_SIOMLT_SEND 0x12a +#define REG_OFFSET_SIOMLT_RECV 0x120 +#define REG_OFFSET_SIOMULTI0 0x120 +#define REG_OFFSET_SIOMULTI1 0x122 +#define REG_OFFSET_SIOMULTI2 0x124 +#define REG_OFFSET_SIOMULTI3 0x126 + +#define REG_OFFSET_KEYINPUT 0x130 +#define REG_OFFSET_KEYCNT 0x132 + +#define REG_OFFSET_RCNT 0x134 + +#define REG_OFFSET_JOYCNT 0x140 +#define REG_OFFSET_JOYSTAT 0x158 +#define REG_OFFSET_JOY_RECV 0x150 +#define REG_OFFSET_JOY_RECV_L 0x150 +#define REG_OFFSET_JOY_RECV_H 0x152 +#define REG_OFFSET_JOY_TRANS 0x154 +#define REG_OFFSET_JOY_TRANS_L 0x154 +#define REG_OFFSET_JOY_TRANS_H 0x156 + +#define REG_OFFSET_IME 0x208 +#define REG_OFFSET_IE 0x200 +#define REG_OFFSET_IF 0x202 + +#define REG_OFFSET_WAITCNT 0x204 + +// I/O register addresses + +#define REG_ADDR_DISPCNT (REG_BASE + REG_OFFSET_DISPCNT) +#define REG_ADDR_DISPSTAT (REG_BASE + REG_OFFSET_DISPSTAT) +#define REG_ADDR_VCOUNT (REG_BASE + REG_OFFSET_VCOUNT) +#define REG_ADDR_BG0CNT (REG_BASE + REG_OFFSET_BG0CNT) +#define REG_ADDR_BG1CNT (REG_BASE + REG_OFFSET_BG1CNT) +#define REG_ADDR_BG2CNT (REG_BASE + REG_OFFSET_BG2CNT) +#define REG_ADDR_BG3CNT (REG_BASE + REG_OFFSET_BG3CNT) +#define REG_ADDR_BG0HOFS (REG_BASE + REG_OFFSET_BG0HOFS) +#define REG_ADDR_BG0VOFS (REG_BASE + REG_OFFSET_BG0VOFS) +#define REG_ADDR_BG1HOFS (REG_BASE + REG_OFFSET_BG1HOFS) +#define REG_ADDR_BG1VOFS (REG_BASE + REG_OFFSET_BG1VOFS) +#define REG_ADDR_BG2HOFS (REG_BASE + REG_OFFSET_BG2HOFS) +#define REG_ADDR_BG2VOFS (REG_BASE + REG_OFFSET_BG2VOFS) +#define REG_ADDR_BG3HOFS (REG_BASE + REG_OFFSET_BG3HOFS) +#define REG_ADDR_BG3VOFS (REG_BASE + REG_OFFSET_BG3VOFS) +#define REG_ADDR_BG2PA (REG_BASE + REG_OFFSET_BG2PA) +#define REG_ADDR_BG2PB (REG_BASE + REG_OFFSET_BG2PB) +#define REG_ADDR_BG2PC (REG_BASE + REG_OFFSET_BG2PC) +#define REG_ADDR_BG2PD (REG_BASE + REG_OFFSET_BG2PD) +#define REG_ADDR_BG2X_L (REG_BASE + REG_OFFSET_BG2X_L) +#define REG_ADDR_BG2X_H (REG_BASE + REG_OFFSET_BG2X_H) +#define REG_ADDR_BG2Y_L (REG_BASE + REG_OFFSET_BG2Y_L) +#define REG_ADDR_BG2Y_H (REG_BASE + REG_OFFSET_BG2Y_H) +#define REG_ADDR_BG3PA (REG_BASE + REG_OFFSET_BG3PA) +#define REG_ADDR_BG3PB (REG_BASE + REG_OFFSET_BG3PB) +#define REG_ADDR_BG3PC (REG_BASE + REG_OFFSET_BG3PC) +#define REG_ADDR_BG3PD (REG_BASE + REG_OFFSET_BG3PD) +#define REG_ADDR_BG3X_L (REG_BASE + REG_OFFSET_BG3X_L) +#define REG_ADDR_BG3X_H (REG_BASE + REG_OFFSET_BG3X_H) +#define REG_ADDR_BG3Y_L (REG_BASE + REG_OFFSET_BG3Y_L) +#define REG_ADDR_BG3Y_H (REG_BASE + REG_OFFSET_BG3Y_H) +#define REG_ADDR_WIN0H (REG_BASE + REG_OFFSET_WIN0H) +#define REG_ADDR_WIN1H (REG_BASE + REG_OFFSET_WIN1H) +#define REG_ADDR_WIN0V (REG_BASE + REG_OFFSET_WIN0V) +#define REG_ADDR_WIN1V (REG_BASE + REG_OFFSET_WIN1V) +#define REG_ADDR_WININ (REG_BASE + REG_OFFSET_WININ) +#define REG_ADDR_WINOUT (REG_BASE + REG_OFFSET_WINOUT) +#define REG_ADDR_MOSAIC (REG_BASE + REG_OFFSET_MOSAIC) +#define REG_ADDR_BLDCNT (REG_BASE + REG_OFFSET_BLDCNT) +#define REG_ADDR_BLDALPHA (REG_BASE + REG_OFFSET_BLDALPHA) +#define REG_ADDR_BLDY (REG_BASE + REG_OFFSET_BLDY) + +#define REG_ADDR_SOUND1CNT (REG_BASE + REG_OFFSET_SOUND1CNT) +#define REG_ADDR_SOUND1CNT_L (REG_BASE + REG_OFFSET_SOUND1CNT_L) +#define REG_ADDR_SOUND1CNT_H (REG_BASE + REG_OFFSET_SOUND1CNT_H) +#define REG_ADDR_SOUND1CNT_X (REG_BASE + REG_OFFSET_SOUND1CNT_X) +#define REG_ADDR_SOUND2CNT (REG_BASE + REG_OFFSET_SOUND2CNT) +#define REG_ADDR_SOUND2CNT_L (REG_BASE + REG_OFFSET_SOUND2CNT_L) +#define REG_ADDR_SOUND2CNT_H (REG_BASE + REG_OFFSET_SOUND2CNT_H) +#define REG_ADDR_SOUND3CNT (REG_BASE + REG_OFFSET_SOUND3CNT) +#define REG_ADDR_SOUND3CNT_L (REG_BASE + REG_OFFSET_SOUND3CNT_L) +#define REG_ADDR_SOUND3CNT_H (REG_BASE + REG_OFFSET_SOUND3CNT_H) +#define REG_ADDR_SOUND3CNT_X (REG_BASE + REG_OFFSET_SOUND3CNT_X) +#define REG_ADDR_SOUND4CNT (REG_BASE + REG_OFFSET_SOUND4CNT) +#define REG_ADDR_SOUND4CNT_L (REG_BASE + REG_OFFSET_SOUND4CNT_L) +#define REG_ADDR_SOUND4CNT_H (REG_BASE + REG_OFFSET_SOUND4CNT_H) +#define REG_ADDR_SOUNDCNT (REG_BASE + REG_OFFSET_SOUNDCNT) +#define REG_ADDR_SOUNDCNT_L (REG_BASE + REG_OFFSET_SOUNDCNT_L) +#define REG_ADDR_SOUNDCNT_H (REG_BASE + REG_OFFSET_SOUNDCNT_H) +#define REG_ADDR_SOUNDCNT_X (REG_BASE + REG_OFFSET_SOUNDCNT_X) +#define REG_ADDR_SOUNDBIAS (REG_BASE + REG_OFFSET_SOUNDBIAS) +#define REG_ADDR_WAVE_RAM (REG_BASE + REG_OFFSET_WAVE_RAM) +#define REG_ADDR_WAVE_RAM0 (REG_BASE + REG_OFFSET_WAVE_RAM0) +#define REG_ADDR_WAVE_RAM0_L (REG_BASE + REG_OFFSET_WAVE_RAM0_L) +#define REG_ADDR_WAVE_RAM0_H (REG_BASE + REG_OFFSET_WAVE_RAM0_H) +#define REG_ADDR_WAVE_RAM1 (REG_BASE + REG_OFFSET_WAVE_RAM1) +#define REG_ADDR_WAVE_RAM1_L (REG_BASE + REG_OFFSET_WAVE_RAM1_L) +#define REG_ADDR_WAVE_RAM1_H (REG_BASE + REG_OFFSET_WAVE_RAM1_H) +#define REG_ADDR_WAVE_RAM2 (REG_BASE + REG_OFFSET_WAVE_RAM2) +#define REG_ADDR_WAVE_RAM2_L (REG_BASE + REG_OFFSET_WAVE_RAM2_L) +#define REG_ADDR_WAVE_RAM2_H (REG_BASE + REG_OFFSET_WAVE_RAM2_H) +#define REG_ADDR_WAVE_RAM3 (REG_BASE + REG_OFFSET_WAVE_RAM3) +#define REG_ADDR_WAVE_RAM3_L (REG_BASE + REG_OFFSET_WAVE_RAM3_L) +#define REG_ADDR_WAVE_RAM3_H (REG_BASE + REG_OFFSET_WAVE_RAM3_H) +#define REG_ADDR_FIFO (REG_BASE + REG_OFFSET_FIFO) +#define REG_ADDR_FIFO_A (REG_BASE + REG_OFFSET_FIFO_A) +#define REG_ADDR_FIFO_A_L (REG_BASE + REG_OFFSET_FIFO_A_L) +#define REG_ADDR_FIFO_A_H (REG_BASE + REG_OFFSET_FIFO_A_H) +#define REG_ADDR_FIFO_B (REG_BASE + REG_OFFSET_FIFO_B) +#define REG_ADDR_FIFO_B_L (REG_BASE + REG_OFFSET_FIFO_B_L) +#define REG_ADDR_FIFO_B_H (REG_BASE + REG_OFFSET_FIFO_B_H) + +#define REG_ADDR_DMA0 (REG_BASE + REG_OFFSET_DMA0) +#define REG_ADDR_DMA0SAD (REG_BASE + REG_OFFSET_DMA0SAD) +#define REG_ADDR_DMA0SAD_L (REG_BASE + REG_OFFSET_DMA0SAD_L) +#define REG_ADDR_DMA0SAD_H (REG_BASE + REG_OFFSET_DMA0SAD_H) +#define REG_ADDR_DMA0DAD (REG_BASE + REG_OFFSET_DMA0DAD) +#define REG_ADDR_DMA0DAD_L (REG_BASE + REG_OFFSET_DMA0DAD_L) +#define REG_ADDR_DMA0DAD_H (REG_BASE + REG_OFFSET_DMA0DAD_H) +#define REG_ADDR_DMA0CNT (REG_BASE + REG_OFFSET_DMA0CNT) +#define REG_ADDR_DMA0CNT_L (REG_BASE + REG_OFFSET_DMA0CNT_L) +#define REG_ADDR_DMA0CNT_H (REG_BASE + REG_OFFSET_DMA0CNT_H) +#define REG_ADDR_DMA1 (REG_BASE + REG_OFFSET_DMA1) +#define REG_ADDR_DMA1SAD (REG_BASE + REG_OFFSET_DMA1SAD) +#define REG_ADDR_DMA1SAD_L (REG_BASE + REG_OFFSET_DMA1SAD_L) +#define REG_ADDR_DMA1SAD_H (REG_BASE + REG_OFFSET_DMA1SAD_H) +#define REG_ADDR_DMA1DAD (REG_BASE + REG_OFFSET_DMA1DAD) +#define REG_ADDR_DMA1DAD_L (REG_BASE + REG_OFFSET_DMA1DAD_L) +#define REG_ADDR_DMA1DAD_H (REG_BASE + REG_OFFSET_DMA1DAD_H) +#define REG_ADDR_DMA1CNT (REG_BASE + REG_OFFSET_DMA1CNT) +#define REG_ADDR_DMA1CNT_L (REG_BASE + REG_OFFSET_DMA1CNT_L) +#define REG_ADDR_DMA1CNT_H (REG_BASE + REG_OFFSET_DMA1CNT_H) +#define REG_ADDR_DMA2 (REG_BASE + REG_OFFSET_DMA2) +#define REG_ADDR_DMA2SAD (REG_BASE + REG_OFFSET_DMA2SAD) +#define REG_ADDR_DMA2SAD_L (REG_BASE + REG_OFFSET_DMA2SAD_L) +#define REG_ADDR_DMA2SAD_H (REG_BASE + REG_OFFSET_DMA2SAD_H) +#define REG_ADDR_DMA2DAD (REG_BASE + REG_OFFSET_DMA2DAD) +#define REG_ADDR_DMA2DAD_L (REG_BASE + REG_OFFSET_DMA2DAD_L) +#define REG_ADDR_DMA2DAD_H (REG_BASE + REG_OFFSET_DMA2DAD_H) +#define REG_ADDR_DMA2CNT (REG_BASE + REG_OFFSET_DMA2CNT) +#define REG_ADDR_DMA2CNT_L (REG_BASE + REG_OFFSET_DMA2CNT_L) +#define REG_ADDR_DMA2CNT_H (REG_BASE + REG_OFFSET_DMA2CNT_H) +#define REG_ADDR_DMA3 (REG_BASE + REG_OFFSET_DMA3) +#define REG_ADDR_DMA3SAD (REG_BASE + REG_OFFSET_DMA3SAD) +#define REG_ADDR_DMA3SAD_L (REG_BASE + REG_OFFSET_DMA3SAD_L) +#define REG_ADDR_DMA3SAD_H (REG_BASE + REG_OFFSET_DMA3SAD_H) +#define REG_ADDR_DMA3DAD (REG_BASE + REG_OFFSET_DMA3DAD) +#define REG_ADDR_DMA3DAD_L (REG_BASE + REG_OFFSET_DMA3DAD_L) +#define REG_ADDR_DMA3DAD_H (REG_BASE + REG_OFFSET_DMA3DAD_H) +#define REG_ADDR_DMA3CNT (REG_BASE + REG_OFFSET_DMA3CNT) +#define REG_ADDR_DMA3CNT_L (REG_BASE + REG_OFFSET_DMA3CNT_L) +#define REG_ADDR_DMA3CNT_H (REG_BASE + REG_OFFSET_DMA3CNT_H) + +#define REG_ADDR_TM0CNT (REG_BASE + REG_OFFSET_TM0CNT) +#define REG_ADDR_TM0CNT_L (REG_BASE + REG_OFFSET_TM0CNT_L) +#define REG_ADDR_TM0CNT_H (REG_BASE + REG_OFFSET_TM0CNT_H) +#define REG_ADDR_TM1CNT (REG_BASE + REG_OFFSET_TM1CNT) +#define REG_ADDR_TM1CNT_L (REG_BASE + REG_OFFSET_TM1CNT_L) +#define REG_ADDR_TM1CNT_H (REG_BASE + REG_OFFSET_TM1CNT_H) +#define REG_ADDR_TM2CNT (REG_BASE + REG_OFFSET_TM2CNT) +#define REG_ADDR_TM2CNT_L (REG_BASE + REG_OFFSET_TM2CNT_L) +#define REG_ADDR_TM2CNT_H (REG_BASE + REG_OFFSET_TM2CNT_H) +#define REG_ADDR_TM3CNT (REG_BASE + REG_OFFSET_TM3CNT) +#define REG_ADDR_TM3CNT_L (REG_BASE + REG_OFFSET_TM3CNT_L) +#define REG_ADDR_TM3CNT_H (REG_BASE + REG_OFFSET_TM3CNT_H) + +#define REG_ADDR_SIOCNT (REG_BASE + REG_OFFSET_SIOCNT) +#define REG_ADDR_SIODATA8 (REG_BASE + REG_OFFSET_SIODATA8) +#define REG_ADDR_SIODATA32 (REG_BASE + REG_OFFSET_SIODATA32) +#define REG_ADDR_SIOMLT_SEND (REG_BASE + REG_OFFSET_SIOMLT_SEND) +#define REG_ADDR_SIOMLT_RECV (REG_BASE + REG_OFFSET_SIOMLT_RECV) +#define REG_ADDR_SIOMULTI0 (REG_BASE + REG_OFFSET_SIOMULTI0) +#define REG_ADDR_SIOMULTI1 (REG_BASE + REG_OFFSET_SIOMULTI1) +#define REG_ADDR_SIOMULTI2 (REG_BASE + REG_OFFSET_SIOMULTI2) +#define REG_ADDR_SIOMULTI3 (REG_BASE + REG_OFFSET_SIOMULTI3) + +#define REG_ADDR_KEYINPUT (REG_BASE + REG_OFFSET_KEYINPUT) +#define REG_ADDR_KEYCNT (REG_BASE + REG_OFFSET_KEYCNT) + +#define REG_ADDR_RCNT (REG_BASE + REG_OFFSET_RCNT) + +#define REG_ADDR_JOYCNT (REG_BASE + REG_OFFSET_JOYCNT) +#define REG_ADDR_JOYSTAT (REG_BASE + REG_OFFSET_JOYSTAT) +#define REG_ADDR_JOY_RECV (REG_BASE + REG_OFFSET_JOY_RECV) +#define REG_ADDR_JOY_RECV_L (REG_BASE + REG_OFFSET_JOY_RECV_L) +#define REG_ADDR_JOY_RECV_H (REG_BASE + REG_OFFSET_JOY_RECV_H) +#define REG_ADDR_JOY_TRANS (REG_BASE + REG_OFFSET_JOY_TRANS) +#define REG_ADDR_JOY_TRANS_L (REG_BASE + REG_OFFSET_JOY_TRANS_L) +#define REG_ADDR_JOY_TRANS_H (REG_BASE + REG_OFFSET_JOY_TRANS_H) + +#define REG_ADDR_IME (REG_BASE + REG_OFFSET_IME) +#define REG_ADDR_IE (REG_BASE + REG_OFFSET_IE) +#define REG_ADDR_IF (REG_BASE + REG_OFFSET_IF) + +#define REG_ADDR_WAITCNT (REG_BASE + REG_OFFSET_WAITCNT) diff --git a/wram_syms.txt b/wram_syms.txt index 528a5ba58..d7fa0ab82 100644 --- a/wram_syms.txt +++ b/wram_syms.txt @@ -1,5 +1,9 @@ -gHeapStart = 0x03000004; -gHeapSize = 0x03000008; +gHeapStart = 0x03000004; +gHeapSize = 0x03000008; + gDma3Requests = 0x03000010; gDma3ManagerLocked = 0x03000810; gDma3RequestCursor = 0x03000811; + +gGpuRegBuffer = 0x03000818; +gGpuRegBufferLocked = 0x030008D8;