shithub: pokecrystal

Download patch

ref: d4074dd3853e819b6e544d296b227550772c73d1
parent: cabf0a5b8762b7781840d7b497962f8262b2941f
author: yenatch <[email protected]>
date: Fri Dec 20 16:16:57 EST 2013

clean up some tileset sections

also found unused metatile/collision data for a 128-block tileset

--- a/contents.asm
+++ b/contents.asm
@@ -1,5 +1,17 @@
 ; Doubles as bank constants.
 
+; main.o
+
+ROOFS                     EQU $7
+TILESETS_1                EQU $6
+TILESETS_2                EQU $7
+TILESETS_3                EQU $8
+TILESETS_4                EQU $C
+TILESETS_5                EQU $2D
+TILESETS_6                EQU $37
+TILESETS_7                EQU $77
+TILESETS_8                EQU $78
+
 
 ; stats/egg_moves.o
 
--- a/main.asm
+++ b/main.asm
@@ -27130,68 +27130,17 @@
 INCBIN "baserom.gbc",$1749c,$174ba - $1749c
 
 
-SECTION "bank6", ROMX, BANK[$6]
+SECTION "Tileset Data 1", ROMX, BANK[TILESETS_1]
 
 INCLUDE "tilesets/data_1.asm"
 
 
-SECTION "bank7", ROMX, BANK[$7]
+SECTION "Roofs", ROMX, BANK[ROOFS]
 
-LoadMapGroupRoof: ; 1c000
-	ld a, [MapGroup]
-	ld e, a
-	ld d, 0
-	ld hl, MapGroupRoofs
-	add hl, de
-	ld a, [hl]
-	cp $ff
-	ret z
-	ld hl, Roofs
-	ld bc, $90
-	call AddNTimes
-	ld de, $90a0
-	ld bc, $90
-	call CopyBytes
-	ret
-; 1c021
+INCLUDE "tilesets/roofs.asm"
 
-MapGroupRoofs: ; 1c021i
-	db -1 ; group 1
-	db  3 ; group 2
-	db  2 ; group 3
-	db -1 ; group 4
-	db  1 ; group 5
-	db  2 ; group 6
-	db -1 ; group 7
-	db -1 ; group 8
-	db  2 ; group 9
-	db  2 ; group 10
-	db  1 ; group 11
-	db  4 ; group 12
-	db -1 ; group 13
-	db -1 ; group 14
-	db -1 ; group 15
-	db -1 ; group 16
-	db -1 ; group 17
-	db -1 ; group 18
-	db -1 ; group 19
-	db  0 ; group 20
-	db -1 ; group 21
-	db -1 ; group 22
-	db  3 ; group 23
-	db -1 ; group 24
-	db  0 ; group 25
-	db -1 ; group 26
-	db  0 ; group 27
-; 1c03c
 
-Roofs: ; 1c03c
-INCBIN "gfx/tilesets/roofs/0.2bpp"
-INCBIN "gfx/tilesets/roofs/1.2bpp"
-INCBIN "gfx/tilesets/roofs/2.2bpp"
-INCBIN "gfx/tilesets/roofs/3.2bpp"
-INCBIN "gfx/tilesets/roofs/4.2bpp"
-; 1c30c
+SECTION "Tileset Data 2", ROMX, BANK[TILESETS_2]
 
 INCLUDE "tilesets/data_2.asm"
 
@@ -27408,9 +27357,10 @@
 
 INCBIN "baserom.gbc",$2017c,$20181 - $2017c
 
-INCLUDE "tilesets/data_3.asm"
 
+SECTION "Tileset Data 3", ROMX, BANK[TILESETS_3]
 
+INCLUDE "tilesets/data_3.asm"
 
 
 SECTION "bank9", ROMX, BANK[$9]
@@ -37333,14 +37283,11 @@
 ; 2ef9f
 
 
+SECTION "Tileset Data 4", ROMX, BANK[TILESETS_4]
 
-SECTION "bankC", ROMX, BANK[$C]
-
 INCLUDE "tilesets/data_4.asm"
 
-INCBIN "baserom.gbc",$329f0,$333f0 - $329f0
 
-
 SECTION "bankD", ROMX, BANK[$D]
 
 INCLUDE "battle/effect_commands.asm"
@@ -71921,7 +71868,7 @@
 INCLUDE "maps/blockdata_3.asm"
 
 
-SECTION "bank2D", ROMX, BANK[$2D]
+SECTION "Tileset Data 5", ROMX, BANK[TILESETS_5]
 
 INCLUDE "tilesets/data_5.asm"
 
@@ -74533,7 +74480,7 @@
 INCLUDE "gfx/pics/unown_frames.asm"
 
 
-SECTION "bank37", ROMX, BANK[$37]
+SECTION "Tileset Data 6", ROMX, BANK[TILESETS_6]
 
 INCLUDE "tilesets/data_6.asm"
 
@@ -100099,7 +100046,7 @@
 ; 1df238
 
 
-SECTION "bank78", ROMX, BANK[$78]
+SECTION "Tileset Data 8", ROMX, BANK[TILESETS_8]
 
 INCLUDE "tilesets/data_8.asm"
 
--- a/tilesets/data_2.asm
+++ b/tilesets/data_2.asm
@@ -52,11 +52,11 @@
 
 Tileset24Meta: ; 0x1ee1c
 Tileset30Meta: ; 0x1ee1c
-INCBIN "tilesets/30_metatiles.bin"
+INCBIN "tilesets/24_metatiles.bin"
 ; 0x1f21c
 
 Tileset24Coll: ; 0x1f21c
 Tileset30Coll: ; 0x1f21c
-INCBIN "tilesets/30_collision.bin"
+INCBIN "tilesets/24_collision.bin"
 ; 0x1f31c
 
--- a/tilesets/data_4.asm
+++ b/tilesets/data_4.asm
@@ -50,3 +50,11 @@
 INCBIN "gfx/tilesets/30.lz"
 ; 0x329f0
 
+UnusedTileset30Meta: ; 0x329f0
+INCBIN "tilesets/unused_30_metatiles.bin"
+; 0x331f0
+
+UnusedTileset30Coll: ; 0x331f0
+INCBIN "tilesets/unused_30_collision.bin"
+; 0x333f0
+
--- a/tilesets/data_7.asm
+++ b/tilesets/data_7.asm
@@ -4,7 +4,7 @@
 Tileset34GFX: ; 0x1dc5a1
 Tileset35GFX: ; 0x1dc5a1
 Tileset36GFX: ; 0x1dc5a1
-INCBIN "gfx/tilesets/36.lz"
+INCBIN "gfx/tilesets/26.lz"
 ; 0x1dd1a9
 
 Tileset26Meta: ; 0x1dd1a9
--- /dev/null
+++ b/tilesets/roofs.asm
@@ -1,0 +1,56 @@
+
+LoadMapGroupRoof: ; 1c000
+	ld a, [MapGroup]
+	ld e, a
+	ld d, 0
+	ld hl, MapGroupRoofs
+	add hl, de
+	ld a, [hl]
+	cp $ff
+	ret z
+	ld hl, Roofs
+	ld bc, $90
+	call AddNTimes
+	ld de, $90a0
+	ld bc, $90
+	call CopyBytes
+	ret
+; 1c021
+
+MapGroupRoofs: ; 1c021i
+	db -1 ; group 1
+	db  3 ; group 2
+	db  2 ; group 3
+	db -1 ; group 4
+	db  1 ; group 5
+	db  2 ; group 6
+	db -1 ; group 7
+	db -1 ; group 8
+	db  2 ; group 9
+	db  2 ; group 10
+	db  1 ; group 11
+	db  4 ; group 12
+	db -1 ; group 13
+	db -1 ; group 14
+	db -1 ; group 15
+	db -1 ; group 16
+	db -1 ; group 17
+	db -1 ; group 18
+	db -1 ; group 19
+	db  0 ; group 20
+	db -1 ; group 21
+	db -1 ; group 22
+	db  3 ; group 23
+	db -1 ; group 24
+	db  0 ; group 25
+	db -1 ; group 26
+	db  0 ; group 27
+; 1c03c
+
+Roofs: ; 1c03c
+INCBIN "gfx/tilesets/roofs/0.2bpp"
+INCBIN "gfx/tilesets/roofs/1.2bpp"
+INCBIN "gfx/tilesets/roofs/2.2bpp"
+INCBIN "gfx/tilesets/roofs/3.2bpp"
+INCBIN "gfx/tilesets/roofs/4.2bpp"
+; 1c30c
binary files /dev/null b/tilesets/unused_30_collision.bin differ
binary files /dev/null b/tilesets/unused_30_metatiles.bin differ