pokedex 2

This commit is contained in:
YamaArashi
2016-01-09 19:03:38 -08:00
parent e033ea3a37
commit 418c84dc0c
3 changed files with 131 additions and 119 deletions

View File

@@ -71,7 +71,7 @@ InitPokedex: ; 40063
xor a xor a
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld [wcf64], a ld [wDexEntryPrevJumptableIndex], a
ld [wcf65], a ld [wcf65], a
ld [wcf66], a ld [wcf66], a
@@ -80,7 +80,7 @@ InitPokedex: ; 40063
ld a, [wLastDexMode] ld a, [wLastDexMode]
ld [wCurrentDexMode], a ld [wCurrentDexMode], a
call Pokedex_ChangeMode call Pokedex_OrderMonsByMode
call Pokedex_InitCursorPosition call Pokedex_InitCursorPosition
call Pokedex_GetLandmark call Pokedex_GetLandmark
callba Function1de247 callba Function1de247
@@ -214,7 +214,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c)
call Pokedex_PrintListing call Pokedex_PrintListing
call Pokedex_SetBGMapMode_3ifDMG_4ifCGB call Pokedex_SetBGMapMode_3ifDMG_4ifCGB
call Pokedex_ResetBGMapMode call Pokedex_ResetBGMapMode
call Pokedex_DrawMainScreenLeftSideAndBottom call Pokedex_DrawMainScreenBG
ld a, $5 ld a, $5
ld [hSCX], a ld [hSCX], a
@@ -276,7 +276,7 @@ Pokedex_UpdateMainScreen: ; 401ae (10:41ae)
ld a, $2 ld a, $2
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld a, $0 ld a, $0
ld [wcf64], a ld [wDexEntryPrevJumptableIndex], a
ret ret
.select .select
@@ -338,22 +338,22 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258)
ld hl, hJoyPressed ld hl, hJoyPressed
ld a, [hl] ld a, [hl]
and B_BUTTON and B_BUTTON
jr nz, .b jr nz, .return_to_prev_screen
ld a, [hl] ld a, [hl]
and A_BUTTON and A_BUTTON
jr nz, .a jr nz, .do_menu_action
call Pokedex_NextOrPreviousDexEntry call Pokedex_NextOrPreviousDexEntry
ret nc ret nc
call Pokedex_IncrementDexPointer call Pokedex_IncrementDexPointer
ret ret
.a .do_menu_action
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
ld hl, DexEntryPage_Jumptable ld hl, DexEntryScreen_MenuActionJumptable
call Pokedex_LoadPointer call Pokedex_LoadPointer
jp [hl] jp [hl]
.b .return_to_prev_screen
ld a, [LastVolume] ld a, [LastVolume]
and a and a
jr z, .max_volume jr z, .max_volume
@@ -362,7 +362,7 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258)
.max_volume .max_volume
call MaxVolume call MaxVolume
ld a, [wcf64] ld a, [wDexEntryPrevJumptableIndex]
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@@ -410,7 +410,7 @@ DexEntryScreen_ArrowCursorData: ; 402e8
dwcoord 15, 17 dwcoord 15, 17
DexEntryPage_Jumptable: ; 402f2 DexEntryScreen_MenuActionJumptable: ; 402f2
dw Pokedex_Page dw Pokedex_Page
dw .Area dw .Area
dw .Cry dw .Cry
@@ -438,7 +438,7 @@ DexEntryPage_Jumptable: ; 402f2
ld a, $5 ld a, $5
ld [hSCX], a ld [hSCX], a
call DelayFrame call DelayFrame
call Function4038d call Pokedex_RedisplayDexEntry
call Pokedex_LoadSelectedMonTiles call Pokedex_LoadSelectedMonTiles
call WaitBGMap call WaitBGMap
call Pokedex_GetSelectedMon call Pokedex_GetSelectedMon
@@ -457,12 +457,12 @@ DexEntryPage_Jumptable: ; 402f2
ret ret
.Print: ; 4034f .Print: ; 4034f
call Function41415 call Pokedex_ApplyPrintPals
xor a xor a
ld [hSCX], a ld [hSCX], a
ld a, [wcf65] ld a, [wcf65]
push af push af
ld a, [wcf64] ld a, [wDexEntryPrevJumptableIndex]
push af push af
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
push af push af
@@ -470,21 +470,21 @@ DexEntryPage_Jumptable: ; 402f2
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
pop af pop af
ld [wcf64], a ld [wDexEntryPrevJumptableIndex], a
pop af pop af
ld [wcf65], a ld [wcf65], a
call ClearBGPalettes call ClearBGPalettes
call DisableLCD call DisableLCD
call Pokedex_LoadInvertedFont call Pokedex_LoadInvertedFont
call Function4038d call Pokedex_RedisplayDexEntry
call EnableLCD call EnableLCD
call WaitBGMap call WaitBGMap
ld a, $5 ld a, $5
ld [hSCX], a ld [hSCX], a
call Function41427 call Pokedex_ApplyUsualPals
ret ret
Function4038d: ; 4038d Pokedex_RedisplayDexEntry: ; 4038d
call Pokedex_DrawDexEntryScreenBG call Pokedex_DrawDexEntryScreenBG
call Pokedex_GetSelectedMon call Pokedex_GetSelectedMon
callba DisplayDexEntry callba DisplayDexEntry
@@ -499,7 +499,7 @@ Pokedex_InitOptionScreen: ; 4039d (10:439d)
call Pokedex_InitArrowCursor call Pokedex_InitArrowCursor
ld a, [wCurrentDexMode] ld a, [wCurrentDexMode]
ld [wDexArrowCursorPosIndex], a ld [wDexArrowCursorPosIndex], a
call Function40e5b call Pokedex_DisplayModeDescription
call WaitBGMap call WaitBGMap
ld a, $10 ld a, $10
call Pokedex_GetSGBLayout call Pokedex_GetSGBLayout
@@ -509,85 +509,86 @@ Pokedex_InitOptionScreen: ; 4039d (10:439d)
Pokedex_UpdateOptionScreen: ; 403be (10:43be) Pokedex_UpdateOptionScreen: ; 403be (10:43be)
ld a, [wUnlockedUnownMode] ld a, [wUnlockedUnownMode]
and a and a
jr nz, .asm_403c9 jr nz, .okay
ld de, Unknown_403f3 ld de, .NoUnownModeArrowCursorData
jr .asm_403cc jr .okay2
.okay
.asm_403c9 ld de, .ArrowCursorData
ld de, Unknown_403fb .okay2
.asm_403cc
call Pokedex_MoveArrowCursor call Pokedex_MoveArrowCursor
call c, Function40e5b call c, Pokedex_DisplayModeDescription
ld hl, hJoyPressed ; $ffa7 ld hl, hJoyPressed
ld a, [hl] ld a, [hl]
and $6 and SELECT | B_BUTTON
jr nz, .asm_403ea jr nz, .return_to_main_screen
ld a, [hl] ld a, [hl]
and $1 and A_BUTTON
jr nz, .asm_403e0 jr nz, .do_menu_action
ret ret
.asm_403e0 .do_menu_action
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
ld hl, Jumptable_40405 ld hl, .MenuActionJumptable
call Pokedex_LoadPointer call Pokedex_LoadPointer
jp [hl] jp [hl]
.asm_403ea .return_to_main_screen
call Pokedex_BlackOutBG call Pokedex_BlackOutBG
ld a, $0 ld a, $0
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
Unknown_403f3: ; 403f3 .NoUnownModeArrowCursorData: ; 403f3
db D_UP | D_DOWN, 3 db D_UP | D_DOWN, 3
dwcoord 2, 4 dwcoord 2, 4
dwcoord 2, 6 dwcoord 2, 6
dwcoord 2, 8 dwcoord 2, 8
Unknown_403fb: ; 403fb .ArrowCursorData: ; 403fb
db D_UP | D_DOWN, 4 db D_UP | D_DOWN, 4
dwcoord 2, 4 dwcoord 2, 4
dwcoord 2, 6 dwcoord 2, 6
dwcoord 2, 8 dwcoord 2, 8
dwcoord 2, 10 dwcoord 2, 10
Jumptable_40405: ; 40405 (10:4405) .MenuActionJumptable: ; 40405 (10:4405)
dw Function4040d dw .MenuAction_NewMode
dw Function40411 dw .MenuAction_OldMode
dw Function40415 dw .MenuAction_ABCMode
dw Function4043a dw .MenuAction_UnownMode
Function4040d: ; 4040d (10:440d) .MenuAction_NewMode: ; 4040d (10:440d)
ld b, DEXMODE_NEW ld b, DEXMODE_NEW
jr Function40417 jr .ChangeMode
Function40411: ; 40411 (10:4411) .MenuAction_OldMode: ; 40411 (10:4411)
ld b, DEXMODE_OLD ld b, DEXMODE_OLD
jr Function40417 jr .ChangeMode
Function40415: ; 40415 (10:4415) .MenuAction_ABCMode: ; 40415 (10:4415)
ld b, DEXMODE_ABC ld b, DEXMODE_ABC
Function40417: ; 40417 (10:4417)
.ChangeMode: ; 40417 (10:4417)
ld a, [wCurrentDexMode] ld a, [wCurrentDexMode]
cp b cp b
jr z, .asm_40431 jr z, .skip_changing_mode ; Skip if new mode is same as current.
ld a, b ld a, b
ld [wCurrentDexMode], a ld [wCurrentDexMode], a
call Pokedex_ChangeMode call Pokedex_OrderMonsByMode
call Function40f08 call Pokedex_DisplayChangingModesMessage
xor a xor a
ld [wDexListingScrollOffset], a ld [wDexListingScrollOffset], a
ld [wDexListingCursor], a ld [wDexListingCursor], a
call Pokedex_InitCursorPosition call Pokedex_InitCursorPosition
.asm_40431 .skip_changing_mode
call Pokedex_BlackOutBG call Pokedex_BlackOutBG
ld a, $0 ld a, $0
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
Function4043a: ; 4043a (10:443a) .MenuAction_UnownMode: ; 4043a (10:443a)
call Pokedex_BlackOutBG call Pokedex_BlackOutBG
ld a, $b ld a, $b
ld [wJumptableIndex], a ld [wJumptableIndex], a
@@ -621,19 +622,19 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471)
ld hl, hJoyPressed ld hl, hJoyPressed
ld a, [hl] ld a, [hl]
and START | B_BUTTON and START | B_BUTTON
jr nz, .asm_40495 jr nz, .cancel
ld a, [hl] ld a, [hl]
and A_BUTTON and A_BUTTON
jr nz, .asm_4048b jr nz, .do_menu_action
ret ret
.asm_4048b .do_menu_action
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
ld hl, .MenuActionJumptable ld hl, .MenuActionJumptable
call Pokedex_LoadPointer call Pokedex_LoadPointer
jp [hl] jp [hl]
.asm_40495 .cancel
call Pokedex_BlackOutBG call Pokedex_BlackOutBG
ld a, $0 ld a, $0
ld [wJumptableIndex], a ld [wJumptableIndex], a
@@ -663,8 +664,10 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471)
ld a, [wDexSearchResultCount] ld a, [wDexSearchResultCount]
and a and a
jr nz, .show_search_results jr nz, .show_search_results
call Pokedex_ChangeMode
call Function41107 ; No mon with matching types was found.
call Pokedex_OrderMonsByMode
call Pokedex_DisplayTypeNotFoundMessage
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Pokedex_DrawSearchScreenBG call Pokedex_DrawSearchScreenBG
@@ -731,13 +734,13 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
ret ret
Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562) Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562)
ld hl, hJoyPressed ; $ffa7 ld hl, hJoyPressed
ld a, [hl] ld a, [hl]
and B_BUTTON and B_BUTTON
jr nz, .asm_40595 jr nz, .return_to_search_screen
ld a, [hl] ld a, [hl]
and A_BUTTON and A_BUTTON
jr nz, .asm_40583 jr nz, .go_to_dex_entry
call Pokedex_ListingHandleDPadInput call Pokedex_ListingHandleDPadInput
ret nc ret nc
call Pokedex_UpdateSearchResultsCursorOAM call Pokedex_UpdateSearchResultsCursorOAM
@@ -748,17 +751,17 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562)
call Pokedex_ResetBGMapMode call Pokedex_ResetBGMapMode
ret ret
.asm_40583 .go_to_dex_entry
call Pokedex_GetSelectedMon call Pokedex_GetSelectedMon
call Pokedex_CheckSeen call Pokedex_CheckSeen
ret z ret z
ld a, $2 ld a, $2
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld a, $9 ld a, $9
ld [wcf64], a ld [wDexEntryPrevJumptableIndex], a
ret ret
.asm_40595 .return_to_search_screen
ld a, [wc7e0] ld a, [wc7e0]
ld [wDexListingScrollOffset], a ld [wDexListingScrollOffset], a
ld a, [wc7e1] ld a, [wc7e1]
@@ -767,7 +770,7 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562)
ld [wLastDexEntry], a ld [wLastDexEntry], a
call Pokedex_BlackOutBG call Pokedex_BlackOutBG
call ClearSprites call ClearSprites
call Pokedex_ChangeMode call Pokedex_OrderMonsByMode
ld a, $5 ld a, $5
ld [wJumptableIndex], a ld [wJumptableIndex], a
xor a xor a
@@ -795,7 +798,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
ld a, [hl] ld a, [hl]
and A_BUTTON | B_BUTTON and A_BUTTON | B_BUTTON
jr nz, .a_b jr nz, .a_b
call Function40610 call Pokedex_UnownModeHandleDPadInput
ret ret
.a_b .a_b
@@ -817,7 +820,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
.done .done
ret ret
Function40610: ; 40610 (10:4610) Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610)
ld hl, hJoyLast ld hl, hJoyLast
ld a, [hl] ld a, [hl]
and D_RIGHT and D_RIGHT
@@ -1047,7 +1050,7 @@ Pokedex_HLDownBRows: ; 40741
ret ret
Pokedex_DrawMainScreenLeftSideAndBottom: ; 4074c (10:474c) Pokedex_DrawMainScreenBG: ; 4074c (10:474c)
; Draws the left sidebar and the bottom bar on the main screen. ; Draws the left sidebar and the bottom bar on the main screen.
hlcoord 0, 17 hlcoord 0, 17
ld de, String_START_SEARCH ld de, String_START_SEARCH
@@ -1593,7 +1596,7 @@ Pokedex_CheckSeen: ; 40bd0
Pokedex_ChangeMode: ; 40bdc Pokedex_OrderMonsByMode: ; 40bdc
ld hl, wPokedexDataStart ld hl, wPokedexDataStart
ld bc, wPokedexMetadata - wPokedexDataStart ld bc, wPokedexMetadata - wPokedexDataStart
xor a xor a
@@ -1694,14 +1697,14 @@ INCLUDE "data/pokedex/order_alpha.asm"
NewPokedexOrder: ; 0x40d60 NewPokedexOrder: ; 0x40d60
INCLUDE "data/pokedex/order_new.asm" INCLUDE "data/pokedex/order_new.asm"
Function40e5b: ; 40e5b Pokedex_DisplayModeDescription: ; 40e5b
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
lb bc, 4, SCREEN_WIDTH - 2 lb bc, 4, SCREEN_WIDTH - 2
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
ld hl, Unknown_40e7d ld hl, .Modes
call Pokedex_LoadPointer call Pokedex_LoadPointer
ld e, l ld e, l
ld d, h ld d, h
@@ -1711,7 +1714,7 @@ Function40e5b: ; 40e5b
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
Unknown_40e7d: ; 40e7d .Modes: ; 40e7d
dw .NewMode dw .NewMode
dw .OldMode dw .OldMode
dw .ABCMode dw .ABCMode
@@ -1733,7 +1736,7 @@ Unknown_40e7d: ; 40e7d
db "UNOWN are listed" db "UNOWN are listed"
next "in catching order.@" next "in catching order.@"
Function40f08: ; 40f08 (10:4f08) Pokedex_DisplayChangingModesMessage: ; 40f08 (10:4f08)
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
@@ -1759,7 +1762,7 @@ String_ChangingModesPleaseWait: ; 40f32
Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f) Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f)
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
cp 2 cp 2
jr nc, .NoChange jr nc, .no_change
ld hl, hJoyLast ld hl, hJoyLast
ld a, [hl] ld a, [hl]
and D_LEFT and D_LEFT
@@ -1767,56 +1770,63 @@ Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f)
ld a, [hl] ld a, [hl]
and D_RIGHT and D_RIGHT
jr nz, Pokedex_NextSearchMonType jr nz, Pokedex_NextSearchMonType
.NoChange .no_change
and a and a
ret ret
Pokedex_PrevSearchMonType: ; 40f65 Pokedex_PrevSearchMonType: ; 40f65
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
and a and a
jr nz, .asm_40f76 jr nz, .type2
ld hl, wDexSearchMonType1 ld hl, wDexSearchMonType1
ld a, [hl] ld a, [hl]
cp $1 cp $1
jr z, .asm_40f80 jr z, .wrap_around
dec [hl] dec [hl]
jr .asm_40f82 jr .done
.asm_40f76
.type2
ld hl, wDexSearchMonType2 ld hl, wDexSearchMonType2
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_40f80 jr z, .wrap_around
dec [hl] dec [hl]
jr .asm_40f82 jr .done
.asm_40f80
.wrap_around
ld [hl], $11 ld [hl], $11
.asm_40f82
.done
scf scf
ret ret
Pokedex_NextSearchMonType: ; 40f84 Pokedex_NextSearchMonType: ; 40f84
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
and a and a
jr nz, .asm_40f99 jr nz, .type2
ld hl, wDexSearchMonType1 ld hl, wDexSearchMonType1
ld a, [hl] ld a, [hl]
cp $11 cp $11
jr nc, .asm_40f95 jr nc, .type1_wrap_around
inc [hl] inc [hl]
jr .asm_40fa6 jr .done
.asm_40f95 .type1_wrap_around
ld [hl], $1 ld [hl], $1
jr .asm_40fa6 jr .done
.asm_40f99
.type2
ld hl, wDexSearchMonType2 ld hl, wDexSearchMonType2
ld a, [hl] ld a, [hl]
cp $11 cp $11
jr nc, .asm_40fa4 jr nc, .type2_wrap_around
inc [hl] inc [hl]
jr .asm_40fa6 jr .done
.asm_40fa4 .type2_wrap_around
ld [hl], $0 ld [hl], 0
.asm_40fa6
.done
scf scf
ret ret
@@ -1965,13 +1975,13 @@ Pokedex_SearchForMons: ; 41086
db DARK db DARK
db STEEL db STEEL
Function41107: ; 41107 Pokedex_DisplayTypeNotFoundMessage: ; 41107
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
hlcoord 0, 12 hlcoord 0, 12
ld bc, $0412 ld bc, $0412
call Pokedex_PlaceBorder call Pokedex_PlaceBorder
ld de, String_41126 ld de, .TypeNotFound
hlcoord 1, 14 hlcoord 1, 14
call PlaceString call PlaceString
ld a, $1 ld a, $1
@@ -1980,7 +1990,7 @@ Function41107: ; 41107
call DelayFrames call DelayFrames
ret ret
String_41126: ; 41126 .TypeNotFound: ; 41126
db "The specified type" db "The specified type"
next "was not found.@" next "was not found.@"
@@ -2213,48 +2223,48 @@ Pokedex_MoveArrowCursor: ; 4135a (10:535a)
ld a, [hl] ld a, [hl]
and D_LEFT | D_UP and D_LEFT | D_UP
and b and b
jr nz, .MoveCursorLeftOrUp jr nz, .move_left_or_up
ld a, [hl] ld a, [hl]
and D_RIGHT | D_DOWN and D_RIGHT | D_DOWN
and b and b
jr nz, .MoveCursorRightOrDown jr nz, .move_right_or_down
ld a, [hl] ld a, [hl]
and SELECT and SELECT
and b and b
jr nz, .Select jr nz, .select
call Pokedex_ArrowCursorDelay call Pokedex_ArrowCursorDelay
jr c, .NoAction jr c, .no_action
ld hl, hJoyLast ld hl, hJoyLast
ld a, [hl] ld a, [hl]
and D_LEFT | D_UP and D_LEFT | D_UP
and b and b
jr nz, .MoveCursorLeftOrUp jr nz, .move_left_or_up
ld a, [hl] ld a, [hl]
and D_RIGHT | D_DOWN and D_RIGHT | D_DOWN
and b and b
jr nz, .MoveCursorRightOrDown jr nz, .move_right_or_down
jr .NoAction jr .no_action
.MoveCursorLeftOrUp .move_left_or_up
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
and a and a
jr z, .NoAction jr z, .no_action
call Pokedex_GetArrowCursorPos call Pokedex_GetArrowCursorPos
ld [hl], " " ld [hl], " "
ld hl, wDexArrowCursorPosIndex ld hl, wDexArrowCursorPosIndex
dec [hl] dec [hl]
jr .UpdateCursorPosition jr .update_cursor_pos
.MoveCursorRightOrDown .move_right_or_down
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
cp c cp c
jr nc, .NoAction jr nc, .no_action
call Pokedex_GetArrowCursorPos call Pokedex_GetArrowCursorPos
ld [hl], " " ld [hl], " "
ld hl, wDexArrowCursorPosIndex ld hl, wDexArrowCursorPosIndex
inc [hl] inc [hl]
.UpdateCursorPosition .update_cursor_pos
call Pokedex_GetArrowCursorPos call Pokedex_GetArrowCursorPos
ld [hl], "▶" ld [hl], "▶"
ld a, 12 ld a, 12
@@ -2264,21 +2274,21 @@ Pokedex_MoveArrowCursor: ; 4135a (10:535a)
scf scf
ret ret
.NoAction .no_action
and a and a
ret ret
.Select .select
call Pokedex_GetArrowCursorPos call Pokedex_GetArrowCursorPos
ld [hl], " " ld [hl], " "
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
cp c cp c
jr c, .Update jr c, .update
ld a, -1 ld a, -1
.Update .update
inc a inc a
ld [wDexArrowCursorPosIndex], a ld [wDexArrowCursorPosIndex], a
jr .UpdateCursorPosition jr .update_cursor_pos
Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4) Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4)
ld a, [wDexArrowCursorPosIndex] ld a, [wDexArrowCursorPosIndex]
@@ -2334,7 +2344,7 @@ Pokedex_BlackOutBG: ; 41401 (10:5401)
pop af pop af
ld [rSVBK], a ld [rSVBK], a
Function41415: ; 41415 Pokedex_ApplyPrintPals: ; 41415
ld a, $ff ld a, $ff
call DmgToCgbBGPals call DmgToCgbBGPals
ld a, $ff ld a, $ff
@@ -2346,7 +2356,8 @@ Pokedex_GetSGBLayout: ; 41423
ld b, a ld b, a
call GetSGBLayout call GetSGBLayout
Function41427: ; 41427 Pokedex_ApplyUsualPals: ; 41427
; This applies the palettes used for most Pokédex screens.
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
ld a, $e0 ld a, $e0

View File

@@ -5864,7 +5864,7 @@ Function11ad1b: ; 11ad1b
ld [wcd30], a ld [wcd30], a
ld a, $2 ld a, $2
ld [wc7d4], a ld [wc7d4], a
callba Pokedex_ChangeMode callba Pokedex_OrderMonsByMode
ret ret
; 11ad6e ; 11ad6e

View File

@@ -1348,6 +1348,7 @@ wIntroSceneFrameCounter::
wHoldingUnownPuzzlePiece:: wHoldingUnownPuzzlePiece::
wCardFlipCursorY:: wCardFlipCursorY::
wCreditsBorderFrame:: wCreditsBorderFrame::
wDexEntryPrevJumptableIndex::
wcf64:: ds 1 wcf64:: ds 1
IF !DEF(CRYSTAL11) IF !DEF(CRYSTAL11)
wPokedexStatus:: wPokedexStatus::