summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2022-02-22 17:11:33 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2022-02-22 17:11:33 -0500
commit2910b9a6c21862ed422227846481fafff15a8f7c (patch)
tree4df8340cae6a4f4274b7804c31af65a42c1a76ec
parent0d6fae45a55bc562e125907f480eeeab47cbe28d (diff)
Rename `GetPokedexEntryBank` to `HeavyBall_GetDexEntryBank`
-rw-r--r--docs/bugs_and_glitches.md4
-rw-r--r--docs/design_flaws.md12
-rw-r--r--engine/items/item_effects.asm6
3 files changed, 11 insertions, 11 deletions
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md
index 328192a7a..6f7cc88fa 100644
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -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.
diff --git a/docs/design_flaws.md b/docs/design_flaws.md
index 70f441ff2..f778a1e98 100644
--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -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
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 1c73c7c8f..c9c7c1b87 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -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