diff options
author | mid-kid <esteve.varela@gmail.com> | 2018-06-24 16:09:41 +0200 |
---|---|---|
committer | mid-kid <esteve.varela@gmail.com> | 2018-06-24 16:13:22 +0200 |
commit | 1d9a68dbdd0132035f1fc7b7ea8f7fdc24741507 (patch) | |
tree | 3af0a92f5f7dc10f32eed04d9daae52749fc33c2 /engine/pokedex | |
parent | 131875d3e37044ec995287af7c93decd86a0d659 (diff) |
Remove all address comments
Diffstat (limited to 'engine/pokedex')
-rw-r--r-- | engine/pokedex/new_pokedex_entry.asm | 6 | ||||
-rw-r--r-- | engine/pokedex/pokedex.asm | 310 | ||||
-rw-r--r-- | engine/pokedex/pokedex_2.asm | 18 | ||||
-rw-r--r-- | engine/pokedex/pokedex_3.asm | 20 | ||||
-rw-r--r-- | engine/pokedex/unown_dex.asm | 6 |
5 files changed, 178 insertions, 182 deletions
diff --git a/engine/pokedex/new_pokedex_entry.asm b/engine/pokedex/new_pokedex_entry.asm index 365cf1b70..765f2f576 100644 --- a/engine/pokedex/new_pokedex_entry.asm +++ b/engine/pokedex/new_pokedex_entry.asm @@ -1,4 +1,4 @@ -NewPokedexEntry: ; fb877 +NewPokedexEntry: ld a, [hMapAnims] push af xor a @@ -32,9 +32,8 @@ NewPokedexEntry: ; fb877 pop af ld [hMapAnims], a ret -; fb8c8 -.ReturnFromDexRegistration: ; fb8c8 +.ReturnFromDexRegistration: call ClearTileMap call LoadFontsExtra call LoadStandardFont @@ -49,4 +48,3 @@ NewPokedexEntry: ; fb877 call GetSGBLayout call SetPalettes ret -; fb8f1 diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 2e36175ab..147a0ff15 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -18,7 +18,7 @@ POKEDEX_SCX EQU 5 GLOBAL POKEDEX_SCX -Pokedex: ; 40000 +Pokedex: ld a, [hWX] ld l, a @@ -77,7 +77,7 @@ Pokedex: ; 40000 ld [hWY], a ret -InitPokedex: ; 40063 +InitPokedex: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -106,7 +106,7 @@ InitPokedex: ; 40063 call Pokedex_ResetBGMapMode ret -Pokedex_CheckUnlockedUnownMode: ; 400a2 +Pokedex_CheckUnlockedUnownMode: ld a, [wStatusFlags] bit STATUSFLAGS_UNOWN_DEX_F, a jr nz, .unlocked @@ -120,7 +120,7 @@ Pokedex_CheckUnlockedUnownMode: ; 400a2 ld [wUnlockedUnownMode], a ret -Pokedex_InitCursorPosition: ; 400b4 +Pokedex_InitCursorPosition: ld hl, wPokedexOrder ld a, [wPrevDexEntry] and a @@ -162,7 +162,7 @@ Pokedex_InitCursorPosition: ; 400b4 .done ret -Pokedex_GetLandmark: ; 400ed +Pokedex_GetLandmark: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -182,13 +182,13 @@ Pokedex_GetLandmark: ; 400ed ld [wDexCurrentLocation], a ret -Pokedex_RunJumptable: ; 4010b +Pokedex_RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call Pokedex_LoadPointer jp hl -.Jumptable: ; 40115 (10:4115) +.Jumptable: ; entries correspond to DEXSTATE_* constants dw Pokedex_InitMainScreen dw Pokedex_UpdateMainScreen @@ -205,17 +205,17 @@ Pokedex_RunJumptable: ; 4010b dw Pokedex_UpdateUnownMode dw Pokedex_Exit -Pokedex_IncrementDexPointer: ; 40131 (10:4131) +Pokedex_IncrementDexPointer: ld hl, wJumptableIndex inc [hl] ret -Pokedex_Exit: ; 40136 (10:4136) +Pokedex_Exit: ld hl, wJumptableIndex set 7, [hl] ret -Pokedex_InitMainScreen: ; 4013c (10:413c) +Pokedex_InitMainScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -263,7 +263,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateMainScreen: ; 401ae (10:41ae) +Pokedex_UpdateMainScreen: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -324,7 +324,7 @@ Pokedex_UpdateMainScreen: ; 401ae (10:41ae) ld [wJumptableIndex], a ret -Pokedex_InitDexEntryScreen: ; 40217 (10:4217) +Pokedex_InitDexEntryScreen: call LowVolume xor a ; page 1 ld [wPokedexStatus], a @@ -350,7 +350,7 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258) +Pokedex_UpdateDexEntryScreen: ld de, DexEntryScreen_ArrowCursorData call Pokedex_MoveArrowCursor ld hl, hJoyPressed @@ -384,7 +384,7 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258) ld [wJumptableIndex], a ret -Pokedex_Page: ; 40292 +Pokedex_Page: ld a, [wPokedexStatus] xor 1 ; toggle page ld [wPokedexStatus], a @@ -394,7 +394,7 @@ Pokedex_Page: ; 40292 call WaitBGMap ret -Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa) +Pokedex_ReinitDexEntryScreen: ; Reinitialize the Pokédex entry screen after changing the selected mon. call Pokedex_BlackOutBG xor a ; page 1 @@ -420,7 +420,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa) dec [hl] ret -DexEntryScreen_ArrowCursorData: ; 402e8 +DexEntryScreen_ArrowCursorData: db D_RIGHT | D_LEFT, 4 dwcoord 1, 17 ; PAGE dwcoord 6, 17 ; AREA @@ -428,13 +428,13 @@ DexEntryScreen_ArrowCursorData: ; 402e8 dwcoord 15, 17 ; PRNT -DexEntryScreen_MenuActionJumptable: ; 402f2 +DexEntryScreen_MenuActionJumptable: dw Pokedex_Page dw .Area dw .Cry dw .Print -.Area: ; 402fa +.Area: call Pokedex_BlackOutBG xor a ld [hSCX], a @@ -465,7 +465,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call Pokedex_GetSGBLayout ret -.Cry: ; 40340 +.Cry: call Pokedex_GetSelectedMon ld a, [wd265] call GetCryIndex @@ -474,7 +474,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call PlayCry ret -.Print: ; 4034f +.Print: call Pokedex_ApplyPrintPals xor a ld [hSCX], a @@ -502,14 +502,14 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call Pokedex_ApplyUsualPals ret -Pokedex_RedisplayDexEntry: ; 4038d +Pokedex_RedisplayDexEntry: call Pokedex_DrawDexEntryScreenBG call Pokedex_GetSelectedMon farcall DisplayDexEntry call Pokedex_DrawFootprint ret -Pokedex_InitOptionScreen: ; 4039d (10:439d) +Pokedex_InitOptionScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -524,7 +524,7 @@ Pokedex_InitOptionScreen: ; 4039d (10:439d) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateOptionScreen: ; 403be (10:43be) +Pokedex_UpdateOptionScreen: ld a, [wUnlockedUnownMode] and a jr nz, .okay @@ -556,37 +556,37 @@ Pokedex_UpdateOptionScreen: ; 403be (10:43be) ld [wJumptableIndex], a ret -.NoUnownModeArrowCursorData: ; 403f3 +.NoUnownModeArrowCursorData: db D_UP | D_DOWN, 3 dwcoord 2, 4 ; NEW dwcoord 2, 6 ; OLD dwcoord 2, 8 ; ABC -.ArrowCursorData: ; 403fb +.ArrowCursorData: db D_UP | D_DOWN, 4 dwcoord 2, 4 ; NEW dwcoord 2, 6 ; OLD dwcoord 2, 8 ; ABC dwcoord 2, 10 ; UNOWN -.MenuActionJumptable: ; 40405 (10:4405) +.MenuActionJumptable: dw .MenuAction_NewMode dw .MenuAction_OldMode dw .MenuAction_ABCMode dw .MenuAction_UnownMode -.MenuAction_NewMode: ; 4040d (10:440d) +.MenuAction_NewMode: ld b, DEXMODE_NEW jr .ChangeMode -.MenuAction_OldMode: ; 40411 (10:4411) +.MenuAction_OldMode: ld b, DEXMODE_OLD jr .ChangeMode -.MenuAction_ABCMode: ; 40415 (10:4415) +.MenuAction_ABCMode: ld b, DEXMODE_ABC -.ChangeMode: ; 40417 (10:4417) +.ChangeMode: ld a, [wCurrentDexMode] cp b jr z, .skip_changing_mode ; Skip if new mode is same as current. @@ -606,13 +606,13 @@ Pokedex_UpdateOptionScreen: ; 403be (10:43be) ld [wJumptableIndex], a ret -.MenuAction_UnownMode: ; 4043a (10:443a) +.MenuAction_UnownMode: call Pokedex_BlackOutBG ld a, DEXSTATE_UNOWN_MODE ld [wJumptableIndex], a ret -Pokedex_InitSearchScreen: ; 40443 (10:4443) +Pokedex_InitSearchScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -632,7 +632,7 @@ Pokedex_InitSearchScreen: ; 40443 (10:4443) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateSearchScreen: ; 40471 (10:4471) +Pokedex_UpdateSearchScreen: ld de, .ArrowCursorData call Pokedex_MoveArrowCursor call Pokedex_UpdateSearchMonType @@ -658,25 +658,25 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) ld [wJumptableIndex], a ret -.ArrowCursorData: ; 4049e +.ArrowCursorData: db D_UP | D_DOWN, 4 dwcoord 2, 4 ; TYPE 1 dwcoord 2, 6 ; TYPE 2 dwcoord 2, 13 ; BEGIN SEARCH dwcoord 2, 15 ; CANCEL -.MenuActionJumptable: ; 404a8 +.MenuActionJumptable: dw .MenuAction_MonSearchType dw .MenuAction_MonSearchType dw .MenuAction_BeginSearch dw .MenuAction_Cancel -.MenuAction_MonSearchType: ; 404b0 +.MenuAction_MonSearchType: call Pokedex_NextSearchMonType call Pokedex_PlaceSearchScreenTypeStrings ret -.MenuAction_BeginSearch: ; 404b7 +.MenuAction_BeginSearch: call Pokedex_SearchForMons farcall AnimateDexSearchSlowpoke ld a, [wDexSearchResultCount] @@ -710,13 +710,13 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) ld [wJumptableIndex], a ret -.MenuAction_Cancel: ; 40501 +.MenuAction_Cancel: call Pokedex_BlackOutBG ld a, DEXSTATE_MAIN_SCR ld [wJumptableIndex], a ret -Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) +Pokedex_InitSearchResultsScreen: xor a ld [hBGMapMode], a xor a @@ -751,7 +751,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562) +Pokedex_UpdateSearchResultsScreen: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -797,7 +797,7 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562) ld [hWX], a ret -Pokedex_InitUnownMode: ; 405bd (10:45bd) +Pokedex_InitUnownMode: call Pokedex_LoadUnownFont call Pokedex_DrawUnownModeBG xor a @@ -811,7 +811,7 @@ Pokedex_InitUnownMode: ; 405bd (10:45bd) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateUnownMode: ; 405df (10:45df) +Pokedex_UpdateUnownMode: ld hl, hJoyPressed ld a, [hl] and A_BUTTON | B_BUTTON @@ -838,7 +838,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df) .done ret -Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610) +Pokedex_UnownModeHandleDPadInput: ld hl, hJoyLast ld a, [hl] and D_RIGHT @@ -883,15 +883,15 @@ Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610) call DelayFrame ret -Pokedex_UnownModeEraseCursor: ; 40654 (10:4654) +Pokedex_UnownModeEraseCursor: ld c, " " jr Pokedex_UnownModeUpdateCursorGfx -Pokedex_UnownModePlaceCursor: ; 40658 (10:4658) +Pokedex_UnownModePlaceCursor: ld a, [wDexCurrentUnownIndex] ld c, $5a ; diamond cursor -Pokedex_UnownModeUpdateCursorGfx: ; 4065d (10:465d) +Pokedex_UnownModeUpdateCursorGfx: ld e, a ld d, 0 ld hl, UnownModeLetterAndCursorCoords + 2 @@ -904,7 +904,7 @@ endr ld [hl], c ret -Pokedex_NextOrPreviousDexEntry: ; 4066c (10:466c) +Pokedex_NextOrPreviousDexEntry: ld a, [wDexListingCursor] ld [wBackupDexListingCursor], a ld a, [wDexListingScrollOffset] @@ -955,7 +955,7 @@ Pokedex_NextOrPreviousDexEntry: ; 4066c (10:466c) and a ret -Pokedex_ListingHandleDPadInput: ; 406c5 (10:46c5) +Pokedex_ListingHandleDPadInput: ; Handles D-pad input for a list of Pokémon. ld a, [wDexListingHeight] ld d, a @@ -979,7 +979,7 @@ Pokedex_ListingHandleDPadInput: ; 406c5 (10:46c5) jr nz, Pokedex_ListingMoveDownOnePage jr Pokedex_ListingPosStayedSame -Pokedex_ListingMoveCursorUp: ; 406ea (10:46ea) +Pokedex_ListingMoveCursorUp: ld hl, wDexListingCursor ld a, [hl] and a @@ -994,7 +994,7 @@ Pokedex_ListingMoveCursorUp: ; 406ea (10:46ea) dec [hl] jr Pokedex_ListingPosChanged -Pokedex_ListingMoveCursorDown: ; 406fe (10:46fe) +Pokedex_ListingMoveCursorDown: ld hl, wDexListingCursor ld a, [hl] inc a @@ -1012,7 +1012,7 @@ Pokedex_ListingMoveCursorDown: ; 406fe (10:46fe) inc [hl] jr Pokedex_ListingPosChanged -Pokedex_ListingMoveUpOnePage: ; 40716 (10:4716) +Pokedex_ListingMoveUpOnePage: ld hl, wDexListingScrollOffset ld a, [hl] and a @@ -1028,7 +1028,7 @@ Pokedex_ListingMoveUpOnePage: ; 40716 (10:4716) ld [hl], a jr Pokedex_ListingPosChanged -Pokedex_ListingMoveDownOnePage: ; 40728 (10:4728) +Pokedex_ListingMoveDownOnePage: ; When moving down a page, the return value always report a change in position. ld hl, wDexListingScrollOffset ld a, d @@ -1048,15 +1048,15 @@ Pokedex_ListingMoveDownOnePage: ; 40728 (10:4728) ld [hl], a jr Pokedex_ListingPosChanged -Pokedex_ListingPosStayedSame: ; 4073d (10:473d) +Pokedex_ListingPosStayedSame: and a ret -Pokedex_ListingPosChanged: ; 4073f (10:473f) +Pokedex_ListingPosChanged: scf ret -Pokedex_FillColumn: ; 40741 +Pokedex_FillColumn: ; Fills a column starting at HL, going downwards. ; B is the height of the column and A is the tile it's filled with. push de @@ -1070,7 +1070,7 @@ Pokedex_FillColumn: ; 40741 ret -Pokedex_DrawMainScreenBG: ; 4074c (10:474c) +Pokedex_DrawMainScreenBG: ; Draws the left sidebar and the bottom bar on the main screen. hlcoord 0, 17 ld de, String_START_SEARCH @@ -1127,17 +1127,17 @@ Pokedex_DrawMainScreenBG: ; 4074c (10:474c) call Pokedex_PlaceFrontpicTopLeftCorner ret -String_SEEN: ; 407e1 +String_SEEN: db "SEEN", -1 -String_OWN: ; 407e6 +String_OWN: db "OWN", -1 -String_SELECT_OPTION: ; 407ea +String_SELECT_OPTION: db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION ; fallthrough -String_START_SEARCH: ; 407f2 +String_START_SEARCH: db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, -1 ; START > SEARCH -Pokedex_DrawDexEntryScreenBG: ; 407fd +Pokedex_DrawDexEntryScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 0 lb bc, 15, 18 @@ -1169,16 +1169,16 @@ Pokedex_DrawDexEntryScreenBG: ; 407fd call Pokedex_PlaceFrontpicTopLeftCorner ret -.Unused: ; 4084f +.Unused: db $5c, $5d, -1 ; No. -.Height: ; 40852 +.Height: db "HT ?", $5e, "??", $5f, -1 ; HT ?'??" -.Weight: ; 4085c +.Weight: db "WT ???lb", -1 ; WT ???lb -.MenuItems: ; 40867 +.MenuItems: db $3b, " PAGE AREA CRY PRNT", -1 -Pokedex_DrawOptionScreenBG: ; 4087c (10:487c) +Pokedex_DrawOptionScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 2 lb bc, 8, 18 @@ -1200,19 +1200,19 @@ Pokedex_DrawOptionScreenBG: ; 4087c (10:487c) call PlaceString ret -.Title: ; 408b2 +.Title: db $3b, " OPTION ", $3c, -1 -.Modes: ; 408bd +.Modes: db "NEW #DEX MODE" next "OLD #DEX MODE" next "A to Z MODE" db "@" -.UnownMode: ; 408e5 +.UnownMode: db "UNOWN MODE@" -Pokedex_DrawSearchScreenBG: ; 408f0 (10:48f0) +Pokedex_DrawSearchScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 2 lb bc, 14, 18 @@ -1234,23 +1234,23 @@ Pokedex_DrawSearchScreenBG: ; 408f0 (10:48f0) call PlaceString ret -.Title: ; 4092a +.Title: db $3b, " SEARCH ", $3c, -1 -.TypeLeftRightArrows: ; 40935 +.TypeLeftRightArrows: db $3d, " ", $3e, -1 -.Types: ; 40940 +.Types: db "TYPE1" next "TYPE2" db "@" -.Menu: ; 4094c +.Menu: db "BEGIN SEARCH!!" next "CANCEL" db "@" -Pokedex_DrawSearchResultsScreenBG: ; 40962 (10:4962) +Pokedex_DrawSearchResultsScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 0 lb bc, 7, 7 @@ -1280,13 +1280,13 @@ Pokedex_DrawSearchResultsScreenBG: ; 40962 (10:4962) call Pokedex_PlaceFrontpicTopLeftCorner ret -.BottomWindowText: ; 409ae +.BottomWindowText: db "SEARCH RESULTS" next " TYPE" next " FOUND!" db "@" -Pokedex_PlaceSearchResultsTypeStrings: ; 409cf (10:49cf) +Pokedex_PlaceSearchResultsTypeStrings: ld a, [wDexSearchMonType1] hlcoord 0, 14 call Pokedex_PlaceTypeString @@ -1304,7 +1304,7 @@ Pokedex_PlaceSearchResultsTypeStrings: ; 409cf (10:49cf) .done ret -Pokedex_DrawUnownModeBG: ; 409f1 (10:49f1) +Pokedex_DrawUnownModeBG: call Pokedex_FillBackgroundColor2 hlcoord 2, 1 lb bc, 10, 13 @@ -1347,7 +1347,7 @@ endr ld [wDexUnownCount], a ret -UnownModeLetterAndCursorCoords: ; 40a3e +UnownModeLetterAndCursorCoords: ; entries correspond to Unown forms ; letter, cursor dwcoord 4,11, 3,11 ; A @@ -1377,16 +1377,16 @@ UnownModeLetterAndCursorCoords: ; 40a3e dwcoord 14, 9, 15, 9 ; Y dwcoord 14,10, 15,10 ; Z -Pokedex_FillBackgroundColor2: ; 40aa6 +Pokedex_FillBackgroundColor2: hlcoord 0, 0 ld a, $32 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill ret -Pokedex_PlaceFrontpicTopLeftCorner: ; 40ab2 +Pokedex_PlaceFrontpicTopLeftCorner: hlcoord 1, 1 -Pokedex_PlaceFrontpicAtHL: ; 40ab5 +Pokedex_PlaceFrontpicAtHL: xor a ld b, $7 .row @@ -1407,7 +1407,7 @@ Pokedex_PlaceFrontpicAtHL: ; 40ab5 jr nz, .row ret -Pokedex_PlaceString: ; 40acd +Pokedex_PlaceString: .loop ld a, [de] cp -1 @@ -1417,7 +1417,7 @@ Pokedex_PlaceString: ; 40acd jr .loop -Pokedex_PlaceBorder: ; 40ad5 +Pokedex_PlaceBorder: push hl ld a, $33 ld [hli], a @@ -1449,7 +1449,7 @@ Pokedex_PlaceBorder: ; 40ad5 ld [hl], a ret -.FillRow: ; 40b06 +.FillRow: ld e, c .row_loop ld a, e @@ -1461,7 +1461,7 @@ Pokedex_PlaceBorder: ; 40ad5 jr .row_loop -Pokedex_PrintListing: ; 40b0f (10:4b0f) +Pokedex_PrintListing: ; Prints the list of Pokémon on the main Pokédex screen. ; This check is completely useless. @@ -1512,7 +1512,7 @@ Pokedex_PrintListing: ; 40b0f (10:4b0f) call Pokedex_LoadSelectedMonTiles ret -.PrintEntry: ; 40b55 (10:4b55) +.PrintEntry: ; Prints one entry in the list of Pokémon on the main Pokédex screen. and a ret z @@ -1526,7 +1526,7 @@ Pokedex_PrintListing: ; 40b0f (10:4b0f) call PlaceString ret -Pokedex_PrintNumberIfOldMode: ; 40b6a (10:4b6a) +Pokedex_PrintNumberIfOldMode: ld a, [wCurrentDexMode] cp DEXMODE_OLD jr z, .printnum @@ -1542,7 +1542,7 @@ Pokedex_PrintNumberIfOldMode: ; 40b6a (10:4b6a) pop hl ret -Pokedex_PlaceCaughtSymbolIfCaught: ; 40b82 (10:4b82) +Pokedex_PlaceCaughtSymbolIfCaught: call Pokedex_CheckCaught jr nz, .place_caught_symbol inc hl @@ -1553,7 +1553,7 @@ Pokedex_PlaceCaughtSymbolIfCaught: ; 40b82 (10:4b82) ld [hli], a ret -Pokedex_PlaceDefaultStringIfNotSeen: ; 40b8d (10:4b8d) +Pokedex_PlaceDefaultStringIfNotSeen: call Pokedex_CheckSeen ret nz inc hl @@ -1562,10 +1562,10 @@ Pokedex_PlaceDefaultStringIfNotSeen: ; 40b8d (10:4b8d) scf ret -.NameNotSeen: ; 40b9a +.NameNotSeen: db "-----@" -Pokedex_DrawFootprint: ; 40ba0 +Pokedex_DrawFootprint: hlcoord 18, 1 ld a, $62 ld [hli], a @@ -1579,7 +1579,7 @@ Pokedex_DrawFootprint: ; 40ba0 ret -Pokedex_GetSelectedMon: ; 40bb1 +Pokedex_GetSelectedMon: ; Gets the species of the currently selected Pokémon. This corresponds to the ; position of the cursor in the main listing, but this function can be used ; on all Pokédex screens. @@ -1595,7 +1595,7 @@ Pokedex_GetSelectedMon: ; 40bb1 ret -Pokedex_CheckCaught: ; 40bc4 (10:4bc4) +Pokedex_CheckCaught: push de push hl ld a, [wd265] @@ -1606,7 +1606,7 @@ Pokedex_CheckCaught: ; 40bc4 (10:4bc4) ret -Pokedex_CheckSeen: ; 40bd0 +Pokedex_CheckSeen: push de push hl ld a, [wd265] @@ -1618,7 +1618,7 @@ Pokedex_CheckSeen: ; 40bd0 -Pokedex_OrderMonsByMode: ; 40bdc +Pokedex_OrderMonsByMode: ld hl, wPokedexOrder ld bc, wPokedexOrderEnd - wPokedexOrder xor a @@ -1628,12 +1628,12 @@ Pokedex_OrderMonsByMode: ; 40bdc call Pokedex_LoadPointer jp hl -.Jumptable: ; 40bf0 (10:4bf0) +.Jumptable: dw .NewMode dw .OldMode dw Pokedex_ABCMode -.NewMode: ; 40bf6 (10:4bf6) +.NewMode: ld de, NewPokedexOrder ld hl, wPokedexOrder ld c, NUM_POKEMON @@ -1646,7 +1646,7 @@ Pokedex_OrderMonsByMode: ; 40bdc call .FindLastSeen ret -.OldMode: ; 40c08 (10:4c08) +.OldMode: ld hl, wPokedexOrder ld a, $1 ld c, NUM_POKEMON @@ -1658,7 +1658,7 @@ Pokedex_OrderMonsByMode: ; 40bdc call .FindLastSeen ret -.FindLastSeen: ; 40c18 (10:4c18) +.FindLastSeen: ld hl, wPokedexOrder + NUM_POKEMON - 1 ld d, NUM_POKEMON ld e, d @@ -1675,7 +1675,7 @@ Pokedex_OrderMonsByMode: ; 40bdc ld [wDexListingEnd], a ret -Pokedex_ABCMode: ; 40c30 +Pokedex_ABCMode: xor a ld [wDexListingEnd], a ld hl, wPokedexOrder @@ -1717,7 +1717,7 @@ INCLUDE "data/pokemon/dex_order_alpha.asm" INCLUDE "data/pokemon/dex_order_new.asm" -Pokedex_DisplayModeDescription: ; 40e5b +Pokedex_DisplayModeDescription: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1734,29 +1734,29 @@ Pokedex_DisplayModeDescription: ; 40e5b ld [hBGMapMode], a ret -.Modes: ; 40e7d +.Modes: dw .NewMode dw .OldMode dw .ABCMode dw .UnownMode -.NewMode: ; 40e85 +.NewMode: db "<PK><MN> are listed by" next "evolution type.@" -.OldMode: ; 40ea6 +.OldMode: db "<PK><MN> are listed by" next "official type.@" -.ABCMode: ; 40ec6 +.ABCMode: db "<PK><MN> are listed" next "alphabetically.@" -.UnownMode: ; 40ee4 +.UnownMode: db "UNOWN are listed" next "in catching order.@" -Pokedex_DisplayChangingModesMessage: ; 40f08 (10:4f08) +Pokedex_DisplayChangingModesMessage: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1775,11 +1775,11 @@ Pokedex_DisplayChangingModesMessage: ; 40f08 (10:4f08) call DelayFrames ret -String_ChangingModesPleaseWait: ; 40f32 +String_ChangingModesPleaseWait: db "Changing modes." next "Please wait.@" -Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f) +Pokedex_UpdateSearchMonType: ld a, [wDexArrowCursorPosIndex] cp 2 jr nc, .no_change @@ -1794,7 +1794,7 @@ Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f) and a ret -Pokedex_PrevSearchMonType: ; 40f65 +Pokedex_PrevSearchMonType: ld a, [wDexArrowCursorPosIndex] and a jr nz, .type2 @@ -1821,7 +1821,7 @@ Pokedex_PrevSearchMonType: ; 40f65 scf ret -Pokedex_NextSearchMonType: ; 40f84 +Pokedex_NextSearchMonType: ld a, [wDexArrowCursorPosIndex] and a jr nz, .type2 @@ -1850,7 +1850,7 @@ Pokedex_NextSearchMonType: ; 40f84 scf ret -Pokedex_PlaceSearchScreenTypeStrings: ; 40fa8 (10:4fa8) +Pokedex_PlaceSearchScreenTypeStrings: xor a ld [hBGMapMode], a hlcoord 9, 3 @@ -1867,7 +1867,7 @@ Pokedex_PlaceSearchScreenTypeStrings: ; 40fa8 (10:4fa8) ld [hBGMapMode], a ret -Pokedex_PlaceTypeString: ; 40fcd (10:4fcd) +Pokedex_PlaceTypeString: push hl ld e, a ld d, 0 @@ -1883,7 +1883,7 @@ endr INCLUDE "data/types/search_strings.asm" -Pokedex_SearchForMons: ; 41086 +Pokedex_SearchForMons: ld a, [wDexSearchMonType2] and a call nz, .Search @@ -1892,7 +1892,7 @@ Pokedex_SearchForMons: ; 41086 call nz, .Search ret -.Search: ; 41095 +.Search: dec a ld e, a ld d, 0 @@ -1960,7 +1960,7 @@ Pokedex_SearchForMons: ; 41086 INCLUDE "data/types/search_types.asm" -Pokedex_DisplayTypeNotFoundMessage: ; 41107 +Pokedex_DisplayTypeNotFoundMessage: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1975,11 +1975,11 @@ Pokedex_DisplayTypeNotFoundMessage: ; 41107 call DelayFrames ret -.TypeNotFound: ; 41126 +.TypeNotFound: db "The specified type" next "was not found.@" -Pokedex_UpdateCursorOAM: ; 41148 (10:5148) +Pokedex_UpdateCursorOAM: ld a, [wCurrentDexMode] cp DEXMODE_OLD jp z, Pokedex_PutOldModeCursorOAM @@ -1987,7 +1987,7 @@ Pokedex_UpdateCursorOAM: ; 41148 (10:5148) call Pokedex_PutScrollbarOAM ret -Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) +Pokedex_PutOldModeCursorOAM: ld hl, .CursorOAM ld a, [wDexListingCursor] or a @@ -1997,7 +1997,7 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41167 +.CursorOAM: dsprite 3, 0, 9, -1, $30, 7 dsprite 2, 0, 9, -1, $31, 7 dsprite 2, 0, 10, -1, $32, 7 @@ -2024,7 +2024,7 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -.CursorAtTopOAM: ; 411c8 +.CursorAtTopOAM: ; OAM data for when the cursor is at the top of the list. The tiles at the top ; are cut off so they don't show up outside the list area. dsprite 3, 0, 9, -1, $30, 7 @@ -2053,12 +2053,12 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229) +Pokedex_PutNewModeABCModeCursorOAM: ld hl, .CursorOAM call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41230 +.CursorOAM: dsprite 3, 3, 9, -1, $30, 7 dsprite 2, 3, 9, -1, $31, 7 dsprite 2, 3, 10, -1, $32, 7 @@ -2081,7 +2081,7 @@ Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229) dsprite 4, 3, 19, 0, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) +Pokedex_UpdateSearchResultsCursorOAM: ld a, [wCurrentDexMode] cp DEXMODE_OLD jp z, Pokedex_PutOldModeCursorOAM @@ -2089,7 +2089,7 @@ Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41290 +.CursorOAM: dsprite 3, 3, 9, -1, $30, 7 dsprite 2, 3, 9, -1, $31, 7 dsprite 2, 3, 10, -1, $32, 7 @@ -2116,7 +2116,7 @@ Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) dsprite 4, 3, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_LoadCursorOAM: ; 412f1 (10:52f1) +Pokedex_LoadCursorOAM: ld de, wVirtualOAMSprite00 .loop ld a, [hl] @@ -2140,7 +2140,7 @@ Pokedex_LoadCursorOAM: ; 412f1 (10:52f1) inc de jr .loop -Pokedex_PutScrollbarOAM: ; 4130e (10:530e) +Pokedex_PutScrollbarOAM: ; Writes the OAM data for the scrollbar in the new mode and ABC mode. push de ld a, [wDexListingEnd] @@ -2186,14 +2186,14 @@ Pokedex_PutScrollbarOAM: ; 4130e (10:530e) ld [hl], $0 ret -Pokedex_InitArrowCursor: ; 4134f (10:534f) +Pokedex_InitArrowCursor: xor a ld [wDexArrowCursorPosIndex], a ld [wDexArrowCursorDelayCounter], a ld [wDexArrowCursorBlinkCounter], a ret -Pokedex_MoveArrowCursor: ; 4135a (10:535a) +Pokedex_MoveArrowCursor: ; bc = [de] - 1 ld a, [de] ld b, a @@ -2275,7 +2275,7 @@ Pokedex_MoveArrowCursor: ; 4135a (10:535a) ld [wDexArrowCursorPosIndex], a jr .update_cursor_pos -Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4) +Pokedex_GetArrowCursorPos: ld a, [wDexArrowCursorPosIndex] add a ld l, a @@ -2286,7 +2286,7 @@ Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4) ld l, a ret -Pokedex_BlinkArrowCursor: ; 413e0 (10:53e0) +Pokedex_BlinkArrowCursor: ld hl, wDexArrowCursorBlinkCounter ld a, [hl] inc [hl] @@ -2301,7 +2301,7 @@ Pokedex_BlinkArrowCursor: ; 413e0 (10:53e0) ld [hl], "▶" ret -Pokedex_ArrowCursorDelay: ; 413f5 (10:53f5) +Pokedex_ArrowCursorDelay: ; Updates the delay counter set when moving the arrow cursor. ; Returns whether the delay is active in carry. ld hl, wDexArrowCursorDelayCounter @@ -2313,10 +2313,10 @@ Pokedex_ArrowCursorDelay: ; 413f5 (10:53f5) scf ret -Pokedex_FillBox: ; 413fe (10:53fe) +Pokedex_FillBox: jp FillBoxWithByte -Pokedex_BlackOutBG: ; 41401 (10:5401) +Pokedex_BlackOutBG: ; Make BG palettes black so that the BG becomes all black. ld a, [rSVBK] push af @@ -2329,7 +2329,7 @@ Pokedex_BlackOutBG: ; 41401 (10:5401) pop af ld [rSVBK], a -Pokedex_ApplyPrintPals: ; 41415 +Pokedex_ApplyPrintPals: ld a, $ff call DmgToCgbBGPals ld a, $ff @@ -2337,11 +2337,11 @@ Pokedex_ApplyPrintPals: ; 41415 call DelayFrame ret -Pokedex_GetSGBLayout: ; 41423 +Pokedex_GetSGBLayout: ld b, a call GetSGBLayout -Pokedex_ApplyUsualPals: ; 41427 +Pokedex_ApplyUsualPals: ; This applies the palettes used for most Pokédex screens. ld a, $e4 call DmgToCgbBGPals @@ -2350,7 +2350,7 @@ Pokedex_ApplyUsualPals: ; 41427 ret -Pokedex_LoadPointer: ; 41432 +Pokedex_LoadPointer: ld e, a ld d, 0 add hl, de @@ -2360,7 +2360,7 @@ Pokedex_LoadPointer: ; 41432 ld l, a ret -Pokedex_LoadSelectedMonTiles: ; 4143b +Pokedex_LoadSelectedMonTiles: ; Loads the tiles of the currently selected Pokémon. call Pokedex_GetSelectedMon call Pokedex_CheckSeen @@ -2388,10 +2388,10 @@ Pokedex_LoadSelectedMonTiles: ; 4143b ret -Pokedex_LoadCurrentFootprint: ; 41478 (10:5478) +Pokedex_LoadCurrentFootprint: call Pokedex_GetSelectedMon -Pokedex_LoadAnyFootprint: ; 4147b +Pokedex_LoadAnyFootprint: ld a, [wd265] dec a and %11111000 @@ -2432,7 +2432,7 @@ Pokedex_LoadAnyFootprint: ; 4147b ret -Pokedex_LoadGFX: ; 414b7 +Pokedex_LoadGFX: call DisableLCD ld hl, vTiles2 ld bc, $31 tiles @@ -2462,12 +2462,12 @@ Pokedex_LoadGFX: ; 414b7 call EnableLCD ret -Pokedex_LoadInvertedFont: ; 414fb +Pokedex_LoadInvertedFont: call LoadStandardFont ld hl, vTiles1 ld bc, $80 tiles -Pokedex_InvertTiles: ; 41504 +Pokedex_InvertTiles: .loop ld a, [hl] xor $ff @@ -2478,13 +2478,13 @@ Pokedex_InvertTiles: ; 41504 jr nz, .loop ret -PokedexLZ: ; 4150e +PokedexLZ: INCBIN "gfx/pokedex/pokedex.2bpp.lz" -PokedexSlowpokeLZ: ; 416b0 +PokedexSlowpokeLZ: INCBIN "gfx/pokedex/slowpoke.2bpp.lz" -Pokedex_CheckSGB: ; 41a24 +Pokedex_CheckSGB: ld a, [hCGB] or a ret nz @@ -2492,7 +2492,7 @@ Pokedex_CheckSGB: ; 41a24 dec a ret -Pokedex_LoadUnownFont: ; 41a2c +Pokedex_LoadUnownFont: ld a, BANK(sScratch) call GetSRAMBank ld hl, UnownFont @@ -2510,7 +2510,7 @@ Pokedex_LoadUnownFont: ; 41a2c call CloseSRAM ret -Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) +Pokedex_LoadUnownFrontpicTiles: ld a, [wUnownLetter] push af ld a, [wDexCurrentUnownIndex] @@ -2529,7 +2529,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) ld [wUnownLetter], a ret -_NewPokedexEntry: ; 41a7f +_NewPokedexEntry: xor a ld [hBGMapMode], a farcall DrawDexEntryScreenRightEdge @@ -2562,21 +2562,21 @@ _NewPokedexEntry: ; 41a7f ret -Pokedex_SetBGMapMode3: ; 41ad7 (10:5ad7) +Pokedex_SetBGMapMode3: ld a, $3 ld [hBGMapMode], a ld c, 4 call DelayFrames ret -Pokedex_SetBGMapMode4: ; 41ae1 (10:5ae1) +Pokedex_SetBGMapMode4: ld a, $4 ld [hBGMapMode], a ld c, 4 call DelayFrames ret -Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ; 41aeb (10:5aeb) +Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ld a, [hCGB] and a jr z, .DMG @@ -2586,7 +2586,7 @@ Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ; 41aeb (10:5aeb) ret -Pokedex_ResetBGMapMode: ; 41af7 +Pokedex_ResetBGMapMode: xor a ld [hBGMapMode], a ret diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm index cca246ec7..21aea61b4 100644 --- a/engine/pokedex/pokedex_2.asm +++ b/engine/pokedex/pokedex_2.asm @@ -1,4 +1,4 @@ -AnimateDexSearchSlowpoke: ; 441cf +AnimateDexSearchSlowpoke: ld hl, .FrameIDs ld b, 25 .loop @@ -29,7 +29,7 @@ AnimateDexSearchSlowpoke: ; 441cf call DelayFrames ret -.FrameIDs: ; 441fc +.FrameIDs: ; frame ID, duration db 0, 7 db 1, 7 @@ -38,7 +38,7 @@ AnimateDexSearchSlowpoke: ; 441cf db 4, 7 db -2 -DoDexSearchSlowpokeFrame: ; 44207 +DoDexSearchSlowpokeFrame: ld a, [wDexSearchSlowpokeFrame] ld hl, .SlowpokeSpriteData ld de, wVirtualOAMSprite00 @@ -64,7 +64,7 @@ DoDexSearchSlowpokeFrame: ; 44207 inc de jr .loop -.SlowpokeSpriteData: ; 44228 +.SlowpokeSpriteData: dsprite 11, 0, 9, 0, $00, 0 dsprite 11, 0, 10, 0, $01, 0 dsprite 11, 0, 11, 0, $02, 0 @@ -76,7 +76,7 @@ DoDexSearchSlowpokeFrame: ; 44207 dsprite 13, 0, 11, 0, $22, 0 db -1 -DisplayDexEntry: ; 4424d +DisplayDexEntry: call GetPokemonName hlcoord 9, 3 call PlaceString ; mon species @@ -211,11 +211,11 @@ DisplayDexEntry: ; 4424d call FarString ret -UnreferencedPOKeString: ; 44331 +UnreferencedPOKeString: ; unused db "#@" -GetDexEntryPointer: ; 44333 +GetDexEntryPointer: ; return dex entry pointer b:de push hl ld hl, PokedexDataPointerTable @@ -247,8 +247,8 @@ GetDexEntryPointer: ; 44333 db BANK("Pokedex Entries 129-192") db BANK("Pokedex Entries 193-251") -GetDexEntryPagePointer: ; 44355 - call GetDexEntryPointer ; b:de +GetDexEntryPagePointer: + call GetDexEntryPointer push hl ld h, d ld l, e diff --git a/engine/pokedex/pokedex_3.asm b/engine/pokedex/pokedex_3.asm index 51399f434..d11c18fc6 100644 --- a/engine/pokedex/pokedex_3.asm +++ b/engine/pokedex/pokedex_3.asm @@ -1,29 +1,29 @@ -LoadSGBPokedexGFX: ; 1ddf1c +LoadSGBPokedexGFX: ld hl, SGBPokedexGFX_LZ ld de, vTiles2 tile $31 call Decompress ret -LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26) +LoadSGBPokedexGFX2: ld hl, SGBPokedexGFX_LZ ld de, vTiles2 tile $31 lb bc, BANK(SGBPokedexGFX_LZ), 58 call DecompressRequest2bpp ret -SGBPokedexGFX_LZ: ; 1ddf33 +SGBPokedexGFX_LZ: INCBIN "gfx/pokedex/sgb.2bpp.lz" -LoadQuestionMarkPic: ; 1de0d7 +LoadQuestionMarkPic: ld hl, .QuestionMarkLZ ld de, sScratch call Decompress ret -.QuestionMarkLZ: ; 1de0e1 +.QuestionMarkLZ: INCBIN "gfx/pokedex/question_mark.2bpp.lz" -DrawPokedexListWindow: ; 1de171 (77:6171) +DrawPokedexListWindow: ld a, $32 hlcoord 0, 17 ld bc, 12 @@ -68,7 +68,7 @@ DrawPokedexListWindow: ; 1de171 (77:6171) .Done: ret -DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1) +DrawPokedexSearchResultsWindow: ld a, $34 hlcoord 0, 0 ld bc, 11 @@ -111,14 +111,14 @@ DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1) call PlaceString ret -.esults_D ; 1de23c +.esults_D ; (SEARCH R) db "ESULTS" next "" ; (### FOUN) next "D!@" -DrawDexEntryScreenRightEdge: ; 1de247 +DrawDexEntryScreenRightEdge: ld a, [hBGMapAddress] ld l, a ld a, [hBGMapAddress + 1] @@ -150,7 +150,7 @@ DrawDexEntryScreenRightEdge: ; 1de247 ld [hBGMapAddress + 1], a ret -Bank77_FillColumn: ; 1de27f +Bank77_FillColumn: push de ld de, SCREEN_WIDTH .loop diff --git a/engine/pokedex/unown_dex.asm b/engine/pokedex/unown_dex.asm index a35a266b7..93f9d3d81 100644 --- a/engine/pokedex/unown_dex.asm +++ b/engine/pokedex/unown_dex.asm @@ -1,4 +1,4 @@ -UpdateUnownDex: ; fba18 +UpdateUnownDex: ld a, [wUnownLetter] ld c, a ld b, NUM_UNOWN @@ -17,9 +17,8 @@ UpdateUnownDex: ; fba18 dec hl ld [hl], c ret -; fba2e -PrintUnownWord: ; fba2e (3e:7a2e) +PrintUnownWord: hlcoord 4, 15 ld bc, 12 ld a, " " @@ -46,7 +45,6 @@ PrintUnownWord: ; fba2e (3e:7a2e) inc de ld [hli], a jr .loop -; fba5a (3e:7a5a) INCLUDE "data/pokemon/unown_words.asm" |