Rename GetPokedexEntryBank to HeavyBall_GetDexEntryBank

This commit is contained in:
Rangi 2022-02-22 17:11:33 -05:00
parent 0d6fae45a5
commit 2910b9a6c2
3 changed files with 11 additions and 11 deletions

View File

@ -1171,10 +1171,10 @@ This can occur if your party and current PC box are both full when you start the
### Heavy Ball uses wrong weight value for three Pokémon
**Fix:** Edit `GetPokedexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):
**Fix:** Edit `HeavyBall_GetDexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):
```diff
GetPokedexEntryBank:
HeavyBall_GetDexEntryBank:
-; This function is buggy.
-; It gets the wrong bank for Kadabra (64), Tauros (128), and Sunflora (192).
-; Uncomment the line below to fix this.

View File

@ -403,7 +403,7 @@ Edit [engine/items/items.asm](https://github.com/pret/pokecrystal/blob/master/en
`PokedexDataPointerTable` in [data/pokemon/dex_entry_pointers.asm](https://github.com/pret/pokecrystal/blob/master/data/pokemon/dex_entry_pointers.asm) is a table of `dw`, not `dba`, yet there are four banks used for Pokédex entries. The correct bank is derived from the species ID at the beginning of each Pokémon's base stats. (This is the only use the base stat species ID has.)
Three separate routines do the same derivation; `GetDexEntryPointer` in [engine/pokedex/pokedex_2.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex_2.asm):
Three separate routines do the same derivation: `GetDexEntryPointer` in [engine/pokedex/pokedex_2.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex_2.asm):
```asm
GetDexEntryPointer:
@ -439,10 +439,10 @@ GetDexEntryPointer:
db BANK("Pokedex Entries 193-251")
```
`GetPokedexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):
`HeavyBall_GetDexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm):
```asm
GetPokedexEntryBank:
HeavyBall_GetDexEntryBank:
push hl
push de
ld a, [wEnemyMonSpecies]
@ -496,7 +496,7 @@ PokedexShow_GetDexEntryBank:
Use `dba` instead of `dw` in `PokedexDataPointerTable`. Make sure to edit the `table_width` line to specify a width of 3 instead of 2.
Delete `GetPokedexEntryBank` and `PokedexShow_GetDexEntryBank`. You can also delete `NUM_DEX_ENTRY_BANKS` from [constants/pokemon_data_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/pokemon_data_constants.asm).
Delete `HeavyBall_GetDexEntryBank` and `PokedexShow_GetDexEntryBank`. You can also delete `NUM_DEX_ENTRY_BANKS` from [constants/pokemon_data_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/pokemon_data_constants.asm).
Edit [engine/pokedex/pokedex_2.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex_2.asm):
@ -569,14 +569,14 @@ Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/ma
+ pop de
.SkipText:
- call GetPokedexEntryBank
- call HeavyBall_GetDexEntryBank
+ ld a, d
call GetFarByte
inc hl
cp "@"
jr nz, .SkipText
- call GetPokedexEntryBank
- call HeavyBall_GetDexEntryBank
+ ld a, d
push bc
inc hl

View File

@ -760,7 +760,7 @@ ParkBallMultiplier:
ld b, $ff
ret
GetPokedexEntryBank:
HeavyBall_GetDexEntryBank:
; This function is buggy.
; It gets the wrong bank for Kadabra (64), Tauros (128), and Sunflora (192).
; Uncomment the line below to fix this.
@ -803,13 +803,13 @@ HeavyBallMultiplier:
call GetFarWord
.SkipText:
call GetPokedexEntryBank
call HeavyBall_GetDexEntryBank
call GetFarByte
inc hl
cp "@"
jr nz, .SkipText
call GetPokedexEntryBank
call HeavyBall_GetDexEntryBank
push bc
inc hl
inc hl