diff options
| author | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
| commit | a02a98ee7ada1a658e28698484058be2796dc0df (patch) | |
| tree | 945986054565bd8b5212fc755415096050d1d3a8 /engine/menus/pokedex.asm | |
| parent | Use long option flags for rgbgfx, same as tools/gfx (diff) | |
| parent | Use `const_skip` (diff) | |
| download | pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/menus/pokedex.asm')
| -rw-r--r-- | engine/menus/pokedex.asm | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm index 899b70ed..f4637cd0 100644 --- a/engine/menus/pokedex.asm +++ b/engine/menus/pokedex.asm @@ -9,7 +9,7 @@ ShowPokedexMenu: ld [wListScrollOffset], a ld [wLastMenuItem], a inc a - ld [wd11e], a + ld [wPokedexNum], a ldh [hJoy7], a .setUpGraphics callfar LoadPokedexTilePatterns @@ -37,7 +37,7 @@ ShowPokedexMenu: ld [wCurrentMenuItem], a ld [wLastMenuItem], a ldh [hJoy7], a - ld [wUnusedCD3A], a + ld [wUnusedOverrideSimulatedJoypadStatesIndex], a ld [wOverrideSimulatedJoypadStatesMask], a pop af ld [wListScrollOffset], a @@ -72,8 +72,8 @@ HandlePokedexSideMenu: push af add b inc a - ld [wd11e], a - ld a, [wd11e] + ld [wPokedexNum], a + ld a, [wPokedexNum] push af ld a, [wDexMaxSeenMon] push af ; this doesn't need to be preserved @@ -124,7 +124,7 @@ ENDC pop af ld [wDexMaxSeenMon], a pop af - ld [wd11e], a + ld [wPokedexNum], a pop af ld [wListScrollOffset], a pop af @@ -157,7 +157,7 @@ ENDC ; play pokemon cry .choseCry - ld a, [wd11e] + ld a, [wPokedexNum] call GetCryData call PlaySound jr .handleMenuInput @@ -172,8 +172,8 @@ ENDC push af xor a ldh [hTileAnimations], a - ld a, [wd11e] - ld [wcf91], a + ld a, [wPokedexNum] + ld [wCurPartySpecies], a callfar PrintPokedexEntry xor a ldh [hAutoBGTransferEnabled], a @@ -359,7 +359,7 @@ Pokedex_PlacePokemonList: call ClearScreenArea hlcoord 1, 3 ld a, [wListScrollOffset] - ld [wd11e], a + ld [wPokedexNum], a ld d, 7 ld a, [wDexMaxSeenMon] cp 7 @@ -370,17 +370,17 @@ Pokedex_PlacePokemonList: ; loop to print pokemon pokedex numbers and names ; if the player has owned the pokemon, it puts a pokeball beside the name .printPokemonLoop - ld a, [wd11e] + ld a, [wPokedexNum] inc a - ld [wd11e], a + ld [wPokedexNum], a push af push de push hl ld de, -SCREEN_WIDTH add hl, de - ld de, wd11e + ld de, wPokedexNum lb bc, LEADING_ZEROES | 1, 3 - call PrintNumber ; print the pokedex number + call PrintNumber ld de, SCREEN_WIDTH add hl, de dec hl @@ -413,7 +413,7 @@ Pokedex_PlacePokemonList: add hl, bc pop de pop af - ld [wd11e], a + ld [wPokedexNum], a dec d jr nz, .printPokemonLoop ld a, 01 @@ -423,10 +423,10 @@ Pokedex_PlacePokemonList: ; tests if a pokemon's bit is set in the seen or owned pokemon bit fields ; INPUT: -; [wd11e] = pokedex number +; [wPokedexNum] = pokedex number ; hl = address of bit field IsPokemonBitSet: - ld a, [wd11e] + ld a, [wPokedexNum] dec a ld c, a ld b, FLAG_TEST @@ -444,8 +444,8 @@ ShowPokedexData: ; function to display pokedex data from inside the pokedex ShowPokedexDataInternal: - ld hl, wd72c - set 1, [hl] + ld hl, wStatusFlags2 + set BIT_NO_AUDIO_FADE_OUT, [hl] ld a, $33 ; 3/7 volume ldh [rNR50], a ldh a, [hTileAnimations] @@ -453,13 +453,13 @@ ShowPokedexDataInternal: xor a ldh [hTileAnimations], a call GBPalWhiteOut ; zero all palettes - ld a, [wd11e] ; pokemon ID - ld [wcf91], a + ld a, [wPokedexNum] + ld [wCurPartySpecies], a push af ld b, SET_PAL_POKEDEX call RunPaletteCommand pop af - ld [wd11e], a + ld [wPokedexNum], a call DrawDexEntryOnScreen call c, Pokedex_PrintFlavorTextAtRow11 .waitForButtonPress @@ -474,8 +474,8 @@ ShowPokedexDataInternal: call RunDefaultPaletteCommand call LoadTextBoxTilePatterns call GBPalNormal - ld hl, wd72c - res 1, [hl] + ld hl, wStatusFlags2 + res BIT_NO_AUDIO_FADE_OUT, [hl] ld a, $77 ; max volume ldh [rNR50], a ret @@ -537,7 +537,7 @@ DrawDexEntryOnScreen: call PlaceString ld hl, PokedexEntryPointers - ld a, [wd11e] + ld a, [wPokedexNum] dec a ld e, a ld d, 0 @@ -553,7 +553,7 @@ DrawDexEntryOnScreen: ld h, b ld l, c push de - ld a, [wd11e] + ld a, [wPokedexNum] push af call IndexToPokedex @@ -562,16 +562,16 @@ DrawDexEntryOnScreen: ld [hli], a ld a, "<DOT>" ld [hli], a - ld de, wd11e + ld de, wPokedexNum lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; print pokedex number ld hl, wPokedexOwned call IsPokemonBitSet pop af - ld [wd11e], a - ld a, [wcf91] - ld [wd0b5], a + ld [wPokedexNum], a + ld a, [wCurPartySpecies] + ld [wCurSpecies], a pop de push af @@ -584,8 +584,8 @@ DrawDexEntryOnScreen: call GetMonHeader ; load pokemon picture location hlcoord 1, 1 call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture - ld a, [wcf91] - call PlayCry ; play pokemon cry + ld a, [wCurPartySpecies] + call PlayCry pop hl pop de @@ -712,10 +712,10 @@ DrawTileLine: INCLUDE "data/pokemon/dex_entries.asm" PokedexToIndex: - ; converts the Pokédex number at wd11e to an index + ; converts the Pokédex number at [wPokedexNum] to an index push bc push hl - ld a, [wd11e] + ld a, [wPokedexNum] ld b, a ld c, 0 ld hl, PokedexOrder @@ -727,23 +727,23 @@ PokedexToIndex: jr nz, .loop ld a, c - ld [wd11e], a + ld [wPokedexNum], a pop hl pop bc ret IndexToPokedex: - ; converts the index number at wd11e to a Pokédex number + ; converts the index number at [wPokedexNum] to a Pokédex number push bc push hl - ld a, [wd11e] + ld a, [wPokedexNum] dec a ld hl, PokedexOrder ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wd11e], a + ld [wPokedexNum], a pop hl pop bc ret |
