diff options
34 files changed, 2180 insertions, 2312 deletions
diff --git a/asm/clock.s b/asm/clock.s deleted file mode 100644 index a1c162682..000000000 --- a/asm/clock.s +++ /dev/null @@ -1,176 +0,0 @@ - .include "constants/gba_constants.inc" - .include "constants/species_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_806A328 -sub_806A328: @ 806A328 - push {lr} - ldr r0, _0806A350 @ =0x00000835 - bl FlagSet - bl RtcCalcLocalTime - ldr r2, _0806A354 @ =gSaveBlock2 - adds r2, 0xA0 - ldr r3, _0806A358 @ =gLocalTime - ldr r0, [r3] - ldr r1, [r3, 0x4] - str r0, [r2] - str r1, [r2, 0x4] - ldr r0, _0806A35C @ =0x00004040 - ldrh r1, [r3] - bl VarSet - pop {r0} - bx r0 - .align 2, 0 -_0806A350: .4byte 0x00000835 -_0806A354: .4byte gSaveBlock2 -_0806A358: .4byte gLocalTime -_0806A35C: .4byte 0x00004040 - thumb_func_end sub_806A328 - - thumb_func_start DoTimeBasedEvents -DoTimeBasedEvents: @ 806A360 - push {r4,lr} - ldr r0, _0806A388 @ =0x00000835 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _0806A380 - bl RtcCalcLocalTime - ldr r4, _0806A38C @ =gLocalTime - adds r0, r4, 0 - bl sub_806A390 - adds r0, r4, 0 - bl sub_806A3F4 -_0806A380: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0806A388: .4byte 0x00000835 -_0806A38C: .4byte gLocalTime - thumb_func_end DoTimeBasedEvents - - thumb_func_start sub_806A390 -sub_806A390: @ 806A390 - push {r4-r6,lr} - adds r5, r0, 0 - ldr r0, _0806A3F0 @ =0x00004040 - bl GetVarPointer - adds r6, r0, 0 - ldrh r0, [r6] - movs r2, 0 - ldrsh r1, [r5, r2] - cmp r0, r1 - beq _0806A3EA - cmp r0, r1 - bgt _0806A3EA - ldrh r4, [r5] - subs r4, r0 - lsls r4, 16 - lsrs r4, 16 - bl ClearUpperFlags - adds r0, r4, 0 - bl sub_80FA220 - adds r0, r4, 0 - bl sub_80BE8C4 - adds r0, r4, 0 - bl sub_8080834 - adds r0, r4, 0 - bl UpdatePartyPokerusTime - adds r0, r4, 0 - bl sub_810D2F4 - adds r0, r4, 0 - bl UpdateBirchState - adds r0, r4, 0 - bl sub_810F618 - adds r0, r4, 0 - bl SetRandomLotteryNumber - ldrh r0, [r5] - strh r0, [r6] -_0806A3EA: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0806A3F0: .4byte 0x00004040 - thumb_func_end sub_806A390 - - thumb_func_start sub_806A3F4 -sub_806A3F4: @ 806A3F4 - push {r4-r6,lr} - sub sp, 0x8 - adds r5, r0, 0 - mov r4, sp - ldr r6, _0806A448 @ =gSaveBlock2 + 0xA0 - mov r0, sp - adds r1, r6, 0 - adds r2, r5, 0 - bl CalcTimeDifference - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - lsls r0, r1, 1 - adds r0, r1 - lsls r1, r0, 4 - subs r1, r0 - lsls r1, 5 - movs r2, 0x2 - ldrsb r2, [r4, r2] - lsls r0, r2, 4 - subs r0, r2 - lsls r0, 2 - adds r1, r0 - movs r0, 0x3 - ldrsb r0, [r4, r0] - adds r0, r1, r0 - cmp r0, 0 - beq _0806A43E - cmp r0, 0 - blt _0806A43E - bl BerryTreeTimeUpdate - ldr r0, [r5] - ldr r1, [r5, 0x4] - str r0, [r6] - str r1, [r6, 0x4] -_0806A43E: - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0806A448: .4byte gSaveBlock2 + 0xA0 - thumb_func_end sub_806A3F4 - - thumb_func_start sub_806A44C -sub_806A44C: @ 806A44C - push {lr} - bl sub_806A328 - ldr r0, _0806A45C @ =c2_exit_to_overworld_1_continue_scripts_restart_music - bl SetMainCallback2 - pop {r0} - bx r0 - .align 2, 0 -_0806A45C: .4byte c2_exit_to_overworld_1_continue_scripts_restart_music - thumb_func_end sub_806A44C - - thumb_func_start sub_806A460 -sub_806A460: @ 806A460 - push {lr} - ldr r0, _0806A474 @ =Cb2_StartWallClock - bl SetMainCallback2 - ldr r1, _0806A478 @ =gMain - ldr r0, _0806A47C @ =sub_806A44C - str r0, [r1, 0x8] - pop {r0} - bx r0 - .align 2, 0 -_0806A474: .4byte Cb2_StartWallClock -_0806A478: .4byte gMain -_0806A47C: .4byte sub_806A44C - thumb_func_end sub_806A460 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/party_menu.s b/asm/party_menu.s index 1d51711f1..0edec1623 100644 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -7446,82 +7446,9 @@ sub_806E81C: @ 806E81C bx lr thumb_func_end sub_806E81C - thumb_func_start sub_806E834 -sub_806E834: @ 806E834 - push {r4,r5,lr} - adds r5, r0, 0 - lsls r4, r1, 24 - lsrs r4, 24 - ldr r1, _0806E878 @ =gUnknown_0202E8F6 - movs r0, 0x1 - strb r0, [r1] - movs r0, 0x3 - movs r1, 0xE - movs r2, 0x1A - movs r3, 0x13 - bl MenuDrawTextWindow - adds r0, r5, 0 - movs r1, 0x4 - movs r2, 0xF - bl MenuPrintMessage - ldr r0, _0806E87C @ =sub_806E884 - movs r1, 0x1 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, _0806E880 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - strh r4, [r1, 0x8] - pop {r4,r5} - pop {r1} - bx r1 - .align 2, 0 -_0806E878: .4byte gUnknown_0202E8F6 -_0806E87C: .4byte sub_806E884 -_0806E880: .4byte gTasks - thumb_func_end sub_806E834 + .section .text_806E884 + - thumb_func_start sub_806E884 -sub_806E884: @ 806E884 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r5, r4, 0 - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - beq _0806E8C0 - ldr r1, _0806E8C8 @ =gUnknown_0202E8F6 - movs r0, 0 - strb r0, [r1] - ldr r1, _0806E8CC @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - movs r1, 0x8 - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _0806E8BA - movs r0, 0x3 - movs r1, 0xE - movs r2, 0x1A - movs r3, 0x13 - bl MenuZeroFillWindowRect -_0806E8BA: - adds r0, r5, 0 - bl DestroyTask -_0806E8C0: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0806E8C8: .4byte gUnknown_0202E8F6 -_0806E8CC: .4byte gTasks - thumb_func_end sub_806E884 thumb_func_start sub_806E8D0 sub_806E8D0: @ 806E8D0 @@ -10379,159 +10306,7 @@ _08070080: .4byte 0xfffff27e _08070084: .4byte 0xfffff280 thumb_func_end sub_8070048 - thumb_func_start sub_8070088 -sub_8070088: @ 8070088 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - ldr r1, _08070120 @ =gTasks - mov r10, r1 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - mov r2, r10 - adds r7, r1, r2 - ldr r5, _08070124 @ =TaskDummy - str r5, [r7] - ldr r4, _08070128 @ =0x0201c000 - ldrb r0, [r4, 0x5] - movs r1, 0x64 - mov r9, r1 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - ldr r1, _0807012C @ =gPlayerParty - mov r8, r1 - add r0, r8 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _08070118 - adds r0, r5, 0 - movs r1, 0x5 - bl CreateTask - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - str r0, [sp] - mov r0, r10 - adds r0, 0x8 - ldr r2, [sp] - adds r6, r2, r0 - ldrb r0, [r4, 0x5] - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 - add r0, r8 - str r0, [r4] - movs r1, 0x3A - bl GetMonData - strh r0, [r6, 0x14] - ldr r0, [r4] - movs r1, 0x39 - bl GetMonData - strh r0, [r6, 0x16] - ldrb r0, [r4, 0x5] - ldrh r1, [r4, 0x6] - movs r2, 0 - bl ExecuteTableBasedItemEffect__ - lsls r0, 24 - cmp r0, 0 - beq _08070134 - adds r0, r5, 0 - bl DestroyTask -_08070118: - ldr r0, _08070130 @ =sub_80701DC - str r0, [r7] - b _080701B0 - .align 2, 0 -_08070120: .4byte gTasks -_08070124: .4byte TaskDummy -_08070128: .4byte 0x0201c000 -_0807012C: .4byte gPlayerParty -_08070130: .4byte sub_80701DC -_08070134: - ldr r1, _080701C0 @ =gUnknown_0202E8F4 - movs r0, 0x1 - strb r0, [r1] - movs r0, 0x3 - movs r1, 0xE - movs r2, 0x1A - movs r3, 0x13 - bl MenuZeroFillWindowRect - movs r0, 0x1 - bl PlaySE - ldr r0, [r4] - ldrb r1, [r4, 0x5] - bl PartyMenuUpdateLevelOrStatus - bl IsDoubleBattle - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldrb r1, [r4, 0x5] - lsls r1, 1 - adds r0, r1 - ldr r1, _080701C4 @ =gUnknown_083769A8 - adds r0, r1 - movs r1, 0x9 - bl task_pc_turn_off - ldr r2, _080701C8 @ =0xfffff261 - adds r1, r4, r2 - movs r0, 0x2 - strb r0, [r1] - ldr r0, [r4] - movs r1, 0x39 - bl GetMonData - ldrh r1, [r6, 0x16] - subs r0, r1 - strh r0, [r6, 0x18] - movs r0, 0x1 - strh r0, [r6, 0x1C] - ldr r1, _080701CC @ =0xfffff27e - adds r0, r4, r1 - movs r1, 0x1 - strh r1, [r0] - ldr r2, _080701D0 @ =0xfffff280 - adds r0, r4, r2 - strh r1, [r0] - ldrh r1, [r6, 0x16] - adds r2, 0x2 - adds r0, r4, r2 - strh r1, [r0] - ldr r0, _080701D4 @ =0xffff8000 - str r0, [r4, 0xC] - ldr r1, [sp] - add r1, r10 - ldr r0, _080701D8 @ =sub_806F8AC - str r0, [r1] -_080701B0: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080701C0: .4byte gUnknown_0202E8F4 -_080701C4: .4byte gUnknown_083769A8 -_080701C8: .4byte 0xfffff261 -_080701CC: .4byte 0xfffff27e -_080701D0: .4byte 0xfffff280 -_080701D4: .4byte 0xffff8000 -_080701D8: .4byte sub_806F8AC - thumb_func_end sub_8070088 + .section .text_80701DC thumb_func_start sub_80701DC sub_80701DC: @ 80701DC @@ -11296,141 +11071,7 @@ _08070840: .4byte gTasks _08070844: .4byte Task_RareCandy3 thumb_func_end Task_RareCandy2 - thumb_func_start sub_8070848 -sub_8070848: @ 8070848 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r0, 0xB - movs r1, 0 - movs r2, 0x1D - movs r3, 0x7 - bl MenuDrawTextWindow - movs r7, 0 - ldr r0, _080708E4 @ =gStringVar1 - mov r10, r0 -_08070864: - ldr r1, _080708E8 @ =0x0201c000 - ldr r0, [r1] - ldr r1, _080708EC @ =gUnknown_08376D1C - adds r1, r7, r1 - ldrb r1, [r1] - bl GetMonData - adds r1, r7, 0x6 - lsls r1, 1 - ldr r2, _080708F0 @ =0x0201b264 - adds r1, r2 - strh r0, [r1] - lsls r4, r7, 1 - adds r2, r4, r2 - ldrh r1, [r2] - subs r0, r1 - strh r0, [r2] - adds r0, r7, 0 - movs r1, 0x3 - bl __udivsi3 - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 3 - adds r1, r0 - adds r1, 0xB - lsls r1, 24 - lsrs r6, r1, 24 - adds r0, r7, 0 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 1 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - ldr r1, _080708F4 @ =gUnknown_08376D04 - lsls r0, r7, 2 - adds r0, r1 - ldr r0, [r0] - adds r1, r6, 0x1 - lsls r1, 27 - lsrs r1, 24 - mov r2, r9 - lsls r5, r2, 3 - adds r2, r5, 0 - movs r3, 0x1 - bl MenuPrint_PixelCoords - mov r8, r4 - cmp r7, 0x2 - bne _080708FC - adds r4, r6, 0x6 - lsls r1, r4, 3 - adds r1, 0x6 - lsls r1, 24 - lsrs r1, 24 - ldr r0, _080708F8 @ =gOtherText_TallPlusAndRightArrow - adds r2, r5, 0 - movs r3, 0 - bl MenuPrint_PixelCoords - b _08070910 - .align 2, 0 -_080708E4: .4byte gStringVar1 -_080708E8: .4byte 0x0201c000 -_080708EC: .4byte gUnknown_08376D1C -_080708F0: .4byte 0x0201b264 -_080708F4: .4byte gUnknown_08376D04 -_080708F8: .4byte gOtherText_TallPlusAndRightArrow -_080708FC: - adds r4, r6, 0x6 - lsls r1, r4, 3 - adds r1, 0x6 - lsls r1, 24 - lsrs r1, 24 - ldr r0, _08070960 @ =gOtherText_TallPlusAndRightArrow - adds r2, r5, 0 - movs r3, 0x1 - bl MenuPrint_PixelCoords -_08070910: - movs r0, 0xFC - mov r1, r10 - strb r0, [r1] - movs r0, 0x14 - strb r0, [r1, 0x1] - movs r0, 0x6 - strb r0, [r1, 0x2] - ldr r0, _08070964 @ =0x0201b264 - add r0, r8 - movs r2, 0 - ldrsh r1, [r0, r2] - mov r0, r10 - adds r0, 0x3 - movs r2, 0x1 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - lsls r1, r4, 27 - movs r0, 0xC0 - lsls r0, 20 - adds r1, r0 - lsrs r1, 24 - mov r0, r9 - lsls r2, r0, 3 - mov r0, r10 - movs r3, 0 - bl MenuPrint_PixelCoords - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x5 - bls _08070864 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08070960: .4byte gOtherText_TallPlusAndRightArrow -_08070964: .4byte 0x0201b264 - thumb_func_end sub_8070848 + .section .text_8070968 thumb_func_start sub_8070968 sub_8070968: @ 8070968 diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index c1f0fab6d..25144558d 100644 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -4614,7 +4614,7 @@ _0809FD0A: adds r0, r6, 0 movs r1, 0xB movs r2, 0xE - bl sub_80A0708 + bl PokemonSummaryScreen_PrintEggTrainerMemo b _0809FE4C .align 2, 0 _0809FD18: .4byte gOtherText_EggLongTime @@ -5739,157 +5739,6 @@ _080A065C: .4byte 0x0000044c _080A0660: .4byte 0x0000103d thumb_func_end sub_80A057C - thumb_func_start PokemonSummaryScreen_CheckOT -PokemonSummaryScreen_CheckOT: @ 80A0664 - push {r4-r6,lr} - adds r6, r0, 0 - ldr r0, _080A06A0 @ =0x02018000 - ldr r1, [r0] - ldr r0, _080A06A4 @ =gEnemyParty - cmp r1, r0 - bne _080A06B0 - bl GetMultiplayerId - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080A06A8 @ =gLinkPlayers - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r0, r2, 0x4 - adds r0, r1, r0 - ldrh r5, [r0] - ldr r4, _080A06AC @ =gStringVar1 - adds r2, 0x8 - adds r1, r2 - adds r0, r4, 0 - bl StringCopy - adds r0, r4, 0 - bl StripExtCtrlCodes - b _080A06C2 - .align 2, 0 -_080A06A0: .4byte 0x02018000 -_080A06A4: .4byte gEnemyParty -_080A06A8: .4byte gLinkPlayers -_080A06AC: .4byte gStringVar1 -_080A06B0: - bl GetPlayerTrainerId - adds r5, r0, 0 - ldr r0, _080A06F0 @ =0x0000ffff - ands r5, r0 - ldr r0, _080A06F4 @ =gStringVar1 - ldr r1, _080A06F8 @ =gSaveBlock2 - bl StringCopy -_080A06C2: - adds r0, r6, 0 - movs r1, 0x1 - bl GetMonData - ldr r1, _080A06F0 @ =0x0000ffff - ands r1, r0 - cmp r5, r1 - bne _080A06EA - ldr r4, _080A06FC @ =gStringVar2 - adds r0, r6, 0 - movs r1, 0x7 - adds r2, r4, 0 - bl GetMonData - ldr r0, _080A06F4 @ =gStringVar1 - adds r1, r4, 0 - bl StringCompareWithoutExtCtrlCodes - cmp r0, 0 - beq _080A0700 -_080A06EA: - movs r0, 0 - b _080A0702 - .align 2, 0 -_080A06F0: .4byte 0x0000ffff -_080A06F4: .4byte gStringVar1 -_080A06F8: .4byte gSaveBlock2 -_080A06FC: .4byte gStringVar2 -_080A0700: - movs r0, 0x1 -_080A0702: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end PokemonSummaryScreen_CheckOT - - thumb_func_start sub_80A0708 -sub_80A0708: @ 80A0708 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - adds r4, r0, 0 - lsls r1, 24 - lsrs r5, r1, 24 - mov r9, r5 - lsls r2, 24 - lsrs r6, r2, 24 - mov r8, r6 - movs r1, 0x25 - bl GetMonData - lsls r0, 24 - movs r1, 0xFF - lsls r1, 24 - adds r0, r1 - lsrs r0, 24 - cmp r0, 0x2 - bls _080A073C - ldr r0, _080A0738 @ =gOtherText_EggObtainedInTrade - b _080A076E - .align 2, 0 -_080A0738: .4byte gOtherText_EggObtainedInTrade -_080A073C: - adds r0, r4, 0 - movs r1, 0x23 - bl GetMonData - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0xFF - bne _080A0754 - ldr r0, _080A0750 @ =gOtherText_EggNicePlace - b _080A076E - .align 2, 0 -_080A0750: .4byte gOtherText_EggNicePlace -_080A0754: - adds r0, r4, 0 - bl PokemonSummaryScreen_CheckOT - lsls r0, 24 - cmp r0, 0 - bne _080A0768 - ldr r0, _080A0764 @ =gOtherText_EggObtainedInTrade - b _080A076E - .align 2, 0 -_080A0764: .4byte gOtherText_EggObtainedInTrade -_080A0768: - cmp r7, 0xFD - bne _080A077C - ldr r0, _080A0778 @ =gOtherText_EggHotSprings -_080A076E: - adds r1, r5, 0 - adds r2, r6, 0 - bl MenuPrint - b _080A0786 - .align 2, 0 -_080A0778: .4byte gOtherText_EggHotSprings -_080A077C: - ldr r0, _080A0794 @ =gOtherText_EggDayCare - mov r1, r9 - mov r2, r8 - bl MenuPrint -_080A0786: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080A0794: .4byte gOtherText_EggDayCare - thumb_func_end sub_80A0708 - .section .text_80A0958 thumb_func_start sub_80A0958 diff --git a/asm/reset_rtc_screen.s b/asm/reset_rtc_screen.s index d80d374f1..1b58b417b 100644 --- a/asm/reset_rtc_screen.s +++ b/asm/reset_rtc_screen.s @@ -655,7 +655,7 @@ Task_ResetRtc_1: @ 806A958 lsls r0, r4, 1 adds r0, r4 lsls r0, 2 - ldr r1, _0806A9A0 @ =gUnknown_08376414 + ldr r1, _0806A9A0 @ =gUnknown_08376420 - 0xC adds r2, r0, r1 ldr r1, _0806A9A4 @ =gMain ldrh r3, [r1, 0x2E] @@ -675,7 +675,7 @@ Task_ResetRtc_1: @ 806A958 b _0806A9CC .align 2, 0 _0806A99C: .4byte gTasks + 0x8 -_0806A9A0: .4byte gUnknown_08376414 +_0806A9A0: .4byte gUnknown_08376420 - 0xC _0806A9A4: .4byte gMain _0806A9A8: .4byte Task_ResetRtc_2 _0806A9AC: diff --git a/asm/rom_810CBB4.s b/asm/rom_810CBB4.s index 986b6ce79..9289078b3 100644 --- a/asm/rom_810CBB4.s +++ b/asm/rom_810CBB4.s @@ -1453,7 +1453,7 @@ sub_810D6B8: @ 810D6B8 ldr r0, _0810D6D0 @ =gMain ldr r1, _0810D6D4 @ =c2_exit_to_overworld_2_switch str r1, [r0, 0x8] - ldr r0, _0810D6D8 @ =Cb2_ViewWallClock + ldr r0, _0810D6D8 @ =CB2_ViewWallClock bl SetMainCallback2 bl ScriptContext2_Enable pop {r0} @@ -1461,7 +1461,7 @@ sub_810D6B8: @ 810D6B8 .align 2, 0 _0810D6D0: .4byte gMain _0810D6D4: .4byte c2_exit_to_overworld_2_switch -_0810D6D8: .4byte Cb2_ViewWallClock +_0810D6D8: .4byte CB2_ViewWallClock thumb_func_end sub_810D6B8 thumb_func_start ResetCyclingRoadChallengeData diff --git a/data/data_83760F0.s b/data/data_83760F0.s index 3e69efb6c..631623864 100644 --- a/data/data_83760F0.s +++ b/data/data_83760F0.s @@ -4,1513 +4,6 @@ .section .rodata .align 2 -gUnknown_08376364:: @ 8376364 - .4byte DummyPerStepCallback - .4byte PerStepCallback_8069F64 - .4byte PerStepCallback_8069AA0 - .4byte PerStepCallback_8069864 - .4byte PerStepCallback_8069DD4 - .4byte EndTruckSequence - .4byte sub_80BCF1C - .4byte PerStepCallback_806A07C - -gUnknown_08376384:: @ 8376384 - .incbin "baserom.gba", 0x00376384, 0x20 - -gUnknown_083763A4:: @ 83763A4 - .incbin "baserom.gba", 0x003763a4, 0x20 - -gUnknown_083763C4:: @ 83763C4 - .incbin "baserom.gba", 0x003763c4, 0x20 - -gUnknown_083763E4:: @ 83763E4 - .incbin "baserom.gba", 0x003763e4, 0x30 - -gUnknown_08376414:: @ 8376414 - .space 4 - -gUnknown_08376418:: @ 8376418 - .incbin "baserom.gba", 0x00376418, 0x44 - - .align 2 -gOamData_837645C:: @ 837645C - .2byte 0x0000 - .2byte 0x0000 - .2byte 0x0000 - - .align 2 -gSpriteImage_8376464:: @ 8376464 - .incbin "graphics/unknown_sprites/83764AC/0.4bpp" - - .align 2 -gSpriteImage_8376484:: @ 8376484 - .incbin "graphics/unknown_sprites/83764AC/1.4bpp" - - .align 2 -Palette_3764A4: @ 83764A4 - .incbin "baserom.gba", 0x3764a4, 0x8 - - .align 2 -gSpriteImageTable_83764AC:: @ 83764AC - obj_frame_tiles gSpriteImage_8376464, 0x20 - obj_frame_tiles gSpriteImage_8376484, 0x20 - - .align 2 -gUnknown_083764BC:: @ 83764BC - obj_pal Palette_3764A4, 0x1000 - - .align 2 -gSpriteAnim_83764C4:: @ 83764C4 - obj_image_anim_frame 0, 30 - obj_image_anim_jump 0 - - .align 2 -gSpriteAnim_83764CC:: @ 83764CC - obj_image_anim_frame 0, 30, OBJ_IMAGE_ANIM_V_FLIP - obj_image_anim_jump 0 - - .align 2 -gSpriteAnim_83764D4:: @ 83764D4 - obj_image_anim_frame 1, 30 - obj_image_anim_jump 0 - - .align 2 -gSpriteAnimTable_83764DC:: @ 83764DC - .4byte gSpriteAnim_83764C4 - .4byte gSpriteAnim_83764CC - .4byte gSpriteAnim_83764D4 - - .align 2 -gSpriteTemplate_83764E8:: @ 83764E8 - spr_template 0xFFFF, 0x1000, gOamData_837645C, gSpriteAnimTable_83764DC, gSpriteImageTable_83764AC, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -gUnknown_08376500:: @ 8376500 - .incbin "baserom.gba", 0x00376500, 0x4 - - .align 1 -gUnknown_08376504:: @ 8376504 - .2byte MOVE_FOCUS_PUNCH - .2byte MOVE_DRAGON_CLAW - .2byte MOVE_WATER_PULSE - .2byte MOVE_CALM_MIND - .2byte MOVE_ROAR - .2byte MOVE_TOXIC - .2byte MOVE_HAIL - .2byte MOVE_BULK_UP - .2byte MOVE_BULLET_SEED - .2byte MOVE_HIDDEN_POWER - .2byte MOVE_SUNNY_DAY - .2byte MOVE_TAUNT - .2byte MOVE_ICE_BEAM - .2byte MOVE_BLIZZARD - .2byte MOVE_HYPER_BEAM - .2byte MOVE_LIGHT_SCREEN - .2byte MOVE_PROTECT - .2byte MOVE_RAIN_DANCE - .2byte MOVE_GIGA_DRAIN - .2byte MOVE_SAFEGUARD - .2byte MOVE_FRUSTRATION - .2byte MOVE_SOLAR_BEAM - .2byte MOVE_IRON_TAIL - .2byte MOVE_THUNDERBOLT - .2byte MOVE_THUNDER - .2byte MOVE_EARTHQUAKE - .2byte MOVE_RETURN - .2byte MOVE_DIG - .2byte MOVE_PSYCHIC - .2byte MOVE_SHADOW_BALL - .2byte MOVE_BRICK_BREAK - .2byte MOVE_DOUBLE_TEAM - .2byte MOVE_REFLECT - .2byte MOVE_SHOCK_WAVE - .2byte MOVE_FLAMETHROWER - .2byte MOVE_SLUDGE_BOMB - .2byte MOVE_SANDSTORM - .2byte MOVE_FIRE_BLAST - .2byte MOVE_ROCK_TOMB - .2byte MOVE_AERIAL_ACE - .2byte MOVE_TORMENT - .2byte MOVE_FACADE - .2byte MOVE_SECRET_POWER - .2byte MOVE_REST - .2byte MOVE_ATTRACT - .2byte MOVE_THIEF - .2byte MOVE_STEEL_WING - .2byte MOVE_SKILL_SWAP - .2byte MOVE_SNATCH - .2byte MOVE_OVERHEAT - .2byte MOVE_CUT - .2byte MOVE_FLY - .2byte MOVE_SURF - .2byte MOVE_STRENGTH - .2byte MOVE_FLASH - .2byte MOVE_ROCK_SMASH - .2byte MOVE_WATERFALL - .2byte MOVE_DIVE - - .4byte gTileBuffer @ unreferenced? - -MenuGfx_HoldIcons: - .incbin "graphics/interface/hold_icons.4bpp" -MenuPal_HoldIcons: - .incbin "graphics/interface/hold_icons.gbapal" - - .align 2 -gUnknown_083765DC:: @ 83765DC - obj_tiles MenuGfx_HoldIcons, 64, 0xd750 - - .align 2 -gUnknown_083765E4:: @ 83765E4 - obj_pal MenuPal_HoldIcons, 0xd750 - - .align 2 -gOamData_83765EC:: @ 83765EC - .2byte 0x0000 - .2byte 0x0000 - .2byte 0x0400 - - .align 2 -gSpriteAnim_83765F4:: @ 83765F4 - obj_image_anim_frame 0, 1 - obj_image_anim_end - - .align 2 -gSpriteAnim_83765FC:: @ 83765FC - obj_image_anim_frame 1, 1 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_8376604:: @ 8376604 - .4byte gSpriteAnim_83765F4 - .4byte gSpriteAnim_83765FC - - .align 2 -gSpriteTemplate_837660C:: @ 837660C - spr_template 55120, 55120, gOamData_83765EC, gSpriteAnimTable_8376604, NULL, gDummySpriteAffineAnimTable, SpriteCB_HeldItemIcon_806DD7C - - .align 2 -gUnknown_08376624:: @ 8376624 - .4byte OtherText_ChoosePoke - .4byte OtherText_MovePokeTo - .4byte OtherText_TeachWhat - .4byte OtherText_UseWhat - .4byte OtherText_GiveWhat - .4byte OtherText_DoWhat - .4byte OtherText_NothingToCut - .4byte OtherText_CantSurf - .4byte OtherText_AlreadySurfing - .4byte OtherText_CantUseThatHere - .4byte OtherText_RestoreWhatMove - .4byte OtherText_BoostPP - .4byte gOtherText_CancelWithTerminator - .4byte OtherText_DoWhatWithItem - .4byte OtherText_NoPokeForBattle - .4byte OtherText_ChoosePoke2 - .4byte OtherText_NotEnoughHP - .4byte OtherText_ThreePokeNeeded - .4byte OtherText_PokeCantBeSame - .4byte OtherText_NoIdenticalHoldItems - .4byte OtherText_TeachWhichPoke - - .align 2 -gUnknown_08376678:: @ 8376678 - .byte 16, 40, 0, 0 - .byte 104, 18, 0, 0 - .byte 104, 42, 0, 0 - .byte 104, 66, 0, 0 - .byte 104, 90, 0, 0 - .byte 104, 114, 0, 0 - .byte 16, 24, 0, 0 - .byte 16, 80, 0, 0 - .byte 104, 18, 0, 0 - .byte 104, 50, 0, 0 - .byte 104, 82, 0, 0 - .byte 104, 114, 0, 0 - .byte 16, 24, 0, 0 - .byte 16, 80, 0, 0 - .byte 104, 26, 0, 0 - .byte 104, 50, 0, 0 - .byte 104, 82, 0, 0 - .byte 104, 106, 0, 0 - .byte 16, 24, 0, 0 - .byte 104, 26, 0, 0 - .byte 104, 50, 0, 0 - .byte 16, 80, 0, 0 - .byte 104, 82, 0, 0 - .byte 104, 106, 0, 0 - .byte 5, 4, 0, 0 - .byte 16, 1, 0, 0 - .byte 16, 4, 0, 0 - .byte 16, 7, 0, 0 - .byte 16, 10, 0, 0 - .byte 16, 13, 0, 0 - .byte 5, 2, 0, 0 - .byte 5, 9, 0, 0 - .byte 16, 1, 0, 0 - .byte 16, 5, 0, 0 - .byte 16, 9, 0, 0 - .byte 16, 13, 0, 0 - .byte 5, 2, 0, 0 - .byte 5, 9, 0, 0 - .byte 16, 2, 0, 0 - .byte 16, 5, 0, 0 - .byte 16, 9, 0, 0 - .byte 16, 12, 0, 0 - .byte 5, 2, 0, 0 - .byte 16, 2, 0, 0 - .byte 16, 5, 0, 0 - .byte 5, 9, 0, 0 - .byte 16, 9, 0, 0 - .byte 16, 12, 0, 0 - - .align 2 -gUnknown_08376738:: @ 8376738 - .byte 6, 5, 0, 0 - .byte 17, 2, 0, 0 - .byte 17, 5, 0, 0 - .byte 17, 8, 0, 0 - .byte 17, 11, 0, 0 - .byte 17, 14, 0, 0 - .byte 6, 3, 0, 0 - .byte 6, 10, 0, 0 - .byte 17, 2, 0, 0 - .byte 17, 6, 0, 0 - .byte 17, 10, 0, 0 - .byte 17, 14, 0, 0 - .byte 6, 3, 0, 0 - .byte 6, 10, 0, 0 - .byte 17, 3, 0, 0 - .byte 17, 6, 0, 0 - .byte 17, 10, 0, 0 - .byte 17, 13, 0, 0 - .byte 6, 3, 0, 0 - .byte 17, 3, 0, 0 - .byte 17, 6, 0, 0 - .byte 6, 10, 0, 0 - .byte 17, 10, 0, 0 - .byte 17, 13, 0, 0 - .byte 3, 7, 0, 0 - .byte 22, 2, 0, 0 - .byte 22, 5, 0, 0 - .byte 22, 8, 0, 0 - .byte 22, 11, 0, 0 - .byte 22, 14, 0, 0 - .byte 3, 5, 0, 0 - .byte 3, 12, 0, 0 - .byte 22, 2, 0, 0 - .byte 22, 6, 0, 0 - .byte 22, 10, 0, 0 - .byte 22, 14, 0, 0 - .byte 3, 5, 0, 0 - .byte 3, 12, 0, 0 - .byte 22, 3, 0, 0 - .byte 22, 6, 0, 0 - .byte 22, 10, 0, 0 - .byte 22, 13, 0, 0 - .byte 3, 5, 0, 0 - .byte 22, 3, 0, 0 - .byte 22, 6, 0, 0 - .byte 3, 12, 0, 0 - .byte 22, 10, 0, 0 - .byte 22, 13, 0, 0 - .byte 7, 7, 0, 0 - .byte 26, 2, 0, 0 - .byte 26, 5, 0, 0 - .byte 26, 8, 0, 0 - .byte 26, 11, 0, 0 - .byte 26, 14, 0, 0 - .byte 7, 5, 0, 0 - .byte 7, 12, 0, 0 - .byte 26, 2, 0, 0 - .byte 26, 6, 0, 0 - .byte 26, 10, 0, 0 - .byte 26, 14, 0, 0 - .byte 7, 5, 0, 0 - .byte 7, 12, 0, 0 - .byte 26, 3, 0, 0 - .byte 26, 6, 0, 0 - .byte 26, 10, 0, 0 - .byte 26, 13, 0, 0 - .byte 7, 5, 0, 0 - .byte 26, 3, 0, 0 - .byte 26, 6, 0, 0 - .byte 7, 12, 0, 0 - .byte 26, 10, 0, 0 - .byte 26, 13, 0, 0 - - .align 2 -gUnknown_08376858:: @ 8376858 - .4byte BG_VRAM + 0xF1C8 - .4byte BG_VRAM + 0xF0AE - .4byte BG_VRAM + 0xF16E - .4byte BG_VRAM + 0xF22E - .4byte BG_VRAM + 0xF2EE - .4byte BG_VRAM + 0xF3AE - .4byte BG_VRAM + 0xF148 - .4byte BG_VRAM + 0xF308 - .4byte BG_VRAM + 0xF0AE - .4byte BG_VRAM + 0xF1AE - .4byte BG_VRAM + 0xF2AE - .4byte BG_VRAM + 0xF3AE - .4byte BG_VRAM + 0xF148 - .4byte BG_VRAM + 0xF308 - .4byte BG_VRAM + 0xF0EE - .4byte BG_VRAM + 0xF1AE - .4byte BG_VRAM + 0xF2AE - .4byte BG_VRAM + 0xF36E - .4byte BG_VRAM + 0xF148 - .4byte BG_VRAM + 0xF0EE - .4byte BG_VRAM + 0xF1AE - .4byte BG_VRAM + 0xF308 - .4byte BG_VRAM + 0xF2AE - .4byte BG_VRAM + 0xF36E - - .align 2 -gUnknown_083768B8:: @ 83768B8 - .byte 8, 44, 0, 0 - .byte 92, 22, 0, 0 - .byte 92, 46, 0, 0 - .byte 92, 70, 0, 0 - .byte 92, 94, 0, 0 - .byte 92, 118, 0, 0 - .byte 196, 136, 0, 0 - .byte 196, 152, 0, 0 - .byte 8, 28, 0, 0 - .byte 8, 84, 0, 0 - .byte 92, 22, 0, 0 - .byte 92, 54, 0, 0 - .byte 92, 86, 0, 0 - .byte 92, 118, 0, 0 - .byte 196, 136, 0, 0 - .byte 196, 152, 0, 0 - .byte 8, 28, 0, 0 - .byte 8, 84, 0, 0 - .byte 92, 30, 0, 0 - .byte 92, 54, 0, 0 - .byte 92, 86, 0, 0 - .byte 92, 110, 0, 0 - .byte 196, 136, 0, 0 - .byte 196, 152, 0, 0 - - .align 2 -gUnknown_08376918:: @ 8376918 - .4byte BG_VRAM + 0xF1C6 - .4byte BG_VRAM + 0xF06C - .4byte BG_VRAM + 0xF12C - .4byte BG_VRAM + 0xF1EC - .4byte BG_VRAM + 0xF2AC - .4byte BG_VRAM + 0xF36C - .4byte BG_VRAM + 0xF148 - .4byte BG_VRAM + 0xF308 - .4byte BG_VRAM + 0xF0AE - .4byte BG_VRAM + 0xF1AE - .4byte BG_VRAM + 0xF2AE - .4byte BG_VRAM + 0xF3AE - - .align 2 -gUnknown_08376948:: @ 8376948 - .byte 2, 4, 10, 9 - .byte 16, 1, 29, 3 - .byte 16, 4, 29, 6 - .byte 16, 7, 29, 9 - .byte 16, 10, 29, 12 - .byte 16, 13, 29, 15 - .byte 2, 2, 10, 7 - .byte 2, 9, 10, 14 - .byte 16, 1, 29, 3 - .byte 16, 5, 29, 7 - .byte 16, 9, 29, 11 - .byte 16, 13, 29, 15 - - .align 2 -gUnknown_08376978:: @ 8376978 - .byte 2, 7, 10, 9 - .byte 21, 1, 29, 3 - .byte 21, 4, 29, 6 - .byte 21, 7, 29, 9 - .byte 21, 10, 29, 12 - .byte 21, 13, 29, 15 - .byte 2, 2, 10, 7 - .byte 2, 9, 10, 14 - .byte 16, 1, 29, 3 - .byte 16, 5, 29, 7 - .byte 16, 9, 29, 11 - .byte 16, 13, 29, 15 - - .align 2 -gUnknown_083769A8:: @ 83769A8 - .byte 0, 3 - .byte 11, 1 - .byte 11, 4 - .byte 11, 7 - .byte 11, 10 - .byte 11, 13 - .byte 0, 1 - .byte 0, 8 - .byte 11, 1 - .byte 11, 5 - .byte 11, 9 - .byte 11, 13 - - .align 2 -gUnknown_083769C0:: @ 83769C0 - .byte 0, 1 - .byte 0, 8 - .byte 11, 2 - .byte 11, 5 - .byte 11, 9 - .byte 11, 12 - .byte 0, 1 - .byte 0, 8 - .byte 11, 2 - .byte 11, 5 - .byte 11, 9 - .byte 11, 12 - -gUnknown_083769D8:: @ 83769D8 - .byte 0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x27 - .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 - .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 - .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 - .byte 0x44,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x47 - .byte 0x44,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x47 - .byte 0x54,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x57 - -gUnknown_08376A25:: @ 8376A25 - .byte 0x50,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x53 - .byte 0x60,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x63 - .byte 0x70,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x73 - -gUnknown_08376A5E:: @ 8376A5E - .byte 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x23 - .byte 0x30,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x33 - .byte 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x43 - -@ unknown, unreferenced data - .byte 0x0C - .byte 0x0D - .byte 0x0E - .byte 0x0F - .byte 0x00 - .byte 0x01 - .byte 0x02 - .byte 0x03 - .byte 0x04 - .byte 0x05 - .byte 0x0F - .byte 0x10 - .byte 0x11 - .byte 0x12 - .byte 0x13 - .byte 0x14 - .byte 0x15 - .byte 0x0F - .byte 0x06 - .byte 0x05 - .byte 0x01 - .byte 0x07 - .byte 0x08 - .byte 0x09 - .byte 0x0F - .byte 0x16 - .byte 0x15 - .byte 0x11 - .byte 0x17 - .byte 0x18 - .byte 0x19 - .byte 0x0F - .byte 0x09 - .byte 0x0A - .byte 0x0B - .byte 0x05 - .byte 0x0C - .byte 0x0F - .byte 0x0F - .byte 0x19 - .byte 0x1A - .byte 0x1B - .byte 0x15 - .byte 0x1C - .byte 0x0F - .byte 0x0F - .byte 0x0D - .byte 0x0B - .byte 0x05 - .byte 0x0C - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x1D - .byte 0x1B - .byte 0x15 - .byte 0x1C - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x06 - .byte 0x05 - .byte 0x0B - .byte 0x05 - .byte 0x0C - .byte 0x0F - .byte 0x0F - .byte 0x16 - .byte 0x15 - .byte 0x1B - .byte 0x15 - .byte 0x1C - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x20 - .byte 0x0C - .byte 0x09 - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x1F - .byte 0x30 - .byte 0x1C - .byte 0x19 - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x25 - .byte 0x0F - .byte 0x22 - .byte 0x24 - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x35 - .byte 0x41 - .byte 0x32 - .byte 0x34 - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x26 - .byte 0x0F - .byte 0x23 - .byte 0x0E - .byte 0x0F - .byte 0x0F - .byte 0x0F - .byte 0x36 - .byte 0x43 - .byte 0x33 - .byte 0x1E - .byte 0x0F - .byte 0x0F - .byte 0x27 - .byte 0x28 - .byte 0x29 - .byte 0x03 - .byte 0x2A - .byte 0x0F - .byte 0x0F - .byte 0x37 - .byte 0x38 - .byte 0x39 - .byte 0x13 - .byte 0x3A - .byte 0x0F - .byte 0x0F - .byte 0x27 - .byte 0x28 - .byte 0x29 - .byte 0x03 - .byte 0x04 - .byte 0x05 - .byte 0x0F - .byte 0x37 - .byte 0x38 - .byte 0x39 - .byte 0x13 - .byte 0x14 - .byte 0x15 - .byte 0x0F - .byte 0x2B - .byte 0x2C - .byte 0x02 - .byte 0x28 - .byte 0x29 - .byte 0x2D - .byte 0x21 - .byte 0x3B - .byte 0x3C - .byte 0x12 - .byte 0x38 - .byte 0x39 - .byte 0x3D - .byte 0x31 - .byte 0x2B - .byte 0x2C - .byte 0x02 - .byte 0x28 - .byte 0x29 - .byte 0x08 - .byte 0x09 - .byte 0x3B - .byte 0x3C - .byte 0x12 - .byte 0x38 - .byte 0x39 - .byte 0x18 - .byte 0x19 - .byte 0x2E - .byte 0x2F - .byte 0x2B - .byte 0x2C - .byte 0x02 - .byte 0x27 - .byte 0x2D - .byte 0x3E - .byte 0x3F - .byte 0x3B - .byte 0x3C - .byte 0x12 - .byte 0x45 - .byte 0x3D - - .align 2 -gUnknown_08376B54:: @ 8376B54 - .4byte ItemUseMoveMenu_HandleMoveSelection - .4byte ItemUseMoveMenu_HandleCancel - - .align 1 -Unknown_08376B5C: - .2byte 0x4000, 0x4018, 0xF400 - .2byte 0x4000, 0x4038, 0xF404 - .2byte 0x4008, 0x4018, 0xF408 - .2byte 0x4008, 0x4038, 0xF40C - .2byte 0x4010, 0x4020, 0xF410 - .2byte 0x4020, 0x4025, 0xF418 - .2byte 0x4020, 0x4045, 0xF41C - .2byte -1 - - .align 1 -Unknown_08376B88: - .2byte 0x4000, 0x4018, 0xF400 - .2byte 0x4000, 0x4038, 0xF404 - .2byte 0x4008, 0x4018, 0xF408 - .2byte 0x4008, 0x4038, 0xF40C - .2byte 0x4010, 0x4020, 0xF410 - .2byte 0x4010, 0x4065, 0xF418 - .2byte 0x4010, 0x4085, 0xF41C - .2byte -1 - - .align 2 -gUnknown_08376BB4:: @ 8376BB4 - .byte 0x1, 0x4 - .space 2 - .4byte Unknown_08376B5C - - .byte 0xC, 0x1 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x4 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x7 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0xA - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0xD - .space 2 - .4byte Unknown_08376B88 - - .byte 0x1, 0x2 - .space 2 - .4byte Unknown_08376B5C - - .byte 0x1, 0x9 - .space 2 - .4byte Unknown_08376B5C - - .byte 0xC, 0x1 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x5 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x9 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0xD - .space 2 - .4byte Unknown_08376B88 - - .byte 0x1, 0x2 - .space 2 - .4byte Unknown_08376B5C - - .byte 0x1, 0x9 - .space 2 - .4byte Unknown_08376B5C - - .byte 0xC, 0x2 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x5 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x9 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0xC - .space 2 - .4byte Unknown_08376B88 - - .byte 0x1, 0x2 - .space 2 - .4byte Unknown_08376B5C - - .byte 0xC, 0x2 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0x5 - .space 2 - .4byte Unknown_08376B88 - - .byte 0x1, 0x9 - .space 2 - .4byte Unknown_08376B5C - - .byte 0xC, 0x9 - .space 2 - .4byte Unknown_08376B88 - - .byte 0xC, 0xC - .space 2 - .4byte Unknown_08376B88 - - .align 2 -gUnknown_08376C74:: @ 8376C74 - .4byte sub_8089CD4, sub_806AFD0, 0 - .4byte SetUpBattlePokemonMenu, SetUpBattlePartyMenu, 0 - .4byte sub_80F9C6C, sub_80F9ACC, 0 - .4byte sub_80F9C6C, sub_806AFD0, 0 - .4byte sub_81222B0, sub_8121E78, 0 - .4byte sub_8122A48, sub_8122854, 0xFF - .4byte sub_8122E0C, sub_806AFD0, 0x0F - .4byte sub_80F9E64, sub_80F9CE8, 0 - - .align 2 -gUnknown_08376CD4:: @ 8376CD4 - .2byte 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F - .2byte 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F - - .align 2 -gUnknown_08376CEC:: @ 8376CEC - .2byte 0x2A, 0x0B, 0x0C, 0x0D, 0x0E, 0x2F - .2byte 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F - - .align 2 -gUnknown_08376D04:: @ 8376D04 - .4byte gOtherText_HP - .4byte gOtherText_Attack - .4byte gOtherText_Defense - .4byte gOtherText_SpAtk - .4byte gOtherText_SpDef - .4byte gOtherText_Speed - -gUnknown_08376D1C:: @ 8376D1C - .byte 0x3A @ HP - .byte 0x3B @ Attack - .byte 0x3C @ Defense - .byte 0x3E @ Sp. Attack - .byte 0x3F @ Sp. Defense - .byte 0x3D @ Speed - - .align 2 -gStartMenuItems:: @ 8376D24 - .4byte SystemText_Pokedex, StartMenu_PokedexCallback - .4byte SystemText_Pokemon, StartMenu_PokemonCallback - .4byte SystemText_BAG, StartMenu_BagCallback - .4byte SystemText_Pokenav, StartMenu_PokenavCallback - .4byte SystemText_Player, StartMenu_PlayerCallback - .4byte SystemText_Save, StartMenu_SaveCallback - .4byte SystemText_Option, StartMenu_OptionCallback - .4byte SystemText_Exit, StartMenu_ExitCallback - .4byte SystemText_Retire, StartMenu_RetireCallback - .4byte SystemText_Player, StartMenu_PlayerLinkCallback - - .align 2 -gMenuYesNoItems:: @ 8376D74 - .4byte OtherText_Yes, 0 - .4byte OtherText_No, 0 - - .align 2 -TilesetAnimTiles_General_0_1: @ 8376D84 - .incbin "data/tilesets/primary/general/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_General_0_0: @ 8376E04 - .incbin "data/tilesets/primary/general/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_General_0_2: @ 8376E84 - .incbin "data/tilesets/primary/general/anim/0/2.4bpp" - - .space 32 - - .align 2 -gTilesetAnimTable_General_0:: @ 8376F24 - .4byte TilesetAnimTiles_General_0_0 - .4byte TilesetAnimTiles_General_0_1 - .4byte TilesetAnimTiles_General_0_0 - .4byte TilesetAnimTiles_General_0_2 - - .align 2 -TilesetAnimTiles_General_1_0: @ 8376F34 - .incbin "data/tilesets/primary/general/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_General_1_1: @ 83772F4 - .incbin "data/tilesets/primary/general/anim/1/1.4bpp" - - .align 2 -TilesetAnimTiles_General_1_2: @ 83776B4 - .incbin "data/tilesets/primary/general/anim/1/2.4bpp" - - .align 2 -TilesetAnimTiles_General_1_3: @ 8377A74 - .incbin "data/tilesets/primary/general/anim/1/3.4bpp" - - .align 2 -TilesetAnimTiles_General_1_4: @ 8377E34 - .incbin "data/tilesets/primary/general/anim/1/4.4bpp" - - .align 2 -TilesetAnimTiles_General_1_5: @ 83781F4 - .incbin "data/tilesets/primary/general/anim/1/5.4bpp" - - .align 2 -TilesetAnimTiles_General_1_6: @ 83785B4 - .incbin "data/tilesets/primary/general/anim/1/6.4bpp" - - .align 2 -TilesetAnimTiles_General_1_7: @ 8378974 - .incbin "data/tilesets/primary/general/anim/1/7.4bpp" - - .align 2 -gTilesetAnimTable_General_1:: @ 8378D34 - .4byte TilesetAnimTiles_General_1_0 - .4byte TilesetAnimTiles_General_1_1 - .4byte TilesetAnimTiles_General_1_2 - .4byte TilesetAnimTiles_General_1_3 - .4byte TilesetAnimTiles_General_1_4 - .4byte TilesetAnimTiles_General_1_5 - .4byte TilesetAnimTiles_General_1_6 - .4byte TilesetAnimTiles_General_1_7 - - .align 2 -TilesetAnimTiles_General_2_0: @ 8378D54 - .incbin "data/tilesets/primary/general/anim/2/0.4bpp" - - .align 2 -TilesetAnimTiles_General_2_1: @ 8378E94 - .incbin "data/tilesets/primary/general/anim/2/1.4bpp" - - .align 2 -TilesetAnimTiles_General_2_2: @ 8378FD4 - .incbin "data/tilesets/primary/general/anim/2/2.4bpp" - - .align 2 -TilesetAnimTiles_General_2_3: @ 8379114 - .incbin "data/tilesets/primary/general/anim/2/3.4bpp" - - .align 2 -TilesetAnimTiles_General_2_4: @ 8379254 - .incbin "data/tilesets/primary/general/anim/2/4.4bpp" - - .align 2 -TilesetAnimTiles_General_2_5: @ 8379394 - .incbin "data/tilesets/primary/general/anim/2/5.4bpp" - - .align 2 -TilesetAnimTiles_General_2_6: @ 83794D4 - .incbin "data/tilesets/primary/general/anim/2/6.4bpp" - - .align 2 -gTilesetAnimTable_General_2:: @ 8379614 - .4byte TilesetAnimTiles_General_2_0 - .4byte TilesetAnimTiles_General_2_1 - .4byte TilesetAnimTiles_General_2_2 - .4byte TilesetAnimTiles_General_2_3 - .4byte TilesetAnimTiles_General_2_4 - .4byte TilesetAnimTiles_General_2_5 - .4byte TilesetAnimTiles_General_2_6 - .4byte TilesetAnimTiles_General_2_0 - - .align 2 -TilesetAnimTiles_General_3_0: @ 8379634 - .incbin "data/tilesets/primary/general/anim/3/0.4bpp" - - .align 2 -TilesetAnimTiles_General_3_1: @ 83796F4 - .incbin "data/tilesets/primary/general/anim/3/1.4bpp" - - .align 2 -TilesetAnimTiles_General_3_2: @ 83797B4 - .incbin "data/tilesets/primary/general/anim/3/2.4bpp" - - .align 2 -TilesetAnimTiles_General_3_3: @ 8379874 - .incbin "data/tilesets/primary/general/anim/3/3.4bpp" - - .align 2 -gTilesetAnimTable_General_3:: @ 8379934 - .4byte TilesetAnimTiles_General_3_0 - .4byte TilesetAnimTiles_General_3_1 - .4byte TilesetAnimTiles_General_3_2 - .4byte TilesetAnimTiles_General_3_3 - - .align 2 -TilesetAnimTiles_General_4_0: @ 8379944 - .incbin "data/tilesets/primary/general/anim/4/0.4bpp" - - .align 2 -TilesetAnimTiles_General_4_1: @ 8379A84 - .incbin "data/tilesets/primary/general/anim/4/1.4bpp" - - .align 2 -TilesetAnimTiles_General_4_2: @ 8379BC4 - .incbin "data/tilesets/primary/general/anim/4/2.4bpp" - - .align 2 -TilesetAnimTiles_General_4_3: @ 8379D04 - .incbin "data/tilesets/primary/general/anim/4/3.4bpp" - - .align 2 -gTilesetAnimTable_General_4:: @ 8379E44 - .4byte TilesetAnimTiles_General_4_0 - .4byte TilesetAnimTiles_General_4_1 - .4byte TilesetAnimTiles_General_4_2 - .4byte TilesetAnimTiles_General_4_3 - - .align 2 -TilesetAnimTiles_Lavaridge_0: @ 8379E54 - .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_Lavaridge_1: @ 8379ED4 - .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" - - .align 2 -TilesetAnimTiles_Lavaridge_2: @ 8379F54 - .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" - - .align 2 -TilesetAnimTiles_Lavaridge_3: @ 8379FD4 - .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" - - .align 2 -gTilesetAnimTable_Lavaridge:: @ 837A054 - .4byte TilesetAnimTiles_Lavaridge_0 - .4byte TilesetAnimTiles_Lavaridge_1 - .4byte TilesetAnimTiles_Lavaridge_2 - .4byte TilesetAnimTiles_Lavaridge_3 - - .align 2 -TilesetAnimTiles_Pacifidlog_0_0: @ 837A064 - .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_0_1: @ 837A424 - .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_0_2: @ 837A7E4 - .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" - - .align 2 -gTilesetAnimTable_Pacifidlog_0:: @ 837ABA4 - .4byte TilesetAnimTiles_Pacifidlog_0_0 - .4byte TilesetAnimTiles_Pacifidlog_0_1 - .4byte TilesetAnimTiles_Pacifidlog_0_2 - .4byte TilesetAnimTiles_Pacifidlog_0_1 - - .align 2 -TilesetAnimTiles_Underwater_0: @ 837ABB4 - .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_Underwater_1: @ 837AC34 - .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" - - .align 2 -TilesetAnimTiles_Underwater_2: @ 837ACB4 - .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" - - .align 2 -TilesetAnimTiles_Underwater_3: @ 837AD34 - .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" - - .align 2 -gTilesetAnimTable_Underwater:: @ 837ADB4 - .4byte TilesetAnimTiles_Underwater_0 - .4byte TilesetAnimTiles_Underwater_1 - .4byte TilesetAnimTiles_Underwater_2 - .4byte TilesetAnimTiles_Underwater_3 - - .align 2 -TilesetAnimTiles_Pacifidlog_1_0: @ 837ADC4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_1: @ 837AEC4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_2: @ 837AFC4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_3: @ 837B0C4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_4: @ 837B1C4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_5: @ 837B2C4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_6: @ 837B3C4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" - - .align 2 -TilesetAnimTiles_Pacifidlog_1_7: @ 837B4C4 - .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" - - .align 2 -gTilesetAnimTable_Pacifidlog_1:: @ 837B5C4 - .4byte TilesetAnimTiles_Pacifidlog_1_0 - .4byte TilesetAnimTiles_Pacifidlog_1_1 - .4byte TilesetAnimTiles_Pacifidlog_1_2 - .4byte TilesetAnimTiles_Pacifidlog_1_3 - .4byte TilesetAnimTiles_Pacifidlog_1_4 - .4byte TilesetAnimTiles_Pacifidlog_1_5 - .4byte TilesetAnimTiles_Pacifidlog_1_6 - .4byte TilesetAnimTiles_Pacifidlog_1_7 - - .align 2 -TilesetAnimTiles_Mauville_0_0: @ 837B5E4 - .incbin "data/tilesets/secondary/mauville/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_0_1: @ 837B664 - .incbin "data/tilesets/secondary/mauville/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_0_2: @ 837B6E4 - .incbin "data/tilesets/secondary/mauville/anim/0/2.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_0_3: @ 837B764 - .incbin "data/tilesets/secondary/mauville/anim/0/3.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_0_4: @ 837B7E4 - .incbin "data/tilesets/secondary/mauville/anim/0/4.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_1_0: @ 837B864 - .incbin "data/tilesets/secondary/mauville/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_1_1: @ 837B8E4 - .incbin "data/tilesets/secondary/mauville/anim/1/1.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_1_2: @ 837B964 - .incbin "data/tilesets/secondary/mauville/anim/1/2.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_1_3: @ 837B9E4 - .incbin "data/tilesets/secondary/mauville/anim/1/3.4bpp" - - .align 2 -TilesetAnimTiles_Mauville_1_4: @ 837BA64 - .incbin "data/tilesets/secondary/mauville/anim/1/4.4bpp" - - .align 2 -gUnknown_0837BAE4:: @ 837BAE4 - .4byte 0x06004C00 - .4byte 0x06004C80 - .4byte 0x06004D00 - .4byte 0x06004D80 - .4byte 0x06004E00 - .4byte 0x06004E80 - .4byte 0x06004F00 - .4byte 0x06004F80 - - .align 2 -gUnknown_0837BB04:: @ 837BB04 - .4byte 0x06005000 - .4byte 0x06005080 - .4byte 0x06005100 - .4byte 0x06005180 - .4byte 0x06005200 - .4byte 0x06005280 - .4byte 0x06005300 - .4byte 0x06005380 - - .align 2 -gTilesetAnimTable_Mauville_0A:: @ 837BB24 - .4byte TilesetAnimTiles_Mauville_0_0 - .4byte TilesetAnimTiles_Mauville_0_0 - .4byte TilesetAnimTiles_Mauville_0_1 - .4byte TilesetAnimTiles_Mauville_0_2 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_3 - .4byte TilesetAnimTiles_Mauville_0_2 - .4byte TilesetAnimTiles_Mauville_0_1 - - .align 2 -gTilesetAnimTable_Mauville_1A:: @ 837BB54 - .4byte TilesetAnimTiles_Mauville_1_0 - .4byte TilesetAnimTiles_Mauville_1_0 - .4byte TilesetAnimTiles_Mauville_1_1 - .4byte TilesetAnimTiles_Mauville_1_2 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_3 - .4byte TilesetAnimTiles_Mauville_1_2 - .4byte TilesetAnimTiles_Mauville_1_1 - - .align 2 -gTilesetAnimTable_Mauville_0B:: @ 837BB84 - .4byte TilesetAnimTiles_Mauville_0_0 - .4byte TilesetAnimTiles_Mauville_0_0 - .4byte TilesetAnimTiles_Mauville_0_4 - .4byte TilesetAnimTiles_Mauville_0_4 - - .align 2 -gTilesetAnimTable_Mauville_1B:: @ 837BB94 - .4byte TilesetAnimTiles_Mauville_1_0 - .4byte TilesetAnimTiles_Mauville_1_0 - .4byte TilesetAnimTiles_Mauville_1_4 - .4byte TilesetAnimTiles_Mauville_1_4 - - .align 2 -TilesetAnimTiles_Rustboro_0_0: @ 837BBA4 - .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_1: @ 837BC24 - .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_2: @ 837BCA4 - .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_3: @ 837BD24 - .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_4: @ 837BDA4 - .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_5: @ 837BE24 - .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_6: @ 837BEA4 - .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_0_7: @ 837BF24 - .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" - - .align 2 -gUnknown_0837BFA4:: @ 837BFA4 - .4byte 0x06005000 - .4byte 0x06005080 - .4byte 0x06005100 - .4byte 0x06005180 - .4byte 0x06005200 - .4byte 0x06005280 - .4byte 0x06005300 - .4byte 0x06005380 - - .align 2 -gTilesetAnimTable_Rustboro_0:: @ 837BFC4 - .4byte TilesetAnimTiles_Rustboro_0_0 - .4byte TilesetAnimTiles_Rustboro_0_1 - .4byte TilesetAnimTiles_Rustboro_0_2 - .4byte TilesetAnimTiles_Rustboro_0_3 - .4byte TilesetAnimTiles_Rustboro_0_4 - .4byte TilesetAnimTiles_Rustboro_0_5 - .4byte TilesetAnimTiles_Rustboro_0_6 - .4byte TilesetAnimTiles_Rustboro_0_7 - - .align 2 -TilesetAnimTiles_Rustboro_1_0: @ 837BFE4 - .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_Rustboro_1_1: @ 837C064 - .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" - - .align 2 -gTilesetAnimTable_Rustboro_1:: @ 837C0E4 - .4byte TilesetAnimTiles_Rustboro_1_0 - .4byte TilesetAnimTiles_Rustboro_1_1 - - .align 2 -TilesetAnimTiles_Cave_0: @ 837C0EC - .incbin "data/tilesets/secondary/cave/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_Cave_1: @ 837C16C - .incbin "data/tilesets/secondary/cave/anim/1.4bpp" - - .align 2 -TilesetAnimTiles_Cave_2: @ 837C1EC - .incbin "data/tilesets/secondary/cave/anim/2.4bpp" - - .align 2 -TilesetAnimTiles_Cave_3: @ 837C26C - .incbin "data/tilesets/secondary/cave/anim/3.4bpp" - - .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" - .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" - .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" - .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" - - .space 32 - - .align 2 -gTilesetAnimTable_Cave:: @ 837C50C - .4byte TilesetAnimTiles_Cave_0 - .4byte TilesetAnimTiles_Cave_1 - .4byte TilesetAnimTiles_Cave_2 - .4byte TilesetAnimTiles_Cave_3 - - .align 2 -TilesetAnimTiles_EverGrande_0: @ 837C51C - .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_1: @ 837C59C - .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_2: @ 837C61C - .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_3: @ 837C69C - .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_4: @ 837C71C - .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_5: @ 837C79C - .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_6: @ 837C81C - .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" - - .align 2 -TilesetAnimTiles_EverGrande_7: @ 837C89C - .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" - - .space 32 - - .align 2 -gUnknown_0837C93C:: @ 837C93C - .4byte 0x06005C00 - .4byte 0x06005C80 - .4byte 0x06005D00 - .4byte 0x06005D80 - .4byte 0x06005E00 - .4byte 0x06005E80 - .4byte 0x06005F00 - .4byte 0x06005F80 - - .align 2 -gTilesetAnimTable_EverGrande:: @ 837C95C - .4byte TilesetAnimTiles_EverGrande_0 - .4byte TilesetAnimTiles_EverGrande_1 - .4byte TilesetAnimTiles_EverGrande_2 - .4byte TilesetAnimTiles_EverGrande_3 - .4byte TilesetAnimTiles_EverGrande_4 - .4byte TilesetAnimTiles_EverGrande_5 - .4byte TilesetAnimTiles_EverGrande_6 - .4byte TilesetAnimTiles_EverGrande_7 - - .align 2 -TilesetAnimTiles_Building_0: @ 837C97C - .incbin "data/tilesets/primary/building/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_Building_1: @ 837C9FC - .incbin "data/tilesets/primary/building/anim/1.4bpp" - - .align 2 -gTilesetAnimTable_Building:: @ 837CA7C - .4byte TilesetAnimTiles_Building_0 - .4byte TilesetAnimTiles_Building_1 - - .align 2 -TilesetAnimTiles_SootopolisGym_0_0: @ 837CA84 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_SootopolisGym_0_1: @ 837CC04 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_SootopolisGym_0_2: @ 837CD84 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" - - .align 2 -TilesetAnimTiles_SootopolisGym_1_0: @ 837CF04 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_SootopolisGym_1_1: @ 837D184 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" - - .align 2 -TilesetAnimTiles_SootopolisGym_1_2: @ 837D404 - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" - - .align 2 -gTilesetAnimTable_SootopolisGym_0:: @ 837D684 - .4byte TilesetAnimTiles_SootopolisGym_0_0 - .4byte TilesetAnimTiles_SootopolisGym_0_1 - .4byte TilesetAnimTiles_SootopolisGym_0_2 - - .align 2 -gTilesetAnimTable_SootopolisGym_1:: @ 837D690 - .4byte TilesetAnimTiles_SootopolisGym_1_0 - .4byte TilesetAnimTiles_SootopolisGym_1_1 - .4byte TilesetAnimTiles_SootopolisGym_1_2 - - .align 2 -TilesetAnimTiles_EliteFour_1_0: @ 837D69C - .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" - - .align 2 -TilesetAnimTiles_EliteFour_1_1: @ 837D71C - .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" - - .align 2 -TilesetAnimTiles_EliteFour_0_0: @ 837D79C - .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" - - .align 2 -TilesetAnimTiles_EliteFour_0_1: @ 837D7BC - .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" - - .align 2 -TilesetAnimTiles_EliteFour_0_2: @ 837D7DC - .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" - - .align 2 -TilesetAnimTiles_EliteFour_0_3: @ 837D7FC - .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" - - .space 32 - - .align 2 -gTilesetAnimTable_EliteFour_0:: @ 837D83C - .4byte TilesetAnimTiles_EliteFour_0_0 - .4byte TilesetAnimTiles_EliteFour_0_1 - .4byte TilesetAnimTiles_EliteFour_0_2 - .4byte TilesetAnimTiles_EliteFour_0_3 - - .align 2 -gTilesetAnimTable_EliteFour_1:: @ 837D84C - .4byte TilesetAnimTiles_EliteFour_1_0 - .4byte TilesetAnimTiles_EliteFour_1_1 - - .align 2 -TilesetAnimTiles_MauvilleGym_0: @ 837D854 - .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_MauvilleGym_1: @ 837DA54 - .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" - - .space 32 - - .align 2 -gTilesetAnimTable_MauvilleGym:: @ 837DC74 - .4byte TilesetAnimTiles_MauvilleGym_0 - .4byte TilesetAnimTiles_MauvilleGym_1 - - .align 2 -TilesetAnimTiles_BikeShop_0: @ 837DC7C - .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" - - .align 2 -TilesetAnimTiles_BikeShop_1: @ 837DD9C - .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" - - .space 32 - - .align 2 -gTilesetAnimTable_BikeShop:: @ 837DEDC - .4byte TilesetAnimTiles_BikeShop_0 - .4byte TilesetAnimTiles_BikeShop_1 - - .align 2 -gDummyPaletteStructTemplate:: @ 837DEE4 - .2byte 0xFFFF - .space 9 - .byte 0x20 - .space 4 - - .align 2 -gFanfares:: @ 837DEF4 - .2byte BGM_FANFA1, 80 - .2byte BGM_FANFA4, 160 - .2byte BGM_FANFA5, 220 - .2byte BGM_ME_WAZA, 220 - .2byte BGM_ME_ASA, 160 - .2byte BGM_ME_BACHI, 340 - .2byte BGM_ME_WASURE, 180 - .2byte BGM_ME_KINOMI, 120 - .2byte BGM_ME_TAMA, 710 - .2byte BGM_ME_B_BIG, 250 - .2byte BGM_ME_B_SMALL, 150 - .2byte BGM_ME_ZANNEN, 160 - - .align 2 gOamData_837DF24:: @ 837DF24 .2byte 0x0000 .2byte 0x0000 @@ -23911,23 +22404,23 @@ gSystemText_LR:: @ 842C465 gSystemText_LA:: @ 842C46B .string "{PALETTE 15}L=A$" -SystemText_Pokedex: +SystemText_Pokedex:: .string "POKéDEX$" -SystemText_Pokemon: +SystemText_Pokemon:: .string "POKéMON$" -SystemText_BAG: +SystemText_BAG:: .string "BAG$" -SystemText_Pokenav: +SystemText_Pokenav:: .string "POKéNAV$" -SystemText_Player: +SystemText_Player:: .string "{PLAYER}$" -SystemText_Save: +SystemText_Save:: .string "SAVE$" -SystemText_Option: +SystemText_Option:: .string "OPTION$" -SystemText_Exit: +SystemText_Exit:: .string "EXIT$" -SystemText_Retire: @ safari zone? +SystemText_Retire:: @ safari zone? .string "RETIRE$" gOtherText_SafariStock:: @ 842C4A9 diff --git a/data/field_tasks.s b/data/field_tasks.s new file mode 100644 index 000000000..d7de1fe16 --- /dev/null +++ b/data/field_tasks.s @@ -0,0 +1,31 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 +gUnknown_08376364:: @ 8376364 + .4byte DummyPerStepCallback + .4byte PerStepCallback_8069F64 + .4byte PerStepCallback_8069AA0 + .4byte PerStepCallback_8069864 + .4byte PerStepCallback_8069DD4 + .4byte EndTruckSequence + .4byte sub_80BCF1C + .4byte PerStepCallback_806A07C + +gUnknown_08376384:: @ 8376384 + .incbin "baserom.gba", 0x00376384, 0x20 + +gUnknown_083763A4:: @ 83763A4 + .incbin "baserom.gba", 0x003763a4, 0x20 + +gUnknown_083763C4:: @ 83763C4 + .incbin "baserom.gba", 0x003763c4, 0x20 + +gUnknown_083763E4:: @ 83763E4 + .incbin "baserom.gba", 0x003763e4, 0x34 + + .align 1 +gUnknown_08376418:: @ 8376418 + .2byte 0xE8, 0xEB, 0xEA, 0xE9 diff --git a/data/party_menu.s b/data/party_menu.s new file mode 100644 index 000000000..5596ff2ed --- /dev/null +++ b/data/party_menu.s @@ -0,0 +1,744 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 1 +gUnknown_08376504:: @ 8376504 + .2byte MOVE_FOCUS_PUNCH + .2byte MOVE_DRAGON_CLAW + .2byte MOVE_WATER_PULSE + .2byte MOVE_CALM_MIND + .2byte MOVE_ROAR + .2byte MOVE_TOXIC + .2byte MOVE_HAIL + .2byte MOVE_BULK_UP + .2byte MOVE_BULLET_SEED + .2byte MOVE_HIDDEN_POWER + .2byte MOVE_SUNNY_DAY + .2byte MOVE_TAUNT + .2byte MOVE_ICE_BEAM + .2byte MOVE_BLIZZARD + .2byte MOVE_HYPER_BEAM + .2byte MOVE_LIGHT_SCREEN + .2byte MOVE_PROTECT + .2byte MOVE_RAIN_DANCE + .2byte MOVE_GIGA_DRAIN + .2byte MOVE_SAFEGUARD + .2byte MOVE_FRUSTRATION + .2byte MOVE_SOLAR_BEAM + .2byte MOVE_IRON_TAIL + .2byte MOVE_THUNDERBOLT + .2byte MOVE_THUNDER + .2byte MOVE_EARTHQUAKE + .2byte MOVE_RETURN + .2byte MOVE_DIG + .2byte MOVE_PSYCHIC + .2byte MOVE_SHADOW_BALL + .2byte MOVE_BRICK_BREAK + .2byte MOVE_DOUBLE_TEAM + .2byte MOVE_REFLECT + .2byte MOVE_SHOCK_WAVE + .2byte MOVE_FLAMETHROWER + .2byte MOVE_SLUDGE_BOMB + .2byte MOVE_SANDSTORM + .2byte MOVE_FIRE_BLAST + .2byte MOVE_ROCK_TOMB + .2byte MOVE_AERIAL_ACE + .2byte MOVE_TORMENT + .2byte MOVE_FACADE + .2byte MOVE_SECRET_POWER + .2byte MOVE_REST + .2byte MOVE_ATTRACT + .2byte MOVE_THIEF + .2byte MOVE_STEEL_WING + .2byte MOVE_SKILL_SWAP + .2byte MOVE_SNATCH + .2byte MOVE_OVERHEAT + .2byte MOVE_CUT + .2byte MOVE_FLY + .2byte MOVE_SURF + .2byte MOVE_STRENGTH + .2byte MOVE_FLASH + .2byte MOVE_ROCK_SMASH + .2byte MOVE_WATERFALL + .2byte MOVE_DIVE + + .4byte gTileBuffer @ unreferenced? + +MenuGfx_HoldIcons: + .incbin "graphics/interface/hold_icons.4bpp" +MenuPal_HoldIcons: + .incbin "graphics/interface/hold_icons.gbapal" + + .align 2 +gUnknown_083765DC:: @ 83765DC + obj_tiles MenuGfx_HoldIcons, 64, 0xd750 + + .align 2 +gUnknown_083765E4:: @ 83765E4 + obj_pal MenuPal_HoldIcons, 0xd750 + + .align 2 +gOamData_83765EC:: @ 83765EC + .2byte 0x0000 + .2byte 0x0000 + .2byte 0x0400 + + .align 2 +gSpriteAnim_83765F4:: @ 83765F4 + obj_image_anim_frame 0, 1 + obj_image_anim_end + + .align 2 +gSpriteAnim_83765FC:: @ 83765FC + obj_image_anim_frame 1, 1 + obj_image_anim_end + + .align 2 +gSpriteAnimTable_8376604:: @ 8376604 + .4byte gSpriteAnim_83765F4 + .4byte gSpriteAnim_83765FC + + .align 2 +gSpriteTemplate_837660C:: @ 837660C + spr_template 55120, 55120, gOamData_83765EC, gSpriteAnimTable_8376604, NULL, gDummySpriteAffineAnimTable, SpriteCB_HeldItemIcon_806DD7C + + .align 2 +gUnknown_08376624:: @ 8376624 + .4byte OtherText_ChoosePoke + .4byte OtherText_MovePokeTo + .4byte OtherText_TeachWhat + .4byte OtherText_UseWhat + .4byte OtherText_GiveWhat + .4byte OtherText_DoWhat + .4byte OtherText_NothingToCut + .4byte OtherText_CantSurf + .4byte OtherText_AlreadySurfing + .4byte OtherText_CantUseThatHere + .4byte OtherText_RestoreWhatMove + .4byte OtherText_BoostPP + .4byte gOtherText_CancelWithTerminator + .4byte OtherText_DoWhatWithItem + .4byte OtherText_NoPokeForBattle + .4byte OtherText_ChoosePoke2 + .4byte OtherText_NotEnoughHP + .4byte OtherText_ThreePokeNeeded + .4byte OtherText_PokeCantBeSame + .4byte OtherText_NoIdenticalHoldItems + .4byte OtherText_TeachWhichPoke + + .align 2 +gUnknown_08376678:: @ 8376678 + .byte 16, 40, 0, 0 + .byte 104, 18, 0, 0 + .byte 104, 42, 0, 0 + .byte 104, 66, 0, 0 + .byte 104, 90, 0, 0 + .byte 104, 114, 0, 0 + .byte 16, 24, 0, 0 + .byte 16, 80, 0, 0 + .byte 104, 18, 0, 0 + .byte 104, 50, 0, 0 + .byte 104, 82, 0, 0 + .byte 104, 114, 0, 0 + .byte 16, 24, 0, 0 + .byte 16, 80, 0, 0 + .byte 104, 26, 0, 0 + .byte 104, 50, 0, 0 + .byte 104, 82, 0, 0 + .byte 104, 106, 0, 0 + .byte 16, 24, 0, 0 + .byte 104, 26, 0, 0 + .byte 104, 50, 0, 0 + .byte 16, 80, 0, 0 + .byte 104, 82, 0, 0 + .byte 104, 106, 0, 0 + .byte 5, 4, 0, 0 + .byte 16, 1, 0, 0 + .byte 16, 4, 0, 0 + .byte 16, 7, 0, 0 + .byte 16, 10, 0, 0 + .byte 16, 13, 0, 0 + .byte 5, 2, 0, 0 + .byte 5, 9, 0, 0 + .byte 16, 1, 0, 0 + .byte 16, 5, 0, 0 + .byte 16, 9, 0, 0 + .byte 16, 13, 0, 0 + .byte 5, 2, 0, 0 + .byte 5, 9, 0, 0 + .byte 16, 2, 0, 0 + .byte 16, 5, 0, 0 + .byte 16, 9, 0, 0 + .byte 16, 12, 0, 0 + .byte 5, 2, 0, 0 + .byte 16, 2, 0, 0 + .byte 16, 5, 0, 0 + .byte 5, 9, 0, 0 + .byte 16, 9, 0, 0 + .byte 16, 12, 0, 0 + + .align 2 +gUnknown_08376738:: @ 8376738 + .byte 6, 5, 0, 0 + .byte 17, 2, 0, 0 + .byte 17, 5, 0, 0 + .byte 17, 8, 0, 0 + .byte 17, 11, 0, 0 + .byte 17, 14, 0, 0 + .byte 6, 3, 0, 0 + .byte 6, 10, 0, 0 + .byte 17, 2, 0, 0 + .byte 17, 6, 0, 0 + .byte 17, 10, 0, 0 + .byte 17, 14, 0, 0 + .byte 6, 3, 0, 0 + .byte 6, 10, 0, 0 + .byte 17, 3, 0, 0 + .byte 17, 6, 0, 0 + .byte 17, 10, 0, 0 + .byte 17, 13, 0, 0 + .byte 6, 3, 0, 0 + .byte 17, 3, 0, 0 + .byte 17, 6, 0, 0 + .byte 6, 10, 0, 0 + .byte 17, 10, 0, 0 + .byte 17, 13, 0, 0 + .byte 3, 7, 0, 0 + .byte 22, 2, 0, 0 + .byte 22, 5, 0, 0 + .byte 22, 8, 0, 0 + .byte 22, 11, 0, 0 + .byte 22, 14, 0, 0 + .byte 3, 5, 0, 0 + .byte 3, 12, 0, 0 + .byte 22, 2, 0, 0 + .byte 22, 6, 0, 0 + .byte 22, 10, 0, 0 + .byte 22, 14, 0, 0 + .byte 3, 5, 0, 0 + .byte 3, 12, 0, 0 + .byte 22, 3, 0, 0 + .byte 22, 6, 0, 0 + .byte 22, 10, 0, 0 + .byte 22, 13, 0, 0 + .byte 3, 5, 0, 0 + .byte 22, 3, 0, 0 + .byte 22, 6, 0, 0 + .byte 3, 12, 0, 0 + .byte 22, 10, 0, 0 + .byte 22, 13, 0, 0 + .byte 7, 7, 0, 0 + .byte 26, 2, 0, 0 + .byte 26, 5, 0, 0 + .byte 26, 8, 0, 0 + .byte 26, 11, 0, 0 + .byte 26, 14, 0, 0 + .byte 7, 5, 0, 0 + .byte 7, 12, 0, 0 + .byte 26, 2, 0, 0 + .byte 26, 6, 0, 0 + .byte 26, 10, 0, 0 + .byte 26, 14, 0, 0 + .byte 7, 5, 0, 0 + .byte 7, 12, 0, 0 + .byte 26, 3, 0, 0 + .byte 26, 6, 0, 0 + .byte 26, 10, 0, 0 + .byte 26, 13, 0, 0 + .byte 7, 5, 0, 0 + .byte 26, 3, 0, 0 + .byte 26, 6, 0, 0 + .byte 7, 12, 0, 0 + .byte 26, 10, 0, 0 + .byte 26, 13, 0, 0 + + .align 2 +gUnknown_08376858:: @ 8376858 + .4byte BG_VRAM + 0xF1C8 + .4byte BG_VRAM + 0xF0AE + .4byte BG_VRAM + 0xF16E + .4byte BG_VRAM + 0xF22E + .4byte BG_VRAM + 0xF2EE + .4byte BG_VRAM + 0xF3AE + .4byte BG_VRAM + 0xF148 + .4byte BG_VRAM + 0xF308 + .4byte BG_VRAM + 0xF0AE + .4byte BG_VRAM + 0xF1AE + .4byte BG_VRAM + 0xF2AE + .4byte BG_VRAM + 0xF3AE + .4byte BG_VRAM + 0xF148 + .4byte BG_VRAM + 0xF308 + .4byte BG_VRAM + 0xF0EE + .4byte BG_VRAM + 0xF1AE + .4byte BG_VRAM + 0xF2AE + .4byte BG_VRAM + 0xF36E + .4byte BG_VRAM + 0xF148 + .4byte BG_VRAM + 0xF0EE + .4byte BG_VRAM + 0xF1AE + .4byte BG_VRAM + 0xF308 + .4byte BG_VRAM + 0xF2AE + .4byte BG_VRAM + 0xF36E + + .align 2 +gUnknown_083768B8:: @ 83768B8 + .byte 8, 44, 0, 0 + .byte 92, 22, 0, 0 + .byte 92, 46, 0, 0 + .byte 92, 70, 0, 0 + .byte 92, 94, 0, 0 + .byte 92, 118, 0, 0 + .byte 196, 136, 0, 0 + .byte 196, 152, 0, 0 + .byte 8, 28, 0, 0 + .byte 8, 84, 0, 0 + .byte 92, 22, 0, 0 + .byte 92, 54, 0, 0 + .byte 92, 86, 0, 0 + .byte 92, 118, 0, 0 + .byte 196, 136, 0, 0 + .byte 196, 152, 0, 0 + .byte 8, 28, 0, 0 + .byte 8, 84, 0, 0 + .byte 92, 30, 0, 0 + .byte 92, 54, 0, 0 + .byte 92, 86, 0, 0 + .byte 92, 110, 0, 0 + .byte 196, 136, 0, 0 + .byte 196, 152, 0, 0 + + .align 2 +gUnknown_08376918:: @ 8376918 + .4byte BG_VRAM + 0xF1C6 + .4byte BG_VRAM + 0xF06C + .4byte BG_VRAM + 0xF12C + .4byte BG_VRAM + 0xF1EC + .4byte BG_VRAM + 0xF2AC + .4byte BG_VRAM + 0xF36C + .4byte BG_VRAM + 0xF148 + .4byte BG_VRAM + 0xF308 + .4byte BG_VRAM + 0xF0AE + .4byte BG_VRAM + 0xF1AE + .4byte BG_VRAM + 0xF2AE + .4byte BG_VRAM + 0xF3AE + + .align 2 +gUnknown_08376948:: @ 8376948 + .byte 2, 4, 10, 9 + .byte 16, 1, 29, 3 + .byte 16, 4, 29, 6 + .byte 16, 7, 29, 9 + .byte 16, 10, 29, 12 + .byte 16, 13, 29, 15 + .byte 2, 2, 10, 7 + .byte 2, 9, 10, 14 + .byte 16, 1, 29, 3 + .byte 16, 5, 29, 7 + .byte 16, 9, 29, 11 + .byte 16, 13, 29, 15 + + .align 2 +gUnknown_08376978:: @ 8376978 + .byte 2, 7, 10, 9 + .byte 21, 1, 29, 3 + .byte 21, 4, 29, 6 + .byte 21, 7, 29, 9 + .byte 21, 10, 29, 12 + .byte 21, 13, 29, 15 + .byte 2, 2, 10, 7 + .byte 2, 9, 10, 14 + .byte 16, 1, 29, 3 + .byte 16, 5, 29, 7 + .byte 16, 9, 29, 11 + .byte 16, 13, 29, 15 + + .align 2 +gUnknown_083769A8:: @ 83769A8 + .byte 0, 3, 11, 1, 11, 4, 11, 7, 11, 10, 11, 13 + .byte 0, 1, 0, 8, 11, 1, 11, 5, 11, 9, 11, 13 + + .align 2 +gUnknown_083769C0:: @ 83769C0 + .byte 0, 1 + .byte 0, 8 + .byte 11, 2 + .byte 11, 5 + .byte 11, 9 + .byte 11, 12 + .byte 0, 1 + .byte 0, 8 + .byte 11, 2 + .byte 11, 5 + .byte 11, 9 + .byte 11, 12 + +gUnknown_083769D8:: @ 83769D8 + .byte 0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x27 + .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 + .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 + .byte 0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x37 + .byte 0x44,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x47 + .byte 0x44,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x47 + .byte 0x54,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x57 + +gUnknown_08376A25:: @ 8376A25 + .byte 0x50,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x53 + .byte 0x60,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x63 + .byte 0x70,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x73 + +gUnknown_08376A5E:: @ 8376A5E + .byte 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x23 + .byte 0x30,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x33 + .byte 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x43 + +@ unknown, unreferenced data + .byte 0x0C + .byte 0x0D + .byte 0x0E + .byte 0x0F + .byte 0x00 + .byte 0x01 + .byte 0x02 + .byte 0x03 + .byte 0x04 + .byte 0x05 + .byte 0x0F + .byte 0x10 + .byte 0x11 + .byte 0x12 + .byte 0x13 + .byte 0x14 + .byte 0x15 + .byte 0x0F + .byte 0x06 + .byte 0x05 + .byte 0x01 + .byte 0x07 + .byte 0x08 + .byte 0x09 + .byte 0x0F + .byte 0x16 + .byte 0x15 + .byte 0x11 + .byte 0x17 + .byte 0x18 + .byte 0x19 + .byte 0x0F + .byte 0x09 + .byte 0x0A + .byte 0x0B + .byte 0x05 + .byte 0x0C + .byte 0x0F + .byte 0x0F + .byte 0x19 + .byte 0x1A + .byte 0x1B + .byte 0x15 + .byte 0x1C + .byte 0x0F + .byte 0x0F + .byte 0x0D + .byte 0x0B + .byte 0x05 + .byte 0x0C + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x1D + .byte 0x1B + .byte 0x15 + .byte 0x1C + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x06 + .byte 0x05 + .byte 0x0B + .byte 0x05 + .byte 0x0C + .byte 0x0F + .byte 0x0F + .byte 0x16 + .byte 0x15 + .byte 0x1B + .byte 0x15 + .byte 0x1C + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x20 + .byte 0x0C + .byte 0x09 + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x1F + .byte 0x30 + .byte 0x1C + .byte 0x19 + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x25 + .byte 0x0F + .byte 0x22 + .byte 0x24 + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x35 + .byte 0x41 + .byte 0x32 + .byte 0x34 + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x26 + .byte 0x0F + .byte 0x23 + .byte 0x0E + .byte 0x0F + .byte 0x0F + .byte 0x0F + .byte 0x36 + .byte 0x43 + .byte 0x33 + .byte 0x1E + .byte 0x0F + .byte 0x0F + .byte 0x27 + .byte 0x28 + .byte 0x29 + .byte 0x03 + .byte 0x2A + .byte 0x0F + .byte 0x0F + .byte 0x37 + .byte 0x38 + .byte 0x39 + .byte 0x13 + .byte 0x3A + .byte 0x0F + .byte 0x0F + .byte 0x27 + .byte 0x28 + .byte 0x29 + .byte 0x03 + .byte 0x04 + .byte 0x05 + .byte 0x0F + .byte 0x37 + .byte 0x38 + .byte 0x39 + .byte 0x13 + .byte 0x14 + .byte 0x15 + .byte 0x0F + .byte 0x2B + .byte 0x2C + .byte 0x02 + .byte 0x28 + .byte 0x29 + .byte 0x2D + .byte 0x21 + .byte 0x3B + .byte 0x3C + .byte 0x12 + .byte 0x38 + .byte 0x39 + .byte 0x3D + .byte 0x31 + .byte 0x2B + .byte 0x2C + .byte 0x02 + .byte 0x28 + .byte 0x29 + .byte 0x08 + .byte 0x09 + .byte 0x3B + .byte 0x3C + .byte 0x12 + .byte 0x38 + .byte 0x39 + .byte 0x18 + .byte 0x19 + .byte 0x2E + .byte 0x2F + .byte 0x2B + .byte 0x2C + .byte 0x02 + .byte 0x27 + .byte 0x2D + .byte 0x3E + .byte 0x3F + .byte 0x3B + .byte 0x3C + .byte 0x12 + .byte 0x45 + .byte 0x3D + + .align 2 +gUnknown_08376B54:: @ 8376B54 + .4byte ItemUseMoveMenu_HandleMoveSelection + .4byte ItemUseMoveMenu_HandleCancel + + .align 1 +Unknown_08376B5C: + .2byte 0x4000, 0x4018, 0xF400 + .2byte 0x4000, 0x4038, 0xF404 + .2byte 0x4008, 0x4018, 0xF408 + .2byte 0x4008, 0x4038, 0xF40C + .2byte 0x4010, 0x4020, 0xF410 + .2byte 0x4020, 0x4025, 0xF418 + .2byte 0x4020, 0x4045, 0xF41C + .2byte -1 + + .align 1 +Unknown_08376B88: + .2byte 0x4000, 0x4018, 0xF400 + .2byte 0x4000, 0x4038, 0xF404 + .2byte 0x4008, 0x4018, 0xF408 + .2byte 0x4008, 0x4038, 0xF40C + .2byte 0x4010, 0x4020, 0xF410 + .2byte 0x4010, 0x4065, 0xF418 + .2byte 0x4010, 0x4085, 0xF41C + .2byte -1 + + .align 2 +gUnknown_08376BB4:: @ 8376BB4 + .byte 0x1, 0x4 + .space 2 + .4byte Unknown_08376B5C + + .byte 0xC, 0x1 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x4 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x7 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0xA + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0xD + .space 2 + .4byte Unknown_08376B88 + + .byte 0x1, 0x2 + .space 2 + .4byte Unknown_08376B5C + + .byte 0x1, 0x9 + .space 2 + .4byte Unknown_08376B5C + + .byte 0xC, 0x1 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x5 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x9 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0xD + .space 2 + .4byte Unknown_08376B88 + + .byte 0x1, 0x2 + .space 2 + .4byte Unknown_08376B5C + + .byte 0x1, 0x9 + .space 2 + .4byte Unknown_08376B5C + + .byte 0xC, 0x2 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x5 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x9 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0xC + .space 2 + .4byte Unknown_08376B88 + + .byte 0x1, 0x2 + .space 2 + .4byte Unknown_08376B5C + + .byte 0xC, 0x2 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0x5 + .space 2 + .4byte Unknown_08376B88 + + .byte 0x1, 0x9 + .space 2 + .4byte Unknown_08376B5C + + .byte 0xC, 0x9 + .space 2 + .4byte Unknown_08376B88 + + .byte 0xC, 0xC + .space 2 + .4byte Unknown_08376B88 + + .align 2 +gUnknown_08376C74:: @ 8376C74 + .4byte sub_8089CD4, sub_806AFD0, 0 + .4byte SetUpBattlePokemonMenu, SetUpBattlePartyMenu, 0 + .4byte sub_80F9C6C, sub_80F9ACC, 0 + .4byte sub_80F9C6C, sub_806AFD0, 0 + .4byte sub_81222B0, sub_8121E78, 0 + .4byte sub_8122A48, sub_8122854, 0xFF + .4byte sub_8122E0C, sub_806AFD0, 0x0F + .4byte sub_80F9E64, sub_80F9CE8, 0 + + .align 2 +gUnknown_08376CD4:: @ 8376CD4 + .2byte 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F + .2byte 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F + + .align 2 +gUnknown_08376CEC:: @ 8376CEC + .2byte 0x2A, 0x0B, 0x0C, 0x0D, 0x0E, 0x2F + .2byte 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F + + .align 2 +gUnknown_08376D04:: @ 8376D04 + .4byte gOtherText_HP + .4byte gOtherText_Attack + .4byte gOtherText_Defense + .4byte gOtherText_SpAtk + .4byte gOtherText_SpDef + .4byte gOtherText_Speed + +gUnknown_08376D1C:: @ 8376D1C + .byte 0x3A @ HP + .byte 0x3B @ Attack + .byte 0x3C @ Defense + .byte 0x3E @ Sp. Attack + .byte 0x3F @ Sp. Defense + .byte 0x3D @ Speed diff --git a/data/reset_rtc_screen.s b/data/reset_rtc_screen.s new file mode 100644 index 000000000..a50f5c07b --- /dev/null +++ b/data/reset_rtc_screen.s @@ -0,0 +1,63 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 +gUnknown_08376420:: @ 8376420 + .incbin "baserom.gba", 0x00376420, 0x3C + + .align 2 +gOamData_837645C:: @ 837645C + .2byte 0x0000 + .2byte 0x0000 + .2byte 0x0000 + + .align 2 +gSpriteImage_8376464:: @ 8376464 + .incbin "graphics/unknown_sprites/83764AC/0.4bpp" + + .align 2 +gSpriteImage_8376484:: @ 8376484 + .incbin "graphics/unknown_sprites/83764AC/1.4bpp" + + .align 2 +Palette_3764A4: @ 83764A4 + .incbin "baserom.gba", 0x3764a4, 0x8 + + .align 2 +gSpriteImageTable_83764AC:: @ 83764AC + obj_frame_tiles gSpriteImage_8376464, 0x20 + obj_frame_tiles gSpriteImage_8376484, 0x20 + + .align 2 +gUnknown_083764BC:: @ 83764BC + obj_pal Palette_3764A4, 0x1000 + + .align 2 +gSpriteAnim_83764C4:: @ 83764C4 + obj_image_anim_frame 0, 30 + obj_image_anim_jump 0 + + .align 2 +gSpriteAnim_83764CC:: @ 83764CC + obj_image_anim_frame 0, 30, OBJ_IMAGE_ANIM_V_FLIP + obj_image_anim_jump 0 + + .align 2 +gSpriteAnim_83764D4:: @ 83764D4 + obj_image_anim_frame 1, 30 + obj_image_anim_jump 0 + + .align 2 +gSpriteAnimTable_83764DC:: @ 83764DC + .4byte gSpriteAnim_83764C4 + .4byte gSpriteAnim_83764CC + .4byte gSpriteAnim_83764D4 + + .align 2 +gSpriteTemplate_83764E8:: @ 83764E8 + spr_template 0xFFFF, 0x1000, gOamData_837645C, gSpriteAnimTable_83764DC, gSpriteImageTable_83764AC, gDummySpriteAffineAnimTable, SpriteCallbackDummy + +gUnknown_08376500:: @ 8376500 + .string " : $" diff --git a/data/specials.inc b/data/specials.inc index 832d50138..5d9f2e084 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -154,7 +154,7 @@ gSpecials:: .4byte CableCarWarp .4byte sub_8123218 .4byte sub_8053E90 - .4byte sub_806A460 + .4byte StartWallClock .4byte sub_810D6B8 .4byte ChooseStarter .4byte StartBattle_WallyTutorial diff --git a/data/tileset_anim.s b/data/tileset_anim.s new file mode 100644 index 000000000..e34d50953 --- /dev/null +++ b/data/tileset_anim.s @@ -0,0 +1,637 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 +TilesetAnimTiles_General_0_1: @ 8376D84 + .incbin "data/tilesets/primary/general/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_General_0_0: @ 8376E04 + .incbin "data/tilesets/primary/general/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_General_0_2: @ 8376E84 + .incbin "data/tilesets/primary/general/anim/0/2.4bpp" + + .space 32 + + .align 2 +gTilesetAnimTable_General_0:: @ 8376F24 + .4byte TilesetAnimTiles_General_0_0 + .4byte TilesetAnimTiles_General_0_1 + .4byte TilesetAnimTiles_General_0_0 + .4byte TilesetAnimTiles_General_0_2 + + .align 2 +TilesetAnimTiles_General_1_0: @ 8376F34 + .incbin "data/tilesets/primary/general/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_General_1_1: @ 83772F4 + .incbin "data/tilesets/primary/general/anim/1/1.4bpp" + + .align 2 +TilesetAnimTiles_General_1_2: @ 83776B4 + .incbin "data/tilesets/primary/general/anim/1/2.4bpp" + + .align 2 +TilesetAnimTiles_General_1_3: @ 8377A74 + .incbin "data/tilesets/primary/general/anim/1/3.4bpp" + + .align 2 +TilesetAnimTiles_General_1_4: @ 8377E34 + .incbin "data/tilesets/primary/general/anim/1/4.4bpp" + + .align 2 +TilesetAnimTiles_General_1_5: @ 83781F4 + .incbin "data/tilesets/primary/general/anim/1/5.4bpp" + + .align 2 +TilesetAnimTiles_General_1_6: @ 83785B4 + .incbin "data/tilesets/primary/general/anim/1/6.4bpp" + + .align 2 +TilesetAnimTiles_General_1_7: @ 8378974 + .incbin "data/tilesets/primary/general/anim/1/7.4bpp" + + .align 2 +gTilesetAnimTable_General_1:: @ 8378D34 + .4byte TilesetAnimTiles_General_1_0 + .4byte TilesetAnimTiles_General_1_1 + .4byte TilesetAnimTiles_General_1_2 + .4byte TilesetAnimTiles_General_1_3 + .4byte TilesetAnimTiles_General_1_4 + .4byte TilesetAnimTiles_General_1_5 + .4byte TilesetAnimTiles_General_1_6 + .4byte TilesetAnimTiles_General_1_7 + + .align 2 +TilesetAnimTiles_General_2_0: @ 8378D54 + .incbin "data/tilesets/primary/general/anim/2/0.4bpp" + + .align 2 +TilesetAnimTiles_General_2_1: @ 8378E94 + .incbin "data/tilesets/primary/general/anim/2/1.4bpp" + + .align 2 +TilesetAnimTiles_General_2_2: @ 8378FD4 + .incbin "data/tilesets/primary/general/anim/2/2.4bpp" + + .align 2 +TilesetAnimTiles_General_2_3: @ 8379114 + .incbin "data/tilesets/primary/general/anim/2/3.4bpp" + + .align 2 +TilesetAnimTiles_General_2_4: @ 8379254 + .incbin "data/tilesets/primary/general/anim/2/4.4bpp" + + .align 2 +TilesetAnimTiles_General_2_5: @ 8379394 + .incbin "data/tilesets/primary/general/anim/2/5.4bpp" + + .align 2 +TilesetAnimTiles_General_2_6: @ 83794D4 + .incbin "data/tilesets/primary/general/anim/2/6.4bpp" + + .align 2 +gTilesetAnimTable_General_2:: @ 8379614 + .4byte TilesetAnimTiles_General_2_0 + .4byte TilesetAnimTiles_General_2_1 + .4byte TilesetAnimTiles_General_2_2 + .4byte TilesetAnimTiles_General_2_3 + .4byte TilesetAnimTiles_General_2_4 + .4byte TilesetAnimTiles_General_2_5 + .4byte TilesetAnimTiles_General_2_6 + .4byte TilesetAnimTiles_General_2_0 + + .align 2 +TilesetAnimTiles_General_3_0: @ 8379634 + .incbin "data/tilesets/primary/general/anim/3/0.4bpp" + + .align 2 +TilesetAnimTiles_General_3_1: @ 83796F4 + .incbin "data/tilesets/primary/general/anim/3/1.4bpp" + + .align 2 +TilesetAnimTiles_General_3_2: @ 83797B4 + .incbin "data/tilesets/primary/general/anim/3/2.4bpp" + + .align 2 +TilesetAnimTiles_General_3_3: @ 8379874 + .incbin "data/tilesets/primary/general/anim/3/3.4bpp" + + .align 2 +gTilesetAnimTable_General_3:: @ 8379934 + .4byte TilesetAnimTiles_General_3_0 + .4byte TilesetAnimTiles_General_3_1 + .4byte TilesetAnimTiles_General_3_2 + .4byte TilesetAnimTiles_General_3_3 + + .align 2 +TilesetAnimTiles_General_4_0: @ 8379944 + .incbin "data/tilesets/primary/general/anim/4/0.4bpp" + + .align 2 +TilesetAnimTiles_General_4_1: @ 8379A84 + .incbin "data/tilesets/primary/general/anim/4/1.4bpp" + + .align 2 +TilesetAnimTiles_General_4_2: @ 8379BC4 + .incbin "data/tilesets/primary/general/anim/4/2.4bpp" + + .align 2 +TilesetAnimTiles_General_4_3: @ 8379D04 + .incbin "data/tilesets/primary/general/anim/4/3.4bpp" + + .align 2 +gTilesetAnimTable_General_4:: @ 8379E44 + .4byte TilesetAnimTiles_General_4_0 + .4byte TilesetAnimTiles_General_4_1 + .4byte TilesetAnimTiles_General_4_2 + .4byte TilesetAnimTiles_General_4_3 + + .align 2 +TilesetAnimTiles_Lavaridge_0: @ 8379E54 + .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_Lavaridge_1: @ 8379ED4 + .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" + + .align 2 +TilesetAnimTiles_Lavaridge_2: @ 8379F54 + .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" + + .align 2 +TilesetAnimTiles_Lavaridge_3: @ 8379FD4 + .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" + + .align 2 +gTilesetAnimTable_Lavaridge:: @ 837A054 + .4byte TilesetAnimTiles_Lavaridge_0 + .4byte TilesetAnimTiles_Lavaridge_1 + .4byte TilesetAnimTiles_Lavaridge_2 + .4byte TilesetAnimTiles_Lavaridge_3 + + .align 2 +TilesetAnimTiles_Pacifidlog_0_0: @ 837A064 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_0_1: @ 837A424 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_0_2: @ 837A7E4 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" + + .align 2 +gTilesetAnimTable_Pacifidlog_0:: @ 837ABA4 + .4byte TilesetAnimTiles_Pacifidlog_0_0 + .4byte TilesetAnimTiles_Pacifidlog_0_1 + .4byte TilesetAnimTiles_Pacifidlog_0_2 + .4byte TilesetAnimTiles_Pacifidlog_0_1 + + .align 2 +TilesetAnimTiles_Underwater_0: @ 837ABB4 + .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_Underwater_1: @ 837AC34 + .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" + + .align 2 +TilesetAnimTiles_Underwater_2: @ 837ACB4 + .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" + + .align 2 +TilesetAnimTiles_Underwater_3: @ 837AD34 + .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" + + .align 2 +gTilesetAnimTable_Underwater:: @ 837ADB4 + .4byte TilesetAnimTiles_Underwater_0 + .4byte TilesetAnimTiles_Underwater_1 + .4byte TilesetAnimTiles_Underwater_2 + .4byte TilesetAnimTiles_Underwater_3 + + .align 2 +TilesetAnimTiles_Pacifidlog_1_0: @ 837ADC4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_1: @ 837AEC4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_2: @ 837AFC4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_3: @ 837B0C4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_4: @ 837B1C4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_5: @ 837B2C4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_6: @ 837B3C4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" + + .align 2 +TilesetAnimTiles_Pacifidlog_1_7: @ 837B4C4 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" + + .align 2 +gTilesetAnimTable_Pacifidlog_1:: @ 837B5C4 + .4byte TilesetAnimTiles_Pacifidlog_1_0 + .4byte TilesetAnimTiles_Pacifidlog_1_1 + .4byte TilesetAnimTiles_Pacifidlog_1_2 + .4byte TilesetAnimTiles_Pacifidlog_1_3 + .4byte TilesetAnimTiles_Pacifidlog_1_4 + .4byte TilesetAnimTiles_Pacifidlog_1_5 + .4byte TilesetAnimTiles_Pacifidlog_1_6 + .4byte TilesetAnimTiles_Pacifidlog_1_7 + + .align 2 +TilesetAnimTiles_Mauville_0_0: @ 837B5E4 + .incbin "data/tilesets/secondary/mauville/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_0_1: @ 837B664 + .incbin "data/tilesets/secondary/mauville/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_0_2: @ 837B6E4 + .incbin "data/tilesets/secondary/mauville/anim/0/2.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_0_3: @ 837B764 + .incbin "data/tilesets/secondary/mauville/anim/0/3.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_0_4: @ 837B7E4 + .incbin "data/tilesets/secondary/mauville/anim/0/4.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_1_0: @ 837B864 + .incbin "data/tilesets/secondary/mauville/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_1_1: @ 837B8E4 + .incbin "data/tilesets/secondary/mauville/anim/1/1.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_1_2: @ 837B964 + .incbin "data/tilesets/secondary/mauville/anim/1/2.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_1_3: @ 837B9E4 + .incbin "data/tilesets/secondary/mauville/anim/1/3.4bpp" + + .align 2 +TilesetAnimTiles_Mauville_1_4: @ 837BA64 + .incbin "data/tilesets/secondary/mauville/anim/1/4.4bpp" + + .align 2 +gUnknown_0837BAE4:: @ 837BAE4 + .4byte 0x06004C00 + .4byte 0x06004C80 + .4byte 0x06004D00 + .4byte 0x06004D80 + .4byte 0x06004E00 + .4byte 0x06004E80 + .4byte 0x06004F00 + .4byte 0x06004F80 + + .align 2 +gUnknown_0837BB04:: @ 837BB04 + .4byte 0x06005000 + .4byte 0x06005080 + .4byte 0x06005100 + .4byte 0x06005180 + .4byte 0x06005200 + .4byte 0x06005280 + .4byte 0x06005300 + .4byte 0x06005380 + + .align 2 +gTilesetAnimTable_Mauville_0A:: @ 837BB24 + .4byte TilesetAnimTiles_Mauville_0_0 + .4byte TilesetAnimTiles_Mauville_0_0 + .4byte TilesetAnimTiles_Mauville_0_1 + .4byte TilesetAnimTiles_Mauville_0_2 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_3 + .4byte TilesetAnimTiles_Mauville_0_2 + .4byte TilesetAnimTiles_Mauville_0_1 + + .align 2 +gTilesetAnimTable_Mauville_1A:: @ 837BB54 + .4byte TilesetAnimTiles_Mauville_1_0 + .4byte TilesetAnimTiles_Mauville_1_0 + .4byte TilesetAnimTiles_Mauville_1_1 + .4byte TilesetAnimTiles_Mauville_1_2 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_3 + .4byte TilesetAnimTiles_Mauville_1_2 + .4byte TilesetAnimTiles_Mauville_1_1 + + .align 2 +gTilesetAnimTable_Mauville_0B:: @ 837BB84 + .4byte TilesetAnimTiles_Mauville_0_0 + .4byte TilesetAnimTiles_Mauville_0_0 + .4byte TilesetAnimTiles_Mauville_0_4 + .4byte TilesetAnimTiles_Mauville_0_4 + + .align 2 +gTilesetAnimTable_Mauville_1B:: @ 837BB94 + .4byte TilesetAnimTiles_Mauville_1_0 + .4byte TilesetAnimTiles_Mauville_1_0 + .4byte TilesetAnimTiles_Mauville_1_4 + .4byte TilesetAnimTiles_Mauville_1_4 + + .align 2 +TilesetAnimTiles_Rustboro_0_0: @ 837BBA4 + .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_1: @ 837BC24 + .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_2: @ 837BCA4 + .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_3: @ 837BD24 + .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_4: @ 837BDA4 + .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_5: @ 837BE24 + .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_6: @ 837BEA4 + .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_0_7: @ 837BF24 + .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" + + .align 2 +gUnknown_0837BFA4:: @ 837BFA4 + .4byte 0x06005000 + .4byte 0x06005080 + .4byte 0x06005100 + .4byte 0x06005180 + .4byte 0x06005200 + .4byte 0x06005280 + .4byte 0x06005300 + .4byte 0x06005380 + + .align 2 +gTilesetAnimTable_Rustboro_0:: @ 837BFC4 + .4byte TilesetAnimTiles_Rustboro_0_0 + .4byte TilesetAnimTiles_Rustboro_0_1 + .4byte TilesetAnimTiles_Rustboro_0_2 + .4byte TilesetAnimTiles_Rustboro_0_3 + .4byte TilesetAnimTiles_Rustboro_0_4 + .4byte TilesetAnimTiles_Rustboro_0_5 + .4byte TilesetAnimTiles_Rustboro_0_6 + .4byte TilesetAnimTiles_Rustboro_0_7 + + .align 2 +TilesetAnimTiles_Rustboro_1_0: @ 837BFE4 + .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_Rustboro_1_1: @ 837C064 + .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" + + .align 2 +gTilesetAnimTable_Rustboro_1:: @ 837C0E4 + .4byte TilesetAnimTiles_Rustboro_1_0 + .4byte TilesetAnimTiles_Rustboro_1_1 + + .align 2 +TilesetAnimTiles_Cave_0: @ 837C0EC + .incbin "data/tilesets/secondary/cave/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_Cave_1: @ 837C16C + .incbin "data/tilesets/secondary/cave/anim/1.4bpp" + + .align 2 +TilesetAnimTiles_Cave_2: @ 837C1EC + .incbin "data/tilesets/secondary/cave/anim/2.4bpp" + + .align 2 +TilesetAnimTiles_Cave_3: @ 837C26C + .incbin "data/tilesets/secondary/cave/anim/3.4bpp" + + .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" + .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" + .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" + .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" + + .space 32 + + .align 2 +gTilesetAnimTable_Cave:: @ 837C50C + .4byte TilesetAnimTiles_Cave_0 + .4byte TilesetAnimTiles_Cave_1 + .4byte TilesetAnimTiles_Cave_2 + .4byte TilesetAnimTiles_Cave_3 + + .align 2 +TilesetAnimTiles_EverGrande_0: @ 837C51C + .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_1: @ 837C59C + .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_2: @ 837C61C + .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_3: @ 837C69C + .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_4: @ 837C71C + .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_5: @ 837C79C + .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_6: @ 837C81C + .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" + + .align 2 +TilesetAnimTiles_EverGrande_7: @ 837C89C + .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" + + .space 32 + + .align 2 +gUnknown_0837C93C:: @ 837C93C + .4byte 0x06005C00 + .4byte 0x06005C80 + .4byte 0x06005D00 + .4byte 0x06005D80 + .4byte 0x06005E00 + .4byte 0x06005E80 + .4byte 0x06005F00 + .4byte 0x06005F80 + + .align 2 +gTilesetAnimTable_EverGrande:: @ 837C95C + .4byte TilesetAnimTiles_EverGrande_0 + .4byte TilesetAnimTiles_EverGrande_1 + .4byte TilesetAnimTiles_EverGrande_2 + .4byte TilesetAnimTiles_EverGrande_3 + .4byte TilesetAnimTiles_EverGrande_4 + .4byte TilesetAnimTiles_EverGrande_5 + .4byte TilesetAnimTiles_EverGrande_6 + .4byte TilesetAnimTiles_EverGrande_7 + + .align 2 +TilesetAnimTiles_Building_0: @ 837C97C + .incbin "data/tilesets/primary/building/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_Building_1: @ 837C9FC + .incbin "data/tilesets/primary/building/anim/1.4bpp" + + .align 2 +gTilesetAnimTable_Building:: @ 837CA7C + .4byte TilesetAnimTiles_Building_0 + .4byte TilesetAnimTiles_Building_1 + + .align 2 +TilesetAnimTiles_SootopolisGym_0_0: @ 837CA84 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_SootopolisGym_0_1: @ 837CC04 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_SootopolisGym_0_2: @ 837CD84 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" + + .align 2 +TilesetAnimTiles_SootopolisGym_1_0: @ 837CF04 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_SootopolisGym_1_1: @ 837D184 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" + + .align 2 +TilesetAnimTiles_SootopolisGym_1_2: @ 837D404 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" + + .align 2 +gTilesetAnimTable_SootopolisGym_0:: @ 837D684 + .4byte TilesetAnimTiles_SootopolisGym_0_0 + .4byte TilesetAnimTiles_SootopolisGym_0_1 + .4byte TilesetAnimTiles_SootopolisGym_0_2 + + .align 2 +gTilesetAnimTable_SootopolisGym_1:: @ 837D690 + .4byte TilesetAnimTiles_SootopolisGym_1_0 + .4byte TilesetAnimTiles_SootopolisGym_1_1 + .4byte TilesetAnimTiles_SootopolisGym_1_2 + + .align 2 +TilesetAnimTiles_EliteFour_1_0: @ 837D69C + .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" + + .align 2 +TilesetAnimTiles_EliteFour_1_1: @ 837D71C + .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" + + .align 2 +TilesetAnimTiles_EliteFour_0_0: @ 837D79C + .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" + + .align 2 +TilesetAnimTiles_EliteFour_0_1: @ 837D7BC + .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" + + .align 2 +TilesetAnimTiles_EliteFour_0_2: @ 837D7DC + .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" + + .align 2 +TilesetAnimTiles_EliteFour_0_3: @ 837D7FC + .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" + + .space 32 + + .align 2 +gTilesetAnimTable_EliteFour_0:: @ 837D83C + .4byte TilesetAnimTiles_EliteFour_0_0 + .4byte TilesetAnimTiles_EliteFour_0_1 + .4byte TilesetAnimTiles_EliteFour_0_2 + .4byte TilesetAnimTiles_EliteFour_0_3 + + .align 2 +gTilesetAnimTable_EliteFour_1:: @ 837D84C + .4byte TilesetAnimTiles_EliteFour_1_0 + .4byte TilesetAnimTiles_EliteFour_1_1 + + .align 2 +TilesetAnimTiles_MauvilleGym_0: @ 837D854 + .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_MauvilleGym_1: @ 837DA54 + .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" + + .space 32 + + .align 2 +gTilesetAnimTable_MauvilleGym:: @ 837DC74 + .4byte TilesetAnimTiles_MauvilleGym_0 + .4byte TilesetAnimTiles_MauvilleGym_1 + + .align 2 +TilesetAnimTiles_BikeShop_0: @ 837DC7C + .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" + + .align 2 +TilesetAnimTiles_BikeShop_1: @ 837DD9C + .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" + + .space 32 + + .align 2 +gTilesetAnimTable_BikeShop:: @ 837DEDC + .4byte TilesetAnimTiles_BikeShop_0 + .4byte TilesetAnimTiles_BikeShop_1 diff --git a/include/asm.inc.h b/include/asm.inc.h index 0e45c3174..18127f136 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -9,15 +9,17 @@ u8 sub_8015A98(u8, u8, u8); u8 sub_8018324(u8, u8, u8, u8, u16); void sub_8032AA8(u8 index, int i); -// asm/rom_803D1FC.o +// src/pokemon_3.o u16 SpeciesToNationalPokedexNum(u16); + +// asm/pokemon_3.o void DrawSpindaSpots(u16, u32, void *, u8); u8 sub_803FC58(u16); void AdjustFriendship(struct Pokemon *, u8); void sub_80408BC(); void current_map_music_set__default_for_battle(u16); -// asm/rom_8040EB4.o +// asm/util.o void StoreWordInTwoHalfwords(u16 *, u32); void LoadWordFromTwoHalfwords(u16 *, u32 *); @@ -30,7 +32,7 @@ void sub_8041940(void); void sub_8041950(void); u8 daycare_relationship_score_from_savegame(void); -// asm/rom_804373C.o +// asm/pokeball.o void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u16 s4); // asm/berry_blender.o @@ -134,7 +136,7 @@ u8 ZCoordToPriority(u8); void FieldObjectUpdateZCoord(struct MapObject *pObject); void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); -// src/map_obj_80643A4.o +// src/field_map_obj_helpers.o bool8 FreezeMapObject(struct MapObject *); void FreezeMapObjects(void); void FreezeMapObjectsExceptOne(u8); @@ -142,7 +144,7 @@ void UnfreezeMapObjects(void); void sub_806487C(struct Sprite *sprite, bool8 invisible); void sub_8064990(u8, u8); -// asm/rom_8065394.o +// asm/field_control_avatar.o void sub_8067EEC(struct UnkInputStruct *pStruct); void process_overworld_input(struct UnkInputStruct *pStruct, u16 keys, u16 heldKeys); int sub_8068024(struct UnkInputStruct *pStruct); @@ -152,23 +154,26 @@ void prev_quest_postbuffer_cursor_backup_reset(void); u8 *sub_8068E24(struct UnkStruct_8054FF8_Substruct *); u8 *GetFieldObjectScriptPointerForComparison(); -// asm/rom_806936C.o +// asm/field_tasks.o void SetUpFieldTasks(); void ActivatePerStepCallback(u8); void ResetFieldTasksArgs(void); + +// asm/clock.o void DoTimeBasedEvents(void); // asm/reset_rtc_screen.o void CB2_InitResetRtcScreen(void); -// asm/rom_806D7F8.o +// asm/party_menu.o void GetMonNickname(struct Pokemon *mon, u8 *nickname); bool8 pokemon_has_move(struct Pokemon *, u16); -// asm/rom_8074BAC.o +// asm/rom_8077ABC.o u8 battle_side_get_owner(u8); u8 battle_get_per_side_status(u8); u8 battle_get_side_with_given_state(u8); +bool8 IsDoubleBattle(); // asm/weather.o void SetWeather(u32); @@ -204,27 +209,41 @@ void objc_exclamation_mark_probably(struct Sprite *sprite); u8 CreateTrainerSprite_BirchSpeech(u8, u16, u16, u8, void *); void LoadTrainerGfx_TrainerCard(u8 gender, int, void *); u8 CreateBirchSprite(u8, u8, u8); + +// asm/unknown_task.o void remove_some_task(void); void dp12_8087EA4(void); void sub_80895F8(u32 i, u32 i1, u32 i2); void sub_8089668(void); void sub_8089944(int i, int i1, int i2, int i3, int i4, int i5, int i6); + +// asm/pokemon_menu.o void sub_8089A70(void); void sub_808AB90(void); -// asm/rom_8094928.o +// asm/pokemon_storage_system.o void sub_80961D8(void); + +// asm/pokemon_icon.o u8 sub_809D3A4(u16 arg0, void (*)(struct Sprite *), int, u8 arg3, u32 arg4); u16 sub_809D4A8(u16); void sub_809D510(struct Sprite *); void sub_809D580(u16); void sub_809D608(u16); + +// asm/pokemon_summary_screen.o u8 pokemon_ailments_get_primary(u32); + +// asm/script_movement.o u8 exec_movement(u8, u8, u8, void *); bool8 sub_80A212C(u8, u8, u8); void sub_80A2178(void); + +// asm/mail_data.o void sub_80A2B18(void); u16 sub_80A2D64(u16, u8 *); + +// asm/map_name_popup.o void AddMapNamePopUpWindowTask(void); void HideMapNamePopUpWindow(); @@ -258,7 +277,7 @@ void CreatePokemartMenu(void *); void CreateDecorationShop1Menu(void *); void CreateDecorationShop2Menu(void *); -// asm/script_menu.o +// src/script_menu.o bool8 sub_80B5054(u8, u8, u8, u8); bool8 sub_80B50B0(u8, u8, u8, u8, u8); bool8 Multichoice(u8, u8, u8, u8); @@ -297,6 +316,8 @@ s8 sub_80BF720(TVShow *); u8 sub_80BF77C(u32); void sub_80BFD44(void *, u32, u8); void sub_80C0514(void *, u32, u8); + +// src/tv.o void StartMassOutbreak(void); void TVShowDone(void); @@ -376,8 +397,8 @@ bool8 IsEasyChatPairEqual(u16 *, u16 *); // asm/region_map.o void sub_80FBFB4(u8 *str, u8 region, u8); -u8 *CopyLocationName(u8 *dest, u8 location); void CopyMapName(); +u8 *CopyLocationName(u8 *dest, u8 location); // asm/slot_machine.o void PlaySlotMachine(u8, void *); @@ -388,9 +409,13 @@ void sub_8106630(u32); // asm/rom6.o bool8 npc_before_player_of_type(u8); u8 oei_task_add(void); + +// asm/pokeblock.o void sub_810C994(void); void sub_810CA6C(s32); s16 sub_810CAE4(u8, struct Pokeblock *); + +// asm/rom_810CBB4.o void sub_810CC80(void); u8 sub_810D32C(void); void ResetCyclingRoadChallengeData(void); @@ -407,9 +432,11 @@ void sub_811AABC(u8); void sub_811AAD8(u8); u8 sub_811AAE8(void); -// asm/mystery_event_script.o +// src/mystery_event_script.o u32 sub_812613C(u8 *); void sub_8126160(u8); + +// asm/mystery_event_script.o u16 sub_8126338(void); // asm/field_effect_helpers.o @@ -435,10 +462,10 @@ void sub_8134394(); u8 sub_81344CC(void); void sub_8134AC0(void *); -// asm/player_pc.o +// src/player_pc.o void NewGameInitPCItems(void); -// asm/rom_813BA94.o +// asm/intro.o void sub_813CAF4(u8); void intro_reset_and_hide_bgs(void); void sub_813CCE8(u8); @@ -459,11 +486,11 @@ void sub_813E930(/*TODO: arg types*/); void InitIntroTorchicAttackAnim(u8); void InitIntroMudkipAttackAnim(/*TODO: arg types*/); -// asm/rom_81473B8.o +// asm/braille_puzzles.o bool8 ShouldDoBrailleStrengthEffect(void); void DoBrailleStrengthEffect(void); -// asm/rom_8148B8C.o +// asm/intro_credits_graphics.o void load_intro_part2_graphics(/*TODO: arg types*/); void sub_8148C78(/*TODO: arg types*/); u8 sub_8148EC0(/*TODO: arg types*/); @@ -472,6 +499,8 @@ u8 intro_create_brendan_sprite(/*TODO: arg types*/); u8 intro_create_may_sprite(/*TODO: arg types*/); u8 intro_create_latios_sprite(/*TODO: arg types*/); u8 intro_create_latias_sprite(/*TODO: arg types*/); + +// asm/name_string_util.o void SanitizeNameString(u8*); // src/agb_flash.o diff --git a/include/global.h b/include/global.h index 3ad3f3988..30f935521 100644 --- a/include/global.h +++ b/include/global.h @@ -359,10 +359,10 @@ extern struct SaveBlock1 gSaveBlock1; struct Time { - s16 days; - s8 hours; - s8 minutes; - s8 seconds; + /* 0x00 */ s16 days; + /* 0x02 */ s8 hours; + /* 0x03 */ s8 minutes; + /* 0x04 */ s8 seconds; }; struct Pokedex @@ -386,7 +386,7 @@ struct SaveBlock2_Sub /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; }; -struct SaveBlock2 +struct SaveBlock2 /* 0x02024EA4 */ { /*0x00*/ u8 playerName[8]; /*0x08*/ u8 playerGender; // MALE, FEMALE diff --git a/include/main.h b/include/main.h index eca0e7f96..aef55a182 100644 --- a/include/main.h +++ b/include/main.h @@ -12,7 +12,7 @@ struct Main /*0x000*/ MainCallback callback1; /*0x004*/ MainCallback callback2; - /*0x008*/ MainCallback field_8; + /*0x008*/ MainCallback savedCallback; /*0x00C*/ IntrCallback vblankCallback; /*0x010*/ IntrCallback hblankCallback; diff --git a/include/menu.h b/include/menu.h index 05c675097..0e4860791 100644 --- a/include/menu.h +++ b/include/menu.h @@ -18,7 +18,7 @@ void unref_sub_8071DA4(struct WindowConfig *, u16); void MenuLoadTextWindowGraphics_OverrideFrameType(u8); void MenuLoadTextWindowGraphics(void); void BasicInitMenuWindow(const struct WindowConfig *); -void MenuPrint(u8 *, u8, u8); +void MenuPrint(const u8 *, u8, u8); void MenuZeroFillWindowRect(u8, u8, u8, u8); void MenuFillWindowRectWithBlankTile(u8, u8, u8, u8); void MenuZeroFillScreen(void); diff --git a/include/start_menu.h b/include/start_menu.h index ae9e51284..5169b3bf0 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -5,16 +5,6 @@ void CreateStartMenuTask(void (*func)(u8)); void sub_80712B4(u8 taskId); void sub_8071310(void); -u8 StartMenu_PokedexCallback(void); -u8 StartMenu_PokemonCallback(void); -u8 StartMenu_BagCallback(void); -u8 StartMenu_PokenavCallback(void); -u8 StartMenu_PlayerCallback(void); -u8 StartMenu_SaveCallback(void); -u8 StartMenu_OptionCallback(void); -u8 StartMenu_ExitCallback(void); -u8 StartMenu_RetireCallback(void); -u8 StartMenu_PlayerLinkCallback(void); void InitSaveDialog(void); void sub_8071B28(void); diff --git a/include/vars.h b/include/vars.h index 69939804a..265f903ba 100644 --- a/include/vars.h +++ b/include/vars.h @@ -1,10 +1,21 @@ #ifndef GUARD_VARS_H #define GUARD_VARS_H +#define VAR_RECYCLE_GOODS 0x4020 #define VAR_REPEL_STEP_COUNT 0x4021 +#define VAR_FIRST_POKE 0x4023 +#define VAR_MIRAGE_RND_H 0x4024 +#define VAR_MIRAGE_RND_L 0x4025 + #define VAR_RESET_RTC_ENABLE 0x402C +#define VAR_DAYS 0x4040 + +#define VAR_POKELOT_PRIZE 0x4045 #define VAR_NATIONAL_DEX 0x4046 +#define VAR_POKELOT_RND1 0x404B +#define VAR_POKELOT_RND2 0x404C + #endif // GUARD_VARS_H diff --git a/include/wallclock.h b/include/wallclock.h index be3111ab1..c869e3941 100644 --- a/include/wallclock.h +++ b/include/wallclock.h @@ -3,8 +3,8 @@ #include "sprite.h" -void Cb2_StartWallClock(void); -void Cb2_ViewWallClock(void); +void CB2_StartWallClock(void); +void CB2_ViewWallClock(void); void sub_810B05C(struct Sprite *sprite); void sub_810B0F4(struct Sprite *sprite); diff --git a/ld_script.txt b/ld_script.txt index d0af456cd..6423e5d22 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -90,9 +90,15 @@ SECTIONS { src/event_data.o(.text); src/coord_event_weather.o(.text); asm/field_tasks.o(.text); - asm/clock.o(.text); + src/clock.o(.text); asm/reset_rtc_screen.o(.text); asm/party_menu.o(.text); + src/party_menu.o(.text); + asm/party_menu.o(.text_806E884); + src/party_menu.o(.text_b); + asm/party_menu.o(.text_80701DC); + src/party_menu.o(.text_c); + asm/party_menu.o(.text_8070968); src/start_menu.o(.text); src/menu.o(.text); src/tileset_anim.o(.text); @@ -315,6 +321,14 @@ SECTIONS { src/script.o(.rodata); src/scrcmd.o(.rodata); src/coord_event_weather.o(.rodata); + data/field_tasks.o(.rodata); + data/reset_rtc_screen.o(.rodata); + data/party_menu.o(.rodata); + src/start_menu.o(.rodata); + src/menu.o(.rodata); + data/tileset_anim.o(.rodata); + src/palette.o(.rodata); + src/sound.o(.rodata); data/data_83760F0.o(.rodata); src/m4a_tables.o(.rodata); data/sound_data.o(.rodata); diff --git a/shared_syms.txt b/shared_syms.txt index 074572234..d805ebfde 100644 --- a/shared_syms.txt +++ b/shared_syms.txt @@ -24,4 +24,8 @@ dword_2017100 = 0x2017100; unk_2018000 = 0x2018000; +unk_201B260 = 0x201b260; +unk_201B264 = 0x201B264; +unk_201C000 = 0x201C000; + gHallOfFame = 0x201E000; diff --git a/src/battle_setup.c b/src/battle_setup.c index fa0bf4ba1..5296f1923 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -164,7 +164,7 @@ void StartBattle_StandardWild(void) ScriptContext2_Enable(); FreezeMapObjects(); sub_80597F4(); - gMain.field_8 = HandleWildBattleEnd; + gMain.savedCallback = HandleWildBattleEnd; gBattleTypeFlags = 0; task_add_01_battle_start(GetWildBattleTransition(), 0); sav12_xor_increment(7); @@ -176,7 +176,7 @@ void StartBattle_Roamer(void) ScriptContext2_Enable(); FreezeMapObjects(); sub_80597F4(); - gMain.field_8 = HandleWildBattleEnd; + gMain.savedCallback = HandleWildBattleEnd; gBattleTypeFlags = BATTLE_TYPE_ROAMER; task_add_01_battle_start(GetWildBattleTransition(), 0); sav12_xor_increment(7); @@ -188,7 +188,7 @@ void StartBattle_Safari(void) ScriptContext2_Enable(); FreezeMapObjects(); sub_80597F4(); - gMain.field_8 = sub_80C824C; + gMain.savedCallback = sub_80C824C; gBattleTypeFlags = BATTLE_TYPE_SAFARI; task_add_01_battle_start(GetWildBattleTransition(), 0); } @@ -205,7 +205,7 @@ void StartBattle_WallyTutorial(void) { CreateMaleMon(&gEnemyParty[0], SPECIES_RALTS, 5); ScriptContext2_Enable(); - gMain.field_8 = c2_exit_to_overworld_1_continue_scripts_restart_music; + gMain.savedCallback = c2_exit_to_overworld_1_continue_scripts_restart_music; gBattleTypeFlags = BATTLE_TYPE_WALLY_TUTORIAL; task_add_01_battle_start(8, 0); } @@ -213,7 +213,7 @@ void StartBattle_WallyTutorial(void) void StartBattle_ScriptedWild(void) { ScriptContext2_Enable(); - gMain.field_8 = HandleScriptedWildBattleEnd; + gMain.savedCallback = HandleScriptedWildBattleEnd; gBattleTypeFlags = 0; task_add_01_battle_start(GetWildBattleTransition(), 0); sav12_xor_increment(7); @@ -223,7 +223,7 @@ void StartBattle_ScriptedWild(void) void StartBattle_SouthernIsland(void) { ScriptContext2_Enable(); - gMain.field_8 = HandleScriptedWildBattleEnd; + gMain.savedCallback = HandleScriptedWildBattleEnd; gBattleTypeFlags = BATTLE_TYPE_LEGENDARY; task_add_01_battle_start(GetWildBattleTransition(), 0); sav12_xor_increment(7); @@ -233,7 +233,7 @@ void StartBattle_SouthernIsland(void) void StartBattle_Rayquaza(void) { ScriptContext2_Enable(); - gMain.field_8 = HandleScriptedWildBattleEnd; + gMain.savedCallback = HandleScriptedWildBattleEnd; gBattleTypeFlags = BATTLE_TYPE_LEGENDARY; task_add_01_battle_start(0, BGM_BATTLE34); sav12_xor_increment(7); @@ -243,7 +243,7 @@ void StartBattle_Rayquaza(void) void StartBattle_GroudonKyogre(void) { ScriptContext2_Enable(); - gMain.field_8 = HandleScriptedWildBattleEnd; + gMain.savedCallback = HandleScriptedWildBattleEnd; gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_KYOGRE_GROUDON; if (gGameVersion == 2) task_add_01_battle_start(0xB, BGM_BATTLE34); // KYOGRE @@ -256,7 +256,7 @@ void StartBattle_GroudonKyogre(void) void StartBattle_Regi(void) { ScriptContext2_Enable(); - gMain.field_8 = HandleScriptedWildBattleEnd; + gMain.savedCallback = HandleScriptedWildBattleEnd; gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI; task_add_01_battle_start(0xA, BGM_BATTLE36); sav12_xor_increment(7); @@ -500,7 +500,7 @@ u8 GetBattleTowerBattleTransition(void) void ChooseStarter(void) { SetMainCallback2(CB2_ChooseStarter); - gMain.field_8 = CB2_GiveStarter; + gMain.savedCallback = CB2_GiveStarter; } void CB2_GiveStarter(void) @@ -524,7 +524,7 @@ void CB2_StartFirstBattle(void) if (sub_811AAE8() == TRUE) { gBattleTypeFlags = BATTLE_TYPE_FIRST_BATTLE; - gMain.field_8 = HandleFirstBattleEnd; + gMain.savedCallback = HandleFirstBattleEnd; SetMainCallback2(sub_800E7C4); prev_quest_postbuffer_cursor_backup_reset(); overworld_poison_timer_set(); @@ -734,7 +734,7 @@ void trainer_flag_clear(u16 flag) void sub_80825E4(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER; - gMain.field_8 = sub_808260C; + gMain.savedCallback = sub_808260C; task_add_01_battle_start_with_music_and_stats(); ScriptContext1_Stop(); } @@ -777,7 +777,7 @@ void do_choose_name_or_words_screen(void) void sub_80826B0(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER; - gMain.field_8 = do_choose_name_or_words_screen; + gMain.savedCallback = do_choose_name_or_words_screen; task_add_01_battle_start_with_music_and_stats(); ScriptContext1_Stop(); } diff --git a/src/clock.c b/src/clock.c new file mode 100644 index 000000000..e660abdd3 --- /dev/null +++ b/src/clock.c @@ -0,0 +1,92 @@ +#include "global.h" +#include "main.h" +#include "rtc.h" +#include "event_data.h" +#include "lottery_corner.h" +#include "berry.h" +#include "rom4.h" +#include "wallclock.h" + +extern void sub_80FA220(u16); +extern void sub_80BE8C4(u16); +extern void sub_8080834(u16); +extern void UpdatePartyPokerusTime(u16); +extern void sub_810D2F4(u16); +extern void UpdateBirchState(u16); +extern void sub_810F618(u16); + +static void InitTimeBasedEvents(void); +static void UpdatePerDay(struct Time *time); +static void UpdatePerSecond(struct Time *time); +static void ReturnFromStartWallClock(void); + +static void InitTimeBasedEvents(void) +{ + FlagSet(SYS_CLOCK_SET); + RtcCalcLocalTime(); + gSaveBlock2.lastBerryTreeUpdate = gLocalTime; + VarSet(VAR_DAYS, gLocalTime.days); +} + +void DoTimeBasedEvents(void) +{ + if (FlagGet(SYS_CLOCK_SET)) + { + RtcCalcLocalTime(); + UpdatePerDay(&gLocalTime); + UpdatePerSecond(&gLocalTime); + } +} + +static void UpdatePerDay(struct Time *time) +{ + u16 *varPtr = GetVarPointer(VAR_DAYS); + int days = *varPtr; + u16 newDays; + + if (days != time->days && days <= time->days) + { + newDays = time->days - days; + ClearUpperFlags(); + sub_80FA220(newDays); + sub_80BE8C4(newDays); + sub_8080834(newDays); + UpdatePartyPokerusTime(newDays); + sub_810D2F4(newDays); + UpdateBirchState(newDays); + sub_810F618(newDays); + SetRandomLotteryNumber(newDays); + *varPtr = time->days; + } +} + +static void UpdatePerSecond(struct Time *time) +{ + struct Time newTime; + s32 totalSeconds; + + CalcTimeDifference(&newTime, &gSaveBlock2.lastBerryTreeUpdate, time); + totalSeconds = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes; + + // there's no way to get the correct assembly other than with this nested if check. so dumb. + if (totalSeconds != 0) + { + if (totalSeconds >= 0) + { + BerryTreeTimeUpdate(totalSeconds); + gSaveBlock2.lastBerryTreeUpdate = *time; + } + } +} + +static void ReturnFromStartWallClock(void) +{ + InitTimeBasedEvents(); + SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); +} + +void StartWallClock(void) +{ + SetMainCallback2(CB2_StartWallClock); + gMain.savedCallback = ReturnFromStartWallClock; +} diff --git a/src/lottery_corner.c b/src/lottery_corner.c index 54ba3c46d..4d80f86c2 100644 --- a/src/lottery_corner.c +++ b/src/lottery_corner.c @@ -22,7 +22,7 @@ void ResetLotteryCorner(void) u16 rand = Random(); SetLotteryNumber((Random() << 16) | rand); - VarSet(0x4045, 0); + VarSet(VAR_POKELOT_PRIZE, 0); } void SetRandomLotteryNumber(u16 i) @@ -147,14 +147,14 @@ void SetLotteryNumber(u32 lotteryNum) u16 lowNum = lotteryNum >> 16; u16 highNum = lotteryNum; - VarSet(0x404B, highNum); - VarSet(0x404C, lowNum); + VarSet(VAR_POKELOT_RND1, highNum); + VarSet(VAR_POKELOT_RND2, lowNum); } u32 GetLotteryNumber(void) { - u16 highNum = VarGet(0x404B); - u16 lowNum = VarGet(0x404C); + u16 highNum = VarGet(VAR_POKELOT_RND1); + u16 lowNum = VarGet(VAR_POKELOT_RND2); return (lowNum << 16) | highNum; } diff --git a/src/main_menu.c b/src/main_menu.c index bbdae24fe..7adbda096 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -582,7 +582,7 @@ void Task_MainMenuPressedA(u8 taskId) DestroyTask(taskId); break; case OPTION: - gMain.field_8 = CB2_InitMainMenuFromOptions; + gMain.savedCallback = CB2_InitMainMenuFromOptions; SetMainCallback2(CB2_InitOptionMenu); DestroyTask(taskId); break; diff --git a/src/menu.c b/src/menu.c index 4bb4dbec2..ee9376079 100644 --- a/src/menu.c +++ b/src/menu.c @@ -22,6 +22,9 @@ struct Menu u8 columnXCoords[8]; }; +extern u8 OtherText_Yes[]; +extern u8 OtherText_No[]; + static void MultistepInitMenuWindowInternal(const struct WindowConfig *, u16); static void InitMenuWindowInternal(const struct WindowConfig *, u16); static bool8 sub_80723D4(void); @@ -41,7 +44,11 @@ EWRAM_DATA u16 gMenuTextWindowTileOffset = 0; EWRAM_DATA u16 gMenuTextWindowContentTileOffset = 0; EWRAM_DATA u16 gMenuMessageBoxContentTileOffset = 0; -extern const struct MenuAction gMenuYesNoItems[]; +const struct MenuAction gMenuYesNoItems[] = +{ + { OtherText_Yes, NULL }, + { OtherText_No, NULL }, +}; void CloseMenu(void) { @@ -143,7 +150,7 @@ void BasicInitMenuWindow(const struct WindowConfig *winConfig) gMenuWindowPtr->tileDataStartOffset = gMenuTextTileOffset; } -void MenuPrint(u8 *str, u8 left, u8 top) +void MenuPrint(const u8 *str, u8 left, u8 top) { sub_8003460(gMenuWindowPtr, str, gMenuTextTileOffset, left, top); } diff --git a/src/option_menu.c b/src/option_menu.c index 6d6310b46..f597429c1 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -310,7 +310,7 @@ static void Task_OptionMenuFadeOut(u8 taskId) if(!gPaletteFade.active) { DestroyTask(taskId); - SetMainCallback2(gMain.field_8); + SetMainCallback2(gMain.savedCallback); } } diff --git a/src/palette.c b/src/palette.c index bf93a036c..165eb2eae 100644 --- a/src/palette.c +++ b/src/palette.c @@ -30,7 +30,7 @@ struct PaletteStructTemplate struct PaletteStruct { - struct PaletteStructTemplate *base; + const struct PaletteStructTemplate *base; u32 ps_field_4_0:1; u16 ps_field_4_1:1; u32 baseDestOffset:9; @@ -48,7 +48,19 @@ EWRAM_DATA u32 gFiller_202F394 = 0; EWRAM_DATA static u32 sPlttBufferTransferPending = 0; EWRAM_DATA static u8 sPaletteDecompressionBuffer[0x400] = {0}; -extern struct PaletteStructTemplate gDummyPaletteStructTemplate; +static const struct PaletteStructTemplate sDummyPaletteStructTemplate = +{ + 0xFFFF, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0 +}; static void unused_sub_8073DFC(struct PaletteStruct *, u32 *); static void unused_sub_8073F60(struct PaletteStruct *, u32 *); @@ -332,7 +344,7 @@ void ResetPaletteStructByUid(u16 a1) void ResetPaletteStruct(u8 paletteNum) { - sPaletteStructs[paletteNum].base = &gDummyPaletteStructTemplate; + sPaletteStructs[paletteNum].base = &sDummyPaletteStructTemplate; sPaletteStructs[paletteNum].ps_field_4_0 = 0; sPaletteStructs[paletteNum].baseDestOffset = 0; sPaletteStructs[paletteNum].destOffset = 0; diff --git a/src/party_menu.c b/src/party_menu.c new file mode 100644 index 000000000..ce1b0f32a --- /dev/null +++ b/src/party_menu.c @@ -0,0 +1,317 @@ +#include "global.h" +#include "menu.h" +#include "pokemon.h" +#include "songs.h" +#include "sound.h" +#include "string_util.h" +#include "task.h" + +#define DATA_COUNT (6) + +struct Unk201C000 { + /* 0x00 */ struct Pokemon *pokemon; + /* 0x04 */ u8 var04; + /* 0x05 */ u8 var05; + /* 0x06 */ u16 var06; + u8 pad_08[10]; + /* 0x12 */ u16 var12; +}; + +struct Unk201B260 { + /* 0x00 */ u8 var00; + /* 0x01 */ u8 var01; + u8 pad_02[2]; + /* 0x04 */ s16 var04[DATA_COUNT * 2]; + u8 pad_1C[2]; + /* 0x1E */ u16 var1E; + /* 0x20 */ u16 var20; +}; + +extern struct Unk201B260 unk_201B260; +extern struct Unk201C000 unk_201C000; +extern u8 gStringVar1[]; +extern u8 gUnknown_0202E8F4; +extern u8 gUnknown_0202E8F6; + +extern u8 gUnknown_083769A8[][12]; +extern u8 gUnknown_08376D1C[DATA_COUNT]; +extern u8 *gUnknown_08376D04[DATA_COUNT]; +extern u8 gOtherText_TallPlusAndRightArrow[]; + +void task_pc_turn_off(u8 *u8, int i); +static void sub_806E884(u8 taskId); +void sub_806F8AC(u8 taskId); +void PartyMenuUpdateLevelOrStatus(struct Pokemon *, u8); +u8 ExecuteTableBasedItemEffect__(u8 u8, u16 u16, int i); +void sub_80701DC(u8 taskId); + +u8 sub_806E834(u8 *message, u8 arg1) { + u8 taskId; + + gUnknown_0202E8F6 = 1; + + MenuDrawTextWindow(3, 14, 26, 19); + MenuPrintMessage(message, 4, 15); + + taskId = CreateTask(sub_806E884, 1); + gTasks[taskId].data[0] = arg1; + + return taskId; +} + +static void sub_806E884(u8 taskId) { + if (MenuUpdateWindowText() == 0) { + return; + } + + gUnknown_0202E8F6 = 0; + + if (gTasks[taskId].data[0] == 0) { + MenuZeroFillWindowRect(3, 14, 26, 19); + } + + DestroyTask(taskId); +} + +asm(".section .text_b"); + +#ifdef NONMATCHING +void sub_8070088(u8 taskId) { + u8 dummyTaskId; + struct Task *task2; + + gTasks[taskId].func = TaskDummy; + + if (GetMonData(&gPlayerParty[unk_201C000.var04], MON_DATA_SPECIES) == 0) { + gTasks[taskId].func = sub_80701DC; + return; + } + + dummyTaskId = CreateTask(TaskDummy, 5); + task2 = &gTasks[dummyTaskId]; + + task2->data[10] = GetMonData(unk_201C000.pokemon, MON_DATA_MAX_HP); + task2->data[11] = GetMonData(unk_201C000.pokemon, MON_DATA_HP); + + if (ExecuteTableBasedItemEffect__(unk_201C000.var05, unk_201C000.var06, 0)) { + DestroyTask(dummyTaskId); + gTasks[taskId].func = sub_80701DC; + return; + } + + gUnknown_0202E8F4 = 1; + MenuZeroFillWindowRect(3, 14, 26, 19); + PlaySE(SE_KAIFUKU); + PartyMenuUpdateLevelOrStatus(unk_201C000.pokemon, unk_201C000.var05); + + task_pc_turn_off(&gUnknown_083769A8[IsDoubleBattle()][unk_201C000.var05], 9); + unk_201B260.var01 = 2; // u8 + + task2->data[12] = GetMonData(unk_201C000.pokemon, MON_DATA_HP) - task2->data[11]; + task2->data[14]= 1; + unk_201B260.var1E = 1; // u16 + unk_201B260.var20 = 1; // u16 + + unk_201C000.var12 = -0x8000; + task2->func = sub_806F8AC; +} +#else +__attribute__((naked)) +void sub_8070088(void) { + asm(".syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x4\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + ldr r1, _08070120 @ =gTasks\n\ + mov r10, r1\n\ + lsls r1, r0, 2\n\ + adds r1, r0\n\ + lsls r1, 3\n\ + mov r2, r10\n\ + adds r7, r1, r2\n\ + ldr r5, _08070124 @ =TaskDummy\n\ + str r5, [r7]\n\ + ldr r4, _08070128 @ =0x0201c000\n\ + ldrb r0, [r4, 0x5]\n\ + movs r1, 0x64\n\ + mov r9, r1\n\ + mov r2, r9\n\ + muls r2, r0\n\ + adds r0, r2, 0\n\ + ldr r1, _0807012C @ =gPlayerParty\n\ + mov r8, r1\n\ + add r0, r8\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + beq _08070118\n\ + adds r0, r5, 0\n\ + movs r1, 0x5\n\ + bl CreateTask\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + lsls r0, r5, 2\n\ + adds r0, r5\n\ + lsls r0, 3\n\ + str r0, [sp]\n\ + mov r0, r10\n\ + adds r0, 0x8\n\ + ldr r2, [sp]\n\ + adds r6, r2, r0\n\ + ldrb r0, [r4, 0x5]\n\ + mov r1, r9\n\ + muls r1, r0\n\ + adds r0, r1, 0\n\ + add r0, r8\n\ + str r0, [r4]\n\ + movs r1, 0x3A\n\ + bl GetMonData\n\ + strh r0, [r6, 0x14]\n\ + ldr r0, [r4]\n\ + movs r1, 0x39\n\ + bl GetMonData\n\ + strh r0, [r6, 0x16]\n\ + ldrb r0, [r4, 0x5]\n\ + ldrh r1, [r4, 0x6]\n\ + movs r2, 0\n\ + bl ExecuteTableBasedItemEffect__\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + beq _08070134\n\ + adds r0, r5, 0\n\ + bl DestroyTask\n\ +_08070118:\n\ + ldr r0, _08070130 @ =sub_80701DC\n\ + str r0, [r7]\n\ + b _080701B0\n\ + .align 2, 0\n\ +_08070120: .4byte gTasks\n\ +_08070124: .4byte TaskDummy\n\ +_08070128: .4byte 0x0201c000\n\ +_0807012C: .4byte gPlayerParty\n\ +_08070130: .4byte sub_80701DC\n\ +_08070134:\n\ + ldr r1, _080701C0 @ =gUnknown_0202E8F4\n\ + movs r0, 0x1\n\ + strb r0, [r1]\n\ + movs r0, 0x3\n\ + movs r1, 0xE\n\ + movs r2, 0x1A\n\ + movs r3, 0x13\n\ + bl MenuZeroFillWindowRect\n\ + movs r0, 0x1\n\ + bl PlaySE\n\ + ldr r0, [r4]\n\ + ldrb r1, [r4, 0x5]\n\ + bl PartyMenuUpdateLevelOrStatus\n\ + bl IsDoubleBattle\n\ + adds r1, r0, 0\n\ + lsls r1, 24\n\ + lsrs r1, 24\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + ldrb r1, [r4, 0x5]\n\ + lsls r1, 1\n\ + adds r0, r1\n\ + ldr r1, _080701C4 @ =gUnknown_083769A8\n\ + adds r0, r1\n\ + movs r1, 0x9\n\ + bl task_pc_turn_off\n\ + ldr r2, _080701C8 @ =0xfffff261\n\ + adds r1, r4, r2\n\ + movs r0, 0x2\n\ + strb r0, [r1]\n\ + ldr r0, [r4]\n\ + movs r1, 0x39\n\ + bl GetMonData\n\ + ldrh r1, [r6, 0x16]\n\ + subs r0, r1\n\ + strh r0, [r6, 0x18]\n\ + movs r0, 0x1\n\ + strh r0, [r6, 0x1C]\n\ + ldr r1, _080701CC @ =0xfffff27e\n\ + adds r0, r4, r1\n\ + movs r1, 0x1\n\ + strh r1, [r0]\n\ + ldr r2, _080701D0 @ =0xfffff280\n\ + adds r0, r4, r2\n\ + strh r1, [r0]\n\ + ldrh r1, [r6, 0x16]\n\ + adds r2, 0x2\n\ + adds r0, r4, r2\n\ + strh r1, [r0]\n\ + ldr r0, _080701D4 @ =0xffff8000\n\ + str r0, [r4, 0xC]\n\ + ldr r1, [sp]\n\ + add r1, r10\n\ + ldr r0, _080701D8 @ =sub_806F8AC\n\ + str r0, [r1]\n\ +_080701B0:\n\ + add sp, 0x4\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + .align 2, 0\n\ +_080701C0: .4byte gUnknown_0202E8F4\n\ +_080701C4: .4byte gUnknown_083769A8\n\ +_080701C8: .4byte 0xfffff261\n\ +_080701CC: .4byte 0xfffff27e\n\ +_080701D0: .4byte 0xfffff280\n\ +_080701D4: .4byte 0xffff8000\n\ +_080701D8: .4byte sub_806F8AC\n\ + .syntax divided\n"); +} +#endif + + +asm(".section .text_c"); + +void sub_8070848(u8 taskId) { + u8 i; + + MenuDrawTextWindow(11, 0, 29, 7); + + for (i = 0; i < DATA_COUNT; i++) { + u8 x; + u8 y; + u32 stat; + struct Pokemon **pokemon; + + pokemon = &unk_201C000.pokemon; + asm("" ::: "r0"); + stat = GetMonData(*pokemon, gUnknown_08376D1C[i]); + + unk_201B260.var04[i + DATA_COUNT] = stat; + unk_201B260.var04[i] = stat - unk_201B260.var04[i]; + + x = (i / 3) * 9 + 11; + y = ((i % 3) << 1) + 1; + + MenuPrint_PixelCoords(gUnknown_08376D04[i], (x + 1) * 8, y * 8, 1); + + + if (i == 2) { + MenuPrint_PixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 0); + } else { + MenuPrint_PixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 1); + } + + gStringVar1[0] = 0xFC; + gStringVar1[1] = 0x14; + gStringVar1[2] = 0x06; + + ConvertIntToDecimalStringN(gStringVar1 + 3, unk_201B260.var04[i], 1, 2); + + MenuPrint_PixelCoords(gStringVar1, (x + 6) * 8 + 12, y * 8, 0); + } +} diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 58573e97e..b6b24b9d7 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3,10 +3,13 @@ #include "menu.h" #include "pokemon.h" #include "string_util.h" +#include "link.h" extern u8 gStringVar1[]; extern u8 gStringVar4[]; +extern struct Pokemon *unk_2018000; + extern u8 *(gNatureNames[]); extern const u8 gOtherText_Terminator4[]; extern const u8 gOtherText_Nature[]; @@ -16,10 +19,79 @@ extern const u8 gOtherText_Egg2[]; extern const u8 gOtherText_ObtainedInTrade[]; extern const u8 gOtherText_FatefulEncounter[]; extern const u8 gOtherText_Met2[]; +extern const u8 gOtherText_EggDayCare[]; +extern const u8 gOtherText_EggNicePlace[]; +extern const u8 gOtherText_EggObtainedInTrade[]; +extern const u8 gOtherText_EggHotSprings[]; u8 *sub_80A1E9C(u8 *dest, u8 *src, u8); u8 PokemonSummaryScreen_CheckOT(struct Pokemon *pokemon); u8 *PokemonSummaryScreen_CopyPokemonLevel(u8 *dest, u8 level); +u32 GetPlayerTrainerId(void); + +bool8 PokemonSummaryScreen_CheckOT(struct Pokemon *mon) +{ + u32 trainerId; + + if (unk_2018000 == gEnemyParty) + { + u8 enemyId = GetMultiplayerId() ^ 1; + trainerId = gLinkPlayers[enemyId].trainerId & 0xFFFF; + StringCopy(gStringVar1, gLinkPlayers[enemyId].name); + StripExtCtrlCodes(gStringVar1); + } + else + { + trainerId = GetPlayerTrainerId() & 0xFFFF; + StringCopy(gStringVar1, gSaveBlock2.playerName); + } + + if (trainerId != (GetMonData(mon, MON_DATA_OT_ID) & 0xFFFF)) + return FALSE; + + GetMonData(mon, MON_DATA_OT_NAME, gStringVar2); + + if (!StringCompareWithoutExtCtrlCodes(gStringVar1, gStringVar2)) + return TRUE; + + return FALSE; +} + +void PokemonSummaryScreen_PrintEggTrainerMemo(struct Pokemon *mon, u8 left, u8 top) +{ + u8 locationMet; + u8 gameMet = GetMonData(mon, MON_DATA_MET_GAME); + + if (!(gameMet == VERSION_RUBY || gameMet == VERSION_SAPPHIRE || gameMet == VERSION_EMERALD)) + { + MenuPrint(gOtherText_EggObtainedInTrade, left, top); + return; + } + + locationMet = GetMonData(mon, MON_DATA_MET_LOCATION); + + if (locationMet == 255) + { + MenuPrint(gOtherText_EggNicePlace, left, top); + return; + } + + if (!PokemonSummaryScreen_CheckOT(mon)) + { + MenuPrint(gOtherText_EggObtainedInTrade, left, top); + return; + } + + asm(""); // needed to match for some reason + + if (locationMet == 253) + { + MenuPrint(gOtherText_EggHotSprings, left, top); + return; + } + + MenuPrint(gOtherText_EggDayCare, left, top); +} void PokemonSummaryScreen_PrintTrainerMemo(struct Pokemon *pokemon, u8 left, u8 top) { u8 locationMet; diff --git a/src/rom4.c b/src/rom4.c index 971c46584..e7c28f474 100644 --- a/src/rom4.c +++ b/src/rom4.c @@ -731,7 +731,7 @@ bool16 sub_8053D30(struct WarpData *warp) bool16 sub_8053D6C(struct WarpData *warp) { - if (VarGet(16563)) + if (VarGet(0x40B3)) return FALSE; if (warp->mapGroup != 32) return FALSE; @@ -1135,7 +1135,7 @@ void CB2_LoadMap(void) ScriptContext2_Disable(); set_callback1(NULL); SetMainCallback2(sub_810CC80); - gMain.field_8 = CB2_LoadMap2; + gMain.savedCallback = CB2_LoadMap2; } void CB2_LoadMap2(void) diff --git a/src/sound.c b/src/sound.c index aa12ba477..c244c5cbe 100644 --- a/src/sound.c +++ b/src/sound.c @@ -32,8 +32,6 @@ extern struct MusicPlayerInfo gMPlay_SE1; extern struct MusicPlayerInfo gMPlay_SE2; extern struct MusicPlayerInfo gMPlay_SE3; -extern struct Fanfare gFanfares[]; - extern struct ToneData voicegroup_8452590[]; extern struct ToneData voicegroup_8452B90[]; extern struct ToneData voicegroup_8453190[]; @@ -44,6 +42,22 @@ extern struct ToneData voicegroup_8453DC0[]; extern struct ToneData voicegroup_84543C0[]; extern struct ToneData voicegroup_84549C0[]; +static const struct Fanfare sFanfares[] = +{ + { BGM_FANFA1, 80 }, + { BGM_FANFA4, 160 }, + { BGM_FANFA5, 220 }, + { BGM_ME_WAZA, 220 }, + { BGM_ME_ASA, 160 }, + { BGM_ME_BACHI, 340 }, + { BGM_ME_WASURE, 180 }, + { BGM_ME_KINOMI, 120 }, + { BGM_ME_TAMA, 710 }, + { BGM_ME_B_BIG, 250 }, + { BGM_ME_B_SMALL, 150 }, + { BGM_ME_ZANNEN, 160 }, +}; + static void Task_Fanfare(u8 taskId); static void CreateFanfareTask(void); static void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); @@ -174,14 +188,10 @@ bool8 IsNotWaitingForBGMStop(void) void PlayFanfareByFanfareNum(u8 fanfareNum) { - struct Fanfare *fanfares; - struct Fanfare *fanfare; u16 songNum; m4aMPlayStop(&gMPlay_BGM); - fanfares = gFanfares; - fanfare = &fanfares[fanfareNum]; - songNum = fanfare->songNum; - sFanfareCounter = fanfare->duration; + songNum = sFanfares[fanfareNum].songNum; + sFanfareCounter = sFanfares[fanfareNum].duration; m4aSongNumStart(songNum); } @@ -205,7 +215,7 @@ bool8 WaitFanfare(bool8 stop) void StopFanfareByFanfareNum(u8 fanfareNum) { - m4aSongNumStop(gFanfares[fanfareNum].songNum); + m4aSongNumStop(sFanfares[fanfareNum].songNum); } void PlayFanfare(u16 songNum) @@ -213,8 +223,7 @@ void PlayFanfare(u16 songNum) s32 i; for (i = 0; (u32)i < 12; i++) { - struct Fanfare *fanfare = &gFanfares[i]; - if (fanfare->songNum == songNum) + if (sFanfares[i].songNum == songNum) { PlayFanfareByFanfareNum(i); CreateFanfareTask(); diff --git a/src/start_menu.c b/src/start_menu.c index 0d9e8af2c..87cb3f593 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -37,11 +37,6 @@ enum { MENU_ACTION_PLAYER_LINK }; -struct MenuItem { - u8 *text; - u8 (*callback)(void); -}; - static u8 (*saveDialogCallback)(void); static u8 saveDialogTimer; //Number of frames to keep the window on screen after save was completed static bool8 savingComplete; @@ -51,7 +46,6 @@ extern u16 gSaveFileStatus; extern u16 gScriptResult; extern u8 (*gCallback_03004AE8)(void); extern u8 gUnknown_03004860; -extern struct MenuItem gStartMenuItems[]; extern u8 gNumSafariBalls; EWRAM_DATA static u8 sStartMenuCursorPos = 0; @@ -67,6 +61,41 @@ extern u8 gSaveText_ThereIsAlreadyAFile[]; extern u8 gSaveText_ThereIsADifferentFile[]; extern u8 gSaveText_WouldYouLikeToSave[]; extern u8 gOtherText_SafariStock[]; +extern u8 SystemText_Pokedex[]; +extern u8 SystemText_Pokemon[]; +extern u8 SystemText_BAG[]; +extern u8 SystemText_Pokenav[]; +extern u8 SystemText_Player[]; +extern u8 SystemText_Save[]; +extern u8 SystemText_Option[]; +extern u8 SystemText_Exit[]; +extern u8 SystemText_Retire[]; +extern u8 SystemText_Player[]; + +static u8 StartMenu_PokedexCallback(void); +static u8 StartMenu_PokemonCallback(void); +static u8 StartMenu_BagCallback(void); +static u8 StartMenu_PokenavCallback(void); +static u8 StartMenu_PlayerCallback(void); +static u8 StartMenu_SaveCallback(void); +static u8 StartMenu_OptionCallback(void); +static u8 StartMenu_ExitCallback(void); +static u8 StartMenu_RetireCallback(void); +static u8 StartMenu_PlayerLinkCallback(void); + +static const struct MenuAction sStartMenuItems[] = +{ + { SystemText_Pokedex, StartMenu_PokedexCallback }, + { SystemText_Pokemon, StartMenu_PokemonCallback }, + { SystemText_BAG, StartMenu_BagCallback }, + { SystemText_Pokenav, StartMenu_PokenavCallback }, + { SystemText_Player, StartMenu_PlayerCallback }, + { SystemText_Save, StartMenu_SaveCallback }, + { SystemText_Option, StartMenu_OptionCallback }, + { SystemText_Exit, StartMenu_ExitCallback }, + { SystemText_Retire, StartMenu_RetireCallback }, + { SystemText_Player, StartMenu_PlayerLinkCallback }, +}; //Private functions static void BuildStartMenuActions(void); @@ -180,7 +209,7 @@ static bool32 PrintStartMenuItemsMultistep(s16 *index, u32 n) do { - MenuPrint(gStartMenuItems[sCurrentStartMenuActions[_index]].text, 23, 2 + _index * 2); + MenuPrint(sStartMenuItems[sCurrentStartMenuActions[_index]].text, 23, 2 + _index * 2); _index++; if(_index >= sNumStartMenuActions) { @@ -303,12 +332,12 @@ static u8 StartMenu_InputProcessCallback(void) if(gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - if(gStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].callback == StartMenu_PokedexCallback) + if(sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func == StartMenu_PokedexCallback) { if(GetNationalPokedexCount(0) == 0) return 0; } - gCallback_03004AE8 = gStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].callback; + gCallback_03004AE8 = sStartMenuItems[sCurrentStartMenuActions[sStartMenuCursorPos]].func; if(gCallback_03004AE8 != StartMenu_SaveCallback && gCallback_03004AE8 != StartMenu_ExitCallback && gCallback_03004AE8 != StartMenu_RetireCallback) @@ -324,7 +353,7 @@ static u8 StartMenu_InputProcessCallback(void) } //When player selects POKEDEX -u8 StartMenu_PokedexCallback(void) +static u8 StartMenu_PokedexCallback(void) { if(!gPaletteFade.active) { @@ -337,7 +366,7 @@ u8 StartMenu_PokedexCallback(void) } //When player selects POKEMON -u8 StartMenu_PokemonCallback(void) +static u8 StartMenu_PokemonCallback(void) { if(!gPaletteFade.active) { @@ -349,7 +378,7 @@ u8 StartMenu_PokemonCallback(void) } //When player selects BAG -u8 StartMenu_BagCallback(void) +static u8 StartMenu_BagCallback(void) { if(!gPaletteFade.active) { @@ -361,7 +390,7 @@ u8 StartMenu_BagCallback(void) } //When player selects POKENAV -u8 StartMenu_PokenavCallback(void) +static u8 StartMenu_PokenavCallback(void) { if(!gPaletteFade.active) { @@ -373,7 +402,7 @@ u8 StartMenu_PokenavCallback(void) } //When player selects his/her name -u8 StartMenu_PlayerCallback(void) +static u8 StartMenu_PlayerCallback(void) { if(!gPaletteFade.active) { @@ -385,7 +414,7 @@ u8 StartMenu_PlayerCallback(void) } //When player selects SAVE -u8 StartMenu_SaveCallback(void) +static u8 StartMenu_SaveCallback(void) { sub_8072DEC(); gCallback_03004AE8 = SaveCallback1; @@ -393,27 +422,27 @@ u8 StartMenu_SaveCallback(void) } //When player selects OPTION -u8 StartMenu_OptionCallback(void) +static u8 StartMenu_OptionCallback(void) { if(!gPaletteFade.active) { PlayRainSoundEffect(); SetMainCallback2(CB2_InitOptionMenu); - gMain.field_8 = sub_805469C; + gMain.savedCallback = sub_805469C; return 1; } return 0; } //When player selects EXIT -u8 StartMenu_ExitCallback(void) +static u8 StartMenu_ExitCallback(void) { CloseMenu(); return 1; } //When player selects RETIRE -u8 StartMenu_RetireCallback(void) +static u8 StartMenu_RetireCallback(void) { CloseMenu(); SafariZoneRetirePrompt(); @@ -421,7 +450,7 @@ u8 StartMenu_RetireCallback(void) } //When player selects their name in multiplayer mode -u8 StartMenu_PlayerLinkCallback(void) +static u8 StartMenu_PlayerLinkCallback(void) { if(!gPaletteFade.active) { @@ -826,7 +855,7 @@ static void Task_8071B64(u8 taskId) (*step)++; break; case 4: - SetMainCallback2(gMain.field_8); + SetMainCallback2(gMain.savedCallback); DestroyTask(taskId); break; } diff --git a/src/starter_choose.c b/src/starter_choose.c index 2750705b8..68e644353 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -266,7 +266,7 @@ static void Task_StarterChoose5(u8 taskId) case 0: //YES //Return the starter choice and exit. gScriptResult = gTasks[taskId].data[TD_STARTERSELECTION]; - SetMainCallback2(gMain.field_8); + SetMainCallback2(gMain.savedCallback); break; case 1: //NO case -1: //B button diff --git a/src/wallclock.c b/src/wallclock.c index 1281fcc55..147a68d31 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -150,7 +150,7 @@ static void WallClockInit(void) } //Allow player to set the clock -void Cb2_StartWallClock(void) +void CB2_StartWallClock(void) { u8 taskId; u8 spriteId; @@ -189,7 +189,7 @@ void Cb2_StartWallClock(void) } //View, but don't set, the clock -void Cb2_ViewWallClock(void) +void CB2_ViewWallClock(void) { u8 taskId; s16 angle1; @@ -332,7 +332,7 @@ static void Task_SetClock5(u8 taskId) static void Task_SetClock6(u8 taskId) { if(!gPaletteFade.active) - SetMainCallback2((MainCallback)gMain.field_8); + SetMainCallback2((MainCallback)gMain.savedCallback); } static void Task_ViewClock1(u8 taskId) @@ -358,7 +358,7 @@ static void Task_ViewClock3(u8 taskId) static void Task_ViewClock4(u8 taskId) { if(!gPaletteFade.active) - SetMainCallback2((MainCallback)gMain.field_8); + SetMainCallback2((MainCallback)gMain.savedCallback); } static u8 CalcMinHandDelta(u16 speed) |