diff --git a/asm/battle_4.s b/asm/battle_4.s index 91dc67d0f..241aa8677 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -30996,7 +30996,7 @@ _08056D0A: movs r0, 0x2 adds r2, r6, 0 adds r3, r5, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen ldr r1, =gBattleCommunication ldrb r0, [r1] adds r0, 0x1 diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 608d7843c..752e4adf1 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -585,7 +585,7 @@ sub_80B0AF8: @ 80B0AF8 _080B0B4C: ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF6F0 str r0, [r1] _080B0B58: diff --git a/asm/cable_car.s b/asm/cable_car.s index 9307c54ff..ba228b729 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -775,7 +775,7 @@ _08150340: str r3, [r2, 0x8] ldr r0, [r2, 0x8] bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback str r4, [r0] ldr r0, =c2_load_new_map bl SetMainCallback2 diff --git a/asm/contest.s b/asm/contest.s index 493cc3733..71e8ab058 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -5582,7 +5582,7 @@ sub_80DA830: @ 80DA830 bne _080DA860 adds r0, r2, 0 bl DestroyTask - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80DA874 str r1, [r0] bl FreeAllWindowBuffers diff --git a/asm/daycare.s b/asm/daycare.s index 792ab66ff..065911df8 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -5,8 +5,8 @@ .text - thumb_func_start pokemon_get_nick -pokemon_get_nick: @ 806FA2C + thumb_func_start GetMonNick +GetMonNick: @ 806FA2C push {r4,lr} sub sp, 0x14 adds r4, r1, 0 @@ -20,10 +20,10 @@ pokemon_get_nick: @ 806FA2C pop {r4} pop {r1} bx r1 - thumb_func_end pokemon_get_nick + thumb_func_end GetMonNick - thumb_func_start pokemon_get_nick_ -pokemon_get_nick_: @ 806FA4C + thumb_func_start GetBoxMonNick +GetBoxMonNick: @ 806FA4C push {r4,lr} sub sp, 0x14 adds r4, r1, 0 @@ -37,7 +37,7 @@ pokemon_get_nick_: @ 806FA4C pop {r4} pop {r1} bx r1 - thumb_func_end pokemon_get_nick_ + thumb_func_end GetBoxMonNick thumb_func_start daycare_count_pokemon daycare_count_pokemon: @ 806FA6C @@ -177,7 +177,7 @@ sub_806FB38: @ 806FB38 adds r4, 0x7C adds r0, r6, 0 adds r1, r4, 0 - bl pokemon_get_nick + bl GetMonNick adds r0, r4, 0 bl StripExtCtrlCodes adds r4, 0xB @@ -376,7 +376,7 @@ sub_806FCF8: @ 806FCF8 sub sp, 0x68 adds r5, r0, 0 ldr r1, =gStringVar1 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r5, 0 movs r1, 0xB bl GetBoxMonData @@ -547,7 +547,7 @@ sub_806FE54: @ 806FE54 bl ConvertIntToDecimalStringN ldr r1, =gStringVar1 adds r0, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r4, 0 pop {r4,r5} pop {r1} @@ -565,7 +565,7 @@ sub_806FE88: @ 806FE88 lsrs r4, 24 ldr r1, =gStringVar1 adds r0, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick movs r0, 0x64 muls r4, r0 adds r4, 0x64 @@ -2175,7 +2175,7 @@ _08070B34: lsrs r0, 24 cmp r0, 0xFF bne _08070BC0 - bl sub_807228C + bl GetEggStepsToSubtract lsls r0, 24 lsrs r6, r0, 24 movs r5, 0 @@ -2280,7 +2280,7 @@ sub_8070C04: @ 8070C04 beq _08070C2E ldr r1, =gStringVar1 adds r0, r4, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r4, 0 movs r1, 0x7 mov r2, sp @@ -2297,7 +2297,7 @@ _08070C2E: beq _08070C44 ldr r1, =gStringVar2 adds r0, r4, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick _08070C44: add sp, 0xC pop {r4} @@ -2317,7 +2317,7 @@ sub_8070C58: @ 8070C58 ldr r4, =gPlayerParty adds r0, r4 ldr r1, =gStringVar1 - bl pokemon_get_nick_ + bl GetBoxMonNick bl brm_get_pokemon_selection lsls r0, 24 lsrs r0, 24 @@ -2788,7 +2788,7 @@ _08070FCC: adds r5, r1, r0 adds r0, r4, 0 adds r1, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r5, 0 adds r1, r4, 0 bl sub_8070F98 @@ -2944,7 +2944,7 @@ sub_8071110: @ 8071110 adds r5, r0 adds r0, r5, 0 mov r1, sp - bl pokemon_get_nick_ + bl GetBoxMonNick mov r0, sp adds r1, r5, 0 bl sub_8070F98 diff --git a/asm/decoration.s b/asm/decoration.s index 3aa7a0784..546cf2dfc 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -4149,7 +4149,7 @@ _08128C30: bl sub_812A3C8 ldr r0, =0x00000be5 bl FreeSpritePaletteByTag - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_8128CD4 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch @@ -6907,7 +6907,7 @@ _0812A280: .pool _0812A29C: bl sub_812A3C8 - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_812A334 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s deleted file mode 100644 index 54695cdd2..000000000 --- a/asm/egg_hatch.s +++ /dev/null @@ -1,1801 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8071348 -sub_8071348: @ 8071348 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x50 - adds r5, r0, 0 - adds r6, r1, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x3C] - movs r4, 0 - add r7, sp, 0x18 - add r0, sp, 0x30 - mov r8, r0 - movs r1, 0x31 - add r1, sp - mov r10, r1 - mov r0, sp - adds r0, 0x32 - str r0, [sp, 0x40] - mov r1, sp - adds r1, 0x34 - str r1, [sp, 0x48] - adds r0, 0x1 - str r0, [sp, 0x44] - adds r1, 0x4 - str r1, [sp, 0x4C] -_08071386: - adds r1, r4, 0 - adds r1, 0xD - adds r0, r5, 0 - bl GetMonData - lsls r1, r4, 1 - add r1, sp - adds r1, 0x10 - strh r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x3 - bls _08071386 - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - mov r9, r0 - movs r4, 0 -_080713AE: - adds r1, r4, 0 - adds r1, 0x27 - adds r0, r5, 0 - bl GetMonData - lsls r1, r4, 2 - adds r1, r7, r1 - str r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x5 - bls _080713AE - adds r0, r5, 0 - movs r1, 0x3 - bl GetMonData - mov r1, r8 - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x25 - bl GetMonData - mov r1, r10 - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x8 - bl GetMonData - ldr r1, [sp, 0x40] - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x22 - bl GetMonData - str r0, [sp, 0x38] - adds r0, r5, 0 - movs r1, 0x50 - bl GetMonData - ldr r1, [sp, 0x48] - strb r0, [r1] - movs r0, 0x1 - str r0, [sp] - mov r0, r9 - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - str r0, [sp, 0xC] - adds r0, r6, 0 - ldr r1, [sp, 0x3C] - movs r2, 0x5 - movs r3, 0x20 - bl CreateMon - movs r4, 0 -_0807141E: - adds r1, r4, 0 - adds r1, 0xD - lsls r0, r4, 1 - mov r2, sp - adds r2, r0 - adds r2, 0x10 - adds r0, r6, 0 - bl SetMonData - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x3 - bls _0807141E - movs r4, 0 -_0807143C: - adds r1, r4, 0 - adds r1, 0x27 - lsls r2, r4, 2 - adds r2, r7, r2 - adds r0, r6, 0 - bl SetMonData - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x5 - bls _0807143C - movs r0, 0x2 - mov r1, r8 - strb r0, [r1] - adds r0, r6, 0 - movs r1, 0x3 - mov r2, r8 - bl SetMonData - adds r0, r6, 0 - movs r1, 0x25 - mov r2, r10 - bl SetMonData - adds r0, r6, 0 - movs r1, 0x8 - ldr r2, [sp, 0x40] - bl SetMonData - movs r0, 0x78 - ldr r1, [sp, 0x44] - strb r0, [r1] - adds r0, r6, 0 - movs r1, 0x20 - ldr r2, [sp, 0x44] - bl SetMonData - adds r0, r6, 0 - movs r1, 0x22 - ldr r2, [sp, 0x4C] - bl SetMonData - adds r0, r6, 0 - movs r1, 0x50 - ldr r2, [sp, 0x48] - bl SetMonData - adds r0, r5, 0 - adds r1, r6, 0 - movs r2, 0x64 - bl memcpy - add sp, 0x50 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8071348 - - thumb_func_start sub_80714B8 -sub_80714B8: @ 80714B8 - push {r4,r5,lr} - sub sp, 0x14 - lsls r0, 24 - lsrs r0, 24 - add r4, sp, 0xC - movs r1, 0x46 - strb r1, [r4] - movs r1, 0x64 - adds r5, r0, 0 - muls r5, r1 - ldr r0, =gPlayerParty - adds r5, r0 - ldr r1, =gEnemyParty - adds r0, r5, 0 - bl sub_8071348 - adds r0, r5, 0 - movs r1, 0x2D - adds r2, r4, 0 - bl SetMonData - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - mov r0, sp - adds r1, r4, 0 - bl GetSpeciesName - adds r0, r5, 0 - movs r1, 0x2 - mov r2, sp - bl SetMonData - adds r0, r4, 0 - bl SpeciesToNationalPokedexNum - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r4, 0 - movs r1, 0x2 - bl GetSetPokedexFlag - adds r0, r4, 0 - movs r1, 0x3 - bl GetSetPokedexFlag - ldr r1, =gStringVar1 - adds r0, r5, 0 - bl pokemon_get_nick - mov r2, sp - adds r2, 0xE - movs r0, 0x4 - strh r0, [r2] - adds r0, r5, 0 - movs r1, 0x26 - bl SetMonData - add r2, sp, 0x10 - movs r0, 0 - strh r0, [r2] - adds r0, r5, 0 - movs r1, 0x24 - bl SetMonData - bl sav1_map_get_name - mov r2, sp - adds r2, 0x12 - strb r0, [r2] - adds r0, r5, 0 - movs r1, 0x23 - bl SetMonData - adds r0, r5, 0 - bl MonRestorePP - adds r0, r5, 0 - bl CalculateMonStats - add sp, 0x14 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80714B8 - - thumb_func_start sub_8071578 -sub_8071578: @ 8071578 - push {lr} - ldr r0, =gSpecialVar_0x8004 - ldrb r0, [r0] - bl sub_80714B8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071578 - - thumb_func_start sub_807158C -sub_807158C: @ 807158C - push {r4-r6,lr} - sub sp, 0x20 - lsls r1, 24 - lsrs r1, 24 - movs r2, 0x8C - muls r1, r2 - adds r4, r0, r1 - adds r0, r4, 0 - mov r1, sp - bl pokemon_get_nick_ - adds r0, r4, 0 - adds r0, 0x70 - ldrh r0, [r0] - cmp r0, 0 - beq _08071608 - adds r6, r4, 0 - adds r6, 0x7C - mov r0, sp - adds r1, r6, 0 - bl StringCompareWithoutExtCtrlCodes - adds r5, r4, 0 - adds r5, 0x74 - cmp r0, 0 - bne _080715CE - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - adds r1, r5, 0 - bl StringCompareWithoutExtCtrlCodes - cmp r0, 0 - beq _08071608 -_080715CE: - ldr r0, =gStringVar1 - mov r1, sp - bl StringCopy - ldr r0, =gStringVar2 - adds r4, 0x87 - ldrb r2, [r4] - lsls r2, 28 - lsrs r2, 28 - adds r1, r5, 0 - bl sub_81DB5E8 - ldr r0, =gStringVar3 - ldrb r2, [r4] - lsrs r2, 4 - adds r1, r6, 0 - bl sub_81DB5E8 - movs r0, 0x1 - b _0807160A - .pool -_08071608: - movs r0, 0 -_0807160A: - add sp, 0x20 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_807158C - - thumb_func_start sub_8071614 -sub_8071614: @ 8071614 - push {lr} - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003030 - adds r0, r1 - ldr r1, =gSpecialVar_0x8004 - ldrb r1, [r1] - bl sub_807158C - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8071614 - - thumb_func_start sub_807163C -sub_807163C: @ 807163C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - mov r9, r3 - lsls r0, 24 - lsrs r3, r0, 24 - mov r8, r3 - lsls r1, 24 - lsrs r6, r1, 24 - lsls r2, 24 - lsrs r1, r2, 24 - adds r2, r1, 0 - movs r4, 0 - movs r7, 0 - movs r5, 0 - cmp r3, 0 - bne _0807166A - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - adds r5, r1, r0 - movs r4, 0x1 -_0807166A: - cmp r3, 0x1 - bne _0807167A - movs r0, 0x64 - adds r1, r2, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r5, r1, r0 - movs r4, 0x3 -_0807167A: - cmp r6, 0 - beq _08071688 - cmp r6, 0x1 - beq _080716D8 - b _08071712 - .pool -_08071688: - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - adds r3, r0, 0 - lsls r0, r4, 3 - ldr r1, =gMonFrontPicTable - adds r0, r1 - ldr r1, =gBattleSpritesGfx - ldr r2, [r1] - mov r6, r8 - lsls r1, r6, 1 - adds r1, 0x1 - lsls r1, 2 - adds r2, 0x4 - adds r2, r1 - ldr r1, [r2] - adds r2, r4, 0 - bl HandleLoadSpecialPokePic_DontHandleDeoxys - adds r0, r5, 0 - bl sub_806E794 - bl LoadCompressedObjectPalette - mov r0, r9 - strh r4, [r0] - b _08071712 - .pool -_080716D8: - adds r0, r5, 0 - bl sub_806E794 - ldrh r0, [r0, 0x4] - adds r1, r4, 0 - bl sub_806A068 - ldr r0, =gUnknown_0202499C - movs r1, 0x78 - movs r2, 0x4B - movs r3, 0x6 - bl CreateSprite - lsls r0, 24 - lsrs r7, r0, 24 - ldr r4, =gSprites - lsls r1, r7, 4 - adds r1, r7 - lsls r1, 2 - adds r2, r1, r4 - adds r2, 0x3E - ldrb r0, [r2] - movs r3, 0x4 - orrs r0, r3 - strb r0, [r2] - adds r4, 0x1C - adds r1, r4 - ldr r0, =SpriteCallbackDummy - str r0, [r1] -_08071712: - adds r0, r7, 0 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_807163C - - thumb_func_start sub_807172C -sub_807172C: @ 807172C - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_807172C - - thumb_func_start sub_8071740 -sub_8071740: @ 8071740 - push {lr} - bl ScriptContext2_Enable - ldr r0, =sub_8071760 - movs r1, 0xA - bl CreateTask - movs r0, 0x1 - movs r1, 0 - bl fade_screen - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071740 - - thumb_func_start sub_8071760 -sub_8071760: @ 8071760 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08071788 - bl overworld_free_bg_tilemaps - ldr r0, =c1_hatching_egg - bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC - ldr r0, =sub_80AF168 - str r0, [r1] - adds r0, r4, 0 - bl DestroyTask -_08071788: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071760 - - thumb_func_start c1_hatching_egg -c1_hatching_egg: @ 80717A0 - push {r4,lr} - sub sp, 0x4 - ldr r0, =gMain - movs r1, 0x87 - lsls r1, 3 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x8 - bls _080717B4 - b _080719D6 -_080717B4: - lsls r0, 2 - ldr r1, =_080717C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080717C8: - .4byte _080717EC - .4byte _080718B8 - .4byte _080718D0 - .4byte _08071904 - .4byte _08071924 - .4byte _0807193C - .4byte _08071954 - .4byte _08071970 - .4byte _080719C8 -_080717EC: - movs r0, 0 - movs r1, 0 - bl SetGpuReg - ldr r4, =gUnknown_03000DE0 - movs r0, 0x14 - bl Alloc - str r0, [r4] - bl init_uns_table_pokemon_copy - ldr r2, [r4] - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - movs r1, 0 - strb r0, [r2, 0x4] - ldr r0, [r4] - strb r1, [r0, 0x7] - ldr r0, =sub_807172C - bl SetVBlankCallback - bl GetCurrentMapMusic - ldr r1, =gSpecialVar_0x8005 - strh r0, [r1] - bl reset_temp_tile_data_buffers - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_0832C064 - movs r0, 0 - movs r2, 0x2 - bl InitBgsFromTemplates - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x1 - movs r1, 0x7 - movs r2, 0x2 - bl SetBgAttribute - movs r0, 0x80 - lsls r0, 5 - bl Alloc - adds r1, r0, 0 - movs r0, 0x1 - bl SetBgTilemapBuffer - movs r0, 0x80 - lsls r0, 6 - bl Alloc - adds r1, r0, 0 - movs r0, 0 - bl SetBgTilemapBuffer - bl DeactivateAllTextPrinters - bl ResetPaletteFade - bl FreeAllSpritePalettes - bl ResetSpriteData - bl ResetTasks - bl remove_some_task - bl m4aSoundVSyncOn - b _080719A6 - .pool -_080718B8: - ldr r0, =gUnknown_0832C06C - bl InitWindows - ldr r0, =gUnknown_03000DE0 - ldr r1, [r0] - movs r0, 0 - strb r0, [r1, 0x8] - b _080719A6 - .pool -_080718D0: - ldr r1, =gUnknown_08C00000 - movs r0, 0 - str r0, [sp] - movs r2, 0 - movs r3, 0 - bl copy_decompressed_tile_data_to_vram_autofree - ldr r1, =gUnknown_08C00524 - movs r0, 0 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - ldr r0, =gUnknown_08C004E0 - movs r1, 0 - movs r2, 0x20 - bl LoadCompressedPalette - b _080719A6 - .pool -_08071904: - ldr r0, =gUnknown_0832BFE4 - bl LoadSpriteSheet - ldr r0, =gUnknown_0832BFEC - bl LoadSpriteSheet - ldr r0, =gUnknown_0832BFF4 - bl LoadSpritePalette - b _080719A6 - .pool -_08071924: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_03000DE0 - ldr r0, [r0] - ldrb r0, [r0, 0x4] - bl sub_80714B8 - b _080719A6 - .pool -_0807193C: - ldr r0, =gUnknown_03000DE0 - ldr r3, [r0] - ldrb r2, [r3, 0x4] - adds r3, 0xC - movs r0, 0 - movs r1, 0 - bl sub_807163C - b _080719A6 - .pool -_08071954: - ldr r4, =gUnknown_03000DE0 - ldr r3, [r4] - ldrb r2, [r3, 0x4] - adds r3, 0xC - movs r0, 0 - movs r1, 0x1 - bl sub_807163C - ldr r1, [r4] - strb r0, [r1, 0x1] - b _080719A6 - .pool -_08071970: - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - ldr r0, =gUnknown_08DD7300 - movs r1, 0x10 - movs r2, 0xA0 - bl LoadPalette - ldr r1, =gUnknown_08DD7360 - movs r2, 0xA1 - lsls r2, 5 - movs r0, 0x1 - movs r3, 0 - bl LoadBgTiles - ldr r1, =gUnknown_08331F60 - movs r2, 0x80 - lsls r2, 5 - movs r0, 0x1 - movs r3, 0 - bl CopyToBgTilemapBuffer - movs r0, 0x1 - bl CopyBgTilemapBufferToVram -_080719A6: - ldr r1, =gMain - movs r0, 0x87 - lsls r0, 3 - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _080719D6 - .pool -_080719C8: - ldr r0, =sub_8071A94 - bl SetMainCallback2 - ldr r0, =gUnknown_03000DE0 - ldr r1, [r0] - movs r0, 0 - strb r0, [r1, 0x2] -_080719D6: - bl RunTasks - bl RunTextPrinters - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end c1_hatching_egg - - thumb_func_start sub_80719FC -sub_80719FC: @ 80719FC - push {lr} - ldr r0, =gSpecialVar_0x8004 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r2, =gStringVar3 - movs r1, 0x2 - bl SetMonData - bl sub_805F094 - ldr r0, =gUnknown_03000DE0 - ldr r0, [r0] - bl Free - ldr r0, =c2_exit_to_overworld_2_switch - bl SetMainCallback2 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80719FC - - thumb_func_start c3_080472E4 -c3_080472E4: @ 8071A3C - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _08071A5C - bl StopMapMusic - bl play_some_sound -_08071A5C: - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - bne _08071A6C - movs r0, 0xBC - lsls r0, 1 - bl PlayBGM -_08071A6C: - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x3C - ble _08071A80 - ldr r0, =0x00000179 - bl PlayBGM - adds r0, r5, 0 - bl DestroyTask -_08071A80: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end c3_080472E4 - - thumb_func_start sub_8071A94 -sub_8071A94: @ 8071A94 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x8 - ldr r1, =gUnknown_03000DE0 - ldr r0, [r1] - ldrb r0, [r0, 0x2] - adds r5, r1, 0 - cmp r0, 0xC - bls _08071AAC - b _08071E06 -_08071AAC: - lsls r0, 2 - ldr r1, =_08071AC0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08071AC0: - .4byte _08071AF4 - .4byte _08071B40 - .4byte _08071B68 - .4byte _08071BA0 - .4byte _08071BF8 - .4byte _08071C24 - .4byte _08071C88 - .4byte _08071C96 - .4byte _08071CA4 - .4byte _08071CE8 - .4byte _08071D1C - .4byte _08071DB4 - .4byte _08071DD4 -_08071AF4: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, =gUnknown_0832BFFC - movs r1, 0x78 - movs r2, 0x4B - movs r3, 0x5 - bl CreateSprite - ldr r4, =gUnknown_03000DE0 - ldr r1, [r4] - strb r0, [r1] - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - ldr r1, [r4] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r0, =c3_080472E4 - movs r1, 0x5 - bl CreateTask - b _08071E06 - .pool -_08071B40: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _08071B52 - b _08071E06 -_08071B52: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0 - bl FillWindowPixelBuffer - ldr r0, [r5] - strb r4, [r0, 0x3] - ldr r1, [r5] - b _08071DC8 - .pool -_08071B68: - ldr r1, [r5] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1E - bhi _08071B7A - b _08071E06 -_08071B7A: - ldr r1, [r5] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r2, =gSprites - ldr r0, [r5] - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, =sub_8071E34 - str r1, [r0] - b _08071E06 - .pool -_08071BA0: - ldr r4, =gSprites - ldr r2, [r5] - ldrb r1, [r2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r1, r4, 0 - adds r1, 0x1C - adds r0, r1 - ldr r1, [r0] - ldr r0, =SpriteCallbackDummy - cmp r1, r0 - beq _08071BBC - b _08071E06 -_08071BBC: - ldrb r1, [r2, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r7, r0, 16 - ldr r0, [r5] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r1, r7, 0 - movs r2, 0 - movs r3, 0x1 - bl DoMonFrontSpriteAnimation - ldr r1, [r5] - b _08071DC8 - .pool -_08071BF8: - ldr r2, =gSprites - ldr r3, [r5] - ldrb r1, [r3, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, [r0] - ldr r0, =SpriteCallbackDummy - cmp r1, r0 - beq _08071C12 - b _08071E06 -_08071C12: - ldrb r0, [r3, 0x2] - adds r0, 0x1 - strb r0, [r3, 0x2] - b _08071E06 - .pool -_08071C24: - ldr r0, [r5] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r1, =gStringVar1 - bl pokemon_get_nick - ldr r4, =gStringVar4 - ldr r1, =gText_PkmnHatchedFromEgg - adds r0, r4, 0 - bl StringExpandPlaceholders - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0xFF - str r1, [sp] - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x3 - bl sub_8072214 - ldr r0, =0x00000173 - bl PlayFanfare - ldr r1, [r5] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r0, [r5] - ldrb r0, [r0, 0x8] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0x3 - bl CopyWindowToVram - b _08071E06 - .pool -_08071C88: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - bne _08071C94 - b _08071E06 -_08071C94: - b _08071DC4 -_08071C96: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - bne _08071CA2 - b _08071E06 -_08071CA2: - b _08071DC4 -_08071CA4: - ldr r0, [r5] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r1, =gStringVar1 - bl pokemon_get_nick - ldr r4, =gStringVar4 - ldr r1, =gText_NameHatchedPkmn - adds r0, r4, 0 - bl StringExpandPlaceholders - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0x1 - str r1, [sp] - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x2 - bl sub_8072214 - ldr r1, [r5] - b _08071DC8 - .pool -_08071CE8: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - beq _08071CF8 - b _08071E06 -_08071CF8: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r4, 0xA0 - lsls r4, 1 - adds r1, r4, 0 - movs r2, 0xE0 - bl sub_809882C - ldr r0, =gUnknown_0832C07C - adds r1, r4, 0 - movs r2, 0xE - movs r3, 0 - bl CreateYesNoMenu - ldr r1, [r5] - b _08071DC8 - .pool -_08071D1C: - bl sub_8198C58 - lsls r0, 24 - asrs r1, r0, 24 - cmp r1, 0 - beq _08071D3C - cmp r1, 0 - bgt _08071D36 - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _08071DC4 - b _08071E06 -_08071D36: - cmp r1, 0x1 - beq _08071DC4 - b _08071E06 -_08071D3C: - ldr r0, =gUnknown_03000DE0 - mov r8, r0 - ldr r0, [r0] - ldrb r0, [r0, 0x4] - movs r6, 0x64 - muls r0, r6 - ldr r5, =gPlayerParty - adds r0, r5 - ldr r1, =gStringVar3 - mov r9, r1 - bl pokemon_get_nick - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r7, r0, 16 - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - bl GetMonGender - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - movs r1, 0 - movs r2, 0 - bl GetMonData - str r0, [sp] - ldr r0, =sub_80719FC - str r0, [sp, 0x4] - movs r0, 0x3 - mov r1, r9 - adds r2, r7, 0 - adds r3, r4, 0 - bl do_choose_name_or_words_screen - b _08071E06 - .pool -_08071DB4: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade -_08071DC4: - ldr r0, =gUnknown_03000DE0 - ldr r1, [r0] -_08071DC8: - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - b _08071E06 - .pool -_08071DD4: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08071E06 - bl sub_805F094 - ldr r4, =gUnknown_03000DE0 - ldr r0, [r4] - ldrb r0, [r0, 0x8] - bl RemoveWindow - movs r0, 0 - bl UnsetBgTilemapBuffer - movs r0, 0x1 - bl UnsetBgTilemapBuffer - ldr r0, [r4] - bl Free - ldr r0, =c2_exit_to_overworld_2_switch - bl SetMainCallback2 -_08071E06: - bl RunTasks - bl RunTextPrinters - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - add sp, 0x8 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071A94 - - thumb_func_start sub_8071E34 -sub_8071E34: @ 8071E34 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x14 - ble _08071E54 - ldr r0, =sub_8071E8C - str r0, [r4, 0x1C] - movs r0, 0 - strh r0, [r4, 0x2E] - b _08071E84 - .pool -_08071E54: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x1 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071E84 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAnim - bl sub_8072140 -_08071E84: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8071E34 - - thumb_func_start sub_8071E8C -sub_8071E8C: @ 8071E8C - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x32] - adds r0, 0x1 - movs r1, 0 - strh r0, [r4, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1E - ble _08071EE8 - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x14 - ble _08071EBC - ldr r0, =sub_8071EF0 - str r0, [r4, 0x1C] - strh r1, [r4, 0x2E] - strh r1, [r4, 0x32] - b _08071EE8 - .pool -_08071EBC: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x2 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071EE8 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnim -_08071EE8: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8071E8C - - thumb_func_start sub_8071EF0 -sub_8071EF0: @ 8071EF0 - push {r4,r5,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x32] - adds r0, 0x1 - movs r5, 0 - strh r0, [r4, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1E - ble _08071F9E - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x26 - ble _08071F5C - ldr r0, =sub_8071FA4 - str r0, [r4, 0x1C] - strh r5, [r4, 0x2E] - ldr r4, =gUnknown_03000DE0 - ldr r0, [r4] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xB - bl GetMonData - ldr r3, =gSprites - ldr r2, [r4] - ldrb r1, [r2, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - strh r5, [r0, 0x24] - ldrb r1, [r2, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - strh r5, [r0, 0x26] - b _08071F9E - .pool -_08071F5C: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x2 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071F90 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnim - bl sub_8072140 - bl sub_8072140 -_08071F90: - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0x1E - bne _08071F9E - movs r0, 0x17 - bl PlaySE -_08071F9E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8071EF0 - - thumb_func_start sub_8071FA4 -sub_8071FA4: @ 8071FA4 - push {lr} - adds r1, r0, 0 - ldrh r0, [r1, 0x2E] - adds r0, 0x1 - strh r0, [r1, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x32 - ble _08071FBE - ldr r0, =sub_8071FC8 - str r0, [r1, 0x1C] - movs r0, 0 - strh r0, [r1, 0x2E] -_08071FBE: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071FA4 - - thumb_func_start sub_8071FC8 -sub_8071FC8: @ 8071FC8 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08071FE8 - movs r1, 0x1 - negs r1, r1 - ldr r0, =0x0000ffff - str r0, [sp] - adds r0, r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade -_08071FE8: - ldrh r0, [r5, 0x2E] - cmp r0, 0x3 - bhi _08072004 - movs r4, 0 -_08071FF0: - bl sub_8072140 - lsls r0, r4, 16 - movs r1, 0x80 - lsls r1, 9 - adds r0, r1 - lsrs r4, r0, 16 - asrs r0, 16 - cmp r0, 0x3 - ble _08071FF0 -_08072004: - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _08072032 - movs r0, 0x71 - bl PlaySE - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r0, =sub_8072048 - str r0, [r5, 0x1C] - strh r4, [r5, 0x2E] -_08072032: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071FC8 - - thumb_func_start sub_8072048 -sub_8072048: @ 8072048 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08072084 - ldr r4, =gSprites - ldr r3, =gUnknown_03000DE0 - ldr r0, [r3] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r2, [r0] - movs r1, 0x5 - negs r1, r1 - ands r1, r2 - strb r1, [r0] - ldr r0, [r3] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0x1 - bl StartSpriteAffineAnim -_08072084: - movs r2, 0x2E - ldrsh r0, [r5, r2] - cmp r0, 0x8 - bne _0807209E - movs r1, 0x1 - negs r1, r1 - ldr r0, =0x0000ffff - str r0, [sp] - adds r0, r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade -_0807209E: - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0x9 - bgt _080720BC - ldr r2, =gSprites - ldr r0, =gUnknown_03000DE0 - ldr r0, [r0] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrh r1, [r0, 0x22] - subs r1, 0x1 - strh r1, [r0, 0x22] -_080720BC: - ldrh r1, [r5, 0x2E] - movs r2, 0x2E - ldrsh r0, [r5, r2] - cmp r0, 0x28 - ble _080720CA - ldr r0, =SpriteCallbackDummy - str r0, [r5, 0x1C] -_080720CA: - adds r0, r1, 0x1 - strh r0, [r5, 0x2E] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8072048 - - thumb_func_start sub_80720E8 -sub_80720E8: @ 80720E8 - push {r4,lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x30] - ldrh r1, [r2, 0x36] - adds r0, r1 - strh r0, [r2, 0x36] - ldrh r1, [r2, 0x32] - ldrh r3, [r2, 0x38] - adds r0, r1, r3 - strh r0, [r2, 0x38] - movs r4, 0x36 - ldrsh r0, [r2, r4] - cmp r0, 0 - bge _08072106 - adds r0, 0xFF -_08072106: - asrs r0, 8 - strh r0, [r2, 0x24] - movs r3, 0x38 - ldrsh r0, [r2, r3] - cmp r0, 0 - bge _08072114 - adds r0, 0xFF -_08072114: - asrs r0, 8 - strh r0, [r2, 0x26] - ldrh r0, [r2, 0x34] - adds r3, r1, r0 - strh r3, [r2, 0x32] - movs r4, 0x22 - ldrsh r1, [r2, r4] - movs r4, 0x26 - ldrsh r0, [r2, r4] - adds r0, r1, r0 - adds r1, 0x14 - cmp r0, r1 - ble _0807213A - lsls r0, r3, 16 - cmp r0, 0 - ble _0807213A - adds r0, r2, 0 - bl DestroySprite -_0807213A: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80720E8 - - thumb_func_start sub_8072140 -sub_8072140: @ 8072140 - push {r4-r6,lr} - sub sp, 0x8 - ldr r2, =gUnknown_0832C084 - ldr r0, =gUnknown_03000DE0 - ldr r6, [r0] - ldrb r3, [r6, 0x7] - lsls r0, r3, 2 - adds r1, r0, r2 - ldrh r5, [r1] - adds r2, 0x2 - adds r0, r2 - ldrh r4, [r0] - adds r3, 0x1 - strb r3, [r6, 0x7] - bl Random - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - lsls r5, 16 - asrs r5, 16 - lsls r4, 16 - asrs r4, 16 - movs r0, 0x64 - str r0, [sp] - lsrs r1, 16 - str r1, [sp, 0x4] - movs r0, 0x78 - movs r1, 0x3C - adds r2, r5, 0 - adds r3, r4, 0 - bl sub_8072194 - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8072140 - - thumb_func_start sub_8072194 -sub_8072194: @ 8072194 - push {r4-r6,lr} - mov r6, r10 - mov r5, r9 - mov r4, r8 - push {r4-r6} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - mov r8, r3 - ldr r0, [sp, 0x1C] - mov r9, r0 - ldr r1, [sp, 0x20] - mov r10, r1 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - lsrs r5, 24 - lsls r6, 16 - lsrs r6, 16 - mov r0, r8 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - mov r1, r9 - lsls r1, 16 - lsrs r1, 16 - mov r9, r1 - mov r0, r10 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r0, =gUnknown_0832C04C - adds r1, r4, 0 - adds r2, r5, 0 - movs r3, 0x4 - bl CreateSprite - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gSprites - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - strh r6, [r0, 0x30] - mov r1, r8 - strh r1, [r0, 0x32] - mov r1, r9 - strh r1, [r0, 0x34] - mov r1, r10 - bl StartSpriteAnim - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8072194 - - thumb_func_start sub_8072214 -sub_8072214: @ 8072214 - push {r4-r6,lr} - mov r6, r9 - mov r5, r8 - push {r5,r6} - sub sp, 0x14 - adds r5, r0, 0 - mov r9, r1 - adds r6, r2, 0 - mov r8, r3 - ldr r4, [sp, 0x2C] - lsls r5, 24 - lsrs r5, 24 - lsls r6, 24 - lsrs r6, 24 - mov r0, r8 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r5, 0 - movs r1, 0xFF - bl FillWindowPixelBuffer - ldr r3, =gUnknown_03000DE0 - ldr r0, [r3] - movs r2, 0 - strb r2, [r0, 0xE] - ldr r1, [r3] - movs r0, 0x5 - strb r0, [r1, 0xF] - ldr r1, [r3] - movs r0, 0x6 - strb r0, [r1, 0x10] - str r2, [sp] - str r2, [sp, 0x4] - ldr r0, [r3] - adds r0, 0xE - str r0, [sp, 0x8] - lsls r4, 24 - asrs r4, 24 - str r4, [sp, 0xC] - mov r0, r9 - str r0, [sp, 0x10] - adds r0, r5, 0 - movs r1, 0x1 - adds r2, r6, 0 - mov r3, r8 - bl AddTextPrinterParametrized2 - add sp, 0x14 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8072214 - - thumb_func_start sub_807228C -sub_807228C: @ 807228C - push {r4-r6,lr} - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0 - cmp r5, r6 - bcs _080722D6 -_0807229C: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x6 - bl GetMonData - cmp r0, 0 - bne _080722CC - adds r0, r4, 0 - bl GetMonAbility - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x28 - beq _080722C4 - cmp r0, 0x31 - bne _080722CC -_080722C4: - movs r0, 0x2 - b _080722D8 - .pool -_080722CC: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r6 - bcc _0807229C -_080722D6: - movs r0, 0x1 -_080722D8: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_807228C - - thumb_func_start sub_80722E0 -sub_80722E0: @ 80722E0 - push {r4,lr} - bl sub_80D22D0 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - movs r0, 0x6 - bl sub_80C7050 - lsls r0, 24 - lsrs r0, 24 - adds r4, r0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80722E0 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/field_effect.s b/asm/field_effect.s index 08670f556..c8ccc49b4 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -1945,7 +1945,7 @@ sub_80B69DC: @ 80B69DC push {lr} ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080842E8 str r0, [r1] pop {r0} @@ -1962,7 +1962,7 @@ mapldr_080842E8: @ 80B69FC bl CreateTask bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -2012,7 +2012,7 @@ _080B6A64: bl warp_in ldr r0, =c2_load_new_map bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_08084390 str r0, [r1] adds r0, r5, 0 @@ -2058,7 +2058,7 @@ mapldr_08084390: @ 80B6AA4 _080B6AE6: bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r4} @@ -2120,7 +2120,7 @@ sub_80B6B68: @ 80B6B68 ldr r0, =sub_80B6B94 movs r1, 0 bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -2761,7 +2761,7 @@ sub_80B7060: @ 80B7060 bne _080B709C bl sub_80E1570 bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B70B4 str r0, [r1] ldr r0, =c2_load_new_map @@ -2786,7 +2786,7 @@ sub_80B70B4: @ 80B70B4 ldr r0, =sub_80B70DC movs r1, 0 bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -3727,7 +3727,7 @@ sub_80B7814: @ 80B7814 cmp r0, 0x1 bne _080B784C bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080851BC str r0, [r1] ldr r0, =c2_load_new_map @@ -3750,7 +3750,7 @@ mapldr_080851BC: @ 80B7868 bl sub_8085784 bl pal_fill_for_maplights bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback movs r1, 0 str r1, [r0] ldr r0, =sub_80B7890 @@ -4202,7 +4202,7 @@ sub_80B7BF4: @ 80B7BF4 cmp r0, 0x1 bne _080B7C2C bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B6B68 str r0, [r1] ldr r0, =c2_load_new_map @@ -4399,7 +4399,7 @@ _080B7D86: bl FieldObjectSetDirection bl sub_8084E14 bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080859D4 str r0, [r1] ldr r0, =c2_load_new_map @@ -4462,7 +4462,7 @@ mapldr_080859D4: @ 80B7E48 bl pal_fill_for_maplights bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] ldr r2, =gMapObjects @@ -4885,7 +4885,7 @@ _080B81B8: bl warp_in ldr r0, =c2_load_new_map bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_08085D88 str r0, [r1] ldr r0, =sub_80B7FDC @@ -4907,7 +4907,7 @@ mapldr_08085D88: @ 80B8200 bl pal_fill_for_maplights bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] ldr r2, =gMapObjects diff --git a/asm/field_screen.s b/asm/field_screen.s index e30408654..13f418f17 100644 --- a/asm/field_screen.s +++ b/asm/field_screen.s @@ -8725,7 +8725,7 @@ sub_80AF734: @ 80AF734 bl play_some_sound movs r0, 0x9 bl PlaySE - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA0C @@ -8743,7 +8743,7 @@ sp13E_warp_to_last_warp: @ 80AF76C bl music_something bl sub_80AF0B4 bl play_some_sound - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA0C @@ -8763,7 +8763,7 @@ sub_80AF79C: @ 80AF79C movs r1, 0x8 bl fade_screen bl play_some_sound - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF3B0 str r1, [r0] ldr r0, =sub_80AFA0C @@ -8778,7 +8778,7 @@ sub_80AF79C: @ 80AF79C sub_80AF7D0: @ 80AF7D0 push {lr} bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA88 @@ -8793,7 +8793,7 @@ sub_80AF7D0: @ 80AF7D0 sp13F_fall_to_last_warp: @ 80AF7F4 push {lr} bl sp13E_warp_to_last_warp - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B6B68 str r0, [r1] pop {r0} @@ -8847,7 +8847,7 @@ sub_80AF848: @ 80AF848 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3E8 str r0, [r1] pop {r0} @@ -8869,7 +8869,7 @@ sub_80AF87C: @ 80AF87C ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF40C str r0, [r1] pop {r0} @@ -8885,7 +8885,7 @@ sub_80AF8B8: @ 80AF8B8 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80FB768 str r0, [r1] pop {r0} @@ -9328,7 +9328,7 @@ sub_80AFC60: @ 80AFC60 bl play_some_sound movs r0, 0x9 bl PlaySE - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF3C8 str r1, [r0] ldr r0, =task0A_fade_n_map_maybe @@ -10078,7 +10078,7 @@ sub_80B0244: @ 80B0244 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3E8 str r0, [r1] pop {r0} @@ -10090,7 +10090,7 @@ sub_80B0244: @ 80B0244 sub_80B0268: @ 80B0268 push {lr} bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80B01BC diff --git a/asm/item_menu.s b/asm/item_menu.s index fbb84bf03..abac409bc 100755 --- a/asm/item_menu.s +++ b/asm/item_menu.s @@ -5744,7 +5744,7 @@ unknown_ItemMenu_Show: @ 81ADE38 thumb_func_start bag_menu_leave_maybe_3 bag_menu_leave_maybe_3: @ 81ADE6C push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_819FA50 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -5779,7 +5779,7 @@ unknown_ItemMenu_Give2: @ 81ADE8C thumb_func_start bag_menu_leave_maybe_2 bag_menu_leave_maybe_2: @ 81ADEBC push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_818DEF4 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -5810,7 +5810,7 @@ unknown_ItemMenu_Confirm2: @ 81ADEDC thumb_func_start bag_menu_leave_maybe bag_menu_leave_maybe: @ 81ADF00 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_818E564 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/item_use.s b/asm/item_use.s index b8eb1d1c4..200b0e62f 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -77,7 +77,7 @@ SetUpItemUseOnFieldCallback: @ 80FD0DC ldrsh r0, [r0, r1] cmp r0, 0x1 beq _080FD110 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_UseItem str r0, [r1] adds r0, r2, 0 @@ -1477,7 +1477,7 @@ _080FDB98: b _080FDBDA .pool _080FDBC8: - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF6D4 str r1, [r0] movs r0, 0x1 @@ -1630,7 +1630,7 @@ sub_80FDD10: @ 80FDD10 ldr r1, =gUnknown_0203A0F4 ldr r0, =sub_80FDD74 str r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_UseItem str r0, [r1] ldr r0, =gUnknown_0203CE54 diff --git a/asm/learn_move.s b/asm/learn_move.s index d8a52ba39..159b16f7e 100755 --- a/asm/learn_move.s +++ b/asm/learn_move.s @@ -49,7 +49,7 @@ sub_8160664: @ 8160664 bne _08160688 ldr r0, =sub_81606A0 bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] adds r0, r4, 0 diff --git a/asm/link.s b/asm/link.s index 0278c7445..d1c8d0542 100644 --- a/asm/link.s +++ b/asm/link.s @@ -24689,7 +24689,7 @@ _08016502: ldr r1, =gUnknown_02022C40 movs r0, 0x1 strh r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF128 str r0, [r1] ldr r1, =c2_exit_to_overworld_2_switch @@ -24987,7 +24987,7 @@ _0801677E: lsls r0, 22 lsrs r0, 22 strh r0, [r2] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF128 str r0, [r1] ldr r1, =c2_exit_to_overworld_2_switch diff --git a/asm/main_menu.s b/asm/main_menu.s index 883bd0cb4..40466ae1b 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -2951,7 +2951,7 @@ task_new_game_prof_birch_speech_17: @ 8031090 str r0, [sp, 0x4] movs r0, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen _080310EC: add sp, 0x8 pop {r4,r5} diff --git a/asm/naming_screen.s b/asm/naming_screen.s index b241d3009..1839a7568 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -5,9 +5,9 @@ .text - thumb_func_start do_choose_name_or_words_screen -@ int do_choose_name_or_words_screen(u8 type, sav2 *sav2_ptr, s16 player_gender, s16 a4, int a5, void ( *after_finishing_callback)()) -do_choose_name_or_words_screen: @ 80E2D78 + thumb_func_start DoNamingScreen +@ int DoNamingScreen(u8 type, sav2 *sav2_ptr, s16 player_gender, s16 a4, int a5, void ( *after_finishing_callback)()) +DoNamingScreen: @ 80E2D78 push {r4-r7,lr} mov r7, r8 push {r7} @@ -65,7 +65,7 @@ _080E2DE2: pop {r0} bx r0 .pool - thumb_func_end do_choose_name_or_words_screen + thumb_func_end DoNamingScreen thumb_func_start c2_choose_name_or_words_screen c2_choose_name_or_words_screen: @ 80E2E04 @@ -4197,7 +4197,7 @@ sub_80E5074: @ 80E5074 str r0, [sp, 0x4] movs r0, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4217,7 +4217,7 @@ sub_80E509C: @ 80E509C str r0, [sp, 0x4] movs r0, 0x1 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4237,7 +4237,7 @@ sub_80E50C4: @ 80E50C4 str r0, [sp, 0x4] movs r0, 0x2 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4257,7 +4257,7 @@ sub_80E50EC: @ 80E50EC str r0, [sp, 0x4] movs r0, 0x3 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 diff --git a/asm/party_menu.s b/asm/party_menu.s index 3621dd0ee..1e47701ae 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -17478,7 +17478,7 @@ sub_81B968C: @ 81B968C str r0, [sp] movs r0, 0x3 bl sub_81BF8EC - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] add sp, 0x4 diff --git a/asm/player_pc.s b/asm/player_pc.s index 8d74f118c..14062347c 100644 --- a/asm/player_pc.s +++ b/asm/player_pc.s @@ -583,7 +583,7 @@ _0816B310: thumb_func_start sub_816B31C sub_816B31C: @ 816B31C push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_080EBC0C str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -1276,7 +1276,7 @@ _0816B8E6: thumb_func_start sub_816B900 sub_816B900: @ 816B900 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =pal_fill_for_maplights_or_black str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -1535,7 +1535,7 @@ _0816BB1C: thumb_func_start sub_816BB28 sub_816BB28: @ 816BB28 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_816BB48 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index 83332e538..6cca9c144 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -870,7 +870,7 @@ sub_80C7678: @ 80C7678 bl sub_80CAEA0 ldr r1, =gUnknown_02039D00 strb r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_0808C6D8 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch @@ -5433,7 +5433,7 @@ _080C9F1C: movs r0, 0x1 movs r2, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen b _080C9F56 .pool _080C9F48: diff --git a/asm/rom4.s b/asm/rom4.s index 1887883d7..13a3b5d26 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -3136,12 +3136,12 @@ map_post_load_hook_exec: @ 8085EA0 _08085EBC: movs r1, 0 str r1, [r4] - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback str r1, [r0] b _08085EEA .pool _08085ECC: - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r0, [r0] cmp r0, 0 beq _08085EE0 @@ -3151,7 +3151,7 @@ _08085ECC: _08085EE0: bl mapldr_default _08085EE4: - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] _08085EEA: @@ -3174,7 +3174,7 @@ CB2_NewGame: @ 8085EF8 bl PlayTimeCounter_Start bl ScriptContext1_Init bl ScriptContext2_Disable - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =ExecuteTruckSequence str r0, [r1] ldr r1, =gUnknown_03005DB0 @@ -3214,7 +3214,7 @@ c2_whiteout: @ 8085F58 bl player_avatar_init_params_reset bl ScriptContext1_Init bl ScriptContext2_Disable - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3C8 str r0, [r1] mov r1, sp @@ -3304,7 +3304,7 @@ _08086062: sub_8086074: @ 8086074 push {lr} bl sub_808631C - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF314 str r1, [r0] ldr r0, =c2_80567AC @@ -3399,12 +3399,12 @@ c2_8056854: @ 8086140 ldrb r0, [r0] cmp r0, 0 beq _08086174 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF314 b _08086178 .pool _08086174: - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF214 _08086178: str r0, [r1] @@ -3433,7 +3433,7 @@ sub_8086194: @ 8086194 sub_80861B0: @ 80861B0 push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF188 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3446,7 +3446,7 @@ sub_80861B0: @ 80861B0 c2_exit_to_overworld_1_continue_scripts_restart_music: @ 80861CC push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3459,7 +3459,7 @@ c2_exit_to_overworld_1_continue_scripts_restart_music: @ 80861CC sub_80861E8: @ 80861E8 push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3C8 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3562,7 +3562,7 @@ _080862BE: .pool _080862F4: bl sub_80EDB44 - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_8086204 str r1, [r0] ldr r0, =c1_overworld diff --git a/asm/rom6.s b/asm/rom6.s index e664a9666..cd1421b4f 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -1984,7 +1984,7 @@ sub_8136524: @ 8136524 lsrs r0, 24 cmp r0, 0x1 bhi _0813655A - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] _0813655A: @@ -4651,7 +4651,7 @@ sub_8137C3C: @ 8137C3C push {lr} ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080CA5C0 str r0, [r1] pop {r0} diff --git a/asm/roulette.s b/asm/roulette.s index 5742e089f..009f30717 100644 --- a/asm/roulette.s +++ b/asm/roulette.s @@ -3273,7 +3273,7 @@ sub_8141E7C: @ 8141E7C bl ResetPaletteFade bl ResetSpriteData bl sub_8140418 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/secret_base.s b/asm/secret_base.s index fd4fe6701..e514e88f1 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -686,7 +686,7 @@ _080E900C: _080E9030: bl sub_80E8F9C bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF168 str r1, [r0] ldr r0, =c2_load_new_map @@ -863,7 +863,7 @@ sub_80E916C: @ 80E916C adds r0, r5, 0 bl warp1_set bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80E9108 str r0, [r1] ldr r0, =c2_load_new_map @@ -1486,7 +1486,7 @@ _080E96F4: movs r0, 0x7E bl copy_saved_warp2_bank_and_enter_x_to_warp1 bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =c2_load_new_map diff --git a/asm/shop.s b/asm/shop.s index 646390732..aa993b7de 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -227,7 +227,7 @@ HandleShopMenuSell: @ 80DFC0C @ int CB2_ExitSellMenu() CB2_ExitSellMenu: @ 80DFC48 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =MapPostLoadHook_ExitBuyOrSellMenu str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -2668,7 +2668,7 @@ ExitBuyMenu: @ 80E1168 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_ExitBuyOrSellMenu str r0, [r1] movs r0, 0x1 diff --git a/asm/trade.s b/asm/trade.s index 77eaac095..8712567c7 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -14195,7 +14195,7 @@ sub_807F110: @ 807F110 bne _0807F134 ldr r0, =sub_807B270 bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] adds r0, r4, 0 diff --git a/asm/tv.s b/asm/tv.s index 3d57b3dba..20098a40a 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -7530,7 +7530,7 @@ sub_80EFDDC: @ 80EFDDC mov r1, r10 adds r2, r5, 0 adds r3, r4, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r3-r5} mov r8, r3 @@ -7604,7 +7604,7 @@ sub_80EFEC4: @ 80EFEC4 mov r1, r8 adds r2, r5, 0 adds r3, r4, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r3} mov r8, r3 diff --git a/asm/walda_phrase.s b/asm/walda_phrase.s index 9b27b99cb..be754f386 100755 --- a/asm/walda_phrase.s +++ b/asm/walda_phrase.s @@ -22,7 +22,7 @@ walda_maybe: @ 81D99E4 adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r4} pop {r0} @@ -70,7 +70,7 @@ _081D9A68: adds r1, r0, 0 adds r0, r4, 0 bl StringCopy - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/data/data3.s b/data/data3.s index 1d4dc544c..c249a668c 100644 --- a/data/data3.s +++ b/data/data3.s @@ -22,2393 +22,3 @@ gUnknown_0832B6F8:: @ 832B6F8 gEggName:: @ 832B708 .string "タマゴ$" @ "tamago" ("egg" in Japanese) - -@ 832B70C - .incbin "baserom.gba", 0x32b70c, 0x8d8 - -gUnknown_0832BFE4:: @ 832BFE4 - .incbin "baserom.gba", 0x32bfe4, 0x8 - -gUnknown_0832BFEC:: @ 832BFEC - .incbin "baserom.gba", 0x32bfec, 0x8 - -gUnknown_0832BFF4:: @ 832BFF4 - .incbin "baserom.gba", 0x32bff4, 0x8 - -gUnknown_0832BFFC:: @ 832BFFC - .incbin "baserom.gba", 0x32bffc, 0x50 - -gUnknown_0832C04C:: @ 832C04C - .incbin "baserom.gba", 0x32c04c, 0x18 - -gUnknown_0832C064:: @ 832C064 - .incbin "baserom.gba", 0x32c064, 0x8 - -gUnknown_0832C06C:: @ 832C06C - .incbin "baserom.gba", 0x32c06c, 0x10 - -gUnknown_0832C07C:: @ 832C07C - .incbin "baserom.gba", 0x32c07c, 0x8 - -gUnknown_0832C084:: @ 832C084 - .incbin "baserom.gba", 0x32c084, 0x4c - -gUnknown_0832C0D0:: @ 832C0D0 - .incbin "baserom.gba", 0x32c0d0, 0x8 - -gUnknown_0832C0D8:: @ 832C0D8 - .incbin "baserom.gba", 0x32c0d8, 0x8 - -gUnknown_0832C0E0:: @ 832C0E0 - .incbin "baserom.gba", 0x32c0e0, 0x8 - -gUnknown_0832C0E8:: @ 832C0E8 - .incbin "baserom.gba", 0x32c0e8, 0x8 - -gUnknown_0832C0F0:: @ 832C0F0 - .incbin "baserom.gba", 0x32c0f0, 0x8 - -gUnknown_0832C0F8:: @ 832C0F8 - .incbin "baserom.gba", 0x32c0f8, 0x8 - -gUnknown_0832C100:: @ 832C100 - .incbin "baserom.gba", 0x32c100, 0x8 - -gUnknown_0832C108:: @ 832C108 - .incbin "baserom.gba", 0x32c108, 0x20 - -gUnknown_0832C128:: @ 832C128 - .incbin "baserom.gba", 0x32c128, 0x18 - -gUnknown_0832C140:: @ 832C140 - .incbin "baserom.gba", 0x32c140, 0x30 - -gUnknown_0832C170:: @ 832C170 - .incbin "baserom.gba", 0x32c170, 0x30 - -gUnknown_0832C1A0:: @ 832C1A0 - .incbin "baserom.gba", 0x32c1a0, 0x20 - -gUnknown_0832C1C0:: @ 832C1C0 - .incbin "baserom.gba", 0x32c1c0, 0xcc - -gUnknown_0832C28C:: @ 832C28C - .incbin "baserom.gba", 0x32c28c, 0x38 - -gUnknown_0832C2C4:: @ 832C2C4 - .incbin "baserom.gba", 0x32c2c4, 0x8 - -gUnknown_0832C2CC:: @ 832C2CC - .incbin "baserom.gba", 0x32c2cc, 0x68 - -gUnknown_0832C334:: @ 832C334 - .incbin "baserom.gba", 0x32c334, 0x8 - -gUnknown_0832C33C:: @ 832C33C - .incbin "baserom.gba", 0x32c33c, 0x8 - -gUnknown_0832C344:: @ 832C344 - .incbin "baserom.gba", 0x32c344, 0x8 - -gUnknown_0832C34C:: @ 832C34C - .incbin "baserom.gba", 0x32c34c, 0x18 - -gUnknown_0832C364:: @ 832C364 - .incbin "baserom.gba", 0x32c364, 0x30 - -gUnknown_0832C394:: @ 832C394 - .incbin "baserom.gba", 0x32c394, 0x30 - -gUnknown_0832C3C4:: @ 832C3C4 - .incbin "baserom.gba", 0x32c3c4, 0x14 - -gUnknown_0832C3D8:: @ 832C3D8 - .incbin "baserom.gba", 0x32c3d8, 0x14 - -gUnknown_0832C3EC:: @ 832C3EC - .incbin "baserom.gba", 0x32c3ec, 0xc - -gUnknown_0832C3F8:: @ 832C3F8 - .incbin "baserom.gba", 0x32c3f8, 0x8 - -gUnknown_0832C400:: @ 832C400 - .incbin "baserom.gba", 0x32c400, 0x60 - -gUnknown_0832C460:: @ 832C460 - .incbin "baserom.gba", 0x32c460, 0x128 - -gUnknown_0832C588:: @ 832C588 - .incbin "baserom.gba", 0x32c588, 0x138 - -gUnknown_0832C6C0:: @ 832C6C0 - .incbin "baserom.gba", 0x32c6c0, 0x1fe - -gUnknown_0832C8BE:: @ 832C8BE - .incbin "baserom.gba", 0x32c8be, 0x1fe - -gUnknown_0832CABC:: @ 832CABC - .incbin "baserom.gba", 0x32cabc, 0x800 - -gUnknown_0832D2BC:: @ 832D2BC - .incbin "baserom.gba", 0x32d2bc, 0x800 - -gUnknown_0832DABC:: @ 832DABC - .incbin "baserom.gba", 0x32dabc, 0xb - -gUnknown_0832DAC7:: @ 832DAC7 - .incbin "baserom.gba", 0x32dac7, 0x2 - -gUnknown_0832DAC9:: @ 832DAC9 - .incbin "baserom.gba", 0x32dac9, 0x2 - -gUnknown_0832DACB:: @ 832DACB - .incbin "baserom.gba", 0x32dacb, 0x7 - -gUnknown_0832DAD2:: @ 832DAD2 - .incbin "baserom.gba", 0x32dad2, 0xd - -gUnknown_0832DADF:: @ 832DADF - .incbin "baserom.gba", 0x32dadf, 0x6 - -gUnknown_0832DAE5:: @ 832DAE5 - .incbin "baserom.gba", 0x32dae5, 0x157 - -gUnknown_0832DC3C:: @ 832DC3C - .incbin "baserom.gba", 0x32dc3c, 0x8 - -gUnknown_0832DC44:: @ 832DC44 - .incbin "baserom.gba", 0x32dc44, 0x50 - -gUnknown_0832DC94:: @ 832DC94 - .incbin "baserom.gba", 0x32dc94, 0x18 - -gUnknown_0832DCAC:: @ 832DCAC - .incbin "baserom.gba", 0x32dcac, 0x38 - -gUnknown_0832DCE4:: @ 832DCE4 - .incbin "baserom.gba", 0x32dce4, 0x8 - -gUnknown_0832DCEC:: @ 832DCEC - .incbin "baserom.gba", 0x32dcec, 0x138 - -gUnknown_0832DE24:: @ 832DE24 - .incbin "baserom.gba", 0x32de24, 0x1a - -gUnknown_0832DE3E:: @ 832DE3E - .incbin "baserom.gba", 0x32de3e, 0x18 - -gUnknown_0832DE56:: @ 832DE56 - .incbin "baserom.gba", 0x32de56, 0x3e - -gUnknown_0832DE94:: @ 832DE94 - .incbin "baserom.gba", 0x32de94, 0x18 - -gUnknown_0832DEAC:: @ 832DEAC - .incbin "baserom.gba", 0x32deac, 0x10 - -gUnknown_0832DEBC:: @ 832DEBC - .incbin "baserom.gba", 0x32debc, 0x24 - -gUnknown_0832DEE0:: @ 832DEE0 - .incbin "baserom.gba", 0x32dee0, 0x4 - -gUnknown_0832DEE4:: @ 832DEE4 - .incbin "baserom.gba", 0x32dee4, 0x10 - -gUnknown_0832DEF4:: @ 832DEF4 - .incbin "baserom.gba", 0x32def4, 0x98 - -gUnknown_0832DF8C:: @ 832DF8C - .incbin "baserom.gba", 0x32df8c, 0x8 - -gUnknown_0832DF94:: @ 832DF94 - .incbin "baserom.gba", 0x32df94, 0x5 - -gUnknown_0832DF99:: @ 832DF99 - .incbin "baserom.gba", 0x32df99, 0x2027 - -gUnknown_0832FFC0:: @ 832FFC0 - .incbin "baserom.gba", 0x32ffc0, 0x1fa0 - -gUnknown_08331F60:: @ 8331F60 - .incbin "baserom.gba", 0x331f60, 0x1000 - -gUnknown_08332F60:: @ 8332F60 - .incbin "baserom.gba", 0x332f60, 0x2840 - -gUnknown_083357A0:: @ 83357A0 - .incbin "baserom.gba", 0x3357a0, 0x100 - -gUnknown_083358A0:: @ 83358A0 - .incbin "baserom.gba", 0x3358a0, 0x100 - -gUnknown_083359A0:: @ 83359A0 - .incbin "baserom.gba", 0x3359a0, 0x1000 - -gUnknown_083369A0:: @ 83369A0 - .incbin "baserom.gba", 0x3369a0, 0x1000 - -gUnknown_083379A0:: @ 83379A0 - .incbin "baserom.gba", 0x3379a0, 0x100 - -gUnknown_08337AA0:: @ 8337AA0 - .incbin "baserom.gba", 0x337aa0, 0x200 - -gUnknown_08337CA0:: @ 8337CA0 - .incbin "baserom.gba", 0x337ca0, 0x200 - -gUnknown_08337EA0:: @ 8337EA0 - .incbin "baserom.gba", 0x337ea0, 0x20 - -gUnknown_08337EC0:: @ 8337EC0 - .incbin "baserom.gba", 0x337ec0, 0x690 - -gUnknown_08338550:: @ 8338550 - .incbin "baserom.gba", 0x338550, 0x7c8 - -gUnknown_08338D18:: @ 8338D18 - .incbin "baserom.gba", 0x338d18, 0x8 - -gUnknown_08338D20:: @ 8338D20 - .incbin "baserom.gba", 0x338d20, 0x8 - -gUnknown_08338D28:: @ 8338D28 - .incbin "baserom.gba", 0x338d28, 0x48 - -gUnknown_08338D70:: @ 8338D70 - .incbin "baserom.gba", 0x338d70, 0x8 - -gUnknown_08338D78:: @ 8338D78 - .incbin "baserom.gba", 0x338d78, 0x8 - -gUnknown_08338D80:: @ 8338D80 - .incbin "baserom.gba", 0x338d80, 0x8 - -gUnknown_08338D88:: @ 8338D88 - .incbin "baserom.gba", 0x338d88, 0x38 - -gUnknown_08338DC0:: @ 8338DC0 - .incbin "baserom.gba", 0x338dc0, 0x8 - -gUnknown_08338DC8:: @ 8338DC8 - .incbin "baserom.gba", 0x338dc8, 0x2c - -gUnknown_08338DF4:: @ 8338DF4 - .incbin "baserom.gba", 0x338df4, 0x8 - -gUnknown_08338DFC:: @ 8338DFC - .incbin "baserom.gba", 0x338dfc, 0x70 - -gUnknown_08338E6C:: @ 8338E6C - .incbin "baserom.gba", 0x338e6c, 0x8 - -gUnknown_08338E74:: @ 8338E74 - .incbin "baserom.gba", 0x338e74, 0x18 - -gUnknown_08338E8C:: @ 8338E8C - .incbin "baserom.gba", 0x338e8c, 0x18 - -gUnknown_08338EA4:: @ 8338EA4 - .incbin "baserom.gba", 0x338ea4, 0x28 - -gUnknown_08338ECC:: @ 8338ECC - .incbin "baserom.gba", 0x338ecc, 0x4 - -gUnknown_08338ED0:: @ 8338ED0 - .incbin "baserom.gba", 0x338ed0, 0xf0 - -gUnknown_08338FC0:: @ 8338FC0 - .incbin "baserom.gba", 0x338fc0, 0x3c - -gUnknown_08338FFC:: @ 8338FFC - .incbin "baserom.gba", 0x338ffc, 0x10 - -gUnknown_0833900C:: @ 833900C - .incbin "baserom.gba", 0x33900c, 0x8 - -gUnknown_08339014:: @ 8339014 - .incbin "baserom.gba", 0x339014, 0x10 - -gUnknown_08339024:: @ 8339024 - .incbin "baserom.gba", 0x339024, 0x6c - -gUnknown_08339090:: @ 8339090 - .incbin "baserom.gba", 0x339090, 0x44 - -gUnknown_083390D4:: @ 83390D4 - .incbin "baserom.gba", 0x3390d4, 0x20 - -gUnknown_083390F4:: @ 83390F4 - .incbin "baserom.gba", 0x3390f4, 0x400 - -gUnknown_083394F4:: @ 83394F4 - .incbin "baserom.gba", 0x3394f4, 0x246 - -gUnknown_0833973A:: @ 833973A - .incbin "baserom.gba", 0x33973a, 0x61 - -gUnknown_0833979B:: @ 833979B - .incbin "baserom.gba", 0x33979b, 0x2 - -gUnknown_0833979D:: @ 833979D - .incbin "baserom.gba", 0x33979d, 0x33 - -gUnknown_083397D0:: @ 83397D0 - .incbin "baserom.gba", 0x3397d0, 0x4a - -gUnknown_0833981A:: @ 833981A - .incbin "baserom.gba", 0x33981a, 0x17 - -gUnknown_08339831:: @ 8339831 - .incbin "baserom.gba", 0x339831, 0x27 - -gUnknown_08339858:: @ 8339858 - .incbin "baserom.gba", 0x339858, 0x3e - -gUnknown_08339896:: @ 8339896 - .incbin "baserom.gba", 0x339896, 0x1a - -gUnknown_083398B0:: @ 83398B0 - .incbin "baserom.gba", 0x3398b0, 0x2d - -gUnknown_083398DD:: @ 83398DD - .incbin "baserom.gba", 0x3398dd, 0x18 - -gUnknown_083398F5:: @ 83398F5 - .incbin "baserom.gba", 0x3398f5, 0x1f - -gUnknown_08339914:: @ 8339914 - .incbin "baserom.gba", 0x339914, 0x7 - -gUnknown_0833991B:: @ 833991B - .incbin "baserom.gba", 0x33991b, 0x6 - -gUnknown_08339921:: @ 8339921 - .incbin "baserom.gba", 0x339921, 0x7 - -gUnknown_08339928:: @ 8339928 - .incbin "baserom.gba", 0x339928, 0x6 - -gUnknown_0833992E:: @ 833992E - .incbin "baserom.gba", 0x33992e, 0xe - -gUnknown_0833993C:: @ 833993C - .incbin "baserom.gba", 0x33993c, 0x5 - -gUnknown_08339941:: @ 8339941 - .incbin "baserom.gba", 0x339941, 0x2 - -gUnknown_08339943:: @ 8339943 - .incbin "baserom.gba", 0x339943, 0x4 - -gUnknown_08339947:: @ 8339947 - .incbin "baserom.gba", 0x339947, 0x8 - -gUnknown_0833994F:: @ 833994F - .incbin "baserom.gba", 0x33994f, 0xe - -gUnknown_0833995D:: @ 833995D - .incbin "baserom.gba", 0x33995d, 0x13 - -gUnknown_08339970:: @ 8339970 - .incbin "baserom.gba", 0x339970, 0x4 - -gUnknown_08339974:: @ 8339974 - .incbin "baserom.gba", 0x339974, 0xc - -gUnknown_08339980:: @ 8339980 - .incbin "baserom.gba", 0x339980, 0x38 - -gUnknown_083399B8:: @ 83399B8 - .incbin "baserom.gba", 0x3399b8, 0x8 - -gUnknown_083399C0:: @ 83399C0 - .incbin "baserom.gba", 0x3399c0, 0x8 - -gUnknown_083399C8:: @ 83399C8 - .incbin "baserom.gba", 0x3399c8, 0x8 - -gUnknown_083399D0:: @ 83399D0 - .incbin "baserom.gba", 0x3399d0, 0xc - -gUnknown_083399DC:: @ 83399DC - .incbin "baserom.gba", 0x3399dc, 0x8 - -gUnknown_083399E4:: @ 83399E4 - .incbin "baserom.gba", 0x3399e4, 0x3 - -gUnknown_083399E7:: @ 83399E7 - .incbin "baserom.gba", 0x3399e7, 0x5 - -gUnknown_083399EC:: @ 83399EC - .incbin "baserom.gba", 0x3399ec, 0xd4 - -gUnknown_08339AC0:: @ 8339AC0 - .incbin "baserom.gba", 0x339ac0, 0x8 - -gUnknown_08339AC8:: @ 8339AC8 - .incbin "baserom.gba", 0x339ac8, 0x8 - -gUnknown_08339AD0:: @ 8339AD0 - .incbin "baserom.gba", 0x339ad0, 0x8 - -gUnknown_08339AD8:: @ 8339AD8 - .incbin "baserom.gba", 0x339ad8, 0x60 - -gUnknown_08339B38:: @ 8339B38 - .incbin "baserom.gba", 0x339b38, 0x8 - -gUnknown_08339B40:: @ 8339B40 - .incbin "baserom.gba", 0x339b40, 0x98 - -gUnknown_08339BD8:: @ 8339BD8 - .incbin "baserom.gba", 0x339bd8, 0x8 - -gUnknown_08339BE0:: @ 8339BE0 - .incbin "baserom.gba", 0x339be0, 0x44 - -gUnknown_08339C24:: @ 8339C24 - .incbin "baserom.gba", 0x339c24, 0x8 - -gUnknown_08339C2C:: @ 8339C2C - .incbin "baserom.gba", 0x339c2c, 0x2c - -gUnknown_08339C58:: @ 8339C58 - .incbin "baserom.gba", 0x339c58, 0x8 - -gUnknown_08339C60:: @ 8339C60 - .incbin "baserom.gba", 0x339c60, 0x18 - -gUnknown_08339C78:: @ 8339C78 - .incbin "baserom.gba", 0x339c78, 0x28 - -gUnknown_08339CA0:: @ 8339CA0 - .incbin "baserom.gba", 0x339ca0, 0x1e - -gUnknown_08339CBE:: @ 8339CBE - .incbin "baserom.gba", 0x339cbe, 0x5 - -gUnknown_08339CC3:: @ 8339CC3 - .incbin "baserom.gba", 0x339cc3, 0x5 - -gUnknown_08339CC8:: @ 8339CC8 - .incbin "baserom.gba", 0x339cc8, 0x4c - -gUnknown_08339D14:: @ 8339D14 - .incbin "baserom.gba", 0x339d14, 0x8 - -gContestWinnerPicDummy:: @ 8339D1C - .incbin "baserom.gba", 0x339d1c, 0x20 - -gUnknown_08339D3C:: @ 8339D3C - .incbin "baserom.gba", 0x339d3c, 0x28 - -gUnknown_08339D64:: @ 8339D64 - .incbin "baserom.gba", 0x339d64, 0x48 - -gUnknown_08339DAC:: @ 8339DAC - .incbin "baserom.gba", 0x339dac, 0x10 - -gUnknown_08339DBC:: @ 8339DBC - .incbin "baserom.gba", 0x339dbc, 0xc - -gUnknown_08339DC8:: @ 8339DC8 - .incbin "baserom.gba", 0x339dc8, 0xc - -gUnknown_08339DD4:: @ 8339DD4 - .incbin "baserom.gba", 0x339dd4, 0x2c - -gUnknown_08339E00:: @ 8339E00 - .incbin "baserom.gba", 0x339e00, 0x8 - -@ 8339E08 - .include "data/tilesets/tileset_graphics.inc" - -@ 83960F0 - .include "data/tilesets/metatiles.inc" - -@ 83DF704 - .include "data/tilesets/tilesets.inc" - -@ 83DFE14 - .incbin "baserom.gba", 0x3dfe14, 0xa1fc0 - -gUnknown_08481DD4:: @ 8481DD4 - .incbin "baserom.gba", 0x481dd4, 0x47a4 - -gUnknown_08486578:: @ 8486578 - .incbin "baserom.gba", 0x486578, 0x980 - -gUnknown_08486EF8:: @ 8486EF8 - .incbin "baserom.gba", 0x486ef8, 0x4 - -gUnknown_08486EFC:: @ 8486EFC - .incbin "baserom.gba", 0x486efc, 0x10090 - -gUnknown_08496F8C:: @ 8496F8C - .incbin "baserom.gba", 0x496f8c, 0x14 - -gUnknown_08496FA0:: @ 8496FA0 - .incbin "baserom.gba", 0x496fa0, 0x14 - -gUnknown_08496FB4:: @ 8496FB4 - .incbin "baserom.gba", 0x496fb4, 0x1c0 - -gUnknown_08497174:: @ 8497174 - .incbin "baserom.gba", 0x497174, 0x288 - -gUnknown_084973FC:: @ 84973FC - .incbin "baserom.gba", 0x4973fc, 0x48 - -gUnknown_08497444:: @ 8497444 - .incbin "baserom.gba", 0x497444, 0x4c - -gUnknown_08497490:: @ 8497490 - .incbin "baserom.gba", 0x497490, 0xc - -gUnknown_0849749C:: @ 849749C - .incbin "baserom.gba", 0x49749c, 0x14 - -gUnknown_084974B0:: @ 84974B0 - .incbin "baserom.gba", 0x4974b0, 0x8 - -gUnknown_084974B8:: @ 84974B8 - .incbin "baserom.gba", 0x4974b8, 0x20 - -gUnknown_084974D8:: @ 84974D8 - .incbin "baserom.gba", 0x4974d8, 0x10 - -gUnknown_084974E8:: @ 84974E8 - .incbin "baserom.gba", 0x4974e8, 0x10 - -gUnknown_084974F8:: @ 84974F8 - .incbin "baserom.gba", 0x4974f8, 0x10 - -gUnknown_08497508:: @ 8497508 - .incbin "baserom.gba", 0x497508, 0x2 - -gUnknown_0849750A:: @ 849750A - .incbin "baserom.gba", 0x49750a, 0x2 - -gUnknown_0849750C:: @ 849750C - .incbin "baserom.gba", 0x49750c, 0x14 - -gUnknown_08497520:: @ 8497520 - .incbin "baserom.gba", 0x497520, 0x10 - -gUnknown_08497530:: @ 8497530 - .incbin "baserom.gba", 0x497530, 0xc - -gUnknown_0849753C:: @ 849753C - .incbin "baserom.gba", 0x49753c, 0x4 - -gUnknown_08497540:: @ 8497540 - .incbin "baserom.gba", 0x497540, 0x10 - -gUnknown_08497550:: @ 8497550 - .incbin "baserom.gba", 0x497550, 0x4 - -gUnknown_08497554:: @ 8497554 - .incbin "baserom.gba", 0x497554, 0x8 - -gUnknown_0849755C:: @ 849755C - .incbin "baserom.gba", 0x49755c, 0x40 - -gUnknown_0849759C:: @ 849759C - .incbin "baserom.gba", 0x49759c, 0x6 - -gUnknown_084975A2:: @ 84975A2 - .incbin "baserom.gba", 0x4975a2, 0x6 - -gUnknown_084975A8:: @ 84975A8 - .incbin "baserom.gba", 0x4975a8, 0x2 - -gUnknown_084975AA:: @ 84975AA - .incbin "baserom.gba", 0x4975aa, 0x6 - -gUnknown_084975B0:: @ 84975B0 - .incbin "baserom.gba", 0x4975b0, 0xc - -gUnknown_084975BC:: @ 84975BC - .incbin "baserom.gba", 0x4975bc, 0x8 - -// data/field_map_obj.s - - .section .rodata_b - -gUnknown_0850E5DC:: @ 850E5DC - .incbin "baserom.gba", 0x50e5dc, 0x8 - -gUnknown_0850E5E4:: @ 850E5E4 - .incbin "baserom.gba", 0x50e5e4, 0x18 - -gUnknown_0850E5FC:: @ 850E5FC - .incbin "baserom.gba", 0x50e5fc, 0x18 - -gUnknown_0850E614:: @ 850E614 - .incbin "baserom.gba", 0x50e614, 0x10 - -gUnknown_0850E624:: @ 850E624 - .incbin "baserom.gba", 0x50e624, 0x10 - -gUnknown_0850E634:: @ 850E634 - .incbin "baserom.gba", 0x50e634, 0x10 - -gUnknown_0850E644:: @ 850E644 - .incbin "baserom.gba", 0x50e644, 0x10 - -gUnknown_0850E654:: @ 850E654 - .incbin "baserom.gba", 0x50e654, 0xc - -gUnknown_0850E660:: @ 850E660 - .incbin "baserom.gba", 0x50e660, 0x4 - -gUnknown_0850E664:: @ 850E664 - .incbin "baserom.gba", 0x50e664, 0x10 - -gUnknown_0850E674:: @ 850E674 - .incbin "baserom.gba", 0x50e674, 0xe0 - -gUnknown_0850E754:: @ 850E754 - .incbin "baserom.gba", 0x50e754, 0x14 - -gUnknown_0850E768:: @ 850E768 - .incbin "baserom.gba", 0x50e768, 0xa - -gUnknown_0850E772:: @ 850E772 - .incbin "baserom.gba", 0x50e772, 0x48 - -gUnknown_0850E7BA:: @ 850E7BA - .incbin "baserom.gba", 0x50e7ba, 0x7a - -gUnknown_0850E834:: @ 850E834 - .incbin "baserom.gba", 0x50e834, 0xc - -gUnknown_0850E840:: @ 850E840 - .incbin "baserom.gba", 0x50e840, 0x6 - -gUnknown_0850E846:: @ 850E846 - .incbin "baserom.gba", 0x50e846, 0x4 - -gUnknown_0850E84A:: @ 850E84A - .incbin "baserom.gba", 0x50e84a, 0x6 - -gUnknown_0850E850:: @ 850E850 - .incbin "baserom.gba", 0x50e850, 0x4 -gUnknown_0850E854:: - .incbin "baserom.gba", 0x50e854, 0x8 -gUnknown_0850E85C:: - .incbin "baserom.gba", 0x50e85C, 0x8 -gUnknown_0850E864:: - .incbin "baserom.gba", 0x50e864, 0xc -gUnknown_0850E870:: - .incbin "baserom.gba", 0x50e870, 0xc - -gUnknown_0850E87C:: @ 850E87C - .incbin "baserom.gba", 0x50e87c, 0x1680 - -gUnknown_0850FEFC:: @ 850FEFC - .incbin "baserom.gba", 0x50fefc, 0x280 - -gUnknown_0851017C:: @ 851017C - .incbin "baserom.gba", 0x51017c, 0xa0 - -gUnknown_0851021C:: @ 851021C - .incbin "baserom.gba", 0x51021c, 0xa0 - -gNullScriptPtr:: @ 85102BC - .incbin "baserom.gba", 0x5102bc, 0x4 - -gUnknown_085102C0:: @ 85102C0 - .incbin "baserom.gba", 0x5102c0, 0x14 - -gUnknown_085102D4:: @ 85102D4 - .incbin "baserom.gba", 0x5102d4, 0xc - -gUnknown_085102E0:: @ 85102E0 - .incbin "baserom.gba", 0x5102e0, 0x68 - -gUnknown_08510348:: @ 8510348 - .incbin "baserom.gba", 0x510348, 0x20 - -gUnknown_08510368:: @ 8510368 - .incbin "baserom.gba", 0x510368, 0x20 - -gUnknown_08510388:: @ 8510388 - .incbin "baserom.gba", 0x510388, 0x20 - -gUnknown_085103A8:: @ 85103A8 - .incbin "baserom.gba", 0x5103a8, 0x20 - -gUnknown_085103C8:: @ 85103C8 - .incbin "baserom.gba", 0x5103c8, 0x34 - -gUnknown_085103FC:: @ 85103FC - .incbin "baserom.gba", 0x5103fc, 0x8 - -gUnknown_08510404:: @ 8510404 - .incbin "baserom.gba", 0x510404, 0x4 - -gUnknown_08510408:: @ 8510408 - .incbin "baserom.gba", 0x510408, 0x14 - -gUnknown_0851041C:: @ 851041C - .incbin "baserom.gba", 0x51041c, 0x4 - -gUnknown_08510420:: @ 8510420 - .incbin "baserom.gba", 0x510420, 0xa4 - -gUnknown_085104C4:: @ 85104C4 - .incbin "baserom.gba", 0x5104c4, 0x2c - -gUnknown_085104F0:: @ 85104F0 - .incbin "baserom.gba", 0x5104f0, 0x18 - -gSafariBallsWindowTemplate:: @ 8510508 - .incbin "baserom.gba", 0x510508, 0x8 - -gUnknown_08510510:: @ 8510510 - .incbin "baserom.gba", 0x510510, 0x20 - -gPyramidFloorWindowTemplate_2:: @ 8510530 - .incbin "baserom.gba", 0x510530, 0x8 - -gPyramidFloorWindowTemplate_1:: @ 8510538 - .incbin "baserom.gba", 0x510538, 0x8 - -sStartMenuItems:: @ 8510540 - .incbin "baserom.gba", 0x510540, 0x68 - -gUnknown_085105A8:: @ 85105A8 - .incbin "baserom.gba", 0x5105a8, 0x4 - -gUnknown_085105AC:: @ 85105AC - .incbin "baserom.gba", 0x5105ac, 0x10 - -gUnknown_085105BC:: @ 85105BC - .incbin "baserom.gba", 0x5105bc, 0x1a8 - -gUnknown_08510764:: @ 8510764 - .incbin "baserom.gba", 0x510764, 0xb60 - -gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x908 - -gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x9a8 - -gUnknown_08512574:: @ 8512574 - .incbin "baserom.gba", 0x512574, 0x8e0 - -gUnknown_08512E54:: @ 8512E54 - .incbin "baserom.gba", 0x512e54, 0x320 - -gUnknown_08513174:: @ 8513174 - .incbin "baserom.gba", 0x513174, 0x510 - -gUnknown_08513684:: @ 8513684 - .incbin "baserom.gba", 0x513684, 0x210 - -gUnknown_08513894:: @ 8513894 - .incbin "baserom.gba", 0x513894, 0xb50 - -gUnknown_085143E4:: @ 85143E4 - .incbin "baserom.gba", 0x5143e4, 0x210 - -gUnknown_085145F4:: @ 85145F4 - .incbin "baserom.gba", 0x5145f4, 0x810 - -gUnknown_08514E04:: @ 8514E04 - .incbin "baserom.gba", 0x514e04, 0x540 - -gUnknown_08515344:: @ 8515344 - .incbin "baserom.gba", 0x515344, 0x20 - -gUnknown_08515364:: @ 8515364 - .incbin "baserom.gba", 0x515364, 0x20 - -gUnknown_08515384:: @ 8515384 - .incbin "baserom.gba", 0x515384, 0x30 - -gUnknown_085153B4:: @ 85153B4 - .incbin "baserom.gba", 0x5153b4, 0x30 - -gUnknown_085153E4:: @ 85153E4 - .incbin "baserom.gba", 0x5153e4, 0x10 - -gUnknown_085153F4:: @ 85153F4 - .incbin "baserom.gba", 0x5153f4, 0x410 - -gUnknown_08515804:: @ 8515804 - .incbin "baserom.gba", 0x515804, 0x20 - -gUnknown_08515824:: @ 8515824 - .incbin "baserom.gba", 0x515824, 0x140 - -gUnknown_08515964:: @ 8515964 - .incbin "baserom.gba", 0x515964, 0x428 - -gUnknown_08515D8C:: @ 8515D8C - .incbin "baserom.gba", 0x515d8c, 0x430 - -gUnknown_085161BC:: @ 85161BC - .incbin "baserom.gba", 0x5161bc, 0x20 - -gUnknown_085161DC:: @ 85161DC - .incbin "baserom.gba", 0x5161dc, 0x320 - -gUnknown_085164FC:: @ 85164FC - .incbin "baserom.gba", 0x5164fc, 0x310 - -gUnknown_0851680C:: @ 851680C - .incbin "baserom.gba", 0x51680c, 0x310 - -gUnknown_08516B1C:: @ 8516B1C - .incbin "baserom.gba", 0x516b1c, 0x210 - -gUnknown_08516D2C:: @ 8516D2C - .incbin "baserom.gba", 0x516d2c, 0x110 - -gUnknown_08516E3C:: @ 8516E3C - .incbin "baserom.gba", 0x516e3c, 0xc08 - -gUnknown_08517A44:: @ 8517A44 - .incbin "baserom.gba", 0x517a44, 0xc - -gUnknown_08517A50:: @ 8517A50 - .incbin "baserom.gba", 0x517a50, 0x1ac - -gUnknown_08517BFC:: @ 8517BFC - .incbin "baserom.gba", 0x517bfc, 0x10 - -gUnknown_08517C0C:: @ 8517C0C - .incbin "baserom.gba", 0x517c0c, 0x428 - -gUnknown_08518034:: @ 8518034 - .incbin "baserom.gba", 0x518034, 0x268 - -gUnknown_0851829C:: @ 851829C - .incbin "baserom.gba", 0x51829c, 0x8028 - -gUnknown_085202C4:: @ 85202C4 - .incbin "baserom.gba", 0x5202c4, 0x45a0 - -gUnknown_08524864:: @ 8524864 - .incbin "baserom.gba", 0x524864, 0xc - -gUnknown_08524870:: @ 8524870 - .incbin "baserom.gba", 0x524870, 0xc - -gUnknown_0852487C:: @ 852487C - .incbin "baserom.gba", 0x52487c, 0x10 - -gDummyPaletteStructTemplate:: @ 852488C - .2byte 0xFFFF - .space 9 - .byte 0x20 - .space 4 - - .align 2 -gUnknown_0852489C:: @ 852489C - .incbin "baserom.gba", 0x52489c, 0x20 - -sFanfares:: @ 85248BC - .incbin "baserom.gba", 0x5248bc, 0x48 - -gUnknown_08524904:: @ 8524904 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852490C:: @ 852490C - .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524914:: @ 8524914 - .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852491C:: @ 852491C - .byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524924:: @ 8524924 - .byte 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852492C:: @ 852492C - .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524934:: @ 8524934 - .byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852493C:: @ 852493C - .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524944:: @ 8524944 - .byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852494C:: @ 852494C - .byte 0x00, 0x80, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524954:: @ 8524954 - .byte 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852495C:: @ 852495C - .byte 0x00, 0x80, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524964:: @ 8524964 - .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852496C:: @ 852496C - .byte 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524974:: @ 8524974 - .byte 0x00, 0x01, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852497C:: @ 852497C - .byte 0x00, 0x01, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524984:: @ 8524984 - .byte 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852498C:: @ 852498C - .byte 0x00, 0x41, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524994:: @ 8524994 - .byte 0x00, 0x41, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852499C:: @ 852499C - .byte 0x00, 0x41, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249A4:: @ 85249A4 - .byte 0x00, 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249AC:: @ 85249AC - .byte 0x00, 0x81, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249B4:: @ 85249B4 - .byte 0x00, 0x81, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249BC:: @ 85249BC - .byte 0x00, 0x81, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249C4:: @ 85249C4 - .byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249CC:: @ 85249CC - .byte 0x00, 0x03, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249D4:: @ 85249D4 - .byte 0x00, 0x03, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249DC:: @ 85249DC - .byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249E4:: @ 85249E4 - .byte 0x00, 0x43, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249EC:: @ 85249EC - .byte 0x00, 0x43, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249F4:: @ 85249F4 - .byte 0x00, 0x43, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249FC:: @ 85249FC - .byte 0x00, 0x43, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A04:: @ 8524A04 - .byte 0x00, 0x83, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A0C:: @ 8524A0C - .byte 0x00, 0x83, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A14:: @ 8524A14 - .byte 0x00, 0x83, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A1C:: @ 8524A1C - .byte 0x00, 0x83, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A24:: @ 8524A24 - .byte 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A2C:: @ 8524A2C - .byte 0x00, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A34:: @ 8524A34 - .byte 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A3C:: @ 8524A3C - .byte 0x00, 0x04, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A44:: @ 8524A44 - .byte 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A4C:: @ 8524A4C - .byte 0x00, 0x44, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A54:: @ 8524A54 - .byte 0x00, 0x44, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A5C:: @ 8524A5C - .byte 0x00, 0x44, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A64:: @ 8524A64 - .byte 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A6C:: @ 8524A6C - .byte 0x00, 0x84, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A74:: @ 8524A74 - .byte 0x00, 0x84, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A7C:: @ 8524A7C - .byte 0x00, 0x84, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A84:: @ 8524A84 - .byte 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A8C:: @ 8524A8C - .byte 0x00, 0x05, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A94:: @ 8524A94 - .byte 0x00, 0x05, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A9C:: @ 8524A9C - .byte 0x00, 0x05, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AA4:: @ 8524AA4 - .byte 0x00, 0x45, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AAC:: @ 8524AAC - .byte 0x00, 0x45, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AB4:: @ 8524AB4 - .byte 0x00, 0x45, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ABC:: @ 8524ABC - .byte 0x00, 0x45, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AC4:: @ 8524AC4 - .byte 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ACC:: @ 8524ACC - .byte 0x00, 0x85, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AD4:: @ 8524AD4 - .byte 0x00, 0x85, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ADC:: @ 8524ADC - .byte 0x00, 0x85, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AE4:: @ 8524AE4 - .byte 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AEC:: @ 8524AEC - .byte 0x00, 0x07, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AF4:: @ 8524AF4 - .byte 0x00, 0x07, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AFC:: @ 8524AFC - .byte 0x00, 0x07, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B04:: @ 8524B04 - .byte 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B0C:: @ 8524B0C - .byte 0x00, 0x47, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B14:: @ 8524B14 - .byte 0x00, 0x47, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B1C:: @ 8524B1C - .byte 0x00, 0x47, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B24:: @ 8524B24 - .byte 0x00, 0x87, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B2C:: @ 8524B2C - .byte 0x00, 0x87, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B34:: @ 8524B34 - .byte 0x00, 0x87, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B3C:: @ 8524B3C - .byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - -gUnknown_08524B44:: @ 8524B44 - .incbin "baserom.gba", 0x524b44, 0x1d0 - -gUnknown_08524D14:: @ 8524D14 - .incbin "baserom.gba", 0x524d14, 0x270 - -gUnknown_08524F84:: @ 8524F84 - .incbin "baserom.gba", 0x524f84, 0x308 - -gUnknown_0852528C:: @ 852528C - .incbin "baserom.gba", 0x52528c, 0x120 - -gUnknown_085253AC:: @ 85253AC - .incbin "baserom.gba", 0x5253ac, 0x270 - -gUnknown_0852561C:: @ 852561C - .incbin "baserom.gba", 0x52561c, 0x270 - -gUnknown_0852588C:: @ 852588C - .incbin "baserom.gba", 0x52588c, 0x308 - -gUnknown_08525B94:: @ 8525B94 - .incbin "baserom.gba", 0x525b94, 0x120 - -gUnknown_08525CB4:: @ 8525CB4 - .incbin "baserom.gba", 0x525cb4, 0xa0 - -gUnknown_08525D54:: @ 8525D54 - .incbin "baserom.gba", 0x525d54, 0x144 - -gUnknown_08525E98:: @ 8525E98 - .incbin "baserom.gba", 0x525e98, 0xc0 - -gUnknown_08525F58:: @ 8525F58 - .incbin "baserom.gba", 0x525f58, 0x20 - -gUnknown_08525F78:: @ 8525F78 - .incbin "baserom.gba", 0x525f78, 0x10 - -gUnknown_08525F88:: @ 8525F88 - .incbin "baserom.gba", 0x525f88, 0x4 - -gUnknown_08525F8C:: @ 8525F8C - .incbin "baserom.gba", 0x525f8c, 0x4 - -gUnknown_08525F90:: @ 8525F90 - .incbin "baserom.gba", 0x525f90, 0x30 - -gUnknown_08525FC0:: @ 8525FC0 - .incbin "baserom.gba", 0x525fc0, 0x18f80 - -gUnknown_0853EF40:: @ 853EF40 - .incbin "baserom.gba", 0x53ef40, 0x8 - -gUnknown_0853EF48:: @ 853EF48 - .incbin "baserom.gba", 0x53ef48, 0x18 - -gUnknown_0853EF60:: @ 853EF60 - .incbin "baserom.gba", 0x53ef60, 0xf8 - -gTitleScreenRayquazaTiles:: @ 853F058 - .incbin "graphics/title_screen/rayquaza.4bpp.lz" - - .align 2 -gUnknown_0853F83C:: @ 853F83C - .incbin "baserom.gba", 0x53f83c, 0x450 - -gTitleScreenCloudsTiles:: @ 853FC8C - .incbin "graphics/title_screen/clouds.4bpp.lz" - - .align 2 -gUnknown_0853FF70:: @ 853FF70 - .incbin "baserom.gba", 0x53ff70, 0xa8 - -gUnknown_08540018:: @ 8540018 - .incbin "baserom.gba", 0x540018, 0x18 - -gUnknown_08540030:: @ 8540030 - .incbin "baserom.gba", 0x540030, 0x18 - -gUnknown_08540048:: @ 8540048 - .incbin "baserom.gba", 0x540048, 0x90 - -gUnknown_085400D8:: @ 85400D8 - .incbin "baserom.gba", 0x5400d8, 0x18 - -gUnknown_085400F0:: @ 85400F0 - .incbin "baserom.gba", 0x5400f0, 0x10 - -gUnknown_08540100:: @ 8540100 - .incbin "baserom.gba", 0x540100, 0x24 - -gUnknown_08540124:: @ 8540124 - .incbin "baserom.gba", 0x540124, 0x18 - -gUnknown_0854013C:: @ 854013C - .incbin "baserom.gba", 0x54013c, 0x10 - -gUnknown_0854014C:: @ 854014C - .incbin "baserom.gba", 0x54014c, 0xc000 - -gUnknown_0854C14C:: @ 854C14C - .incbin "baserom.gba", 0x54c14c, 0x4 - -gUnknown_0854C150:: @ 854C150 - .incbin "baserom.gba", 0x54c150, 0xf0 - -gUnknown_0854C240:: @ 854C240 - .incbin "baserom.gba", 0x54c240, 0x10 - -gUnknown_0854C250:: @ 854C250 - .incbin "baserom.gba", 0x54c250, 0x20 - -gUnknown_0854C270:: @ 854C270 - .incbin "baserom.gba", 0x54c270, 0x20 - -gUnknown_0854C290:: @ 854C290 - .incbin "baserom.gba", 0x54c290, 0x20 - -gUnknown_0854C2B0:: @ 854C2B0 - .incbin "baserom.gba", 0x54c2b0, 0x820 - -gUnknown_0854CAD0:: @ 854CAD0 - .incbin "baserom.gba", 0x54cad0, 0x3080 - -gUnknown_0854FB50:: @ 854FB50 - .incbin "baserom.gba", 0x54fb50, 0xc - -gUnknown_0854FB5C:: @ 854FB5C - .incbin "baserom.gba", 0x54fb5c, 0x1c - -gUnknown_0854FB78:: @ 854FB78 - .incbin "baserom.gba", 0x54fb78, 0x18 - -gUnknown_0854FB90:: @ 854FB90 - .incbin "baserom.gba", 0x54fb90, 0x9c - -gUnknown_0854FC2C:: @ 854FC2C - .incbin "baserom.gba", 0x54fc2c, 0x18 - -gUnknown_0854FC44:: @ 854FC44 - .incbin "baserom.gba", 0x54fc44, 0x8 - -gUnknown_0854FC4C:: @ 854FC4C - .incbin "baserom.gba", 0x54fc4c, 0x8 - -gUnknown_0854FC54:: @ 854FC54 - .incbin "baserom.gba", 0x54fc54, 0x38 - -gUnknown_0854FC8C:: @ 854FC8C - .incbin "baserom.gba", 0x54fc8c, 0x8c - -gUnknown_0854FD18:: @ 854FD18 - .incbin "baserom.gba", 0x54fd18, 0x18 - -gUnknown_0854FD30:: @ 854FD30 - .incbin "baserom.gba", 0x54fd30, 0x8 - -gUnknown_0854FD38:: @ 854FD38 - .incbin "baserom.gba", 0x54fd38, 0x20 - -gUnknown_0854FD58:: @ 854FD58 - .incbin "baserom.gba", 0x54fd58, 0x18 - -gUnknown_0854FD70:: @ 854FD70 - .incbin "baserom.gba", 0x54fd70, 0x1c - -gUnknown_0854FD8C:: @ 854FD8C - .incbin "baserom.gba", 0x54fd8c, 0x38 - -gUnknown_0854FDC4:: @ 854FDC4 - .incbin "baserom.gba", 0x54fdc4, 0x18 - -gUnknown_0854FDDC:: @ 854FDDC - .incbin "baserom.gba", 0x54fddc, 0x8 - -gUnknown_0854FDE4:: @ 854FDE4 - .incbin "baserom.gba", 0x54fde4, 0xc - -gUnknown_0854FDF0:: @ 854FDF0 - .incbin "baserom.gba", 0x54fdf0, 0x8 - -gUnknown_0854FDF8:: @ 854FDF8 - .incbin "baserom.gba", 0x54fdf8, 0x8 - -gUnknown_0854FE00:: @ 854FE00 - .incbin "baserom.gba", 0x54fe00, 0x44 - -gUnknown_0854FE44:: @ 854FE44 - .incbin "baserom.gba", 0x54fe44, 0x18 - -gUnknown_0854FE5C:: @ 854FE5C - .incbin "baserom.gba", 0x54fe5c, 0x4 - -gUnknown_0854FE60:: @ 854FE60 - .incbin "baserom.gba", 0x54fe60, 0x4 - -gUnknown_0854FE64:: @ 854FE64 - .incbin "baserom.gba", 0x54fe64, 0x14 - -gUnknown_0854FE78:: @ 854FE78 - .incbin "baserom.gba", 0x54fe78, 0x4 - -gUnknown_0854FE7C:: @ 854FE7C - .incbin "baserom.gba", 0x54fe7c, 0xc - -gUnknown_0854FE88:: @ 854FE88 - .incbin "baserom.gba", 0x54fe88, 0x8 - -gUnknown_0854FE90:: @ 854FE90 - .incbin "baserom.gba", 0x54fe90, 0x8 - -gUnknown_0854FE98:: @ 854FE98 - .incbin "baserom.gba", 0x54fe98, 0xc - -gUnknown_0854FEA4:: @ 854FEA4 - .incbin "baserom.gba", 0x54fea4, 0x3 - -gUnknown_0854FEA7:: @ 854FEA7 - .incbin "baserom.gba", 0x54fea7, 0x5 - -gUnknown_0854FEAC:: @ 854FEAC - .incbin "baserom.gba", 0x54feac, 0x48 - -gUnknown_0854FEF4:: @ 854FEF4 - .incbin "baserom.gba", 0x54fef4, 0x48 - -gUnknown_0854FF3C:: @ 854FF3C - .incbin "baserom.gba", 0x54ff3c, 0x48 - -gUnknown_0854FF84:: @ 854FF84 - .incbin "baserom.gba", 0x54ff84, 0x48 - -gUnknown_0854FFCC:: @ 854FFCC - .incbin "baserom.gba", 0x54ffcc, 0x48 - -gUnknown_08550014:: @ 8550014 - .incbin "baserom.gba", 0x550014, 0x48 - -gUnknown_0855005C:: @ 855005C - .incbin "baserom.gba", 0x55005c, 0x48 - -gUnknown_085500A4:: @ 85500A4 - .incbin "baserom.gba", 0x5500a4, 0x4e0 - -gUnknown_08550584:: @ 8550584 - .incbin "baserom.gba", 0x550584, 0x10 - -gUnknown_08550594:: @ 8550594 - .incbin "baserom.gba", 0x550594, 0x8 - -gUnknown_0855059C:: @ 855059C - .incbin "baserom.gba", 0x55059c, 0x190 - -gUnknown_0855072C:: @ 855072C - .incbin "baserom.gba", 0x55072c, 0x10 - -gUnknown_0855073C:: @ 855073C - .incbin "baserom.gba", 0x55073c, 0x30 - -gUnknown_0855076C:: @ 855076C - .incbin "baserom.gba", 0x55076c, 0x48 - -gUnknown_085507B4:: @ 85507B4 - .incbin "baserom.gba", 0x5507b4, 0x18 - -gUnknown_085507CC:: @ 85507CC - .incbin "baserom.gba", 0x5507cc, 0x18 - -@ 85507E4 - .include "data/wild_mons.inc" - - .incbin "baserom.gba", 0x55370c, 0x188 - -gUnknown_08553894:: @ 8553894 - .incbin "baserom.gba", 0x553894, 0x180 - -gUnknown_08553A14:: @ 8553A14 - .incbin "baserom.gba", 0x553a14, 0x64 - -gUnknown_08553A78:: @ 8553A78 - .incbin "baserom.gba", 0x553a78, 0x4 - -gUnknown_08553A7C:: @ 8553A7C - .incbin "baserom.gba", 0x553a7c, 0x14 - - .align 2 -gNewGameBirchPic:: @ 8553A90 - .incbin "graphics/birch_speech/birch.4bpp" - - .incbin "baserom.gba", 0x554290, 0x66c0 - - .align 2 -gNewGameBirchPalette:: @ 855A950 - .incbin "graphics/birch_speech/birch.gbapal" - - .align 2 - .incbin "baserom.gba", 0x55a970, 0x20 - - .align 2 -gFieldEffectObjectPalette4:: @ 855A990 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_04.gbapal" - - .incbin "baserom.gba", 0x55a9b0, 0x480 - - .align 2 -gFieldEffectObjectPalette5:: @ 855AE30 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_05.gbapal" - -gUnknown_0855AE50:: @ 855AE50 - .incbin "baserom.gba", 0x55ae50, 0x200 - -gUnknown_0855B050:: @ 855B050 - .incbin "baserom.gba", 0x55b050, 0x20 - -gUnknown_0855B070:: @ 855B070 - .incbin "baserom.gba", 0x55b070, 0x280 - -gUnknown_0855B2F0:: @ 855B2F0 - .incbin "baserom.gba", 0x55b2f0, 0x80 - -gUnknown_0855B370:: @ 855B370 - .incbin "baserom.gba", 0x55b370, 0x20 - -gUnknown_0855B390:: @ 855B390 - .incbin "baserom.gba", 0x55b390, 0x280 - -gUnknown_0855B610:: @ 855B610 - .incbin "baserom.gba", 0x55b610, 0x20 - -gUnknown_0855B630:: @ 855B630 - .incbin "baserom.gba", 0x55b630, 0xbc0 - -gUnknown_0855C1F0:: @ 855C1F0 - .incbin "baserom.gba", 0x55c1f0, 0x20 - - .align 2 -@ TODO: something else uses these too -gNewGameBirchOamAttributes:: @ 855C210 - .4byte OAM_SIZE_64x64 - .2byte 0 - - .align 2 - .incbin "baserom.gba", 0x55c218, 0x10 - - .align 2 -gNewGameBirchPicTable:: @ 855C228 - obj_tiles gNewGameBirchPic, 0x800 - - .align 2 -gNewGameBirchObjectPaletteInfo:: @ 855C230 - obj_pal gNewGameBirchPalette, 0x1006 - - .align 2 -gNewGameBirchImageAnim:: @ 855C238 - obj_image_anim_frame 0, 1 - obj_image_anim_end - - .align 2 -gNewGameBirchImageAnimTable:: @ 855C240 - .4byte gNewGameBirchImageAnim - - .align 2 -gNewGameBirchObjectTemplate:: @ 855C244 - .2byte 0xFFFF @ tiles tag - .2byte 0x1006 @ palette tag - .4byte gNewGameBirchOamAttributes - .4byte gNewGameBirchImageAnimTable - .4byte gNewGameBirchPicTable - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy - - .align 2 -gFieldEffectObjectPaletteInfo4:: @ 855C25C - obj_pal gFieldEffectObjectPalette4, 0x1007 - - .align 2 -gFieldEffectObjectPaletteInfo5:: @ 855C264 - obj_pal gFieldEffectObjectPalette5, 0x1010 - - .incbin "baserom.gba", 0x55c26c, 0x40 - -gUnknown_0855C2AC:: @ 855C2AC - .incbin "baserom.gba", 0x55c2ac, 0x18 - -gUnknown_0855C2C4:: @ 855C2C4 - .incbin "baserom.gba", 0x55c2c4, 0x40 - -gUnknown_0855C304:: @ 855C304 - .incbin "baserom.gba", 0x55c304, 0x18 - -gUnknown_0855C31C:: @ 855C31C - .incbin "baserom.gba", 0x55c31c, 0x18 - -gUnknown_0855C334:: @ 855C334 - .incbin "baserom.gba", 0x55c334, 0x18 - -gUnknown_0855C34C:: @ 855C34C - .incbin "baserom.gba", 0x55c34c, 0x18 - -gUnknown_0855C364:: @ 855C364 - .incbin "baserom.gba", 0x55c364, 0x10 - -gUnknown_0855C374:: @ 855C374 - .incbin "baserom.gba", 0x55c374, 0x10 - -gUnknown_0855C384:: @ 855C384 - .incbin "baserom.gba", 0x55c384, 0x20 - -gUnknown_0855C3A4:: @ 855C3A4 - .incbin "baserom.gba", 0x55c3a4, 0x18 - -gUnknown_0855C3BC:: @ 855C3BC - .incbin "baserom.gba", 0x55c3bc, 0x4 - -gUnknown_0855C3C0:: @ 855C3C0 - .incbin "baserom.gba", 0x55c3c0, 0x4 - -gUnknown_0855C3C4:: @ 855C3C4 - .incbin "baserom.gba", 0x55c3c4, 0x4 - -gUnknown_0855C3C8:: @ 855C3C8 - .incbin "baserom.gba", 0x55c3c8, 0x1c - -gUnknown_0855C3E4:: @ 855C3E4 - .incbin "baserom.gba", 0x55c3e4, 0x18 - -gUnknown_0855C3FC:: @ 855C3FC - .incbin "baserom.gba", 0x55c3fc, 0x1c - -gUnknown_0855C418:: @ 855C418 - .incbin "baserom.gba", 0x55c418, 0x14 - -gUnknown_0855C42C:: @ 855C42C - .incbin "baserom.gba", 0x55c42c, 0xc - -gUnknown_0855C438:: @ 855C438 - .incbin "baserom.gba", 0x55c438, 0x18 - -gUnknown_0855C450:: @ 855C450 - .incbin "baserom.gba", 0x55c450, 0x10 - -gUnknown_0855C460:: @ 855C460 - .incbin "baserom.gba", 0x55c460, 0x14 - -gUnknown_0855C474:: @ 855C474 - .incbin "baserom.gba", 0x55c474, 0x8 - -gUnknown_0855C47C:: @ 855C47C - .incbin "baserom.gba", 0x55c47c, 0x8 - -gUnknown_0855C484:: @ 855C484 - .incbin "baserom.gba", 0x55c484, 0x8 - -gUnknown_0855C48C:: @ 855C48C - .incbin "baserom.gba", 0x55c48c, 0x10 - -gUnknown_0855C49C:: @ 855C49C - .incbin "baserom.gba", 0x55c49c, 0xc - -gUnknown_0855C4A8:: @ 855C4A8 - .incbin "baserom.gba", 0x55c4a8, 0x1c - -gUnknown_0855C4C4:: @ 855C4C4 - .incbin "baserom.gba", 0x55c4c4, 0x1c - -gUnknown_0855C4E0:: @ 855C4E0 - .incbin "baserom.gba", 0x55c4e0, 0x14 - -gUnknown_0855C4F4:: @ 855C4F4 - .incbin "baserom.gba", 0x55c4f4, 0x54 - -gUnknown_0855C548:: @ 855C548 - .incbin "baserom.gba", 0x55c548, 0x8 - -gUnknown_0855C550:: @ 855C550 - .incbin "baserom.gba", 0x55c550, 0x1c - -gUnknown_0855C56C:: @ 855C56C - .incbin "baserom.gba", 0x55c56c, 0x24 - -gUnknown_0855C590:: @ 855C590 - .incbin "baserom.gba", 0x55c590, 0x5c - -gUnknown_0855C5EC:: @ 855C5EC - .incbin "baserom.gba", 0x55c5ec, 0x18 - -gUnknown_0855C604:: @ 855C604 - .incbin "baserom.gba", 0x55c604, 0x60 - -gUnknown_0855C664:: @ 855C664 - .incbin "baserom.gba", 0x55c664, 0x1c - -gUnknown_0855C680:: @ 855C680 - .incbin "baserom.gba", 0x55c680, 0x18 - -gUnknown_0855C698:: @ 855C698 - .incbin "baserom.gba", 0x55c698, 0x8 - -gUnknown_0855C6A0:: @ 855C6A0 - .incbin "baserom.gba", 0x55c6a0, 0x4 - -gUnknown_0855C6A4:: @ 855C6A4 - .incbin "baserom.gba", 0x55c6a4, 0x336 - -gUnknown_0855C9DA:: @ 855C9DA - .incbin "baserom.gba", 0x55c9da, 0x304 - -gUnknown_0855CCDE:: @ 855CCDE - .incbin "baserom.gba", 0x55ccde, 0x4b6 - -gUnknown_0855D194:: @ 855D194 - .incbin "baserom.gba", 0x55d194, 0x18 - -gUnknown_0855D1AC:: @ 855D1AC - .incbin "baserom.gba", 0x55d1ac, 0x18 - -gUnknown_0855D1C4:: @ 855D1C4 - .incbin "baserom.gba", 0x55d1c4, 0x18 - -gUnknown_0855D1DC:: @ 855D1DC - .incbin "baserom.gba", 0x55d1dc, 0x18 - -gUnknown_0855D1F4:: @ 855D1F4 - .incbin "baserom.gba", 0x55d1f4, 0x18 - -gUnknown_0855D20C:: @ 855D20C - .incbin "baserom.gba", 0x55d20c, 0x18 - -gUnknown_0855D224:: @ 855D224 - .incbin "baserom.gba", 0x55d224, 0x18 - -gUnknown_0855D23C:: @ 855D23C - .incbin "baserom.gba", 0x55d23c, 0x18 - -gUnknown_0855D254:: @ 855D254 - .incbin "baserom.gba", 0x55d254, 0x18 - -gUnknown_0855D26C:: @ 855D26C - .incbin "baserom.gba", 0x55d26c, 0x10 - -gUnknown_0855D27C:: @ 855D27C - .incbin "baserom.gba", 0x55d27c, 0x10 - -gUnknown_0855D28C:: @ 855D28C - .incbin "baserom.gba", 0x55d28c, 0x5 - -gUnknown_0855D291:: @ 855D291 - .incbin "baserom.gba", 0x55d291, 0x7 - -gUnknown_0855D298:: @ 855D298 - .incbin "baserom.gba", 0x55d298, 0x10 - -gUnknown_0855D2A8:: @ 855D2A8 - .incbin "baserom.gba", 0x55d2a8, 0x10 - -gUnknown_0855D2B8:: @ 855D2B8 - .incbin "baserom.gba", 0x55d2b8, 0x6 - -gUnknown_0855D2BE:: @ 855D2BE - .incbin "baserom.gba", 0x55d2be, 0x40 - -gUnknown_0855D2FE:: @ 855D2FE - .incbin "baserom.gba", 0x55d2fe, 0xe - -gUnknown_0855D30C:: @ 855D30C - .string "$" - -@ 855D30D - .include "data/text/pokedex_text.inc" - -@ 856B5B0 - .include "data/pokedex_entries.inc" - -gUnknown_0856E610:: @ 856E610 - .incbin "baserom.gba", 0x56e610, 0x20 - -gUnknown_0856E630:: @ 856E630 - .incbin "baserom.gba", 0x56e630, 0x10 - -gUnknown_0856E640:: @ 856E640 - .incbin "baserom.gba", 0x56e640, 0x28 - -gUnknown_0856E668:: @ 856E668 - .incbin "baserom.gba", 0x56e668, 0x8 - -gUnknown_0856E670:: @ 856E670 - .incbin "baserom.gba", 0x56e670, 0x18 - -gUnknown_0856E688:: @ 856E688 - .incbin "baserom.gba", 0x56e688, 0xc - -@ 856E694 - .include "data/graphics/pokemon/mon_footprint_table.inc" - -gUnknown_0856ED08:: @ 856ED08 - .incbin "baserom.gba", 0x56ed08, 0x28 - -gUnknown_0856ED30:: @ 856ED30 - .incbin "baserom.gba", 0x56ed30, 0x18 - -gUnknown_0856ED48:: @ 856ED48 - .incbin "baserom.gba", 0x56ed48, 0x54 - -gUnknown_0856ED9C:: @ 856ED9C - .incbin "baserom.gba", 0x56ed9c, 0x1c - -gUnknown_0856EDB8:: @ 856EDB8 - .incbin "baserom.gba", 0x56edb8, 0x1c - -gUnknown_0856EDD4:: @ 856EDD4 - .incbin "baserom.gba", 0x56edd4, 0x1c - -gUnknown_0856EDF0:: @ 856EDF0 - .incbin "baserom.gba", 0x56edf0, 0x1c - -gUnknown_0856EE0C:: @ 856EE0C - .incbin "baserom.gba", 0x56ee0c, 0x18 - -gUnknown_0856EE24:: @ 856EE24 - .incbin "baserom.gba", 0x56ee24, 0x38 - -gUnknown_0856EE5C:: @ 856EE5C - .incbin "baserom.gba", 0x56ee5c, 0x58 - -gUnknown_0856EEB4:: @ 856EEB4 - .incbin "baserom.gba", 0x56eeb4, 0x60 - -gUnknown_0856EF14:: @ 856EF14 - .incbin "baserom.gba", 0x56ef14, 0x98 - -gUnknown_0856EFAC:: @ 856EFAC - .incbin "baserom.gba", 0x56efac, 0x2 - -gUnknown_0856EFAE:: @ 856EFAE - .incbin "baserom.gba", 0x56efae, 0x6 - -gUnknown_0856EFB4:: @ 856EFB4 - .incbin "baserom.gba", 0x56efb4, 0x14 - -gUnknown_0856EFC8:: @ 856EFC8 - .incbin "baserom.gba", 0x56efc8, 0x30 - -gUnknown_0856EFF8:: @ 856EFF8 - .incbin "baserom.gba", 0x56eff8, 0x10 - -gUnknown_0856F008:: @ 856F008 - .incbin "baserom.gba", 0x56f008, 0x10 - -gUnknown_0856F018:: @ 856F018 - .incbin "baserom.gba", 0x56f018, 0x494 - -gUnknown_0856F4AC:: @ 856F4AC - .incbin "baserom.gba", 0x56f4ac, 0x20 - -gUnknown_0856F4CC:: @ 856F4CC - .incbin "baserom.gba", 0x56f4cc, 0x20 - -gUnknown_0856F4EC:: @ 856F4EC - .incbin "baserom.gba", 0x56f4ec, 0x20 - -gUnknown_0856F50C:: @ 856F50C - .incbin "baserom.gba", 0x56f50c, 0x20 - -gUnknown_0856F52C:: @ 856F52C - .incbin "baserom.gba", 0x56f52c, 0x20 - -gUnknown_0856F54C:: @ 856F54C - .incbin "baserom.gba", 0x56f54c, 0x20 - -gUnknown_0856F56C:: @ 856F56C - .incbin "baserom.gba", 0x56f56c, 0x20 - -gUnknown_0856F58C:: @ 856F58C - .incbin "baserom.gba", 0x56f58c, 0x20 - -gUnknown_0856F5AC:: @ 856F5AC - .incbin "baserom.gba", 0x56f5ac, 0x20 - -gUnknown_0856F5CC:: @ 856F5CC - .incbin "baserom.gba", 0x56f5cc, 0x248 - -gUnknown_0856F814:: @ 856F814 - .incbin "baserom.gba", 0x56f814, 0x2a0 - -gUnknown_0856FAB4:: @ 856FAB4 - .incbin "baserom.gba", 0x56fab4, 0x10 - -gUnknown_0856FAC4:: @ 856FAC4 - .incbin "baserom.gba", 0x56fac4, 0x20 - -gUnknown_0856FAE4:: @ 856FAE4 - .incbin "baserom.gba", 0x56fae4, 0x14 - -gUnknown_0856FAF8:: @ 856FAF8 - .incbin "baserom.gba", 0x56faf8, 0x14 - -gUnknown_0856FB0C:: @ 856FB0C - .incbin "baserom.gba", 0x56fb0c, 0x3 - -gUnknown_0856FB0F:: @ 856FB0F - .incbin "baserom.gba", 0x56fb0f, 0x9 - -gUnknown_0856FB18:: @ 856FB18 - .incbin "baserom.gba", 0x56fb18, 0x8 - -gUnknown_0856FB20:: @ 856FB20 - .incbin "baserom.gba", 0x56fb20, 0x8 - -gUnknown_0856FB28:: @ 856FB28 - .incbin "baserom.gba", 0x56fb28, 0x18 - -gUnknown_0856FB40:: @ 856FB40 - .incbin "baserom.gba", 0x56fb40, 0x8 - -gUnknown_0856FB48:: @ 856FB48 - .incbin "baserom.gba", 0x56fb48, 0x2 - -gUnknown_0856FB4A:: @ 856FB4A - .incbin "baserom.gba", 0x56fb4a, 0x2 - -gUnknown_0856FB4C:: @ 856FB4C - .incbin "baserom.gba", 0x56fb4c, 0x9 - -gUnknown_0856FB55:: @ 856FB55 - .incbin "baserom.gba", 0x56fb55, 0x2 - -gUnknown_0856FB57:: @ 856FB57 - .incbin "baserom.gba", 0x56fb57, 0x5 - -gUnknown_0856FB5C:: @ 856FB5C - .incbin "baserom.gba", 0x56fb5c, 0xc - -gUnknown_0856FB68:: @ 856FB68 - .incbin "baserom.gba", 0x56fb68, 0x6 - -gUnknown_0856FB6E:: @ 856FB6E - .incbin "baserom.gba", 0x56fb6e, 0x6 - -gUnknown_0856FB74:: @ 856FB74 - .incbin "baserom.gba", 0x56fb74, 0x4 - -gUnknown_0856FB78:: @ 856FB78 - .incbin "baserom.gba", 0x56fb78, 0x44 - -gUnknown_0856FBBC:: @ 856FBBC - .incbin "baserom.gba", 0x56fbbc, 0x1244 - -gUnknown_08570E00:: @ 8570E00 - .incbin "baserom.gba", 0x570e00, 0x260 - -gUnknown_08571060:: @ 8571060 - .incbin "baserom.gba", 0x571060, 0x260 - -gUnknown_085712C0:: @ 85712C0 - .incbin "baserom.gba", 0x5712c0, 0x38 - -gUnknown_085712F8:: @ 85712F8 - .incbin "baserom.gba", 0x5712f8, 0xe8 - -gUnknown_085713E0:: @ 85713E0 - .incbin "baserom.gba", 0x5713e0, 0x8 - -gUnknown_085713E8:: @ 85713E8 - .incbin "baserom.gba", 0x5713e8, 0xc - -gUnknown_085713F4:: @ 85713F4 - .incbin "baserom.gba", 0x5713f4, 0xc - -gUnknown_08571400:: @ 8571400 - .incbin "baserom.gba", 0x571400, 0x28 - -gUnknown_08571428:: @ 8571428 - .incbin "baserom.gba", 0x571428, 0x20 - -gUnknown_08571448:: @ 8571448 - .incbin "baserom.gba", 0x571448, 0x3 - -gUnknown_0857144B:: @ 857144B - .incbin "baserom.gba", 0x57144b, 0x3 - -gUnknown_0857144E:: @ 857144E - .incbin "baserom.gba", 0x57144e, 0x6 - -gUnknown_08571454:: @ 8571454 - .incbin "baserom.gba", 0x571454, 0x68 - -gUnknown_085714BC:: @ 85714BC - .incbin "baserom.gba", 0x5714bc, 0x18 - -gUnknown_085714D4:: @ 85714D4 - .incbin "baserom.gba", 0x5714d4, 0x10 - -gUnknown_085714E4:: @ 85714E4 - .incbin "baserom.gba", 0x5714e4, 0xd0 - -gUnknown_085715B4:: @ 85715B4 - .incbin "baserom.gba", 0x5715b4, 0x30 - -gUnknown_085715E4:: @ 85715E4 - .incbin "baserom.gba", 0x5715e4, 0x18 - -gUnknown_085715FC:: @ 85715FC - .incbin "baserom.gba", 0x5715fc, 0x18 - -gUnknown_08571614:: @ 8571614 - .incbin "baserom.gba", 0x571614, 0x3c - -gUnknown_08571650:: @ 8571650 - .incbin "baserom.gba", 0x571650, 0x70 - -gUnknown_085716C0:: @ 85716C0 - .incbin "baserom.gba", 0x5716c0, 0x28 - -gUnknown_085716E8:: @ 85716E8 - .incbin "baserom.gba", 0x5716e8, 0x28 - -gUnknown_08571710:: @ 8571710 - .incbin "baserom.gba", 0x571710, 0x24 - -gUnknown_08571734:: @ 8571734 - .incbin "baserom.gba", 0x571734, 0x3 - -gUnknown_08571737:: @ 8571737 - .incbin "baserom.gba", 0x571737, 0x5 - -gUnknown_0857173C:: @ 857173C - .incbin "baserom.gba", 0x57173c, 0x20 - -gUnknown_0857175C:: @ 857175C - .incbin "baserom.gba", 0x57175c, 0x800 - -gUnknown_08571F5C:: @ 8571F5C - .incbin "baserom.gba", 0x571f5c, 0x180 - -gUnknown_085720DC:: @ 85720DC - .incbin "baserom.gba", 0x5720dc, 0x98 - -gUnknown_08572174:: @ 8572174 - .incbin "baserom.gba", 0x572174, 0x12c - -gUnknown_085722A0:: @ 85722A0 - .incbin "baserom.gba", 0x5722a0, 0xfc - -gUnknown_0857239C:: @ 857239C - .incbin "baserom.gba", 0x57239c, 0x40 - -gUnknown_085723DC:: @ 85723DC - .incbin "baserom.gba", 0x5723dc, 0x20 - -gUnknown_085723FC:: @ 85723FC - .incbin "baserom.gba", 0x5723fc, 0x20 - -gUnknown_0857241C:: @ 857241C - .incbin "baserom.gba", 0x57241c, 0x20 - -gUnknown_0857243C:: @ 857243C - .incbin "baserom.gba", 0x57243c, 0x20 - -gUnknown_0857245C:: @ 857245C - .incbin "baserom.gba", 0x57245c, 0x48 - -gUnknown_085724A4:: @ 85724A4 - .incbin "baserom.gba", 0x5724a4, 0x18 - -gUnknown_085724BC:: @ 85724BC - .incbin "baserom.gba", 0x5724bc, 0x238 - -gUnknown_085726F4:: @ 85726F4 - .incbin "baserom.gba", 0x5726f4, 0x20 - -gUnknown_08572714:: @ 8572714 - .incbin "baserom.gba", 0x572714, 0x20 - -gUnknown_08572734:: @ 8572734 - .incbin "baserom.gba", 0x572734, 0x10 - -gUnknown_08572744:: @ 8572744 - .incbin "baserom.gba", 0x572744, 0x8 - -gUnknown_0857274C:: @ 857274C - .incbin "baserom.gba", 0x57274c, 0x8 - -gUnknown_08572754:: @ 8572754 - .incbin "baserom.gba", 0x572754, 0x18 - -gUnknown_0857276C:: @ 857276C - .incbin "baserom.gba", 0x57276c, 0xf8 - -gUnknown_08572864:: @ 8572864 - .incbin "baserom.gba", 0x572864, 0x58 - -gUnknown_085728BC:: @ 85728BC - .incbin "baserom.gba", 0x5728bc, 0x18 - -gUnknown_085728D4:: @ 85728D4 - .incbin "baserom.gba", 0x5728d4, 0x48 - -gUnknown_0857291C:: @ 857291C - .incbin "baserom.gba", 0x57291c, 0x4c58 - -gUnknown_08577574:: @ 8577574 - .incbin "baserom.gba", 0x577574, 0x44 - -gUnknown_085775B8:: @ 85775B8 - .incbin "baserom.gba", 0x5775b8, 0x398c - -gUnknown_0857AF44:: @ 857AF44 - .incbin "baserom.gba", 0x57af44, 0xc0 - -gUnknown_0857B004:: @ 857B004 - .incbin "baserom.gba", 0x57b004, 0x7c - -gUnknown_0857B080:: @ 857B080 - .incbin "baserom.gba", 0x57b080, 0x28 - -gUnknown_0857B0A8:: @ 857B0A8 - .incbin "baserom.gba", 0x57b0a8, 0x38 - -gUnknown_0857B0E0:: @ 857B0E0 - .incbin "baserom.gba", 0x57b0e0, 0x8b8 - -gUnknown_0857B998:: @ 857B998 - .incbin "baserom.gba", 0x57b998, 0xc - -gUnknown_0857B9A4:: @ 857B9A4 - .incbin "baserom.gba", 0x57b9a4, 0x18 - -gUnknown_0857B9BC:: @ 857B9BC - .incbin "baserom.gba", 0x57b9bc, 0x28 - -gUnknown_0857B9E4:: @ 857B9E4 - .incbin "baserom.gba", 0x57b9e4, 0x18 - -gUnknown_0857B9FC:: @ 857B9FC - .incbin "baserom.gba", 0x57b9fc, 0x54 - -gUnknown_0857BA50:: @ 857BA50 - .incbin "baserom.gba", 0x57ba50, 0x18 - -gUnknown_0857BA68:: @ 857BA68 - .incbin "baserom.gba", 0x57ba68, 0x18 - -gUnknown_0857BA80:: @ 857BA80 - .incbin "baserom.gba", 0x57ba80, 0x9c - -gUnknown_0857BB1C:: @ 857BB1C - .incbin "baserom.gba", 0x57bb1c, 0x8 - -gUnknown_0857BB24:: @ 857BB24 - .incbin "baserom.gba", 0x57bb24, 0x14c - -gUnknown_0857BC70:: @ 857BC70 - .incbin "baserom.gba", 0x57bc70, 0x18 - -gUnknown_0857BC88:: @ 857BC88 - .incbin "baserom.gba", 0x57bc88, 0x20 - -@ 857BCA8 - .include "data/graphics/pokemon/mon_icon_table.inc" - -@ 857C388 - .include "data/graphics/pokemon/mon_icon_palette_indices.inc" - -@ 857C540 - .include "data/graphics/pokemon/mon_icon_palette_table.inc" - -gUnknown_0857C570:: @ 857C570 - .incbin "baserom.gba", 0x57c570, 0x44 - -gUnknown_0857C5B4:: @ 857C5B4 - .incbin "baserom.gba", 0x57c5b4, 0x34 - -gUnknown_0857C5E8:: @ 857C5E8 - .incbin "baserom.gba", 0x57c5e8, 0x8 - -gUnknown_0857C5F0:: @ 857C5F0 - .incbin "baserom.gba", 0x57c5f0, 0x18 - -gUnknown_0857C608:: @ 857C608 - .incbin "baserom.gba", 0x57c608, 0x2 - -gUnknown_0857C60A:: @ 857C60A - .incbin "baserom.gba", 0x57c60a, 0x5a - - .align 2 -gFieldEffectObjectPaletteInfo6:: @ 857C664 - obj_pal gFieldEffectObjectPalette6, 0x1000 - -gUnknown_0857C66C:: @ 857C66C - .incbin "baserom.gba", 0x57c66c, 0x18 - -gUnknown_0857C684:: @ 857C684 - .incbin "baserom.gba", 0x57c684, 0x1680 - -gUnknown_0857DD04:: @ 857DD04 - .incbin "baserom.gba", 0x57dd04, 0x1680 - -gUnknown_0857F384:: @ 857F384 - .incbin "baserom.gba", 0x57f384, 0xc0 - -gUnknown_0857F444:: @ 857F444 - .incbin "baserom.gba", 0x57f444, 0x20 - -gUnknown_0857F464:: @ 857F464 - .incbin "baserom.gba", 0x57f464, 0xe0 - -gUnknown_0857F544:: @ 857F544 - .incbin "baserom.gba", 0x57f544, 0x5f0 - -gUnknown_0857FB34:: @ 857FB34 - .incbin "baserom.gba", 0x57fb34, 0x8 - -gUnknown_0857FB3C:: @ 857FB3C - .incbin "baserom.gba", 0x57fb3c, 0x8 - -gUnknown_0857FB44:: @ 857FB44 - .incbin "baserom.gba", 0x57fb44, 0x8 - -gUnknown_0857FB4C:: @ 857FB4C - .incbin "baserom.gba", 0x57fb4c, 0x4c - -gUnknown_0857FB98:: @ 857FB98 - .incbin "baserom.gba", 0x57fb98, 0x4 - -gUnknown_0857FB9C:: @ 857FB9C - .incbin "baserom.gba", 0x57fb9c, 0x4 - -gUnknown_0857FBA0:: @ 857FBA0 - .incbin "baserom.gba", 0x57fba0, 0x8 - -gUnknown_0857FBA8:: @ 857FBA8 - .incbin "baserom.gba", 0x57fba8, 0x8 - -gUnknown_0857FBB0:: @ 857FBB0 - .incbin "baserom.gba", 0x57fbb0, 0x3c - -gUnknown_0857FBEC:: @ 857FBEC - .incbin "baserom.gba", 0x57fbec, 0x90 - -gUnknown_0857FC7C:: @ 857FC7C - .incbin "baserom.gba", 0x57fc7c, 0x18 - -@ 857FC94 - .include "data/graphics/berries/berry_pic_table.inc" - -gUnknown_0857FDEC:: @ 857FDEC - .incbin "baserom.gba", 0x57fdec, 0x8 - -gUnknown_0857FDF4:: @ 857FDF4 - .incbin "baserom.gba", 0x57fdf4, 0x1c - -gUnknown_0857FE10:: @ 857FE10 - .incbin "baserom.gba", 0x57fe10, 0x90 - -@ 857FEA0 - .include "data/text/item_descriptions.inc" - -@ 85839A0 - .include "data/items.inc" - -gUnknown_08587A6C:: @ 8587A6C - .incbin "baserom.gba", 0x587a6c, 0x4 - -gUnknown_08587A70:: @ 8587A70 - .incbin "baserom.gba", 0x587a70, 0x4 - -gUnknown_08587A74:: @ 8587A74 - .incbin "baserom.gba", 0x587a74, 0x5c - -gUnknown_08587AD0:: @ 8587AD0 - .incbin "baserom.gba", 0x587ad0, 0x18 - -gUnknown_08587AE8:: @ 8587AE8 - .incbin "baserom.gba", 0x587ae8, 0x20 - -gUnknown_08587B08:: @ 8587B08 - .incbin "baserom.gba", 0x587b08, 0x10 - -gUnknown_08587B18:: @ 8587B18 - .incbin "baserom.gba", 0x587b18, 0x68 - -gUnknown_08587B80:: @ 8587B80 - .incbin "baserom.gba", 0x587b80, 0x30 - -gUnknown_08587BB0:: @ 8587BB0 - .incbin "baserom.gba", 0x587bb0, 0x8 - -gUnknown_08587BB8:: @ 8587BB8 - .incbin "baserom.gba", 0x587bb8, 0x10 - -gUnknown_08587BC8:: @ 8587BC8 - .incbin "baserom.gba", 0x587bc8, 0x20 - -gUnknown_08587BE8:: @ 8587BE8 - .incbin "baserom.gba", 0x587be8, 0x18 - -gUnknown_08587C00:: @ 8587C00 - .incbin "baserom.gba", 0x587c00, 0x8 - -gUnknown_08587C08:: @ 8587C08 - .incbin "baserom.gba", 0x587c08, 0x8 - -gUnknown_08587C10:: @ 8587C10 - .incbin "baserom.gba", 0x587c10, 0x8 - -gUnknown_08587C18:: @ 8587C18 - .incbin "baserom.gba", 0x587c18, 0x18 - -gUnknown_08587C30:: @ 8587C30 - .incbin "baserom.gba", 0x587c30, 0x20 - -@ 8587C50 - .include "data/text/contest_text_pointers.inc" - -@ 8587D5C - .incbin "baserom.gba", 0x587d5c, 0x34 - -gUnknown_08587D90:: @ 8587D90 - .incbin "baserom.gba", 0x587d90, 0x80 - -gUnknown_08587E10:: @ 8587E10 - .incbin "baserom.gba", 0x587e10, 0xf8 - -gUnknown_08587F08:: @ 8587F08 - .incbin "baserom.gba", 0x587f08, 0x14 - -gUnknown_08587F1C:: @ 8587F1C - .incbin "baserom.gba", 0x587f1c, 0x18 - -gUnknown_08587F34:: @ 8587F34 - .incbin "baserom.gba", 0x587f34, 0x10 - -gUnknown_08587F44:: @ 8587F44 - .incbin "baserom.gba", 0x587f44, 0x60 - -gUnknown_08587FA4:: @ 8587FA4 - .incbin "baserom.gba", 0x587fa4, 0x100 - -gUnknown_085880A4:: @ 85880A4 - .incbin "baserom.gba", 0x5880a4, 0x1740 - -gUnknown_085897E4:: @ 85897E4 - .incbin "baserom.gba", 0x5897e4, 0xc0 - -gUnknown_085898A4:: @ 85898A4 - .incbin "baserom.gba", 0x5898a4, 0x60 - -gUnknown_08589904:: @ 8589904 - .incbin "baserom.gba", 0x589904, 0x20 - -gUnknown_08589924:: @ 8589924 - .incbin "baserom.gba", 0x589924, 0x68 - -gUnknown_0858998C:: @ 858998C - .incbin "baserom.gba", 0x58998c, 0x60 - -gUnknown_085899EC:: @ 85899EC - .incbin "baserom.gba", 0x5899ec, 0x1c - -gUnknown_08589A08:: @ 8589A08 - .incbin "baserom.gba", 0x589a08, 0x8 - -gUnknown_08589A10:: @ 8589A10 - .incbin "baserom.gba", 0x589a10, 0x18 - -gUnknown_08589A28:: @ 8589A28 - .incbin "baserom.gba", 0x589a28, 0x10 - -gUnknown_08589A38:: @ 8589A38 - .incbin "baserom.gba", 0x589a38, 0x10 - -gUnknown_08589A48:: @ 8589A48 - .incbin "baserom.gba", 0x589a48, 0x18 - -gUnknown_08589A60:: @ 8589A60 - .incbin "baserom.gba", 0x589a60, 0x10 - -gUnknown_08589A70:: @ 8589A70 - .incbin "baserom.gba", 0x589a70, 0x38 - -gUnknown_08589AA8:: @ 8589AA8 - .incbin "baserom.gba", 0x589aa8, 0x8 - -gUnknown_08589AB0:: @ 8589AB0 - .incbin "baserom.gba", 0x589ab0, 0x3 - -gUnknown_08589AB3:: @ 8589AB3 - .incbin "baserom.gba", 0x589ab3, 0x7 - -gUnknown_08589ABA:: @ 8589ABA - .incbin "baserom.gba", 0x589aba, 0x6 - -gUnknown_08589AC0:: @ 8589AC0 - .incbin "baserom.gba", 0x589ac0, 0x6 - -gUnknown_08589AC6:: @ 8589AC6 - .incbin "baserom.gba", 0x589ac6, 0x6 - -gUnknown_08589ACC:: @ 8589ACC - .incbin "baserom.gba", 0x589acc, 0x6 - -gUnknown_08589AD2:: @ 8589AD2 - .incbin "baserom.gba", 0x589ad2, 0x6 - -gUnknown_08589AD8:: @ 8589AD8 - .incbin "baserom.gba", 0x589ad8, 0x6 - -gUnknown_08589ADE:: @ 8589ADE - .incbin "baserom.gba", 0x589ade, 0x6 diff --git a/data/data3_a0_A.s b/data/data3_a0_A.s new file mode 100644 index 000000000..975b3d640 --- /dev/null +++ b/data/data3_a0_A.s @@ -0,0 +1,585 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0832C0D0:: @ 832C0D0 + .incbin "baserom.gba", 0x32c0d0, 0x8 + +gUnknown_0832C0D8:: @ 832C0D8 + .incbin "baserom.gba", 0x32c0d8, 0x8 + +gUnknown_0832C0E0:: @ 832C0E0 + .incbin "baserom.gba", 0x32c0e0, 0x8 + +gUnknown_0832C0E8:: @ 832C0E8 + .incbin "baserom.gba", 0x32c0e8, 0x8 + +gUnknown_0832C0F0:: @ 832C0F0 + .incbin "baserom.gba", 0x32c0f0, 0x8 + +gUnknown_0832C0F8:: @ 832C0F8 + .incbin "baserom.gba", 0x32c0f8, 0x8 + +gUnknown_0832C100:: @ 832C100 + .incbin "baserom.gba", 0x32c100, 0x8 + +gUnknown_0832C108:: @ 832C108 + .incbin "baserom.gba", 0x32c108, 0x20 + +gUnknown_0832C128:: @ 832C128 + .incbin "baserom.gba", 0x32c128, 0x18 + +gUnknown_0832C140:: @ 832C140 + .incbin "baserom.gba", 0x32c140, 0x30 + +gUnknown_0832C170:: @ 832C170 + .incbin "baserom.gba", 0x32c170, 0x30 + +gUnknown_0832C1A0:: @ 832C1A0 + .incbin "baserom.gba", 0x32c1a0, 0x20 + +gUnknown_0832C1C0:: @ 832C1C0 + .incbin "baserom.gba", 0x32c1c0, 0xcc + +gUnknown_0832C28C:: @ 832C28C + .incbin "baserom.gba", 0x32c28c, 0x38 + +gUnknown_0832C2C4:: @ 832C2C4 + .incbin "baserom.gba", 0x32c2c4, 0x8 + +gUnknown_0832C2CC:: @ 832C2CC + .incbin "baserom.gba", 0x32c2cc, 0x68 + +gUnknown_0832C334:: @ 832C334 + .incbin "baserom.gba", 0x32c334, 0x8 + +gUnknown_0832C33C:: @ 832C33C + .incbin "baserom.gba", 0x32c33c, 0x8 + +gUnknown_0832C344:: @ 832C344 + .incbin "baserom.gba", 0x32c344, 0x8 + +gUnknown_0832C34C:: @ 832C34C + .incbin "baserom.gba", 0x32c34c, 0x18 + +gUnknown_0832C364:: @ 832C364 + .incbin "baserom.gba", 0x32c364, 0x30 + +gUnknown_0832C394:: @ 832C394 + .incbin "baserom.gba", 0x32c394, 0x30 + +gUnknown_0832C3C4:: @ 832C3C4 + .incbin "baserom.gba", 0x32c3c4, 0x14 + +gUnknown_0832C3D8:: @ 832C3D8 + .incbin "baserom.gba", 0x32c3d8, 0x14 + +gUnknown_0832C3EC:: @ 832C3EC + .incbin "baserom.gba", 0x32c3ec, 0xc + +gUnknown_0832C3F8:: @ 832C3F8 + .incbin "baserom.gba", 0x32c3f8, 0x8 + +gUnknown_0832C400:: @ 832C400 + .incbin "baserom.gba", 0x32c400, 0x60 + +gUnknown_0832C460:: @ 832C460 + .incbin "baserom.gba", 0x32c460, 0x128 + +gUnknown_0832C588:: @ 832C588 + .incbin "baserom.gba", 0x32c588, 0x138 + +gUnknown_0832C6C0:: @ 832C6C0 + .incbin "baserom.gba", 0x32c6c0, 0x1fe + +gUnknown_0832C8BE:: @ 832C8BE + .incbin "baserom.gba", 0x32c8be, 0x1fe + +gUnknown_0832CABC:: @ 832CABC + .incbin "baserom.gba", 0x32cabc, 0x800 + +gUnknown_0832D2BC:: @ 832D2BC + .incbin "baserom.gba", 0x32d2bc, 0x800 + +gUnknown_0832DABC:: @ 832DABC + .incbin "baserom.gba", 0x32dabc, 0xb + +gUnknown_0832DAC7:: @ 832DAC7 + .incbin "baserom.gba", 0x32dac7, 0x2 + +gUnknown_0832DAC9:: @ 832DAC9 + .incbin "baserom.gba", 0x32dac9, 0x2 + +gUnknown_0832DACB:: @ 832DACB + .incbin "baserom.gba", 0x32dacb, 0x7 + +gUnknown_0832DAD2:: @ 832DAD2 + .incbin "baserom.gba", 0x32dad2, 0xd + +gUnknown_0832DADF:: @ 832DADF + .incbin "baserom.gba", 0x32dadf, 0x6 + +gUnknown_0832DAE5:: @ 832DAE5 + .incbin "baserom.gba", 0x32dae5, 0x157 + +gUnknown_0832DC3C:: @ 832DC3C + .incbin "baserom.gba", 0x32dc3c, 0x8 + +gUnknown_0832DC44:: @ 832DC44 + .incbin "baserom.gba", 0x32dc44, 0x50 + +gUnknown_0832DC94:: @ 832DC94 + .incbin "baserom.gba", 0x32dc94, 0x18 + +gUnknown_0832DCAC:: @ 832DCAC + .incbin "baserom.gba", 0x32dcac, 0x38 + +gUnknown_0832DCE4:: @ 832DCE4 + .incbin "baserom.gba", 0x32dce4, 0x8 + +gUnknown_0832DCEC:: @ 832DCEC + .incbin "baserom.gba", 0x32dcec, 0x138 + +gUnknown_0832DE24:: @ 832DE24 + .incbin "baserom.gba", 0x32de24, 0x1a + +gUnknown_0832DE3E:: @ 832DE3E + .incbin "baserom.gba", 0x32de3e, 0x18 + +gUnknown_0832DE56:: @ 832DE56 + .incbin "baserom.gba", 0x32de56, 0x3e + +gUnknown_0832DE94:: @ 832DE94 + .incbin "baserom.gba", 0x32de94, 0x18 + +gUnknown_0832DEAC:: @ 832DEAC + .incbin "baserom.gba", 0x32deac, 0x10 + +gUnknown_0832DEBC:: @ 832DEBC + .incbin "baserom.gba", 0x32debc, 0x24 + +gUnknown_0832DEE0:: @ 832DEE0 + .incbin "baserom.gba", 0x32dee0, 0x4 + +gUnknown_0832DEE4:: @ 832DEE4 + .incbin "baserom.gba", 0x32dee4, 0x10 + +gUnknown_0832DEF4:: @ 832DEF4 + .incbin "baserom.gba", 0x32def4, 0x98 + +gUnknown_0832DF8C:: @ 832DF8C + .incbin "baserom.gba", 0x32df8c, 0x8 + +gUnknown_0832DF94:: @ 832DF94 + .incbin "baserom.gba", 0x32df94, 0x5 + +gUnknown_0832DF99:: @ 832DF99 + .incbin "baserom.gba", 0x32df99, 0x2027 + +gUnknown_0832FFC0:: @ 832FFC0 + .incbin "baserom.gba", 0x32ffc0, 0x1fa0 + +gUnknown_08331F60:: @ 8331F60 + .incbin "baserom.gba", 0x331f60, 0x1000 + +gUnknown_08332F60:: @ 8332F60 + .incbin "baserom.gba", 0x332f60, 0x2840 + +gUnknown_083357A0:: @ 83357A0 + .incbin "baserom.gba", 0x3357a0, 0x100 + +gUnknown_083358A0:: @ 83358A0 + .incbin "baserom.gba", 0x3358a0, 0x100 + +gUnknown_083359A0:: @ 83359A0 + .incbin "baserom.gba", 0x3359a0, 0x1000 + +gUnknown_083369A0:: @ 83369A0 + .incbin "baserom.gba", 0x3369a0, 0x1000 + +gUnknown_083379A0:: @ 83379A0 + .incbin "baserom.gba", 0x3379a0, 0x100 + +gUnknown_08337AA0:: @ 8337AA0 + .incbin "baserom.gba", 0x337aa0, 0x200 + +gUnknown_08337CA0:: @ 8337CA0 + .incbin "baserom.gba", 0x337ca0, 0x200 + +gUnknown_08337EA0:: @ 8337EA0 + .incbin "baserom.gba", 0x337ea0, 0x20 + +gUnknown_08337EC0:: @ 8337EC0 + .incbin "baserom.gba", 0x337ec0, 0x690 + +gUnknown_08338550:: @ 8338550 + .incbin "baserom.gba", 0x338550, 0x7c8 + +gUnknown_08338D18:: @ 8338D18 + .incbin "baserom.gba", 0x338d18, 0x8 + +gUnknown_08338D20:: @ 8338D20 + .incbin "baserom.gba", 0x338d20, 0x8 + +gUnknown_08338D28:: @ 8338D28 + .incbin "baserom.gba", 0x338d28, 0x48 + +gUnknown_08338D70:: @ 8338D70 + .incbin "baserom.gba", 0x338d70, 0x8 + +gUnknown_08338D78:: @ 8338D78 + .incbin "baserom.gba", 0x338d78, 0x8 + +gUnknown_08338D80:: @ 8338D80 + .incbin "baserom.gba", 0x338d80, 0x8 + +gUnknown_08338D88:: @ 8338D88 + .incbin "baserom.gba", 0x338d88, 0x38 + +gUnknown_08338DC0:: @ 8338DC0 + .incbin "baserom.gba", 0x338dc0, 0x8 + +gUnknown_08338DC8:: @ 8338DC8 + .incbin "baserom.gba", 0x338dc8, 0x2c + +gUnknown_08338DF4:: @ 8338DF4 + .incbin "baserom.gba", 0x338df4, 0x8 + +gUnknown_08338DFC:: @ 8338DFC + .incbin "baserom.gba", 0x338dfc, 0x70 + +gUnknown_08338E6C:: @ 8338E6C + .incbin "baserom.gba", 0x338e6c, 0x8 + +gUnknown_08338E74:: @ 8338E74 + .incbin "baserom.gba", 0x338e74, 0x18 + +gUnknown_08338E8C:: @ 8338E8C + .incbin "baserom.gba", 0x338e8c, 0x18 + +gUnknown_08338EA4:: @ 8338EA4 + .incbin "baserom.gba", 0x338ea4, 0x28 + +gUnknown_08338ECC:: @ 8338ECC + .incbin "baserom.gba", 0x338ecc, 0x4 + +gUnknown_08338ED0:: @ 8338ED0 + .incbin "baserom.gba", 0x338ed0, 0xf0 + +gUnknown_08338FC0:: @ 8338FC0 + .incbin "baserom.gba", 0x338fc0, 0x3c + +gUnknown_08338FFC:: @ 8338FFC + .incbin "baserom.gba", 0x338ffc, 0x10 + +gUnknown_0833900C:: @ 833900C + .incbin "baserom.gba", 0x33900c, 0x8 + +gUnknown_08339014:: @ 8339014 + .incbin "baserom.gba", 0x339014, 0x10 + +gUnknown_08339024:: @ 8339024 + .incbin "baserom.gba", 0x339024, 0x6c + +gUnknown_08339090:: @ 8339090 + .incbin "baserom.gba", 0x339090, 0x44 + +gUnknown_083390D4:: @ 83390D4 + .incbin "baserom.gba", 0x3390d4, 0x20 + +gUnknown_083390F4:: @ 83390F4 + .incbin "baserom.gba", 0x3390f4, 0x400 + +gUnknown_083394F4:: @ 83394F4 + .incbin "baserom.gba", 0x3394f4, 0x246 + +gUnknown_0833973A:: @ 833973A + .incbin "baserom.gba", 0x33973a, 0x61 + +gUnknown_0833979B:: @ 833979B + .incbin "baserom.gba", 0x33979b, 0x2 + +gUnknown_0833979D:: @ 833979D + .incbin "baserom.gba", 0x33979d, 0x33 + +gUnknown_083397D0:: @ 83397D0 + .incbin "baserom.gba", 0x3397d0, 0x4a + +gUnknown_0833981A:: @ 833981A + .incbin "baserom.gba", 0x33981a, 0x17 + +gUnknown_08339831:: @ 8339831 + .incbin "baserom.gba", 0x339831, 0x27 + +gUnknown_08339858:: @ 8339858 + .incbin "baserom.gba", 0x339858, 0x3e + +gUnknown_08339896:: @ 8339896 + .incbin "baserom.gba", 0x339896, 0x1a + +gUnknown_083398B0:: @ 83398B0 + .incbin "baserom.gba", 0x3398b0, 0x2d + +gUnknown_083398DD:: @ 83398DD + .incbin "baserom.gba", 0x3398dd, 0x18 + +gUnknown_083398F5:: @ 83398F5 + .incbin "baserom.gba", 0x3398f5, 0x1f + +gUnknown_08339914:: @ 8339914 + .incbin "baserom.gba", 0x339914, 0x7 + +gUnknown_0833991B:: @ 833991B + .incbin "baserom.gba", 0x33991b, 0x6 + +gUnknown_08339921:: @ 8339921 + .incbin "baserom.gba", 0x339921, 0x7 + +gUnknown_08339928:: @ 8339928 + .incbin "baserom.gba", 0x339928, 0x6 + +gUnknown_0833992E:: @ 833992E + .incbin "baserom.gba", 0x33992e, 0xe + +gUnknown_0833993C:: @ 833993C + .incbin "baserom.gba", 0x33993c, 0x5 + +gUnknown_08339941:: @ 8339941 + .incbin "baserom.gba", 0x339941, 0x2 + +gUnknown_08339943:: @ 8339943 + .incbin "baserom.gba", 0x339943, 0x4 + +gUnknown_08339947:: @ 8339947 + .incbin "baserom.gba", 0x339947, 0x8 + +gUnknown_0833994F:: @ 833994F + .incbin "baserom.gba", 0x33994f, 0xe + +gUnknown_0833995D:: @ 833995D + .incbin "baserom.gba", 0x33995d, 0x13 + +gUnknown_08339970:: @ 8339970 + .incbin "baserom.gba", 0x339970, 0x4 + +gUnknown_08339974:: @ 8339974 + .incbin "baserom.gba", 0x339974, 0xc + +gUnknown_08339980:: @ 8339980 + .incbin "baserom.gba", 0x339980, 0x38 + +gUnknown_083399B8:: @ 83399B8 + .incbin "baserom.gba", 0x3399b8, 0x8 + +gUnknown_083399C0:: @ 83399C0 + .incbin "baserom.gba", 0x3399c0, 0x8 + +gUnknown_083399C8:: @ 83399C8 + .incbin "baserom.gba", 0x3399c8, 0x8 + +gUnknown_083399D0:: @ 83399D0 + .incbin "baserom.gba", 0x3399d0, 0xc + +gUnknown_083399DC:: @ 83399DC + .incbin "baserom.gba", 0x3399dc, 0x8 + +gUnknown_083399E4:: @ 83399E4 + .incbin "baserom.gba", 0x3399e4, 0x3 + +gUnknown_083399E7:: @ 83399E7 + .incbin "baserom.gba", 0x3399e7, 0x5 + +gUnknown_083399EC:: @ 83399EC + .incbin "baserom.gba", 0x3399ec, 0xd4 + +gUnknown_08339AC0:: @ 8339AC0 + .incbin "baserom.gba", 0x339ac0, 0x8 + +gUnknown_08339AC8:: @ 8339AC8 + .incbin "baserom.gba", 0x339ac8, 0x8 + +gUnknown_08339AD0:: @ 8339AD0 + .incbin "baserom.gba", 0x339ad0, 0x8 + +gUnknown_08339AD8:: @ 8339AD8 + .incbin "baserom.gba", 0x339ad8, 0x60 + +gUnknown_08339B38:: @ 8339B38 + .incbin "baserom.gba", 0x339b38, 0x8 + +gUnknown_08339B40:: @ 8339B40 + .incbin "baserom.gba", 0x339b40, 0x98 + +gUnknown_08339BD8:: @ 8339BD8 + .incbin "baserom.gba", 0x339bd8, 0x8 + +gUnknown_08339BE0:: @ 8339BE0 + .incbin "baserom.gba", 0x339be0, 0x44 + +gUnknown_08339C24:: @ 8339C24 + .incbin "baserom.gba", 0x339c24, 0x8 + +gUnknown_08339C2C:: @ 8339C2C + .incbin "baserom.gba", 0x339c2c, 0x2c + +gUnknown_08339C58:: @ 8339C58 + .incbin "baserom.gba", 0x339c58, 0x8 + +gUnknown_08339C60:: @ 8339C60 + .incbin "baserom.gba", 0x339c60, 0x18 + +gUnknown_08339C78:: @ 8339C78 + .incbin "baserom.gba", 0x339c78, 0x28 + +gUnknown_08339CA0:: @ 8339CA0 + .incbin "baserom.gba", 0x339ca0, 0x1e + +gUnknown_08339CBE:: @ 8339CBE + .incbin "baserom.gba", 0x339cbe, 0x5 + +gUnknown_08339CC3:: @ 8339CC3 + .incbin "baserom.gba", 0x339cc3, 0x5 + +gUnknown_08339CC8:: @ 8339CC8 + .incbin "baserom.gba", 0x339cc8, 0x4c + +gUnknown_08339D14:: @ 8339D14 + .incbin "baserom.gba", 0x339d14, 0x8 + +gContestWinnerPicDummy:: @ 8339D1C + .incbin "baserom.gba", 0x339d1c, 0x20 + +gUnknown_08339D3C:: @ 8339D3C + .incbin "baserom.gba", 0x339d3c, 0x28 + +gUnknown_08339D64:: @ 8339D64 + .incbin "baserom.gba", 0x339d64, 0x48 + +gUnknown_08339DAC:: @ 8339DAC + .incbin "baserom.gba", 0x339dac, 0x10 + +gUnknown_08339DBC:: @ 8339DBC + .incbin "baserom.gba", 0x339dbc, 0xc + +gUnknown_08339DC8:: @ 8339DC8 + .incbin "baserom.gba", 0x339dc8, 0xc + +gUnknown_08339DD4:: @ 8339DD4 + .incbin "baserom.gba", 0x339dd4, 0x2c + +gUnknown_08339E00:: @ 8339E00 + .incbin "baserom.gba", 0x339e00, 0x8 + +@ 8339E08 + .include "data/tilesets/tileset_graphics.inc" + +@ 83960F0 + .include "data/tilesets/metatiles.inc" + +@ 83DF704 + .include "data/tilesets/tilesets.inc" + +@ 83DFE14 + .incbin "baserom.gba", 0x3dfe14, 0xa1fc0 + +gUnknown_08481DD4:: @ 8481DD4 + .incbin "baserom.gba", 0x481dd4, 0x47a4 + +gUnknown_08486578:: @ 8486578 + .incbin "baserom.gba", 0x486578, 0x980 + +gUnknown_08486EF8:: @ 8486EF8 + .incbin "baserom.gba", 0x486ef8, 0x4 + +gUnknown_08486EFC:: @ 8486EFC + .incbin "baserom.gba", 0x486efc, 0x10090 + +gUnknown_08496F8C:: @ 8496F8C + .incbin "baserom.gba", 0x496f8c, 0x14 + +gUnknown_08496FA0:: @ 8496FA0 + .incbin "baserom.gba", 0x496fa0, 0x14 + +gUnknown_08496FB4:: @ 8496FB4 + .incbin "baserom.gba", 0x496fb4, 0x1c0 + +gUnknown_08497174:: @ 8497174 + .incbin "baserom.gba", 0x497174, 0x288 + +gUnknown_084973FC:: @ 84973FC + .incbin "baserom.gba", 0x4973fc, 0x48 + +gUnknown_08497444:: @ 8497444 + .incbin "baserom.gba", 0x497444, 0x4c + +gUnknown_08497490:: @ 8497490 + .incbin "baserom.gba", 0x497490, 0xc + +gUnknown_0849749C:: @ 849749C + .incbin "baserom.gba", 0x49749c, 0x14 + +gUnknown_084974B0:: @ 84974B0 + .incbin "baserom.gba", 0x4974b0, 0x8 + +gUnknown_084974B8:: @ 84974B8 + .incbin "baserom.gba", 0x4974b8, 0x20 + +gUnknown_084974D8:: @ 84974D8 + .incbin "baserom.gba", 0x4974d8, 0x10 + +gUnknown_084974E8:: @ 84974E8 + .incbin "baserom.gba", 0x4974e8, 0x10 + +gUnknown_084974F8:: @ 84974F8 + .incbin "baserom.gba", 0x4974f8, 0x10 + +gUnknown_08497508:: @ 8497508 + .incbin "baserom.gba", 0x497508, 0x2 + +gUnknown_0849750A:: @ 849750A + .incbin "baserom.gba", 0x49750a, 0x2 + +gUnknown_0849750C:: @ 849750C + .incbin "baserom.gba", 0x49750c, 0x14 + +gUnknown_08497520:: @ 8497520 + .incbin "baserom.gba", 0x497520, 0x10 + +gUnknown_08497530:: @ 8497530 + .incbin "baserom.gba", 0x497530, 0xc + +gUnknown_0849753C:: @ 849753C + .incbin "baserom.gba", 0x49753c, 0x4 + +gUnknown_08497540:: @ 8497540 + .incbin "baserom.gba", 0x497540, 0x10 + +gUnknown_08497550:: @ 8497550 + .incbin "baserom.gba", 0x497550, 0x4 + +gUnknown_08497554:: @ 8497554 + .incbin "baserom.gba", 0x497554, 0x8 + +gUnknown_0849755C:: @ 849755C + .incbin "baserom.gba", 0x49755c, 0x40 + +gUnknown_0849759C:: @ 849759C + .incbin "baserom.gba", 0x49759c, 0x6 + +gUnknown_084975A2:: @ 84975A2 + .incbin "baserom.gba", 0x4975a2, 0x6 + +gUnknown_084975A8:: @ 84975A8 + .incbin "baserom.gba", 0x4975a8, 0x2 + +gUnknown_084975AA:: @ 84975AA + .incbin "baserom.gba", 0x4975aa, 0x6 + +gUnknown_084975B0:: @ 84975B0 + .incbin "baserom.gba", 0x4975b0, 0xc + +gUnknown_084975BC:: @ 84975BC + .incbin "baserom.gba", 0x4975bc, 0x8 diff --git a/data/data3_a0_B.s b/data/data3_a0_B.s new file mode 100644 index 000000000..75279e607 --- /dev/null +++ b/data/data3_a0_B.s @@ -0,0 +1,1783 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0850E5DC:: @ 850E5DC + .incbin "baserom.gba", 0x50e5dc, 0x8 + +gUnknown_0850E5E4:: @ 850E5E4 + .incbin "baserom.gba", 0x50e5e4, 0x18 + +gUnknown_0850E5FC:: @ 850E5FC + .incbin "baserom.gba", 0x50e5fc, 0x18 + +gUnknown_0850E614:: @ 850E614 + .incbin "baserom.gba", 0x50e614, 0x10 + +gUnknown_0850E624:: @ 850E624 + .incbin "baserom.gba", 0x50e624, 0x10 + +gUnknown_0850E634:: @ 850E634 + .incbin "baserom.gba", 0x50e634, 0x10 + +gUnknown_0850E644:: @ 850E644 + .incbin "baserom.gba", 0x50e644, 0x10 + +gUnknown_0850E654:: @ 850E654 + .incbin "baserom.gba", 0x50e654, 0xc + +gUnknown_0850E660:: @ 850E660 + .incbin "baserom.gba", 0x50e660, 0x4 + +gUnknown_0850E664:: @ 850E664 + .incbin "baserom.gba", 0x50e664, 0x10 + +gUnknown_0850E674:: @ 850E674 + .incbin "baserom.gba", 0x50e674, 0xe0 + +gUnknown_0850E754:: @ 850E754 + .incbin "baserom.gba", 0x50e754, 0x14 + +gUnknown_0850E768:: @ 850E768 + .incbin "baserom.gba", 0x50e768, 0xa + +gUnknown_0850E772:: @ 850E772 + .incbin "baserom.gba", 0x50e772, 0x48 + +gUnknown_0850E7BA:: @ 850E7BA + .incbin "baserom.gba", 0x50e7ba, 0x7a + +gUnknown_0850E834:: @ 850E834 + .incbin "baserom.gba", 0x50e834, 0xc + +gUnknown_0850E840:: @ 850E840 + .incbin "baserom.gba", 0x50e840, 0x6 + +gUnknown_0850E846:: @ 850E846 + .incbin "baserom.gba", 0x50e846, 0x4 + +gUnknown_0850E84A:: @ 850E84A + .incbin "baserom.gba", 0x50e84a, 0x6 + +gUnknown_0850E850:: @ 850E850 + .incbin "baserom.gba", 0x50e850, 0x4 +gUnknown_0850E854:: + .incbin "baserom.gba", 0x50e854, 0x8 +gUnknown_0850E85C:: + .incbin "baserom.gba", 0x50e85C, 0x8 +gUnknown_0850E864:: + .incbin "baserom.gba", 0x50e864, 0xc +gUnknown_0850E870:: + .incbin "baserom.gba", 0x50e870, 0xc + +gUnknown_0850E87C:: @ 850E87C + .incbin "baserom.gba", 0x50e87c, 0x1680 + +gUnknown_0850FEFC:: @ 850FEFC + .incbin "baserom.gba", 0x50fefc, 0x280 + +gUnknown_0851017C:: @ 851017C + .incbin "baserom.gba", 0x51017c, 0xa0 + +gUnknown_0851021C:: @ 851021C + .incbin "baserom.gba", 0x51021c, 0xa0 + +gNullScriptPtr:: @ 85102BC + .incbin "baserom.gba", 0x5102bc, 0x4 + +gUnknown_085102C0:: @ 85102C0 + .incbin "baserom.gba", 0x5102c0, 0x14 + +gUnknown_085102D4:: @ 85102D4 + .incbin "baserom.gba", 0x5102d4, 0xc + +gUnknown_085102E0:: @ 85102E0 + .incbin "baserom.gba", 0x5102e0, 0x68 + +gUnknown_08510348:: @ 8510348 + .incbin "baserom.gba", 0x510348, 0x20 + +gUnknown_08510368:: @ 8510368 + .incbin "baserom.gba", 0x510368, 0x20 + +gUnknown_08510388:: @ 8510388 + .incbin "baserom.gba", 0x510388, 0x20 + +gUnknown_085103A8:: @ 85103A8 + .incbin "baserom.gba", 0x5103a8, 0x20 + +gUnknown_085103C8:: @ 85103C8 + .incbin "baserom.gba", 0x5103c8, 0x34 + +gUnknown_085103FC:: @ 85103FC + .incbin "baserom.gba", 0x5103fc, 0x8 + +gUnknown_08510404:: @ 8510404 + .incbin "baserom.gba", 0x510404, 0x4 + +gUnknown_08510408:: @ 8510408 + .incbin "baserom.gba", 0x510408, 0x14 + +gUnknown_0851041C:: @ 851041C + .incbin "baserom.gba", 0x51041c, 0x4 + +gUnknown_08510420:: @ 8510420 + .incbin "baserom.gba", 0x510420, 0xa4 + +gUnknown_085104C4:: @ 85104C4 + .incbin "baserom.gba", 0x5104c4, 0x2c + +gUnknown_085104F0:: @ 85104F0 + .incbin "baserom.gba", 0x5104f0, 0x18 + +gSafariBallsWindowTemplate:: @ 8510508 + .incbin "baserom.gba", 0x510508, 0x8 + +gUnknown_08510510:: @ 8510510 + .incbin "baserom.gba", 0x510510, 0x20 + +gPyramidFloorWindowTemplate_2:: @ 8510530 + .incbin "baserom.gba", 0x510530, 0x8 + +gPyramidFloorWindowTemplate_1:: @ 8510538 + .incbin "baserom.gba", 0x510538, 0x8 + +sStartMenuItems:: @ 8510540 + .incbin "baserom.gba", 0x510540, 0x68 + +gUnknown_085105A8:: @ 85105A8 + .incbin "baserom.gba", 0x5105a8, 0x4 + +gUnknown_085105AC:: @ 85105AC + .incbin "baserom.gba", 0x5105ac, 0x10 + +gUnknown_085105BC:: @ 85105BC + .incbin "baserom.gba", 0x5105bc, 0x1a8 + +gUnknown_08510764:: @ 8510764 + .incbin "baserom.gba", 0x510764, 0xb60 + +gUnknown_085112C4:: @ 85112C4 + .incbin "baserom.gba", 0x5112c4, 0x908 + +gUnknown_08511BCC:: @ 8511BCC + .incbin "baserom.gba", 0x511bcc, 0x9a8 + +gUnknown_08512574:: @ 8512574 + .incbin "baserom.gba", 0x512574, 0x8e0 + +gUnknown_08512E54:: @ 8512E54 + .incbin "baserom.gba", 0x512e54, 0x320 + +gUnknown_08513174:: @ 8513174 + .incbin "baserom.gba", 0x513174, 0x510 + +gUnknown_08513684:: @ 8513684 + .incbin "baserom.gba", 0x513684, 0x210 + +gUnknown_08513894:: @ 8513894 + .incbin "baserom.gba", 0x513894, 0xb50 + +gUnknown_085143E4:: @ 85143E4 + .incbin "baserom.gba", 0x5143e4, 0x210 + +gUnknown_085145F4:: @ 85145F4 + .incbin "baserom.gba", 0x5145f4, 0x810 + +gUnknown_08514E04:: @ 8514E04 + .incbin "baserom.gba", 0x514e04, 0x540 + +gUnknown_08515344:: @ 8515344 + .incbin "baserom.gba", 0x515344, 0x20 + +gUnknown_08515364:: @ 8515364 + .incbin "baserom.gba", 0x515364, 0x20 + +gUnknown_08515384:: @ 8515384 + .incbin "baserom.gba", 0x515384, 0x30 + +gUnknown_085153B4:: @ 85153B4 + .incbin "baserom.gba", 0x5153b4, 0x30 + +gUnknown_085153E4:: @ 85153E4 + .incbin "baserom.gba", 0x5153e4, 0x10 + +gUnknown_085153F4:: @ 85153F4 + .incbin "baserom.gba", 0x5153f4, 0x410 + +gUnknown_08515804:: @ 8515804 + .incbin "baserom.gba", 0x515804, 0x20 + +gUnknown_08515824:: @ 8515824 + .incbin "baserom.gba", 0x515824, 0x140 + +gUnknown_08515964:: @ 8515964 + .incbin "baserom.gba", 0x515964, 0x428 + +gUnknown_08515D8C:: @ 8515D8C + .incbin "baserom.gba", 0x515d8c, 0x430 + +gUnknown_085161BC:: @ 85161BC + .incbin "baserom.gba", 0x5161bc, 0x20 + +gUnknown_085161DC:: @ 85161DC + .incbin "baserom.gba", 0x5161dc, 0x320 + +gUnknown_085164FC:: @ 85164FC + .incbin "baserom.gba", 0x5164fc, 0x310 + +gUnknown_0851680C:: @ 851680C + .incbin "baserom.gba", 0x51680c, 0x310 + +gUnknown_08516B1C:: @ 8516B1C + .incbin "baserom.gba", 0x516b1c, 0x210 + +gUnknown_08516D2C:: @ 8516D2C + .incbin "baserom.gba", 0x516d2c, 0x110 + +gUnknown_08516E3C:: @ 8516E3C + .incbin "baserom.gba", 0x516e3c, 0xc08 + +gUnknown_08517A44:: @ 8517A44 + .incbin "baserom.gba", 0x517a44, 0xc + +gUnknown_08517A50:: @ 8517A50 + .incbin "baserom.gba", 0x517a50, 0x1ac + +gUnknown_08517BFC:: @ 8517BFC + .incbin "baserom.gba", 0x517bfc, 0x10 + +gUnknown_08517C0C:: @ 8517C0C + .incbin "baserom.gba", 0x517c0c, 0x428 + +gUnknown_08518034:: @ 8518034 + .incbin "baserom.gba", 0x518034, 0x268 + +gUnknown_0851829C:: @ 851829C + .incbin "baserom.gba", 0x51829c, 0x8028 + +gUnknown_085202C4:: @ 85202C4 + .incbin "baserom.gba", 0x5202c4, 0x45a0 + +gUnknown_08524864:: @ 8524864 + .incbin "baserom.gba", 0x524864, 0xc + +gUnknown_08524870:: @ 8524870 + .incbin "baserom.gba", 0x524870, 0xc + +gUnknown_0852487C:: @ 852487C + .incbin "baserom.gba", 0x52487c, 0x10 + +gDummyPaletteStructTemplate:: @ 852488C + .2byte 0xFFFF + .space 9 + .byte 0x20 + .space 4 + + .align 2 +gUnknown_0852489C:: @ 852489C + .incbin "baserom.gba", 0x52489c, 0x20 + +sFanfares:: @ 85248BC + .incbin "baserom.gba", 0x5248bc, 0x48 + +gUnknown_08524904:: @ 8524904 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852490C:: @ 852490C + .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524914:: @ 8524914 + .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852491C:: @ 852491C + .byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524924:: @ 8524924 + .byte 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852492C:: @ 852492C + .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524934:: @ 8524934 + .byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852493C:: @ 852493C + .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524944:: @ 8524944 + .byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852494C:: @ 852494C + .byte 0x00, 0x80, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524954:: @ 8524954 + .byte 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852495C:: @ 852495C + .byte 0x00, 0x80, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524964:: @ 8524964 + .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852496C:: @ 852496C + .byte 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524974:: @ 8524974 + .byte 0x00, 0x01, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852497C:: @ 852497C + .byte 0x00, 0x01, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524984:: @ 8524984 + .byte 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852498C:: @ 852498C + .byte 0x00, 0x41, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524994:: @ 8524994 + .byte 0x00, 0x41, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852499C:: @ 852499C + .byte 0x00, 0x41, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249A4:: @ 85249A4 + .byte 0x00, 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249AC:: @ 85249AC + .byte 0x00, 0x81, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249B4:: @ 85249B4 + .byte 0x00, 0x81, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249BC:: @ 85249BC + .byte 0x00, 0x81, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249C4:: @ 85249C4 + .byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249CC:: @ 85249CC + .byte 0x00, 0x03, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249D4:: @ 85249D4 + .byte 0x00, 0x03, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249DC:: @ 85249DC + .byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249E4:: @ 85249E4 + .byte 0x00, 0x43, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249EC:: @ 85249EC + .byte 0x00, 0x43, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249F4:: @ 85249F4 + .byte 0x00, 0x43, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249FC:: @ 85249FC + .byte 0x00, 0x43, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A04:: @ 8524A04 + .byte 0x00, 0x83, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A0C:: @ 8524A0C + .byte 0x00, 0x83, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A14:: @ 8524A14 + .byte 0x00, 0x83, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A1C:: @ 8524A1C + .byte 0x00, 0x83, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A24:: @ 8524A24 + .byte 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A2C:: @ 8524A2C + .byte 0x00, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A34:: @ 8524A34 + .byte 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A3C:: @ 8524A3C + .byte 0x00, 0x04, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A44:: @ 8524A44 + .byte 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A4C:: @ 8524A4C + .byte 0x00, 0x44, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A54:: @ 8524A54 + .byte 0x00, 0x44, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A5C:: @ 8524A5C + .byte 0x00, 0x44, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A64:: @ 8524A64 + .byte 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A6C:: @ 8524A6C + .byte 0x00, 0x84, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A74:: @ 8524A74 + .byte 0x00, 0x84, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A7C:: @ 8524A7C + .byte 0x00, 0x84, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A84:: @ 8524A84 + .byte 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A8C:: @ 8524A8C + .byte 0x00, 0x05, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A94:: @ 8524A94 + .byte 0x00, 0x05, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A9C:: @ 8524A9C + .byte 0x00, 0x05, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AA4:: @ 8524AA4 + .byte 0x00, 0x45, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AAC:: @ 8524AAC + .byte 0x00, 0x45, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AB4:: @ 8524AB4 + .byte 0x00, 0x45, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ABC:: @ 8524ABC + .byte 0x00, 0x45, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AC4:: @ 8524AC4 + .byte 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ACC:: @ 8524ACC + .byte 0x00, 0x85, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AD4:: @ 8524AD4 + .byte 0x00, 0x85, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ADC:: @ 8524ADC + .byte 0x00, 0x85, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AE4:: @ 8524AE4 + .byte 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AEC:: @ 8524AEC + .byte 0x00, 0x07, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AF4:: @ 8524AF4 + .byte 0x00, 0x07, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AFC:: @ 8524AFC + .byte 0x00, 0x07, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B04:: @ 8524B04 + .byte 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B0C:: @ 8524B0C + .byte 0x00, 0x47, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B14:: @ 8524B14 + .byte 0x00, 0x47, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B1C:: @ 8524B1C + .byte 0x00, 0x47, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B24:: @ 8524B24 + .byte 0x00, 0x87, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B2C:: @ 8524B2C + .byte 0x00, 0x87, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B34:: @ 8524B34 + .byte 0x00, 0x87, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B3C:: @ 8524B3C + .byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + +gUnknown_08524B44:: @ 8524B44 + .incbin "baserom.gba", 0x524b44, 0x1d0 + +gUnknown_08524D14:: @ 8524D14 + .incbin "baserom.gba", 0x524d14, 0x270 + +gUnknown_08524F84:: @ 8524F84 + .incbin "baserom.gba", 0x524f84, 0x308 + +gUnknown_0852528C:: @ 852528C + .incbin "baserom.gba", 0x52528c, 0x120 + +gUnknown_085253AC:: @ 85253AC + .incbin "baserom.gba", 0x5253ac, 0x270 + +gUnknown_0852561C:: @ 852561C + .incbin "baserom.gba", 0x52561c, 0x270 + +gUnknown_0852588C:: @ 852588C + .incbin "baserom.gba", 0x52588c, 0x308 + +gUnknown_08525B94:: @ 8525B94 + .incbin "baserom.gba", 0x525b94, 0x120 + +gUnknown_08525CB4:: @ 8525CB4 + .incbin "baserom.gba", 0x525cb4, 0xa0 + +gUnknown_08525D54:: @ 8525D54 + .incbin "baserom.gba", 0x525d54, 0x144 + +gUnknown_08525E98:: @ 8525E98 + .incbin "baserom.gba", 0x525e98, 0xc0 + +gUnknown_08525F58:: @ 8525F58 + .incbin "baserom.gba", 0x525f58, 0x20 + +gUnknown_08525F78:: @ 8525F78 + .incbin "baserom.gba", 0x525f78, 0x10 + +gUnknown_08525F88:: @ 8525F88 + .incbin "baserom.gba", 0x525f88, 0x4 + +gUnknown_08525F8C:: @ 8525F8C + .incbin "baserom.gba", 0x525f8c, 0x4 + +gUnknown_08525F90:: @ 8525F90 + .incbin "baserom.gba", 0x525f90, 0x30 + +gUnknown_08525FC0:: @ 8525FC0 + .incbin "baserom.gba", 0x525fc0, 0x18f80 + +gUnknown_0853EF40:: @ 853EF40 + .incbin "baserom.gba", 0x53ef40, 0x8 + +gUnknown_0853EF48:: @ 853EF48 + .incbin "baserom.gba", 0x53ef48, 0x18 + +gUnknown_0853EF60:: @ 853EF60 + .incbin "baserom.gba", 0x53ef60, 0xf8 + +gTitleScreenRayquazaTiles:: @ 853F058 + .incbin "graphics/title_screen/rayquaza.4bpp.lz" + + .align 2 +gUnknown_0853F83C:: @ 853F83C + .incbin "baserom.gba", 0x53f83c, 0x450 + +gTitleScreenCloudsTiles:: @ 853FC8C + .incbin "graphics/title_screen/clouds.4bpp.lz" + + .align 2 +gUnknown_0853FF70:: @ 853FF70 + .incbin "baserom.gba", 0x53ff70, 0xa8 + +gUnknown_08540018:: @ 8540018 + .incbin "baserom.gba", 0x540018, 0x18 + +gUnknown_08540030:: @ 8540030 + .incbin "baserom.gba", 0x540030, 0x18 + +gUnknown_08540048:: @ 8540048 + .incbin "baserom.gba", 0x540048, 0x90 + +gUnknown_085400D8:: @ 85400D8 + .incbin "baserom.gba", 0x5400d8, 0x18 + +gUnknown_085400F0:: @ 85400F0 + .incbin "baserom.gba", 0x5400f0, 0x10 + +gUnknown_08540100:: @ 8540100 + .incbin "baserom.gba", 0x540100, 0x24 + +gUnknown_08540124:: @ 8540124 + .incbin "baserom.gba", 0x540124, 0x18 + +gUnknown_0854013C:: @ 854013C + .incbin "baserom.gba", 0x54013c, 0x10 + +gUnknown_0854014C:: @ 854014C + .incbin "baserom.gba", 0x54014c, 0xc000 + +gUnknown_0854C14C:: @ 854C14C + .incbin "baserom.gba", 0x54c14c, 0x4 + +gUnknown_0854C150:: @ 854C150 + .incbin "baserom.gba", 0x54c150, 0xf0 + +gUnknown_0854C240:: @ 854C240 + .incbin "baserom.gba", 0x54c240, 0x10 + +gUnknown_0854C250:: @ 854C250 + .incbin "baserom.gba", 0x54c250, 0x20 + +gUnknown_0854C270:: @ 854C270 + .incbin "baserom.gba", 0x54c270, 0x20 + +gUnknown_0854C290:: @ 854C290 + .incbin "baserom.gba", 0x54c290, 0x20 + +gUnknown_0854C2B0:: @ 854C2B0 + .incbin "baserom.gba", 0x54c2b0, 0x820 + +gUnknown_0854CAD0:: @ 854CAD0 + .incbin "baserom.gba", 0x54cad0, 0x3080 + +gUnknown_0854FB50:: @ 854FB50 + .incbin "baserom.gba", 0x54fb50, 0xc + +gUnknown_0854FB5C:: @ 854FB5C + .incbin "baserom.gba", 0x54fb5c, 0x1c + +gUnknown_0854FB78:: @ 854FB78 + .incbin "baserom.gba", 0x54fb78, 0x18 + +gUnknown_0854FB90:: @ 854FB90 + .incbin "baserom.gba", 0x54fb90, 0x9c + +gUnknown_0854FC2C:: @ 854FC2C + .incbin "baserom.gba", 0x54fc2c, 0x18 + +gUnknown_0854FC44:: @ 854FC44 + .incbin "baserom.gba", 0x54fc44, 0x8 + +gUnknown_0854FC4C:: @ 854FC4C + .incbin "baserom.gba", 0x54fc4c, 0x8 + +gUnknown_0854FC54:: @ 854FC54 + .incbin "baserom.gba", 0x54fc54, 0x38 + +gUnknown_0854FC8C:: @ 854FC8C + .incbin "baserom.gba", 0x54fc8c, 0x8c + +gUnknown_0854FD18:: @ 854FD18 + .incbin "baserom.gba", 0x54fd18, 0x18 + +gUnknown_0854FD30:: @ 854FD30 + .incbin "baserom.gba", 0x54fd30, 0x8 + +gUnknown_0854FD38:: @ 854FD38 + .incbin "baserom.gba", 0x54fd38, 0x20 + +gUnknown_0854FD58:: @ 854FD58 + .incbin "baserom.gba", 0x54fd58, 0x18 + +gUnknown_0854FD70:: @ 854FD70 + .incbin "baserom.gba", 0x54fd70, 0x1c + +gUnknown_0854FD8C:: @ 854FD8C + .incbin "baserom.gba", 0x54fd8c, 0x38 + +gUnknown_0854FDC4:: @ 854FDC4 + .incbin "baserom.gba", 0x54fdc4, 0x18 + +gUnknown_0854FDDC:: @ 854FDDC + .incbin "baserom.gba", 0x54fddc, 0x8 + +gUnknown_0854FDE4:: @ 854FDE4 + .incbin "baserom.gba", 0x54fde4, 0xc + +gUnknown_0854FDF0:: @ 854FDF0 + .incbin "baserom.gba", 0x54fdf0, 0x8 + +gUnknown_0854FDF8:: @ 854FDF8 + .incbin "baserom.gba", 0x54fdf8, 0x8 + +gUnknown_0854FE00:: @ 854FE00 + .incbin "baserom.gba", 0x54fe00, 0x44 + +gUnknown_0854FE44:: @ 854FE44 + .incbin "baserom.gba", 0x54fe44, 0x18 + +gUnknown_0854FE5C:: @ 854FE5C + .incbin "baserom.gba", 0x54fe5c, 0x4 + +gUnknown_0854FE60:: @ 854FE60 + .incbin "baserom.gba", 0x54fe60, 0x4 + +gUnknown_0854FE64:: @ 854FE64 + .incbin "baserom.gba", 0x54fe64, 0x14 + +gUnknown_0854FE78:: @ 854FE78 + .incbin "baserom.gba", 0x54fe78, 0x4 + +gUnknown_0854FE7C:: @ 854FE7C + .incbin "baserom.gba", 0x54fe7c, 0xc + +gUnknown_0854FE88:: @ 854FE88 + .incbin "baserom.gba", 0x54fe88, 0x8 + +gUnknown_0854FE90:: @ 854FE90 + .incbin "baserom.gba", 0x54fe90, 0x8 + +gUnknown_0854FE98:: @ 854FE98 + .incbin "baserom.gba", 0x54fe98, 0xc + +gUnknown_0854FEA4:: @ 854FEA4 + .incbin "baserom.gba", 0x54fea4, 0x3 + +gUnknown_0854FEA7:: @ 854FEA7 + .incbin "baserom.gba", 0x54fea7, 0x5 + +gUnknown_0854FEAC:: @ 854FEAC + .incbin "baserom.gba", 0x54feac, 0x48 + +gUnknown_0854FEF4:: @ 854FEF4 + .incbin "baserom.gba", 0x54fef4, 0x48 + +gUnknown_0854FF3C:: @ 854FF3C + .incbin "baserom.gba", 0x54ff3c, 0x48 + +gUnknown_0854FF84:: @ 854FF84 + .incbin "baserom.gba", 0x54ff84, 0x48 + +gUnknown_0854FFCC:: @ 854FFCC + .incbin "baserom.gba", 0x54ffcc, 0x48 + +gUnknown_08550014:: @ 8550014 + .incbin "baserom.gba", 0x550014, 0x48 + +gUnknown_0855005C:: @ 855005C + .incbin "baserom.gba", 0x55005c, 0x48 + +gUnknown_085500A4:: @ 85500A4 + .incbin "baserom.gba", 0x5500a4, 0x4e0 + +gUnknown_08550584:: @ 8550584 + .incbin "baserom.gba", 0x550584, 0x10 + +gUnknown_08550594:: @ 8550594 + .incbin "baserom.gba", 0x550594, 0x8 + +gUnknown_0855059C:: @ 855059C + .incbin "baserom.gba", 0x55059c, 0x190 + +gUnknown_0855072C:: @ 855072C + .incbin "baserom.gba", 0x55072c, 0x10 + +gUnknown_0855073C:: @ 855073C + .incbin "baserom.gba", 0x55073c, 0x30 + +gUnknown_0855076C:: @ 855076C + .incbin "baserom.gba", 0x55076c, 0x48 + +gUnknown_085507B4:: @ 85507B4 + .incbin "baserom.gba", 0x5507b4, 0x18 + +gUnknown_085507CC:: @ 85507CC + .incbin "baserom.gba", 0x5507cc, 0x18 + +@ 85507E4 + .include "data/wild_mons.inc" + + .incbin "baserom.gba", 0x55370c, 0x188 + +gUnknown_08553894:: @ 8553894 + .incbin "baserom.gba", 0x553894, 0x180 + +gUnknown_08553A14:: @ 8553A14 + .incbin "baserom.gba", 0x553a14, 0x64 + +gUnknown_08553A78:: @ 8553A78 + .incbin "baserom.gba", 0x553a78, 0x4 + +gUnknown_08553A7C:: @ 8553A7C + .incbin "baserom.gba", 0x553a7c, 0x14 + + .align 2 +gNewGameBirchPic:: @ 8553A90 + .incbin "graphics/birch_speech/birch.4bpp" + + .incbin "baserom.gba", 0x554290, 0x66c0 + + .align 2 +gNewGameBirchPalette:: @ 855A950 + .incbin "graphics/birch_speech/birch.gbapal" + + .align 2 + .incbin "baserom.gba", 0x55a970, 0x20 + + .align 2 +gFieldEffectObjectPalette4:: @ 855A990 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_04.gbapal" + + .incbin "baserom.gba", 0x55a9b0, 0x480 + + .align 2 +gFieldEffectObjectPalette5:: @ 855AE30 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_05.gbapal" + +gUnknown_0855AE50:: @ 855AE50 + .incbin "baserom.gba", 0x55ae50, 0x200 + +gUnknown_0855B050:: @ 855B050 + .incbin "baserom.gba", 0x55b050, 0x20 + +gUnknown_0855B070:: @ 855B070 + .incbin "baserom.gba", 0x55b070, 0x280 + +gUnknown_0855B2F0:: @ 855B2F0 + .incbin "baserom.gba", 0x55b2f0, 0x80 + +gUnknown_0855B370:: @ 855B370 + .incbin "baserom.gba", 0x55b370, 0x20 + +gUnknown_0855B390:: @ 855B390 + .incbin "baserom.gba", 0x55b390, 0x280 + +gUnknown_0855B610:: @ 855B610 + .incbin "baserom.gba", 0x55b610, 0x20 + +gUnknown_0855B630:: @ 855B630 + .incbin "baserom.gba", 0x55b630, 0xbc0 + +gUnknown_0855C1F0:: @ 855C1F0 + .incbin "baserom.gba", 0x55c1f0, 0x20 + + .align 2 +@ TODO: something else uses these too +gNewGameBirchOamAttributes:: @ 855C210 + .4byte OAM_SIZE_64x64 + .2byte 0 + + .align 2 + .incbin "baserom.gba", 0x55c218, 0x10 + + .align 2 +gNewGameBirchPicTable:: @ 855C228 + obj_tiles gNewGameBirchPic, 0x800 + + .align 2 +gNewGameBirchObjectPaletteInfo:: @ 855C230 + obj_pal gNewGameBirchPalette, 0x1006 + + .align 2 +gNewGameBirchImageAnim:: @ 855C238 + obj_image_anim_frame 0, 1 + obj_image_anim_end + + .align 2 +gNewGameBirchImageAnimTable:: @ 855C240 + .4byte gNewGameBirchImageAnim + + .align 2 +gNewGameBirchObjectTemplate:: @ 855C244 + .2byte 0xFFFF @ tiles tag + .2byte 0x1006 @ palette tag + .4byte gNewGameBirchOamAttributes + .4byte gNewGameBirchImageAnimTable + .4byte gNewGameBirchPicTable + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 +gFieldEffectObjectPaletteInfo4:: @ 855C25C + obj_pal gFieldEffectObjectPalette4, 0x1007 + + .align 2 +gFieldEffectObjectPaletteInfo5:: @ 855C264 + obj_pal gFieldEffectObjectPalette5, 0x1010 + + .incbin "baserom.gba", 0x55c26c, 0x40 + +gUnknown_0855C2AC:: @ 855C2AC + .incbin "baserom.gba", 0x55c2ac, 0x18 + +gUnknown_0855C2C4:: @ 855C2C4 + .incbin "baserom.gba", 0x55c2c4, 0x40 + +gUnknown_0855C304:: @ 855C304 + .incbin "baserom.gba", 0x55c304, 0x18 + +gUnknown_0855C31C:: @ 855C31C + .incbin "baserom.gba", 0x55c31c, 0x18 + +gUnknown_0855C334:: @ 855C334 + .incbin "baserom.gba", 0x55c334, 0x18 + +gUnknown_0855C34C:: @ 855C34C + .incbin "baserom.gba", 0x55c34c, 0x18 + +gUnknown_0855C364:: @ 855C364 + .incbin "baserom.gba", 0x55c364, 0x10 + +gUnknown_0855C374:: @ 855C374 + .incbin "baserom.gba", 0x55c374, 0x10 + +gUnknown_0855C384:: @ 855C384 + .incbin "baserom.gba", 0x55c384, 0x20 + +gUnknown_0855C3A4:: @ 855C3A4 + .incbin "baserom.gba", 0x55c3a4, 0x18 + +gUnknown_0855C3BC:: @ 855C3BC + .incbin "baserom.gba", 0x55c3bc, 0x4 + +gUnknown_0855C3C0:: @ 855C3C0 + .incbin "baserom.gba", 0x55c3c0, 0x4 + +gUnknown_0855C3C4:: @ 855C3C4 + .incbin "baserom.gba", 0x55c3c4, 0x4 + +gUnknown_0855C3C8:: @ 855C3C8 + .incbin "baserom.gba", 0x55c3c8, 0x1c + +gUnknown_0855C3E4:: @ 855C3E4 + .incbin "baserom.gba", 0x55c3e4, 0x18 + +gUnknown_0855C3FC:: @ 855C3FC + .incbin "baserom.gba", 0x55c3fc, 0x1c + +gUnknown_0855C418:: @ 855C418 + .incbin "baserom.gba", 0x55c418, 0x14 + +gUnknown_0855C42C:: @ 855C42C + .incbin "baserom.gba", 0x55c42c, 0xc + +gUnknown_0855C438:: @ 855C438 + .incbin "baserom.gba", 0x55c438, 0x18 + +gUnknown_0855C450:: @ 855C450 + .incbin "baserom.gba", 0x55c450, 0x10 + +gUnknown_0855C460:: @ 855C460 + .incbin "baserom.gba", 0x55c460, 0x14 + +gUnknown_0855C474:: @ 855C474 + .incbin "baserom.gba", 0x55c474, 0x8 + +gUnknown_0855C47C:: @ 855C47C + .incbin "baserom.gba", 0x55c47c, 0x8 + +gUnknown_0855C484:: @ 855C484 + .incbin "baserom.gba", 0x55c484, 0x8 + +gUnknown_0855C48C:: @ 855C48C + .incbin "baserom.gba", 0x55c48c, 0x10 + +gUnknown_0855C49C:: @ 855C49C + .incbin "baserom.gba", 0x55c49c, 0xc + +gUnknown_0855C4A8:: @ 855C4A8 + .incbin "baserom.gba", 0x55c4a8, 0x1c + +gUnknown_0855C4C4:: @ 855C4C4 + .incbin "baserom.gba", 0x55c4c4, 0x1c + +gUnknown_0855C4E0:: @ 855C4E0 + .incbin "baserom.gba", 0x55c4e0, 0x14 + +gUnknown_0855C4F4:: @ 855C4F4 + .incbin "baserom.gba", 0x55c4f4, 0x54 + +gUnknown_0855C548:: @ 855C548 + .incbin "baserom.gba", 0x55c548, 0x8 + +gUnknown_0855C550:: @ 855C550 + .incbin "baserom.gba", 0x55c550, 0x1c + +gUnknown_0855C56C:: @ 855C56C + .incbin "baserom.gba", 0x55c56c, 0x24 + +gUnknown_0855C590:: @ 855C590 + .incbin "baserom.gba", 0x55c590, 0x5c + +gUnknown_0855C5EC:: @ 855C5EC + .incbin "baserom.gba", 0x55c5ec, 0x18 + +gUnknown_0855C604:: @ 855C604 + .incbin "baserom.gba", 0x55c604, 0x60 + +gUnknown_0855C664:: @ 855C664 + .incbin "baserom.gba", 0x55c664, 0x1c + +gUnknown_0855C680:: @ 855C680 + .incbin "baserom.gba", 0x55c680, 0x18 + +gUnknown_0855C698:: @ 855C698 + .incbin "baserom.gba", 0x55c698, 0x8 + +gUnknown_0855C6A0:: @ 855C6A0 + .incbin "baserom.gba", 0x55c6a0, 0x4 + +gUnknown_0855C6A4:: @ 855C6A4 + .incbin "baserom.gba", 0x55c6a4, 0x336 + +gUnknown_0855C9DA:: @ 855C9DA + .incbin "baserom.gba", 0x55c9da, 0x304 + +gUnknown_0855CCDE:: @ 855CCDE + .incbin "baserom.gba", 0x55ccde, 0x4b6 + +gUnknown_0855D194:: @ 855D194 + .incbin "baserom.gba", 0x55d194, 0x18 + +gUnknown_0855D1AC:: @ 855D1AC + .incbin "baserom.gba", 0x55d1ac, 0x18 + +gUnknown_0855D1C4:: @ 855D1C4 + .incbin "baserom.gba", 0x55d1c4, 0x18 + +gUnknown_0855D1DC:: @ 855D1DC + .incbin "baserom.gba", 0x55d1dc, 0x18 + +gUnknown_0855D1F4:: @ 855D1F4 + .incbin "baserom.gba", 0x55d1f4, 0x18 + +gUnknown_0855D20C:: @ 855D20C + .incbin "baserom.gba", 0x55d20c, 0x18 + +gUnknown_0855D224:: @ 855D224 + .incbin "baserom.gba", 0x55d224, 0x18 + +gUnknown_0855D23C:: @ 855D23C + .incbin "baserom.gba", 0x55d23c, 0x18 + +gUnknown_0855D254:: @ 855D254 + .incbin "baserom.gba", 0x55d254, 0x18 + +gUnknown_0855D26C:: @ 855D26C + .incbin "baserom.gba", 0x55d26c, 0x10 + +gUnknown_0855D27C:: @ 855D27C + .incbin "baserom.gba", 0x55d27c, 0x10 + +gUnknown_0855D28C:: @ 855D28C + .incbin "baserom.gba", 0x55d28c, 0x5 + +gUnknown_0855D291:: @ 855D291 + .incbin "baserom.gba", 0x55d291, 0x7 + +gUnknown_0855D298:: @ 855D298 + .incbin "baserom.gba", 0x55d298, 0x10 + +gUnknown_0855D2A8:: @ 855D2A8 + .incbin "baserom.gba", 0x55d2a8, 0x10 + +gUnknown_0855D2B8:: @ 855D2B8 + .incbin "baserom.gba", 0x55d2b8, 0x6 + +gUnknown_0855D2BE:: @ 855D2BE + .incbin "baserom.gba", 0x55d2be, 0x40 + +gUnknown_0855D2FE:: @ 855D2FE + .incbin "baserom.gba", 0x55d2fe, 0xe + +gUnknown_0855D30C:: @ 855D30C + .string "$" + +@ 855D30D + .include "data/text/pokedex_text.inc" + +@ 856B5B0 + .include "data/pokedex_entries.inc" + +gUnknown_0856E610:: @ 856E610 + .incbin "baserom.gba", 0x56e610, 0x20 + +gUnknown_0856E630:: @ 856E630 + .incbin "baserom.gba", 0x56e630, 0x10 + +gUnknown_0856E640:: @ 856E640 + .incbin "baserom.gba", 0x56e640, 0x28 + +gUnknown_0856E668:: @ 856E668 + .incbin "baserom.gba", 0x56e668, 0x8 + +gUnknown_0856E670:: @ 856E670 + .incbin "baserom.gba", 0x56e670, 0x18 + +gUnknown_0856E688:: @ 856E688 + .incbin "baserom.gba", 0x56e688, 0xc + +@ 856E694 + .include "data/graphics/pokemon/mon_footprint_table.inc" + +gUnknown_0856ED08:: @ 856ED08 + .incbin "baserom.gba", 0x56ed08, 0x28 + +gUnknown_0856ED30:: @ 856ED30 + .incbin "baserom.gba", 0x56ed30, 0x18 + +gUnknown_0856ED48:: @ 856ED48 + .incbin "baserom.gba", 0x56ed48, 0x54 + +gUnknown_0856ED9C:: @ 856ED9C + .incbin "baserom.gba", 0x56ed9c, 0x1c + +gUnknown_0856EDB8:: @ 856EDB8 + .incbin "baserom.gba", 0x56edb8, 0x1c + +gUnknown_0856EDD4:: @ 856EDD4 + .incbin "baserom.gba", 0x56edd4, 0x1c + +gUnknown_0856EDF0:: @ 856EDF0 + .incbin "baserom.gba", 0x56edf0, 0x1c + +gUnknown_0856EE0C:: @ 856EE0C + .incbin "baserom.gba", 0x56ee0c, 0x18 + +gUnknown_0856EE24:: @ 856EE24 + .incbin "baserom.gba", 0x56ee24, 0x38 + +gUnknown_0856EE5C:: @ 856EE5C + .incbin "baserom.gba", 0x56ee5c, 0x58 + +gUnknown_0856EEB4:: @ 856EEB4 + .incbin "baserom.gba", 0x56eeb4, 0x60 + +gUnknown_0856EF14:: @ 856EF14 + .incbin "baserom.gba", 0x56ef14, 0x98 + +gUnknown_0856EFAC:: @ 856EFAC + .incbin "baserom.gba", 0x56efac, 0x2 + +gUnknown_0856EFAE:: @ 856EFAE + .incbin "baserom.gba", 0x56efae, 0x6 + +gUnknown_0856EFB4:: @ 856EFB4 + .incbin "baserom.gba", 0x56efb4, 0x14 + +gUnknown_0856EFC8:: @ 856EFC8 + .incbin "baserom.gba", 0x56efc8, 0x30 + +gUnknown_0856EFF8:: @ 856EFF8 + .incbin "baserom.gba", 0x56eff8, 0x10 + +gUnknown_0856F008:: @ 856F008 + .incbin "baserom.gba", 0x56f008, 0x10 + +gUnknown_0856F018:: @ 856F018 + .incbin "baserom.gba", 0x56f018, 0x494 + +gUnknown_0856F4AC:: @ 856F4AC + .incbin "baserom.gba", 0x56f4ac, 0x20 + +gUnknown_0856F4CC:: @ 856F4CC + .incbin "baserom.gba", 0x56f4cc, 0x20 + +gUnknown_0856F4EC:: @ 856F4EC + .incbin "baserom.gba", 0x56f4ec, 0x20 + +gUnknown_0856F50C:: @ 856F50C + .incbin "baserom.gba", 0x56f50c, 0x20 + +gUnknown_0856F52C:: @ 856F52C + .incbin "baserom.gba", 0x56f52c, 0x20 + +gUnknown_0856F54C:: @ 856F54C + .incbin "baserom.gba", 0x56f54c, 0x20 + +gUnknown_0856F56C:: @ 856F56C + .incbin "baserom.gba", 0x56f56c, 0x20 + +gUnknown_0856F58C:: @ 856F58C + .incbin "baserom.gba", 0x56f58c, 0x20 + +gUnknown_0856F5AC:: @ 856F5AC + .incbin "baserom.gba", 0x56f5ac, 0x20 + +gUnknown_0856F5CC:: @ 856F5CC + .incbin "baserom.gba", 0x56f5cc, 0x248 + +gUnknown_0856F814:: @ 856F814 + .incbin "baserom.gba", 0x56f814, 0x2a0 + +gUnknown_0856FAB4:: @ 856FAB4 + .incbin "baserom.gba", 0x56fab4, 0x10 + +gUnknown_0856FAC4:: @ 856FAC4 + .incbin "baserom.gba", 0x56fac4, 0x20 + +gUnknown_0856FAE4:: @ 856FAE4 + .incbin "baserom.gba", 0x56fae4, 0x14 + +gUnknown_0856FAF8:: @ 856FAF8 + .incbin "baserom.gba", 0x56faf8, 0x14 + +gUnknown_0856FB0C:: @ 856FB0C + .incbin "baserom.gba", 0x56fb0c, 0x3 + +gUnknown_0856FB0F:: @ 856FB0F + .incbin "baserom.gba", 0x56fb0f, 0x9 + +gUnknown_0856FB18:: @ 856FB18 + .incbin "baserom.gba", 0x56fb18, 0x8 + +gUnknown_0856FB20:: @ 856FB20 + .incbin "baserom.gba", 0x56fb20, 0x8 + +gUnknown_0856FB28:: @ 856FB28 + .incbin "baserom.gba", 0x56fb28, 0x18 + +gUnknown_0856FB40:: @ 856FB40 + .incbin "baserom.gba", 0x56fb40, 0x8 + +gUnknown_0856FB48:: @ 856FB48 + .incbin "baserom.gba", 0x56fb48, 0x2 + +gUnknown_0856FB4A:: @ 856FB4A + .incbin "baserom.gba", 0x56fb4a, 0x2 + +gUnknown_0856FB4C:: @ 856FB4C + .incbin "baserom.gba", 0x56fb4c, 0x9 + +gUnknown_0856FB55:: @ 856FB55 + .incbin "baserom.gba", 0x56fb55, 0x2 + +gUnknown_0856FB57:: @ 856FB57 + .incbin "baserom.gba", 0x56fb57, 0x5 + +gUnknown_0856FB5C:: @ 856FB5C + .incbin "baserom.gba", 0x56fb5c, 0xc + +gUnknown_0856FB68:: @ 856FB68 + .incbin "baserom.gba", 0x56fb68, 0x6 + +gUnknown_0856FB6E:: @ 856FB6E + .incbin "baserom.gba", 0x56fb6e, 0x6 + +gUnknown_0856FB74:: @ 856FB74 + .incbin "baserom.gba", 0x56fb74, 0x4 + +gUnknown_0856FB78:: @ 856FB78 + .incbin "baserom.gba", 0x56fb78, 0x44 + +gUnknown_0856FBBC:: @ 856FBBC + .incbin "baserom.gba", 0x56fbbc, 0x1244 + +gUnknown_08570E00:: @ 8570E00 + .incbin "baserom.gba", 0x570e00, 0x260 + +gUnknown_08571060:: @ 8571060 + .incbin "baserom.gba", 0x571060, 0x260 + +gUnknown_085712C0:: @ 85712C0 + .incbin "baserom.gba", 0x5712c0, 0x38 + +gUnknown_085712F8:: @ 85712F8 + .incbin "baserom.gba", 0x5712f8, 0xe8 + +gUnknown_085713E0:: @ 85713E0 + .incbin "baserom.gba", 0x5713e0, 0x8 + +gUnknown_085713E8:: @ 85713E8 + .incbin "baserom.gba", 0x5713e8, 0xc + +gUnknown_085713F4:: @ 85713F4 + .incbin "baserom.gba", 0x5713f4, 0xc + +gUnknown_08571400:: @ 8571400 + .incbin "baserom.gba", 0x571400, 0x28 + +gUnknown_08571428:: @ 8571428 + .incbin "baserom.gba", 0x571428, 0x20 + +gUnknown_08571448:: @ 8571448 + .incbin "baserom.gba", 0x571448, 0x3 + +gUnknown_0857144B:: @ 857144B + .incbin "baserom.gba", 0x57144b, 0x3 + +gUnknown_0857144E:: @ 857144E + .incbin "baserom.gba", 0x57144e, 0x6 + +gUnknown_08571454:: @ 8571454 + .incbin "baserom.gba", 0x571454, 0x68 + +gUnknown_085714BC:: @ 85714BC + .incbin "baserom.gba", 0x5714bc, 0x18 + +gUnknown_085714D4:: @ 85714D4 + .incbin "baserom.gba", 0x5714d4, 0x10 + +gUnknown_085714E4:: @ 85714E4 + .incbin "baserom.gba", 0x5714e4, 0xd0 + +gUnknown_085715B4:: @ 85715B4 + .incbin "baserom.gba", 0x5715b4, 0x30 + +gUnknown_085715E4:: @ 85715E4 + .incbin "baserom.gba", 0x5715e4, 0x18 + +gUnknown_085715FC:: @ 85715FC + .incbin "baserom.gba", 0x5715fc, 0x18 + +gUnknown_08571614:: @ 8571614 + .incbin "baserom.gba", 0x571614, 0x3c + +gUnknown_08571650:: @ 8571650 + .incbin "baserom.gba", 0x571650, 0x70 + +gUnknown_085716C0:: @ 85716C0 + .incbin "baserom.gba", 0x5716c0, 0x28 + +gUnknown_085716E8:: @ 85716E8 + .incbin "baserom.gba", 0x5716e8, 0x28 + +gUnknown_08571710:: @ 8571710 + .incbin "baserom.gba", 0x571710, 0x24 + +gUnknown_08571734:: @ 8571734 + .incbin "baserom.gba", 0x571734, 0x3 + +gUnknown_08571737:: @ 8571737 + .incbin "baserom.gba", 0x571737, 0x5 + +gUnknown_0857173C:: @ 857173C + .incbin "baserom.gba", 0x57173c, 0x20 + +gUnknown_0857175C:: @ 857175C + .incbin "baserom.gba", 0x57175c, 0x800 + +gUnknown_08571F5C:: @ 8571F5C + .incbin "baserom.gba", 0x571f5c, 0x180 + +gUnknown_085720DC:: @ 85720DC + .incbin "baserom.gba", 0x5720dc, 0x98 + +gUnknown_08572174:: @ 8572174 + .incbin "baserom.gba", 0x572174, 0x12c + +gUnknown_085722A0:: @ 85722A0 + .incbin "baserom.gba", 0x5722a0, 0xfc + +gUnknown_0857239C:: @ 857239C + .incbin "baserom.gba", 0x57239c, 0x40 + +gUnknown_085723DC:: @ 85723DC + .incbin "baserom.gba", 0x5723dc, 0x20 + +gUnknown_085723FC:: @ 85723FC + .incbin "baserom.gba", 0x5723fc, 0x20 + +gUnknown_0857241C:: @ 857241C + .incbin "baserom.gba", 0x57241c, 0x20 + +gUnknown_0857243C:: @ 857243C + .incbin "baserom.gba", 0x57243c, 0x20 + +gUnknown_0857245C:: @ 857245C + .incbin "baserom.gba", 0x57245c, 0x48 + +gUnknown_085724A4:: @ 85724A4 + .incbin "baserom.gba", 0x5724a4, 0x18 + +gUnknown_085724BC:: @ 85724BC + .incbin "baserom.gba", 0x5724bc, 0x238 + +gUnknown_085726F4:: @ 85726F4 + .incbin "baserom.gba", 0x5726f4, 0x20 + +gUnknown_08572714:: @ 8572714 + .incbin "baserom.gba", 0x572714, 0x20 + +gUnknown_08572734:: @ 8572734 + .incbin "baserom.gba", 0x572734, 0x10 + +gUnknown_08572744:: @ 8572744 + .incbin "baserom.gba", 0x572744, 0x8 + +gUnknown_0857274C:: @ 857274C + .incbin "baserom.gba", 0x57274c, 0x8 + +gUnknown_08572754:: @ 8572754 + .incbin "baserom.gba", 0x572754, 0x18 + +gUnknown_0857276C:: @ 857276C + .incbin "baserom.gba", 0x57276c, 0xf8 + +gUnknown_08572864:: @ 8572864 + .incbin "baserom.gba", 0x572864, 0x58 + +gUnknown_085728BC:: @ 85728BC + .incbin "baserom.gba", 0x5728bc, 0x18 + +gUnknown_085728D4:: @ 85728D4 + .incbin "baserom.gba", 0x5728d4, 0x48 + +gUnknown_0857291C:: @ 857291C + .incbin "baserom.gba", 0x57291c, 0x4c58 + +gUnknown_08577574:: @ 8577574 + .incbin "baserom.gba", 0x577574, 0x44 + +gUnknown_085775B8:: @ 85775B8 + .incbin "baserom.gba", 0x5775b8, 0x398c + +gUnknown_0857AF44:: @ 857AF44 + .incbin "baserom.gba", 0x57af44, 0xc0 + +gUnknown_0857B004:: @ 857B004 + .incbin "baserom.gba", 0x57b004, 0x7c + +gUnknown_0857B080:: @ 857B080 + .incbin "baserom.gba", 0x57b080, 0x28 + +gUnknown_0857B0A8:: @ 857B0A8 + .incbin "baserom.gba", 0x57b0a8, 0x38 + +gUnknown_0857B0E0:: @ 857B0E0 + .incbin "baserom.gba", 0x57b0e0, 0x8b8 + +gUnknown_0857B998:: @ 857B998 + .incbin "baserom.gba", 0x57b998, 0xc + +gUnknown_0857B9A4:: @ 857B9A4 + .incbin "baserom.gba", 0x57b9a4, 0x18 + +gUnknown_0857B9BC:: @ 857B9BC + .incbin "baserom.gba", 0x57b9bc, 0x28 + +gUnknown_0857B9E4:: @ 857B9E4 + .incbin "baserom.gba", 0x57b9e4, 0x18 + +gUnknown_0857B9FC:: @ 857B9FC + .incbin "baserom.gba", 0x57b9fc, 0x54 + +gUnknown_0857BA50:: @ 857BA50 + .incbin "baserom.gba", 0x57ba50, 0x18 + +gUnknown_0857BA68:: @ 857BA68 + .incbin "baserom.gba", 0x57ba68, 0x18 + +gUnknown_0857BA80:: @ 857BA80 + .incbin "baserom.gba", 0x57ba80, 0x9c + +gUnknown_0857BB1C:: @ 857BB1C + .incbin "baserom.gba", 0x57bb1c, 0x8 + +gUnknown_0857BB24:: @ 857BB24 + .incbin "baserom.gba", 0x57bb24, 0x14c + +gUnknown_0857BC70:: @ 857BC70 + .incbin "baserom.gba", 0x57bc70, 0x18 + +gUnknown_0857BC88:: @ 857BC88 + .incbin "baserom.gba", 0x57bc88, 0x20 + +@ 857BCA8 + .include "data/graphics/pokemon/mon_icon_table.inc" + +@ 857C388 + .include "data/graphics/pokemon/mon_icon_palette_indices.inc" + +@ 857C540 + .include "data/graphics/pokemon/mon_icon_palette_table.inc" + +gUnknown_0857C570:: @ 857C570 + .incbin "baserom.gba", 0x57c570, 0x44 + +gUnknown_0857C5B4:: @ 857C5B4 + .incbin "baserom.gba", 0x57c5b4, 0x34 + +gUnknown_0857C5E8:: @ 857C5E8 + .incbin "baserom.gba", 0x57c5e8, 0x8 + +gUnknown_0857C5F0:: @ 857C5F0 + .incbin "baserom.gba", 0x57c5f0, 0x18 + +gUnknown_0857C608:: @ 857C608 + .incbin "baserom.gba", 0x57c608, 0x2 + +gUnknown_0857C60A:: @ 857C60A + .incbin "baserom.gba", 0x57c60a, 0x5a + + .align 2 +gFieldEffectObjectPaletteInfo6:: @ 857C664 + obj_pal gFieldEffectObjectPalette6, 0x1000 + +gUnknown_0857C66C:: @ 857C66C + .incbin "baserom.gba", 0x57c66c, 0x18 + +gUnknown_0857C684:: @ 857C684 + .incbin "baserom.gba", 0x57c684, 0x1680 + +gUnknown_0857DD04:: @ 857DD04 + .incbin "baserom.gba", 0x57dd04, 0x1680 + +gUnknown_0857F384:: @ 857F384 + .incbin "baserom.gba", 0x57f384, 0xc0 + +gUnknown_0857F444:: @ 857F444 + .incbin "baserom.gba", 0x57f444, 0x20 + +gUnknown_0857F464:: @ 857F464 + .incbin "baserom.gba", 0x57f464, 0xe0 + +gUnknown_0857F544:: @ 857F544 + .incbin "baserom.gba", 0x57f544, 0x5f0 + +gUnknown_0857FB34:: @ 857FB34 + .incbin "baserom.gba", 0x57fb34, 0x8 + +gUnknown_0857FB3C:: @ 857FB3C + .incbin "baserom.gba", 0x57fb3c, 0x8 + +gUnknown_0857FB44:: @ 857FB44 + .incbin "baserom.gba", 0x57fb44, 0x8 + +gUnknown_0857FB4C:: @ 857FB4C + .incbin "baserom.gba", 0x57fb4c, 0x4c + +gUnknown_0857FB98:: @ 857FB98 + .incbin "baserom.gba", 0x57fb98, 0x4 + +gUnknown_0857FB9C:: @ 857FB9C + .incbin "baserom.gba", 0x57fb9c, 0x4 + +gUnknown_0857FBA0:: @ 857FBA0 + .incbin "baserom.gba", 0x57fba0, 0x8 + +gUnknown_0857FBA8:: @ 857FBA8 + .incbin "baserom.gba", 0x57fba8, 0x8 + +gUnknown_0857FBB0:: @ 857FBB0 + .incbin "baserom.gba", 0x57fbb0, 0x3c + +gUnknown_0857FBEC:: @ 857FBEC + .incbin "baserom.gba", 0x57fbec, 0x90 + +gUnknown_0857FC7C:: @ 857FC7C + .incbin "baserom.gba", 0x57fc7c, 0x18 + +@ 857FC94 + .include "data/graphics/berries/berry_pic_table.inc" + +gUnknown_0857FDEC:: @ 857FDEC + .incbin "baserom.gba", 0x57fdec, 0x8 + +gUnknown_0857FDF4:: @ 857FDF4 + .incbin "baserom.gba", 0x57fdf4, 0x1c + +gUnknown_0857FE10:: @ 857FE10 + .incbin "baserom.gba", 0x57fe10, 0x90 + +@ 857FEA0 + .include "data/text/item_descriptions.inc" + +@ 85839A0 + .include "data/items.inc" + +gUnknown_08587A6C:: @ 8587A6C + .incbin "baserom.gba", 0x587a6c, 0x4 + +gUnknown_08587A70:: @ 8587A70 + .incbin "baserom.gba", 0x587a70, 0x4 + +gUnknown_08587A74:: @ 8587A74 + .incbin "baserom.gba", 0x587a74, 0x5c + +gUnknown_08587AD0:: @ 8587AD0 + .incbin "baserom.gba", 0x587ad0, 0x18 + +gUnknown_08587AE8:: @ 8587AE8 + .incbin "baserom.gba", 0x587ae8, 0x20 + +gUnknown_08587B08:: @ 8587B08 + .incbin "baserom.gba", 0x587b08, 0x10 + +gUnknown_08587B18:: @ 8587B18 + .incbin "baserom.gba", 0x587b18, 0x68 + +gUnknown_08587B80:: @ 8587B80 + .incbin "baserom.gba", 0x587b80, 0x30 + +gUnknown_08587BB0:: @ 8587BB0 + .incbin "baserom.gba", 0x587bb0, 0x8 + +gUnknown_08587BB8:: @ 8587BB8 + .incbin "baserom.gba", 0x587bb8, 0x10 + +gUnknown_08587BC8:: @ 8587BC8 + .incbin "baserom.gba", 0x587bc8, 0x20 + +gUnknown_08587BE8:: @ 8587BE8 + .incbin "baserom.gba", 0x587be8, 0x18 + +gUnknown_08587C00:: @ 8587C00 + .incbin "baserom.gba", 0x587c00, 0x8 + +gUnknown_08587C08:: @ 8587C08 + .incbin "baserom.gba", 0x587c08, 0x8 + +gUnknown_08587C10:: @ 8587C10 + .incbin "baserom.gba", 0x587c10, 0x8 + +gUnknown_08587C18:: @ 8587C18 + .incbin "baserom.gba", 0x587c18, 0x18 + +gUnknown_08587C30:: @ 8587C30 + .incbin "baserom.gba", 0x587c30, 0x20 + +@ 8587C50 + .include "data/text/contest_text_pointers.inc" + +@ 8587D5C + .incbin "baserom.gba", 0x587d5c, 0x34 + +gUnknown_08587D90:: @ 8587D90 + .incbin "baserom.gba", 0x587d90, 0x80 + +gUnknown_08587E10:: @ 8587E10 + .incbin "baserom.gba", 0x587e10, 0xf8 + +gUnknown_08587F08:: @ 8587F08 + .incbin "baserom.gba", 0x587f08, 0x14 + +gUnknown_08587F1C:: @ 8587F1C + .incbin "baserom.gba", 0x587f1c, 0x18 + +gUnknown_08587F34:: @ 8587F34 + .incbin "baserom.gba", 0x587f34, 0x10 + +gUnknown_08587F44:: @ 8587F44 + .incbin "baserom.gba", 0x587f44, 0x60 + +gUnknown_08587FA4:: @ 8587FA4 + .incbin "baserom.gba", 0x587fa4, 0x100 + +gUnknown_085880A4:: @ 85880A4 + .incbin "baserom.gba", 0x5880a4, 0x1740 + +gUnknown_085897E4:: @ 85897E4 + .incbin "baserom.gba", 0x5897e4, 0xc0 + +gUnknown_085898A4:: @ 85898A4 + .incbin "baserom.gba", 0x5898a4, 0x60 + +gUnknown_08589904:: @ 8589904 + .incbin "baserom.gba", 0x589904, 0x20 + +gUnknown_08589924:: @ 8589924 + .incbin "baserom.gba", 0x589924, 0x68 + +gUnknown_0858998C:: @ 858998C + .incbin "baserom.gba", 0x58998c, 0x60 + +gUnknown_085899EC:: @ 85899EC + .incbin "baserom.gba", 0x5899ec, 0x1c + +gUnknown_08589A08:: @ 8589A08 + .incbin "baserom.gba", 0x589a08, 0x8 + +gUnknown_08589A10:: @ 8589A10 + .incbin "baserom.gba", 0x589a10, 0x18 + +gUnknown_08589A28:: @ 8589A28 + .incbin "baserom.gba", 0x589a28, 0x10 + +gUnknown_08589A38:: @ 8589A38 + .incbin "baserom.gba", 0x589a38, 0x10 + +gUnknown_08589A48:: @ 8589A48 + .incbin "baserom.gba", 0x589a48, 0x18 + +gUnknown_08589A60:: @ 8589A60 + .incbin "baserom.gba", 0x589a60, 0x10 + +gUnknown_08589A70:: @ 8589A70 + .incbin "baserom.gba", 0x589a70, 0x38 + +gUnknown_08589AA8:: @ 8589AA8 + .incbin "baserom.gba", 0x589aa8, 0x8 + +gUnknown_08589AB0:: @ 8589AB0 + .incbin "baserom.gba", 0x589ab0, 0x3 + +gUnknown_08589AB3:: @ 8589AB3 + .incbin "baserom.gba", 0x589ab3, 0x7 + +gUnknown_08589ABA:: @ 8589ABA + .incbin "baserom.gba", 0x589aba, 0x6 + +gUnknown_08589AC0:: @ 8589AC0 + .incbin "baserom.gba", 0x589ac0, 0x6 + +gUnknown_08589AC6:: @ 8589AC6 + .incbin "baserom.gba", 0x589ac6, 0x6 + +gUnknown_08589ACC:: @ 8589ACC + .incbin "baserom.gba", 0x589acc, 0x6 + +gUnknown_08589AD2:: @ 8589AD2 + .incbin "baserom.gba", 0x589ad2, 0x6 + +gUnknown_08589AD8:: @ 8589AD8 + .incbin "baserom.gba", 0x589ad8, 0x6 + +gUnknown_08589ADE:: @ 8589ADE + .incbin "baserom.gba", 0x589ade, 0x6 diff --git a/data/strings.s b/data/strings.s index 348e493c8..188516469 100644 --- a/data/strings.s +++ b/data/strings.s @@ -2339,11 +2339,11 @@ gText_ByeBye:: @ 85ED44A .string "My POKéMON and I help$" .string "my father’s research.$" -gText_PkmnHatchedFromEgg:: @ 85ED5A5 +gText_HatchedFromEgg:: @ 85ED5A5 .string "{STR_VAR_1} hatched from the EGG!$" -gText_NameHatchedPkmn:: @ 85ED5BE - .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" +gText_NickHatchPrompt:: @ 85ED5BE + .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" .align 2 gText_ReadyToBerryCrush:: @ 85ED5F0 diff --git a/graphics/misc/egg_hatch.png b/graphics/misc/egg_hatch.png new file mode 100644 index 000000000..abea3122f Binary files /dev/null and b/graphics/misc/egg_hatch.png differ diff --git a/graphics/misc/egg_shard.png b/graphics/misc/egg_shard.png new file mode 100644 index 000000000..d404445b8 Binary files /dev/null and b/graphics/misc/egg_shard.png differ diff --git a/include/bg.h b/include/bg.h index 444d3f3c2..0dcb84a34 100644 --- a/include/bg.h +++ b/include/bg.h @@ -1,23 +1,75 @@ -#ifndef GUARD_bg_H -#define GUARD_bg_H +#ifndef GUARD_BG_H +#define GUARD_BG_H -struct BgTemplate { - u32 bg:2; - u32 charBaseIndex:2; - u32 mapBaseIndex:5; - u32 screenSize:2; - u32 paletteMode:1; - u32 priority:2; +enum +{ + BG_CTRL_ATTR_VISIBLE = 1, + BG_CTRL_ATTR_CHARBASEINDEX = 2, + BG_CTRL_ATTR_MAPBASEINDEX = 3, + BG_CTRL_ATTR_SCREENSIZE = 4, + BG_CTRL_ATTR_PALETTEMODE = 5, + BG_CTRL_ATTR_PRIORITY = 6, + BG_CTRL_ATTR_MOSAIC = 7, + BG_CTRL_ATTR_WRAPAROUND = 8, +}; + +struct BgTemplate +{ + u32 bg:2; // 0x1, 0x2 -> 0x3 + u32 charBaseIndex:2; // 0x4, 0x8 -> 0xC + u32 mapBaseIndex:5; // 0x10, 0x20, 0x40, 0x80, 0x100 -> 0x1F0 + u32 screenSize:2; // 0x200, 0x400 -> 0x600 + u32 paletteMode:1; // 0x800 + u32 priority:2; // 0x1000, 0x2000 > 0x3000 u32 baseTile:10; }; -void ResetBgsAndClearDma3BusyFlags(u32); -void InitBgsFromTemplates(u8, const struct BgTemplate *, u8); -u32 ChangeBgX(u8, u32, u8); -u32 ChangeBgY(u8, u32, u8); +void ResetBgs(void); +u8 GetBgMode(void); +void ResetBgControlStructs(void); +void Unused_ResetBgControlStruct(u8 bg); +void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound); +u16 GetBgControlAttribute(u8 bg, u8 attributeId); +u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode); +void SetTextModeAndHideBgs(void); +bool8 IsInvalidBg(u8 bg); +int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4); +void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable); +void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates); +void InitBgFromTemplate(const struct BgTemplate *template); +void SetBgMode(u8 bgMode); +u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset); +u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset); +u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset); +bool8 IsDma3ManagerBusyWithBgCopy(void); +void ShowBg(u8 bg); +void HideBg(u8 bg); +void SetBgAttribute(u8 bg, u8 attributeId, u8 value); +u16 GetBgAttribute(u8 bg, u8 attributeId); +u32 ChangeBgX(u8 bg, u32 value, u8 op); +u32 GetBgX(u8 bg); +u32 ChangeBgY(u8 bg, u32 value, u8 op); +u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op); +u32 GetBgY(u8 bg); +void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle); +u8 Unused_AdjustBgMosaic(u8 a1, u8 a2); +void SetBgTilemapBuffer(u8 bg, void *tilemap); +void UnsetBgTilemapBuffer(u8 bg); +void* GetBgTilemapBuffer(u8 bg); +void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); +void CopyBgTilemapBufferToVram(u8 bg); +void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u8 height); +void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette); +void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2); void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height); -void ShowBg(u8); -void HideBg(u8); -void CopyBgTilemapBufferToVram(u8); +void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette); +void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, s16 tileNumDelta); +u16 GetBgMetricTextMode(u8 bg, u8 whichMetric); +u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric); +u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 screenHeight); +void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 palette2); +u32 GetBgType(u8 bg); +bool32 IsInvalidBg32(u8 bg); +bool32 IsTileMapOutsideWram(u8 bg); -#endif //GUARD_bg_H +#endif // GUARD_BG_H diff --git a/include/dma3.h b/include/dma3.h index beb00745d..db75ea9e3 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -6,7 +6,7 @@ extern u8 gDma3RequestCursor; struct DmaRequestsStruct { - /* 0x00 */ u8 *src; + /* 0x00 */ const u8 *src; /* 0x04 */ u8 *dest; /* 0x08 */ u16 size; /* 0x0A */ u16 mode; @@ -17,7 +17,8 @@ extern struct DmaRequestsStruct gDma3Requests[128]; void ClearDma3Requests(void); void ProcessDma3Requests(void); -int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode); +int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode); +int CheckForSpaceForDma3Request(s16 index); -#endif +#endif // GUARD_DMA3_H diff --git a/include/global.h b/include/global.h index fa7856786..4014c6dde 100644 --- a/include/global.h +++ b/include/global.h @@ -18,6 +18,14 @@ void memcpy(void *, const void *, size_t); #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +// useful math macros + +// Converts a number to Q8.8 fixed-point format +#define Q_8_8(n) ((s16)((n) * 256)) + +// Converts a number to Q4.12 fixed-point format +#define Q_4_12(n) ((s16)((n) * 4096)) + #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -645,7 +653,8 @@ struct DaycareMon struct MailStruct mail; u8 OT_name[OT_NAME_LENGTH + 1]; u8 monName[11]; - u8 language; + u8 language_maybe : 4; + u8 unknown : 4; u32 stepsTaken; }; diff --git a/include/gpu_regs.h b/include/gpu_regs.h index 1039b618f..89e0cb64b 100644 --- a/include/gpu_regs.h +++ b/include/gpu_regs.h @@ -1,4 +1,3 @@ - #ifndef GUARD_GPU_REGS_H #define GUARD_GPU_REGS_H @@ -7,9 +6,14 @@ // Exported RAM declarations // Exported ROM declarations -void DisableInterrupts(u16); -void EnableInterrupts(u16); -void SetGpuReg(u8, u16); +void InitGpuRegManager(void); +void CopyBufferedValuesToGpuRegs(void); +void SetGpuReg(u8 regOffset, u16 value); +void SetGpuReg_ForcedBlank(u8 regOffset, u16 value); +u16 GetGpuReg(u8 regOffset); +void SetGpuRegBits(u8 regOffset, u16 mask); void ClearGpuRegBits(u8 regOffset, u16 mask); +void EnableInterrupts(u16 mask); +void DisableInterrupts(u16 mask); #endif //GUARD_GPU_REGS_H diff --git a/include/m4a.h b/include/m4a.h index b6c8f9072..8c3380dd8 100644 --- a/include/m4a.h +++ b/include/m4a.h @@ -4,6 +4,7 @@ #include "gba/m4a_internal.h" void m4aSoundVSync(void); +void m4aSoundVSyncOn(void); void m4aSoundInit(void); void m4aSoundMain(void); diff --git a/include/pokemon.h b/include/pokemon.h index 595ec38fd..9d01c051e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -620,4 +620,8 @@ bool8 IsPokeSpriteNotFlipped(u16 species); bool8 IsMonShiny(struct Pokemon *mon); bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); +#include "sprite.h" + +void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); + #endif // GUARD_POKEMON_H diff --git a/include/text.h b/include/text.h index c61f6cc98..dba409f37 100644 --- a/include/text.h +++ b/include/text.h @@ -138,28 +138,37 @@ struct FontInfo u8 shadowColor:4; }; -struct GlyphWidthFunc{ +struct GlyphWidthFunc +{ u32 font_id; u32 (*func)(u16 glyphId, bool32 isJapanese); }; -struct KeypadIcon { +struct KeypadIcon +{ u16 tile_offset; u8 width; u8 height; }; +struct __attribute__((packed)) TextColor +{ + u8 fgColor; + u8 bgColor; + u8 shadowColor; +}; + extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; void SetFontsPointer(const struct FontInfo *fonts); -void DeactivateAllTextPrinters (void); +void DeactivateAllTextPrinters(void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); void RunTextPrinters(void); -bool8 IsTextPrinterActive(u8 id); +bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); diff --git a/include/window.h b/include/window.h index 20e5fefa3..e8af82e81 100644 --- a/include/window.h +++ b/include/window.h @@ -24,6 +24,17 @@ struct WindowTemplate u16 baseBlock; }; +#define DUMMY_WIN_TEMPLATE \ +{ \ + 0xFF, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ +} + struct Window { struct WindowTemplate window; diff --git a/ld_script.txt b/ld_script.txt index e973a7748..4b2e1e34a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -80,7 +80,7 @@ SECTIONS { src/util.o(.text); src/blend_palette.o(.text); asm/daycare.o(.text); - asm/egg_hatch.o(.text); + src/egg_hatch.o(.text); asm/battle_interface.o(.text); asm/smokescreen.o(.text); asm/pokeball.o(.text); @@ -339,8 +339,10 @@ SECTIONS { src/trig.o(.rodata); src/util.o(.rodata); data/data3.o(.rodata); + src/egg_hatch.o(.rodata); + data/data3_a0_A.o(.rodata); data/field_map_obj.o(.rodata); - data/data3.o(.rodata_b); + data/data3_a0_B.o(.rodata); src/berry.o(.rodata); data/data3_a1.o(.rodata); src/pokemon_size_record.o(.rodata) diff --git a/src/bg.c b/src/bg.c index 390a99d50..74e3ea830 100644 --- a/src/bg.c +++ b/src/bg.c @@ -1,21 +1,12 @@ #include "global.h" -#include "dma3.h" #include "bg.h" +#include "dma3.h" +#include "gpu_regs.h" -#define DISPCNT_ALL_BG_AND_MODE_BITS 0x0F07 +#define DISPCNT_ALL_BG_AND_MODE_BITS (DISPCNT_BG_ALL_ON | 0x7) -enum { - BG_CTRL_ATTR_VISIBLE = 1, - BG_CTRL_ATTR_CHARBASEINDEX = 2, - BG_CTRL_ATTR_MAPBASEINDEX = 3, - BG_CTRL_ATTR_SCREENSIZE = 4, - BG_CTRL_ATTR_PALETTEMODE = 5, - BG_CTRL_ATTR_PRIORITY = 6, - BG_CTRL_ATTR_MOSAIC = 7, - BG_CTRL_ATTR_WRAPAROUND = 8, -}; - -struct BgControl { +struct BgControl +{ struct BgConfig { u16 visible:1; u16 unknown_1:1; @@ -35,7 +26,8 @@ struct BgControl { u16 bgVisibilityAndMode; }; -struct BgConfig2 { +struct BgConfig2 +{ u32 baseTile:10; u32 basePalette:4; u32 unk_3:18; @@ -45,54 +37,36 @@ struct BgConfig2 { u32 bg_y; }; -static struct BgControl gGpuBgConfigs; -static struct BgConfig2 gGpuBgConfigs2[4]; -static u32 gDmaBusyBitfield[4]; +static IWRAM_DATA struct BgControl sGpuBgConfigs; +static IWRAM_DATA struct BgConfig2 sGpuBgConfigs2[4]; +static IWRAM_DATA u32 sDmaBusyBitfield[4]; u32 gUnneededFireRedVariable; -static const struct BgConfig gZeroedBgControlStruct = { 0 }; - -extern void SetGpuReg(u8 regOffset, u16 value); -extern void SetGpuReg_ForcedBlank(u8 regOffset, u16 value); -extern u16 GetGpuReg(u8 regOffset); -extern int CheckForSpaceForDma3Request(s16 index); - -bool32 IsInvalidBg32(u8); -void ResetBgControlStructs(); -u16 GetBgMetricTextMode(u8, u8); -u32 GetBgMetricAffineMode(u8, u8); -u32 GetBgType(u8); -void SetTextModeAndHideBgs(); -bool8 IsInvalidBg(u8); -bool32 IsTileMapOutsideWram(u8); -void CopyRectToBgTilemapBufferRect(u8, void*, u8, u8, u8, u8, u8, u8, u8, u8, u8, u16, u16); -void CopyTileMapEntry(u16*, u16*, s32, u32, u32); -u32 GetTileMapIndexFromCoords(s32, s32, s32, u32, u32); -void WriteSequenceToBgTilemapBuffer(u8, u16, u8, u8, u8, u8, u8, s16); +static const struct BgConfig sZeroedBgControlStruct = { 0 }; void ResetBgs(void) { ResetBgControlStructs(); - gGpuBgConfigs.bgVisibilityAndMode = 0; + sGpuBgConfigs.bgVisibilityAndMode = 0; SetTextModeAndHideBgs(); } -void SetBgModeInternal(u8 bgMode) +static void SetBgModeInternal(u8 bgMode) { - gGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8; - gGpuBgConfigs.bgVisibilityAndMode |= bgMode; + sGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8; + sGpuBgConfigs.bgVisibilityAndMode |= bgMode; } u8 GetBgMode(void) { - return gGpuBgConfigs.bgVisibilityAndMode & 0x7; + return sGpuBgConfigs.bgVisibilityAndMode & 0x7; } void ResetBgControlStructs(void) { - struct BgConfig* bgConfigs = &gGpuBgConfigs.configs[0]; - struct BgConfig zeroedConfig = gZeroedBgControlStruct; + struct BgConfig* bgConfigs = &sGpuBgConfigs.configs[0]; + struct BgConfig zeroedConfig = sZeroedBgControlStruct; int i; for (i = 0; i < 4; i++) @@ -105,7 +79,7 @@ void Unused_ResetBgControlStruct(u8 bg) { if (IsInvalidBg(bg) == FALSE) { - gGpuBgConfigs.configs[bg] = gZeroedBgControlStruct; + sGpuBgConfigs.configs[bg] = sZeroedBgControlStruct; } } @@ -115,88 +89,88 @@ void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenS { if (charBaseIndex != 0xFF) { - gGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; + sGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; } if (mapBaseIndex != 0xFF) { - gGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; + sGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; } if (screenSize != 0xFF) { - gGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; + sGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; } if (paletteMode != 0xFF) { - gGpuBgConfigs.configs[bg].paletteMode = paletteMode; + sGpuBgConfigs.configs[bg].paletteMode = paletteMode; } if (priority != 0xFF) { - gGpuBgConfigs.configs[bg].priority = priority & 0x3; + sGpuBgConfigs.configs[bg].priority = priority & 0x3; } if (mosaic != 0xFF) { - gGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; + sGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; } if (wraparound != 0xFF) { - gGpuBgConfigs.configs[bg].wraparound = wraparound; + sGpuBgConfigs.configs[bg].wraparound = wraparound; } - gGpuBgConfigs.configs[bg].unknown_2 = 0; - gGpuBgConfigs.configs[bg].unknown_3 = 0; + sGpuBgConfigs.configs[bg].unknown_2 = 0; + sGpuBgConfigs.configs[bg].unknown_3 = 0; - gGpuBgConfigs.configs[bg].visible = 1; + sGpuBgConfigs.configs[bg].visible = 1; } } u16 GetBgControlAttribute(u8 bg, u8 attributeId) { - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { switch (attributeId) { case BG_CTRL_ATTR_VISIBLE: - return gGpuBgConfigs.configs[bg].visible; + return sGpuBgConfigs.configs[bg].visible; case BG_CTRL_ATTR_CHARBASEINDEX: - return gGpuBgConfigs.configs[bg].charBaseIndex; + return sGpuBgConfigs.configs[bg].charBaseIndex; case BG_CTRL_ATTR_MAPBASEINDEX: - return gGpuBgConfigs.configs[bg].mapBaseIndex; + return sGpuBgConfigs.configs[bg].mapBaseIndex; case BG_CTRL_ATTR_SCREENSIZE: - return gGpuBgConfigs.configs[bg].screenSize; + return sGpuBgConfigs.configs[bg].screenSize; case BG_CTRL_ATTR_PALETTEMODE: - return gGpuBgConfigs.configs[bg].paletteMode; + return sGpuBgConfigs.configs[bg].paletteMode; case BG_CTRL_ATTR_PRIORITY: - return gGpuBgConfigs.configs[bg].priority; + return sGpuBgConfigs.configs[bg].priority; case BG_CTRL_ATTR_MOSAIC: - return gGpuBgConfigs.configs[bg].mosaic; + return sGpuBgConfigs.configs[bg].mosaic; case BG_CTRL_ATTR_WRAPAROUND: - return gGpuBgConfigs.configs[bg].wraparound; + return sGpuBgConfigs.configs[bg].wraparound; } } return 0xFF; } -u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) +u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode) { u16 offset; s8 cursor; - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { switch (mode) { case 0x1: - offset = gGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE; + offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE; break; case 0x2: - offset = gGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE; + offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE; break; default: cursor = -1; @@ -221,51 +195,51 @@ end: return cursor; } -void ShowBgInternal(u8 bg) +static void ShowBgInternal(u8 bg) { u16 value; - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { - value = gGpuBgConfigs.configs[bg].priority | - (gGpuBgConfigs.configs[bg].charBaseIndex << 2) | - (gGpuBgConfigs.configs[bg].mosaic << 6) | - (gGpuBgConfigs.configs[bg].paletteMode << 7) | - (gGpuBgConfigs.configs[bg].mapBaseIndex << 8) | - (gGpuBgConfigs.configs[bg].wraparound << 13) | - (gGpuBgConfigs.configs[bg].screenSize << 14); + value = sGpuBgConfigs.configs[bg].priority | + (sGpuBgConfigs.configs[bg].charBaseIndex << 2) | + (sGpuBgConfigs.configs[bg].mosaic << 6) | + (sGpuBgConfigs.configs[bg].paletteMode << 7) | + (sGpuBgConfigs.configs[bg].mapBaseIndex << 8) | + (sGpuBgConfigs.configs[bg].wraparound << 13) | + (sGpuBgConfigs.configs[bg].screenSize << 14); SetGpuReg((bg << 1) + 0x8, value); - gGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); - gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; + sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); + sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } } -void HideBgInternal(u8 bg) +static void HideBgInternal(u8 bg) { if (IsInvalidBg(bg) == FALSE) { - gGpuBgConfigs.bgVisibilityAndMode &= ~(1 << (bg + 8)); - gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; + sGpuBgConfigs.bgVisibilityAndMode &= ~(1 << (bg + 8)); + sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } } -void SyncBgVisibilityAndMode() +static void SyncBgVisibilityAndMode(void) { - SetGpuReg(0, (GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | gGpuBgConfigs.bgVisibilityAndMode); + SetGpuReg(0, (GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | sGpuBgConfigs.bgVisibilityAndMode); } -void SetTextModeAndHideBgs() +void SetTextModeAndHideBgs(void) { SetGpuReg(0, GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS); } -void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) +static void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) { struct BgAffineSrcData src; struct BgAffineDstData dest; - switch (gGpuBgConfigs.bgVisibilityAndMode & 0x7) + switch (sGpuBgConfigs.bgVisibilityAndMode & 0x7) { case 1: if (bg != 2) @@ -320,7 +294,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable) for (i = 0; i < 4; i++) { - gDmaBusyBitfield[i] = 0; + sDmaBusyBitfield[i] = 0; } gUnneededFireRedVariable = leftoverFireRedLeafGreenVariable; @@ -347,13 +321,13 @@ void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numT 0, 0); - gGpuBgConfigs2[bg].baseTile = templates[i].baseTile; - gGpuBgConfigs2[bg].basePalette = 0; - gGpuBgConfigs2[bg].unk_3 = 0; + sGpuBgConfigs2[bg].baseTile = templates[i].baseTile; + sGpuBgConfigs2[bg].basePalette = 0; + sGpuBgConfigs2[bg].unk_3 = 0; - gGpuBgConfigs2[bg].tilemap = NULL; - gGpuBgConfigs2[bg].bg_x = 0; - gGpuBgConfigs2[bg].bg_y = 0; + sGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].bg_x = 0; + sGpuBgConfigs2[bg].bg_y = 0; } } } @@ -373,13 +347,13 @@ void InitBgFromTemplate(const struct BgTemplate *template) 0, 0); - gGpuBgConfigs2[bg].baseTile = template->baseTile; - gGpuBgConfigs2[bg].basePalette = 0; - gGpuBgConfigs2[bg].unk_3 = 0; + sGpuBgConfigs2[bg].baseTile = template->baseTile; + sGpuBgConfigs2[bg].basePalette = 0; + sGpuBgConfigs2[bg].unk_3 = 0; - gGpuBgConfigs2[bg].tilemap = NULL; - gGpuBgConfigs2[bg].bg_x = 0; - gGpuBgConfigs2[bg].bg_y = 0; + sGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].bg_x = 0; + sGpuBgConfigs2[bg].bg_y = 0; } } @@ -388,18 +362,18 @@ void SetBgMode(u8 bgMode) SetBgModeInternal(bgMode); } -u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) +u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) { u16 tileOffset; u8 cursor; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE) == 0) { - tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; + tileOffset = (sGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; } else { - tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; + tileOffset = (sGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; } cursor = LoadBgVram(bg, src, size, tileOffset, DISPCNT_MODE_1); @@ -409,7 +383,7 @@ u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); if (gUnneededFireRedVariable == 1) { @@ -419,7 +393,7 @@ u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) return cursor; } -u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) +u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset) { u8 cursor; @@ -430,19 +404,19 @@ u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); return cursor; } -u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) +u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset) { u16 paletteOffset; s8 cursor; if (IsInvalidBg32(bg) == FALSE) { - paletteOffset = (gGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); + paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0); if (cursor == -1) @@ -455,7 +429,7 @@ u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); return (u8)cursor; } @@ -474,7 +448,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) div = i / 0x20; mod = i % 0x20; - if ((gDmaBusyBitfield[div] & (1 << mod)) != FALSE) + if ((sDmaBusyBitfield[div] & (1 << mod)) != FALSE) { reqSpace = CheckForSpaceForDma3Request(i); if (reqSpace == -1) @@ -482,7 +456,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) return TRUE; } - gDmaBusyBitfield[div] &= ~(1 << mod); + sDmaBusyBitfield[div] &= ~(1 << mod); } } @@ -508,7 +482,7 @@ _08001AE4:\n\ sub r0, r5, r0\n\ lsl r0, #24\n\ lsr r0, #24\n\ - ldr r1, =gDmaBusyBitfield\n\ + ldr r1, =sDmaBusyBitfield\n\ lsr r2, #22\n\ add r4, r2, r1\n\ mov r6, #0x1\n\ @@ -614,7 +588,7 @@ u16 GetBgAttribute(u8 bg, u8 attributeId) case 9: return GetBgType(bg); case 10: - return gGpuBgConfigs2[bg].baseTile; + return sGpuBgConfigs2[bg].baseTile; default: return -1; } @@ -635,13 +609,13 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_x = value; + sGpuBgConfigs2[bg].bg_x = value; break; case 1: - gGpuBgConfigs2[bg].bg_x += value; + sGpuBgConfigs2[bg].bg_x += value; break; case 2: - gGpuBgConfigs2[bg].bg_x -= value; + sGpuBgConfigs2[bg].bg_x -= value; break; } @@ -650,23 +624,23 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG0HOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG1HOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG2HOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_x >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_x & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_x >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_x & 0xFFFF; SetGpuReg(REG_OFFSET_BG2X_H, temp1); SetGpuReg(REG_OFFSET_BG2X_L, temp2); } @@ -674,20 +648,20 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG3HOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_x >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_x & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_x >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_x & 0xFFFF; SetGpuReg(REG_OFFSET_BG3X_H, temp1); SetGpuReg(REG_OFFSET_BG3X_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_x; + return sGpuBgConfigs2[bg].bg_x; } u32 GetBgX(u8 bg) @@ -696,7 +670,7 @@ u32 GetBgX(u8 bg) return -1; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return -1; - return gGpuBgConfigs2[bg].bg_x; + return sGpuBgConfigs2[bg].bg_x; } u32 ChangeBgY(u8 bg, u32 value, u8 op) @@ -714,13 +688,13 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_y = value; + sGpuBgConfigs2[bg].bg_y = value; break; case 1: - gGpuBgConfigs2[bg].bg_y += value; + sGpuBgConfigs2[bg].bg_y += value; break; case 2: - gGpuBgConfigs2[bg].bg_y -= value; + sGpuBgConfigs2[bg].bg_y -= value; break; } @@ -729,23 +703,23 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG0VOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG1VOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG2VOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF; SetGpuReg(REG_OFFSET_BG2Y_H, temp1); SetGpuReg(REG_OFFSET_BG2Y_L, temp2); } @@ -753,20 +727,20 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG3VOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_y & 0xFFFF; SetGpuReg(REG_OFFSET_BG3Y_H, temp1); SetGpuReg(REG_OFFSET_BG3Y_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) @@ -784,13 +758,13 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_y = value; + sGpuBgConfigs2[bg].bg_y = value; break; case 1: - gGpuBgConfigs2[bg].bg_y += value; + sGpuBgConfigs2[bg].bg_y += value; break; case 2: - gGpuBgConfigs2[bg].bg_y -= value; + sGpuBgConfigs2[bg].bg_y -= value; break; } @@ -799,24 +773,24 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG1VOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF; SetGpuReg_ForcedBlank(REG_OFFSET_BG2Y_H, temp1); SetGpuReg_ForcedBlank(REG_OFFSET_BG2Y_L, temp2); } @@ -824,20 +798,20 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG3VOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_y & 0xFFFF; SetGpuReg_ForcedBlank(REG_OFFSET_BG3Y_H, temp1); SetGpuReg_ForcedBlank(REG_OFFSET_BG3Y_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } u32 GetBgY(u8 bg) @@ -846,7 +820,7 @@ u32 GetBgY(u8 bg) return -1; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return -1; - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) @@ -933,7 +907,7 @@ void SetBgTilemapBuffer(u8 bg, void *tilemap) { if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) { - gGpuBgConfigs2[bg].tilemap = tilemap; + sGpuBgConfigs2[bg].tilemap = tilemap; } } @@ -941,7 +915,7 @@ void UnsetBgTilemapBuffer(u8 bg) { if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) { - gGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].tilemap = NULL; } } @@ -951,20 +925,20 @@ void* GetBgTilemapBuffer(u8 bg) return NULL; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return NULL; - return gGpuBgConfigs2[bg].tilemap; + return sGpuBgConfigs2[bg].tilemap; } -void CopyToBgTilemapBuffer(u8 bg, void *src, u16 mode, u16 destOffset) +void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset) { if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { if (mode != 0) { - CpuCopy16(src, (void *)(gGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode); + CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode); } else { - LZ77UnCompWram(src, (void *)(gGpuBgConfigs2[bg].tilemap + (destOffset * 2))); + LZ77UnCompWram(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2))); } } } @@ -987,7 +961,7 @@ void CopyBgTilemapBufferToVram(u8 bg) sizeToLoad = 0; break; } - LoadBgVram(bg, gGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2); + LoadBgVram(bg, sGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2); } } @@ -1008,7 +982,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u16*)gGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++; + ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++; } } break; @@ -1019,7 +993,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++; + ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++; } } break; @@ -1056,7 +1030,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid { for (destX16 = destX; destX16 < (destX + rectWidth); destX16++) { - CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)gGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); + CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); } } break; @@ -1067,7 +1041,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid { for (destX16 = destX; destX16 < (destX + rectWidth); destX16++) { - CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)gGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); + CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); } } break; @@ -1195,7 +1169,7 @@ _080025F8:\n\ bge _0800265A\n\ ldr r2, [sp, #0x4]\n\ lsl r0, r2, #4\n\ - ldr r1, =gGpuBgConfigs2+4\n\ + ldr r1, =sGpuBgConfigs2+4\n\ add r0, r1\n\ mov r10, r0\n\ ldr r7, [sp, #0x20]\n\ @@ -1267,7 +1241,7 @@ _08002674:\n\ sub r2, r7, r2\n\ str r2, [sp, #0x34]\n\ str r0, [sp, #0x38]\n\ - ldr r7, =gGpuBgConfigs2+4\n\ + ldr r7, =sGpuBgConfigs2+4\n\ mov r10, r7\n\ ldr r0, [sp, #0x4]\n\ lsl r0, #4\n\ @@ -1337,7 +1311,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, { for (x16 = x; x16 < (x + width); x16++) { - ((u16*)gGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; + ((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; } } break; @@ -1347,7 +1321,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, { for (x16 = x; x16 < (x + width); x16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; + ((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; } } break; @@ -1382,7 +1356,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt { for (x16 = x; x16 < (x + width); x16++) { - CopyTileMapEntry(&firstTileNum, &((u16*)gGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0); + CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0); firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF); } } @@ -1393,7 +1367,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt { for (x16 = x; x16 < (x + width); x16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum; + ((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum; firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF); } } @@ -1625,9 +1599,9 @@ bool32 IsInvalidBg32(u8 bg) bool32 IsTileMapOutsideWram(u8 bg) { - if (gGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END) + if (sGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END) return TRUE; - if (gGpuBgConfigs2[bg].tilemap == 0x0) + if (sGpuBgConfigs2[bg].tilemap == 0x0) return TRUE; return FALSE; } diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 6d12dec05..7cce06c15 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -14,7 +14,7 @@ void ClearDma3Requests(void) gDma3Requests[i].src = 0; gDma3Requests[i].dest = 0; } - + gDma3ManagerLocked = FALSE; } @@ -24,7 +24,7 @@ void ProcessDma3Requests(void) // NOTE: the fillerA member of the DMA struct is actually u32 value; // NOTE: gUnknown_0300001C is just a pointer inside the gDma3Requests structure, not a true symbol; feel free to remove u16 total_size; - + if (gDma3ManagerLocked) return; @@ -34,7 +34,7 @@ void ProcessDma3Requests(void) while (gDma3Requests[gDma3RequestCursor].size) { total_size += gDma3Requests[gDma3RequestCursor].size; - + if (total_size > 0xA000) return; // don't do too much at once @@ -90,14 +90,14 @@ void ProcessDma3Requests(void) } DmaFill16(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size); break; - } - gDma3Requests[gDma3RequestCursor].src = 0; - gDma3Requests[gDma3RequestCursor].dest = 0; + } + gDma3Requests[gDma3RequestCursor].src = NULL; + gDma3Requests[gDma3RequestCursor].dest = NULL; gDma3Requests[gDma3RequestCursor].size = 0; gDma3Requests[gDma3RequestCursor].mode = 0; gDma3Requests[gDma3RequestCursor].value = 0; gDma3RequestCursor++; - + if (gDma3RequestCursor >= 128) // loop back to the first DMA request gDma3RequestCursor = 0; } @@ -419,13 +419,13 @@ _08000E46:\n\ } #endif -int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode) +int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode) { int cursor; int var = 0; - + gDma3ManagerLocked = 1; - + cursor = gDma3RequestCursor; while(1) { @@ -434,12 +434,12 @@ int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode) gDma3Requests[cursor].src = src; gDma3Requests[cursor].dest = dest; gDma3Requests[cursor].size = size; - + if(mode == 1) gDma3Requests[cursor].mode = mode; else gDma3Requests[cursor].mode = 3; - + gDma3ManagerLocked = FALSE; return (s16)cursor; } @@ -460,10 +460,10 @@ int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode) { int cursor; int var = 0; - + cursor = gDma3RequestCursor; gDma3ManagerLocked = 1; - + while(1) { if(!gDma3Requests[cursor].size) @@ -477,7 +477,7 @@ int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode) gDma3Requests[cursor].mode = 2; else gDma3Requests[cursor].mode = 4; - + gDma3ManagerLocked = FALSE; return (s16)cursor; } @@ -503,9 +503,9 @@ int CheckForSpaceForDma3Request(s16 index) for (; current < 0x80; current ++) if (gDma3Requests[current].size) return -1; - + return 0; - } + } if (gDma3Requests[index].size) return -1; diff --git a/src/egg_hatch.c b/src/egg_hatch.c new file mode 100644 index 000000000..6d14e92f0 --- /dev/null +++ b/src/egg_hatch.c @@ -0,0 +1,893 @@ +#include "global.h" +#include "pokemon.h" +#include "pokedex.h" +#include "items.h" +#include "script.h" +#include "decompress.h" +#include "task.h" +#include "palette.h" +#include "main.h" +#include "event_data.h" +#include "sound.h" +#include "songs.h" +#include "text.h" +#include "text_window.h" +#include "string_util.h" +#include "menu.h" +#include "trig.h" +#include "rng.h" +#include "malloc.h" +#include "dma3.h" +#include "gpu_regs.h" +#include "bg.h" +#include "m4a.h" +#include "window.h" +#include "abilities.h" +#include "battle.h" // to get rid of later + +struct EggHatchData +{ + u8 eggSpriteID; + u8 pokeSpriteID; + u8 CB2_state; + u8 CB2_PalCounter; + u8 eggPartyID; + u8 unused_5; + u8 unused_6; + u8 eggShardVelocityID; + u8 windowId; + u8 unused_9; + u8 unused_A; + u16 species; + struct TextColor textColor; +}; + +extern struct SpriteTemplate gUnknown_0202499C; +extern void (*gFieldCallback)(void); + +extern const struct CompressedSpriteSheet gMonFrontPicTable[]; +extern const u8 gUnknown_08C00000[]; +extern const u8 gUnknown_08C00524[]; +extern const u8 gUnknown_08C004E0[]; +extern const u16 gUnknown_08DD7300[]; // palette, gameboy advance +extern const u32 gUnknown_08DD7360[]; // tileset gameboy advance +extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle +extern const u8 gText_HatchedFromEgg[]; +extern const u8 gText_NickHatchPrompt[]; + +extern u8* GetMonNick(struct Pokemon* mon, u8* dst); +extern u8* GetBoxMonNick(struct BoxPokemon* boxMon, u8* dst); +extern u8 sav1_map_get_name(void); +extern s8 sub_8198C58(void); +extern void sub_81DB5E8(u8* str1, u8* str2, u8); +extern void sub_806A068(u16, u8); +extern void fade_screen(u8, u8); +extern void overworld_free_bg_tilemaps(void); +extern void sub_80AF168(void); +extern void init_uns_table_pokemon_copy(void); +extern void sub_805F094(void); +extern void remove_some_task(void); +extern void reset_temp_tile_data_buffers(void); +extern void c2_exit_to_overworld_2_switch(void); +extern void play_some_sound(void); +extern void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, const void* src, u16 size, u16 offset, u8 mode); +extern void CreateYesNoMenu(const struct WindowTemplate*, u16, u8, u8); +extern void DoNamingScreen(u8, const u8*, u16, u8, u32, MainCallback); +extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str); +extern u16 sub_80D22D0(void); +extern u8 sub_80C7050(u8); + +static void Task_EggHatch(u8 taskID); +static void CB2_EggHatch_0(void); +static void CB2_EggHatch_1(void); +static void SpriteCB_Egg_0(struct Sprite* sprite); +static void SpriteCB_Egg_1(struct Sprite* sprite); +static void SpriteCB_Egg_2(struct Sprite* sprite); +static void SpriteCB_Egg_3(struct Sprite* sprite); +static void SpriteCB_Egg_4(struct Sprite* sprite); +static void SpriteCB_Egg_5(struct Sprite* sprite); +static void SpriteCB_EggShard(struct Sprite* sprite); +static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed); +static void CreateRandomEggShardSprite(void); +static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); + +// IWRAM bss +static IWRAM_DATA struct EggHatchData* sEggHatchData; + +// rom data +static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/palettes/egg_palette.gbapal"); +static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/misc/egg_hatch.4bpp"); +static const u8 sEggShardTiles[] = INCBIN_U8("graphics/misc/egg_shard.4bpp"); + +static const struct OamData sOamData_EggHatch = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_EggHatch0[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch1[] = +{ + ANIMCMD_FRAME(16, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch2[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch3[] = +{ + ANIMCMD_FRAME(48, 5), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_EggHatch[] = +{ + sSpriteAnim_EggHatch0, + sSpriteAnim_EggHatch1, + sSpriteAnim_EggHatch2, + sSpriteAnim_EggHatch3, +}; + +static const struct SpriteSheet sEggHatch_Sheet = +{ + .data = sEggHatchTiles, + .size = 2048, + .tag = 12345, +}; + +static const struct SpriteSheet sEggShards_Sheet = +{ + .data = sEggShardTiles, + .size = 128, + .tag = 23456, +}; + +static const struct SpritePalette sEgg_SpritePalette = +{ + .data = sEggPalette, + .tag = 54321 +}; + +static const struct SpriteTemplate sSpriteTemplate_EggHatch = +{ + .tileTag = 12345, + .paletteTag = 54321, + .oam = &sOamData_EggHatch, + .anims = sSpriteAnimTable_EggHatch, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const struct OamData sOamData_EggShard = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_EggShard0[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard1[] = +{ + ANIMCMD_FRAME(1, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard2[] = +{ + ANIMCMD_FRAME(2, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard3[] = +{ + ANIMCMD_FRAME(3, 5), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_EggShard[] = +{ + sSpriteAnim_EggShard0, + sSpriteAnim_EggShard1, + sSpriteAnim_EggShard2, + sSpriteAnim_EggShard3, +}; + +static const struct SpriteTemplate sSpriteTemplate_EggShard = +{ + .tileTag = 23456, + .paletteTag = 54321, + .oam = &sOamData_EggShard, + .anims = sSpriteAnimTable_EggShard, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_EggShard +}; + +static const struct BgTemplate sBgTemplates_EggHatch[2] = +{ + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 24, + .screenSize = 3, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 8, + .screenSize = 1, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, +}; + +static const struct WindowTemplate sWinTemplates_EggHatch[2] = +{ + {0, 2, 0xF, 0x1A, 4, 0, 0x40}, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sYesNoWinTemplate = +{ + 0, 0x15, 9, 5, 4, 0xF, 0x1A8 +}; + +static const s16 sEggShardVelocities[][2] = +{ + {Q_8_8(-1.5), Q_8_8(-3.75)}, + {Q_8_8(-5), Q_8_8(-3)}, + {Q_8_8(3.5), Q_8_8(-3)}, + {Q_8_8(-4), Q_8_8(-3.75)}, + {Q_8_8(2), Q_8_8(-1.5)}, + {Q_8_8(-0.5), Q_8_8(-6.75)}, + {Q_8_8(5), Q_8_8(-2.25)}, + {Q_8_8(-1.5), Q_8_8(-3.75)}, + {Q_8_8(4.5), Q_8_8(-1.5)}, + {Q_8_8(-1), Q_8_8(-6.75)}, + {Q_8_8(4), Q_8_8(-2.25)}, + {Q_8_8(-3.5), Q_8_8(-3.75)}, + {Q_8_8(1), Q_8_8(-1.5)}, + {Q_8_8(-3.515625), Q_8_8(-6.75)}, + {Q_8_8(4.5), Q_8_8(-2.25)}, + {Q_8_8(-0.5), Q_8_8(-7.5)}, + {Q_8_8(1), Q_8_8(-4.5)}, + {Q_8_8(-2.5), Q_8_8(-2.25)}, + {Q_8_8(2.5), Q_8_8(-7.5)}, +}; + +// code + +static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) +{ + u16 species; + u32 personality, pokerus; + u8 i, friendship, language, gameMet, markings, obedience; + u16 moves[4]; + u32 ivs[6]; + + + species = GetMonData(egg, MON_DATA_SPECIES); + + for (i = 0; i < 4; i++) + { + moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i); + } + + personality = GetMonData(egg, MON_DATA_PERSONALITY); + + for (i = 0; i < 6; i++) + { + ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i); + } + + language = GetMonData(egg, MON_DATA_LANGUAGE); + gameMet = GetMonData(egg, MON_DATA_MET_GAME); + markings = GetMonData(egg, MON_DATA_MARKINGS); + pokerus = GetMonData(egg, MON_DATA_POKERUS); + obedience = GetMonData(egg, MON_DATA_OBEDIENCE); + + CreateMon(temp, species, 5, 32, TRUE, personality, 0, 0); + + for (i = 0; i < 4; i++) + { + SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]); + } + + for (i = 0; i < 6; i++) + { + SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]); + } + + language = GAME_LANGUAGE; + SetMonData(temp, MON_DATA_LANGUAGE, &language); + SetMonData(temp, MON_DATA_MET_GAME, &gameMet); + SetMonData(temp, MON_DATA_MARKINGS, &markings); + + friendship = 120; + SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship); + SetMonData(temp, MON_DATA_POKERUS, &pokerus); + SetMonData(temp, MON_DATA_OBEDIENCE, &obedience); + + *egg = *temp; +} + +static void AddHatchedMonToParty(u8 id) +{ + u8 isEgg = 0x46; // ? + u16 pokeNum; + u8 name[12]; + u16 ball; + u16 caughtLvl; + u8 mapNameID; + struct Pokemon* mon = &gPlayerParty[id]; + + CreatedHatchedMon(mon, &gEnemyParty[0]); + SetMonData(mon, MON_DATA_IS_EGG, &isEgg); + + pokeNum = GetMonData(mon, MON_DATA_SPECIES); + GetSpeciesName(name, pokeNum); + SetMonData(mon, MON_DATA_NICKNAME, name); + + pokeNum = SpeciesToNationalPokedexNum(pokeNum); + GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN); + GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT); + + GetMonNick(mon, gStringVar1); + + ball = ITEM_POKE_BALL; + SetMonData(mon, MON_DATA_POKEBALL, &ball); + + caughtLvl = 0; + SetMonData(mon, MON_DATA_MET_LEVEL, &caughtLvl); + + mapNameID = sav1_map_get_name(); + SetMonData(mon, MON_DATA_MET_LOCATION, &mapNameID); + + MonRestorePP(mon); + CalculateMonStats(mon); +} + +void ScriptHatchMon(void) +{ + AddHatchedMonToParty(gSpecialVar_0x8004); +} + +static bool8 sub_807158C(struct DaycareData* daycare, u8 daycareId) +{ + u8 nick[0x20]; + struct DaycareMon* daycareMon = &daycare->mons[daycareId]; + + GetBoxMonNick(&daycareMon->mon, nick); + if (daycareMon->mail.itemId != 0 + && (StringCompareWithoutExtCtrlCodes(nick, daycareMon->monName) != 0 + || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->OT_name) != 0)) + { + StringCopy(gStringVar1, nick); + sub_81DB5E8(gStringVar2, daycareMon->OT_name, daycareMon->language_maybe); + sub_81DB5E8(gStringVar3, daycareMon->monName, daycareMon->unknown); + return TRUE; + } + return FALSE; +} + +bool8 sub_8071614(void) +{ + return sub_807158C(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); +} + +static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) +{ + u8 r5 = 0; + u8 spriteID = 0; + struct Pokemon* mon = NULL; + + if (a0 == 0) + { + mon = &gPlayerParty[pokeID]; + r5 = 1; + } + if (a0 == 1) + { + mon = &gPlayerParty[pokeID]; + r5 = 3; + } + switch (switchID) + { + case 0: + { + u16 species = GetMonData(mon, MON_DATA_SPECIES); + u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], + gBattleSpritesGfx->sprites[(a0 * 2) + 1], + species, pid); + LoadCompressedObjectPalette(sub_806E794(mon)); + *speciesLoc = species; + } + break; + case 1: + sub_806A068(sub_806E794(mon)->tag, r5); + spriteID = CreateSprite(&gUnknown_0202499C, 120, 75, 6); + gSprites[spriteID].invisible = 1; + gSprites[spriteID].callback = SpriteCallbackDummy; + break; + } + return spriteID; +} + +static void VBlankCB_EggHatch(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +static void EggHatch(void) +{ + ScriptContext2_Enable(); + CreateTask(Task_EggHatch, 10); + fade_screen(1, 0); +} + +static void Task_EggHatch(u8 taskID) +{ + if (!gPaletteFade.active) + { + overworld_free_bg_tilemaps(); + SetMainCallback2(CB2_EggHatch_0); + gFieldCallback = sub_80AF168; + DestroyTask(taskID); + } +} + +static void CB2_EggHatch_0(void) +{ + switch (gMain.state) + { + case 0: + SetGpuReg(REG_OFFSET_DISPCNT, 0); + + sEggHatchData = Alloc(sizeof(struct EggHatchData)); + init_uns_table_pokemon_copy(); + sEggHatchData->eggPartyID = gSpecialVar_0x8004; + sEggHatchData->eggShardVelocityID = 0; + + SetVBlankCallback(VBlankCB_EggHatch); + gSpecialVar_0x8005 = GetCurrentMapMusic(); + + reset_temp_tile_data_buffers(); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, sBgTemplates_EggHatch, ARRAY_COUNT(sBgTemplates_EggHatch)); + + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + + SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 2); + SetBgTilemapBuffer(1, Alloc(0x1000)); + SetBgTilemapBuffer(0, Alloc(0x2000)); + + DeactivateAllTextPrinters(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + ResetSpriteData(); + ResetTasks(); + remove_some_task(); + m4aSoundVSyncOn(); + gMain.state++; + break; + case 1: + InitWindows(sWinTemplates_EggHatch); + sEggHatchData->windowId = 0; + gMain.state++; + break; + case 2: + copy_decompressed_tile_data_to_vram_autofree(0, gUnknown_08C00000, 0, 0, 0); + CopyToBgTilemapBuffer(0, gUnknown_08C00524, 0, 0); + LoadCompressedPalette(gUnknown_08C004E0, 0, 0x20); + gMain.state++; + break; + case 3: + LoadSpriteSheet(&sEggHatch_Sheet); + LoadSpriteSheet(&sEggShards_Sheet); + LoadSpritePalette(&sEgg_SpritePalette); + gMain.state++; + break; + case 4: + CopyBgTilemapBufferToVram(0); + AddHatchedMonToParty(sEggHatchData->eggPartyID); + gMain.state++; + break; + case 5: + EggHatchCreateMonSprite(0, 0, sEggHatchData->eggPartyID, &sEggHatchData->species); + gMain.state++; + break; + case 6: + sEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(0, 1, sEggHatchData->eggPartyID, &sEggHatchData->species); + gMain.state++; + break; + case 7: + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + LoadPalette(gUnknown_08DD7300, 0x10, 0xA0); + LoadBgTiles(1, gUnknown_08DD7360, 0x1420, 0); + CopyToBgTilemapBuffer(1, gUnknown_08331F60, 0x1000, 0); + CopyBgTilemapBufferToVram(1); + gMain.state++; + break; + case 8: + SetMainCallback2(CB2_EggHatch_1); + sEggHatchData->CB2_state = 0; + break; + } + RunTasks(); + RunTextPrinters(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void EggHatchSetMonNickname(void) +{ + SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3); + sub_805F094(); + Free(sEggHatchData); + SetMainCallback2(c2_exit_to_overworld_2_switch); +} + +static void Task_EggHatchPlayBGM(u8 taskID) +{ + if (gTasks[taskID].data[0] == 0) + { + StopMapMusic(); + play_some_sound(); + } + if (gTasks[taskID].data[0] == 1) + PlayBGM(376); + if (gTasks[taskID].data[0] > 60) + { + PlayBGM(377); + DestroyTask(taskID); + // UB: task is destroyed, yet the value is incremented + } + gTasks[taskID].data[0]++; +} + +static void CB2_EggHatch_1(void) +{ + u16 species; + u8 gender; + u32 personality; + + switch (sEggHatchData->CB2_state) + { + case 0: + BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); + sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5); + ShowBg(0); + ShowBg(1); + sEggHatchData->CB2_state++; + CreateTask(Task_EggHatchPlayBGM, 5); + break; + case 1: + if (!gPaletteFade.active) + { + FillWindowPixelBuffer(sEggHatchData->windowId, 0); + sEggHatchData->CB2_PalCounter = 0; + sEggHatchData->CB2_state++; + } + break; + case 2: + if (++sEggHatchData->CB2_PalCounter > 30) + { + sEggHatchData->CB2_state++; + gSprites[sEggHatchData->eggSpriteID].callback = SpriteCB_Egg_0; + } + break; + case 3: + if (gSprites[sEggHatchData->eggSpriteID].callback == SpriteCallbackDummy) + { + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + DoMonFrontSpriteAnimation(&gSprites[sEggHatchData->pokeSpriteID], species, FALSE, 1); + sEggHatchData->CB2_state++; + } + break; + case 4: + if (gSprites[sEggHatchData->pokeSpriteID].callback == SpriteCallbackDummy) + { + sEggHatchData->CB2_state++; + } + break; + case 5: + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); + StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg); + EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF); + PlayFanfare(371); + sEggHatchData->CB2_state++; + PutWindowTilemap(sEggHatchData->windowId); + CopyWindowToVram(sEggHatchData->windowId, 3); + break; + case 6: + if (IsFanfareTaskInactive()) + sEggHatchData->CB2_state++; + break; + case 7: + if (IsFanfareTaskInactive()) + sEggHatchData->CB2_state++; + break; + case 8: + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); + StringExpandPlaceholders(gStringVar4, gText_NickHatchPrompt); + EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1); + sEggHatchData->CB2_state++; + break; + case 9: + if (!IsTextPrinterActive(sEggHatchData->windowId)) + { + sub_809882C(sEggHatchData->windowId, 0x140, 0xE0); + CreateYesNoMenu(&sYesNoWinTemplate, 0x140, 0xE, 0); + sEggHatchData->CB2_state++; + } + break; + case 10: + switch (sub_8198C58()) + { + case 0: + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3); + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]); + personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0); + DoNamingScreen(3, gStringVar3, species, gender, personality, EggHatchSetMonNickname); + break; + case 1: + case -1: + sEggHatchData->CB2_state++; + } + break; + case 11: + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + sEggHatchData->CB2_state++; + break; + case 12: + if (!gPaletteFade.active) + { + sub_805F094(); + RemoveWindow(sEggHatchData->windowId); + UnsetBgTilemapBuffer(0); + UnsetBgTilemapBuffer(1); + Free(sEggHatchData); + SetMainCallback2(c2_exit_to_overworld_2_switch); + } + break; + } + + RunTasks(); + RunTextPrinters(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void SpriteCB_Egg_0(struct Sprite* sprite) +{ + if (++sprite->data0 > 20) + { + sprite->callback = SpriteCB_Egg_1; + sprite->data0 = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 1); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 1); + CreateRandomEggShardSprite(); + } + } +} + +static void SpriteCB_Egg_1(struct Sprite* sprite) +{ + if (++sprite->data2 > 30) + { + if (++sprite->data0 > 20) + { + sprite->callback = SpriteCB_Egg_2; + sprite->data0 = 0; + sprite->data2 = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 2); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 2); + } + } + } +} + +static void SpriteCB_Egg_2(struct Sprite* sprite) +{ + if (++sprite->data2 > 30) + { + if (++sprite->data0 > 38) + { + u16 species; + + sprite->callback = SpriteCB_Egg_3; + sprite->data0 = 0; + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + gSprites[sEggHatchData->pokeSpriteID].pos2.x = 0; + gSprites[sEggHatchData->pokeSpriteID].pos2.y = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 2); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 2); + CreateRandomEggShardSprite(); + CreateRandomEggShardSprite(); + } + if (sprite->data0 == 30) + PlaySE(SE_BOWA); + } + } +} + +static void SpriteCB_Egg_3(struct Sprite* sprite) +{ + if (++sprite->data0 > 50) + { + sprite->callback = SpriteCB_Egg_4; + sprite->data0 = 0; + } +} + +static void SpriteCB_Egg_4(struct Sprite* sprite) +{ + s16 i; + if (sprite->data0 == 0) + BeginNormalPaletteFade(-1, -1, 0, 0x10, 0xFFFF); + if (sprite->data0 < 4u) + { + for (i = 0; i <= 3; i++) + CreateRandomEggShardSprite(); + } + sprite->data0++; + if (!gPaletteFade.active) + { + PlaySE(SE_TAMAGO); + sprite->invisible = 1; + sprite->callback = SpriteCB_Egg_5; + sprite->data0 = 0; + } +} + +static void SpriteCB_Egg_5(struct Sprite* sprite) +{ + if (sprite->data0 == 0) + { + gSprites[sEggHatchData->pokeSpriteID].invisible = 0; + StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1); + } + if (sprite->data0 == 8) + BeginNormalPaletteFade(-1, -1, 0x10, 0, 0xFFFF); + if (sprite->data0 <= 9) + gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1; + if (sprite->data0 > 40) + sprite->callback = SpriteCallbackDummy; + sprite->data0++; +} + +static void SpriteCB_EggShard(struct Sprite* sprite) +{ + sprite->data4 += sprite->data1; + sprite->data5 += sprite->data2; + + sprite->pos2.x = sprite->data4 / 256; + sprite->pos2.y = sprite->data5 / 256; + + sprite->data2 += sprite->data3; + + if (sprite->pos1.y + sprite->pos2.y > sprite->pos1.y + 20 && sprite->data2 > 0) + DestroySprite(sprite); +} + +static void CreateRandomEggShardSprite(void) +{ + u16 spriteAnimIndex; + + s16 velocity1 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][0]; + s16 velocity2 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][1]; + sEggHatchData->eggShardVelocityID++; + spriteAnimIndex = Random() % 4; + CreateEggShardSprite(120, 60, velocity1, velocity2, 100, spriteAnimIndex); +} + +static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex) +{ + u8 spriteID = CreateSprite(&sSpriteTemplate_EggShard, x, y, 4); + gSprites[spriteID].data1 = data1; + gSprites[spriteID].data2 = data2; + gSprites[spriteID].data3 = data3; + StartSpriteAnim(&gSprites[spriteID], spriteAnimIndex); +} + +static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) +{ + FillWindowPixelBuffer(windowId, 0xFF); + sEggHatchData->textColor.fgColor = 0; + sEggHatchData->textColor.bgColor = 5; + sEggHatchData->textColor.shadowColor = 6; + AddTextPrinterParametrized2(windowId, 1, x, y, 0, 0, &sEggHatchData->textColor, speed, string); +} + +u8 GetEggStepsToSubtract(void) +{ + u8 count, i; + for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++) + { + if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT3)) + { + u8 ability = GetMonAbility(&gPlayerParty[i]); + if (ability == ABILITY_MAGMA_ARMOR || ability == ABILITY_FLAME_BODY) + return 2; + } + } + return 1; +} + +u16 sub_80722E0(void) +{ + u16 value = sub_80D22D0(); + value += sub_80C7050(6); + return value; +} diff --git a/src/gpu_regs.c b/src/gpu_regs.c index be1f153d4..805f23b48 100644 --- a/src/gpu_regs.c +++ b/src/gpu_regs.c @@ -1,4 +1,5 @@ #include "global.h" +#include "gpu_regs.h" #define GPU_REG_BUF_SIZE 0x60 @@ -14,14 +15,15 @@ static bool8 sShouldSyncRegIE; static u16 sRegIE; static void CopyBufferedValueToGpuReg(u8 regOffset); -static void SyncRegIE(); +static void SyncRegIE(void); static void UpdateRegDispstatIntrBits(u16 regIE); -void InitGpuRegManager() +void InitGpuRegManager(void) { s32 i; - for (i = 0; i < GPU_REG_BUF_SIZE; i++) { + for (i = 0; i < GPU_REG_BUF_SIZE; i++) + { sGpuRegBuffer[i] = 0; sGpuRegWaitingList[i] = EMPTY_SLOT; } @@ -33,20 +35,25 @@ void InitGpuRegManager() static void CopyBufferedValueToGpuReg(u8 regOffset) { - if (regOffset == REG_OFFSET_DISPSTAT) { + if (regOffset == REG_OFFSET_DISPSTAT) + { REG_DISPSTAT &= ~(DISPSTAT_HBLANK_INTR | DISPSTAT_VBLANK_INTR); REG_DISPSTAT |= GPU_REG_BUF(REG_OFFSET_DISPSTAT); - } else { + } + else + { GPU_REG(regOffset) = GPU_REG_BUF(regOffset); } } -void CopyBufferedValuesToGpuRegs() +void CopyBufferedValuesToGpuRegs(void) { - if (!sGpuRegBufferLocked) { + if (!sGpuRegBufferLocked) + { s32 i; - for (i = 0; i < GPU_REG_BUF_SIZE; i++) { + for (i = 0; i < GPU_REG_BUF_SIZE; i++) + { u8 regOffset = sGpuRegWaitingList[i]; if (regOffset == EMPTY_SLOT) return; @@ -135,7 +142,7 @@ void ClearGpuRegBits(u8 regOffset, u16 mask) SetGpuReg(regOffset, regValue & ~mask); } -static void SyncRegIE() +static void SyncRegIE(void) { if (sShouldSyncRegIE) { u16 temp = REG_IME; diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 569222e33..603732a34 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1511,8 +1511,6 @@ static void Task_PokemonSummaryAnimateAfterDelay(u8 taskId) } } -void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); - void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3) { if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))) diff --git a/src/safari_zone.c b/src/safari_zone.c index fdfdd961a..3e25468bf 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -18,7 +18,7 @@ struct PokeblockFeeder #define NUM_POKEBLOCK_FEEDERS 10 extern u8 gBattleOutcome; -extern void* gUnknown_03005DAC; +extern void* gFieldCallback; extern u8 gUnknown_082A4B8A[]; extern u8 gUnknown_082A4B6F[]; @@ -118,7 +118,7 @@ void sub_80FC190(void) { ScriptContext2_RunNewScript(gUnknown_082A4B4C); warp_in(); - gUnknown_03005DAC = sub_80AF6F0; + gFieldCallback = sub_80AF6F0; SetMainCallback2(c2_load_new_map); } else if (gBattleOutcome == BATTLE_CAUGHT) diff --git a/src/text.c b/src/text.c index aa4e201c0..0081a8244 100644 --- a/src/text.c +++ b/src/text.c @@ -244,12 +244,11 @@ void RunTextPrinters(void) } } -bool8 IsTextPrinterActive(u8 id) +bool16 IsTextPrinterActive(u8 id) { return gTextPrinters[id].sub_union.sub.active; } - u32 RenderFont(struct TextPrinter *textPrinter) { u32 ret; diff --git a/src/trig.c b/src/trig.c index e16a69e63..c2bca3059 100644 --- a/src/trig.c +++ b/src/trig.c @@ -1,12 +1,6 @@ #include "global.h" #include "trig.h" -// Converts a number to Q8.8 fixed-point format -#define Q_8_8(n) ((s16)((n) * 256)) - -// Converts a number to Q4.12 fixed-point format -#define Q_4_12(n) ((s16)((n) * 4096)) - // Values of sin(x*(π/128)) as Q8.8 fixed-point numbers from x = 0 to x = 319 const s16 gSineTable[] = { diff --git a/sym_bss.txt b/sym_bss.txt index ce2549850..aacfa59a0 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -113,8 +113,9 @@ gUnknown_03000DD8: @ 3000DD8 gUnknown_03000DDC: @ 3000DDC .space 0x4 -gUnknown_03000DE0: @ 3000DE0 - .space 0x8 + .include "src/egg_hatch.o" + +.space 0x4 @ why the gap? gUnknown_03000DE8: @ 3000DE8 .space 0x10 diff --git a/sym_common.txt b/sym_common.txt index cf737c390..23809c1a7 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -269,7 +269,7 @@ gUnknown_03005DA4: @ 3005DA4 gUnknown_03005DA8: @ 3005DA8 .space 0x4 -gUnknown_03005DAC: @ 3005DAC +gFieldCallback: @ 3005DAC .space 0x4 gUnknown_03005DB0: @ 3005DB0