shithub: pokecrystal

Download patch

ref: c7bb2d15cfb32a5e965933b90e0acb497c7bf7b2
parent: 7cd5bcbae4a35471fe8473a63526d73e71b193cc
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Jun 3 19:25:21 EDT 2018

Create empty sections for the remaining FixPicBank array entries

--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -66,11 +66,11 @@
 	db BANK("Pics 17") ; BANK("Pics 1") + 16
 	db BANK("Pics 18") ; BANK("Pics 1") + 17
 	db BANK("Pics 19") ; BANK("Pics 1") + 18
-	db BANK("Pics 1") + 19
-	db BANK("Pics 1") + 20
-	db BANK("Pics 1") + 21
-	db BANK("Pics 1") + 22
-	db BANK("Pics 1") + 23
+	db BANK("Pics 20") ; BANK("Pics 1") + 19
+	db BANK("Pics 21") ; BANK("Pics 1") + 20
+	db BANK("Pics 22") ; BANK("Pics 1") + 21
+	db BANK("Pics 23") ; BANK("Pics 1") + 22
+	db BANK("Pics 24") ; BANK("Pics 1") + 23
 ```
 
 **Fix:** Use `dba` instead of `dba_pic`, delete `FixPicBank`, and remove all four calls to `FixPicBank`.
--- a/engine/gfx/load_pics.asm
+++ b/engine/gfx/load_pics.asm
@@ -282,11 +282,11 @@
 	db BANK("Pics 17") ; BANK("Pics 1") + 16
 	db BANK("Pics 18") ; BANK("Pics 1") + 17
 	db BANK("Pics 19") ; BANK("Pics 1") + 18
-	db BANK("Pics 1") + 19
-	db BANK("Pics 1") + 20
-	db BANK("Pics 1") + 21
-	db BANK("Pics 1") + 22
-	db BANK("Pics 1") + 23
+	db BANK("Pics 20") ; BANK("Pics 1") + 19
+	db BANK("Pics 21") ; BANK("Pics 1") + 20
+	db BANK("Pics 22") ; BANK("Pics 1") + 21
+	db BANK("Pics 23") ; BANK("Pics 1") + 22
+	db BANK("Pics 24") ; BANK("Pics 1") + 23
 
 Function511ec: ; 511ec
 	ld a, c
--- a/gfx/pics.asm
+++ b/gfx/pics.asm
@@ -793,3 +793,21 @@
 INCBIN "gfx/pokemon/unown_p/back.2bpp.lz"
 INCBIN "gfx/pokemon/unown_i/back.2bpp.lz"
 INCBIN "gfx/pokemon/unown_r/back.2bpp.lz"
+
+
+; Sections "Pics 20" to "Pics 24" are not used for any graphics,
+; but entries for their banks exist in FixPicBank (see engine/gfx/load_pics.asm).
+
+SECTION "Pics 20", ROMX
+
+
+SECTION "Pics 21", ROMX
+
+
+SECTION "Pics 22", ROMX
+
+
+SECTION "Pics 23", ROMX
+
+
+SECTION "Pics 24", ROMX
--- a/pokecrystal.link
+++ b/pokecrystal.link
@@ -234,17 +234,22 @@
 	"Pics 19"
 ROMX $5b
 	"bank5B"
+	"Pics 20"
 ROMX $5c
 	"Mobile 5C"
+	"Pics 21"
 ROMX $5d
 	"Crystal Phone Text 2"
+	"Pics 22"
 ROMX $5e
 	"UpdateBattleHUDs"
 	"Songs 5"
 	"Crystal Sound Effects"
 	"Mobile 5E"
+	"Pics 23"
 ROMX $5f
 	"Mobile 5F"
+	"Pics 24"
 ROMX $60
 	"Map Scripts 13"
 	"Pokedex Entries 001-064"