shithub: pokecrystal

Download patch

ref: 2910b9a6c21862ed422227846481fafff15a8f7c
parent: 0d6fae45a55bc562e125907f480eeeab47cbe28d
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Feb 22 12:11:33 EST 2022

Rename `GetPokedexEntryBank` to `HeavyBall_GetDexEntryBank`

--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1171,10 +1171,10 @@
 
 ### 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.
--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -403,7 +403,7 @@
 
 `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 @@
 	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 @@
 
 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,7 +569,7 @@
 +	pop de
 
  .SkipText:
--	call GetPokedexEntryBank
+-	call HeavyBall_GetDexEntryBank
 +	ld a, d
  	call GetFarByte
  	inc hl
@@ -576,7 +576,7 @@
  	cp "@"
  	jr nz, .SkipText
 
--	call GetPokedexEntryBank
+-	call HeavyBall_GetDexEntryBank
 +	ld a, d
  	push bc
  	inc hl
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -760,7 +760,7 @@
 	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 @@
 	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