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 ### 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 ```diff
GetPokedexEntryBank: HeavyBall_GetDexEntryBank:
-; This function is buggy. -; This function is buggy.
-; It gets the wrong bank for Kadabra (64), Tauros (128), and Sunflora (192). -; It gets the wrong bank for Kadabra (64), Tauros (128), and Sunflora (192).
-; Uncomment the line below to fix this. -; 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.) `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 ```asm
GetDexEntryPointer: GetDexEntryPointer:
@ -439,10 +439,10 @@ GetDexEntryPointer:
db BANK("Pokedex Entries 193-251") 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 ```asm
GetPokedexEntryBank: HeavyBall_GetDexEntryBank:
push hl push hl
push de push de
ld a, [wEnemyMonSpecies] 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. 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): 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 + pop de
.SkipText: .SkipText:
- call GetPokedexEntryBank - call HeavyBall_GetDexEntryBank
+ ld a, d + ld a, d
call GetFarByte call GetFarByte
inc hl inc hl
cp "@" cp "@"
jr nz, .SkipText jr nz, .SkipText
- call GetPokedexEntryBank - call HeavyBall_GetDexEntryBank
+ ld a, d + ld a, d
push bc push bc
inc hl inc hl

View File

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