shithub: pokecrystal

Download patch

ref: bdc95598d7796d2802295f221d08eef3abb68cec
parent: c6a4d35d57670e73d5011bf09e6ee6345dd77f3f
author: Remy Oukaour <[email protected]>
date: Thu Jan 11 22:07:48 EST 2018

Easier to find palette data

--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -18,6 +18,7 @@
 ; - MapGroupPointers (see maps/map_headers.asm)
 ; - MapGroupRoofs (see data/maps/roofs.asm)
 ; - OutdoorSprites (see data/maps/outdoor_sprites.asm)
+; - RoofPals (see gfx/tilesets/roofs.pal)
 ; `mapgroup` indexes are for the sub-tables of MapGroupPointers (see maps/map_headers.asm)
 	const_def
 
--- a/constants/sprite_data_constants.asm
+++ b/constants/sprite_data_constants.asm
@@ -26,6 +26,7 @@
 	const PAL_OW_ROCK   ; 7
 
 ; object_events set bit 3 so as not to use the sprite's default palette
+; MapObjectPals indexes (see gfx/overworld/npc_sprites.pal)
 const_value set (1 << 3)
 	const PAL_NPC_RED    ; 8
 	const PAL_NPC_BLUE   ; 9
--- a/constants/tileset_constants.asm
+++ b/constants/tileset_constants.asm
@@ -38,6 +38,7 @@
 	const TILESET_AERODACTYL_WORD_ROOM ; 24
 
 ; bg palette values (see gfx/tilesets/*_palette_map.asm)
+; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal)
 	const_def
 	const PAL_BG_GRAY   ; 0
 	const PAL_BG_RED    ; 1
--- a/data/maps/sgb_roofs.asm
+++ /dev/null
@@ -1,32 +1,0 @@
-; Crystal does not support SGB, so this is unused.
-
-MapGroupRoofSGBPalInds: ; 8a45
-; entries correspond to map groups
-	db $00 ; group 0 (unused)
-	db $12 ; group 1 (Olivine)
-	db $14 ; group 2 (Mahogany)
-	db $18 ; group 3 (dungeons)
-	db $11 ; group 4 (Ecruteak)
-	db $15 ; group 5 (Blackthorn)
-	db $09 ; group 6 (Cinnabar)
-	db $04 ; group 7 (Cerulean)
-	db $0f ; group 8 (Azalea)
-	db $16 ; group 9 (Lake of Rage)
-	db $0e ; group 10 (Violet)
-	db $10 ; group 11 (Goldenrod)
-	db $06 ; group 12 (Vermilion)
-	db $01 ; group 13 (Pallet)
-	db $03 ; group 14 (Pewter)
-	db $06 ; group 15 (Mount Moon Square)
-	db $0b ; group 16 (Indigo)
-	db $08 ; group 17 (Fuchsia)
-	db $05 ; group 18 (Lavender)
-	db $17 ; group 19 (Silver Cave)
-	db $08 ; group 20 (Cable Club)
-	db $07 ; group 21 (Celadon)
-	db $13 ; group 22 (Cianwood)
-	db $02 ; group 23 (Viridian)
-	db $0c ; group 24 (New Bark)
-	db $0a ; group 25 (Saffron)
-	db $0d ; group 26 (Cherrygrove)
-; 8a60
--- a/engine/sgb_layouts.asm
+++ b/engine/sgb_layouts.asm
@@ -596,7 +596,7 @@
 	ret
 ; 8a45
 
-INCLUDE "data/maps/sgb_roofs.asm"
+INCLUDE "gfx/sgb/roof_pal_inds.asm"
 
 _LoadSGBLayout_ReturnFromJumpTable: ; 8a60
 	push de
--- /dev/null
+++ b/gfx/sgb/roof_pal_inds.asm
@@ -1,0 +1,32 @@
+; Crystal does not support SGB, so this is unused.
+
+MapGroupRoofSGBPalInds: ; 8a45
+; entries correspond to map groups
+	db $00 ; group 0 (unused)
+	db $12 ; group 1 (Olivine)
+	db $14 ; group 2 (Mahogany)
+	db $18 ; group 3 (dungeons)
+	db $11 ; group 4 (Ecruteak)
+	db $15 ; group 5 (Blackthorn)
+	db $09 ; group 6 (Cinnabar)
+	db $04 ; group 7 (Cerulean)
+	db $0f ; group 8 (Azalea)
+	db $16 ; group 9 (Lake of Rage)
+	db $0e ; group 10 (Violet)
+	db $10 ; group 11 (Goldenrod)
+	db $06 ; group 12 (Vermilion)
+	db $01 ; group 13 (Pallet)
+	db $03 ; group 14 (Pewter)
+	db $06 ; group 15 (Mount Moon Square)
+	db $0b ; group 16 (Indigo)
+	db $08 ; group 17 (Fuchsia)
+	db $05 ; group 18 (Lavender)
+	db $17 ; group 19 (Silver Cave)
+	db $08 ; group 20 (Cable Club)
+	db $07 ; group 21 (Celadon)
+	db $13 ; group 22 (Cianwood)
+	db $02 ; group 23 (Viridian)
+	db $0c ; group 24 (New Bark)
+	db $0a ; group 25 (Saffron)
+	db $0d ; group 26 (Cherrygrove)
+; 8a60
--- a/gfx/tilesets/roofs.pal
+++ b/gfx/tilesets/roofs.pal
@@ -1,161 +1,107 @@
 ; group 0 (unused)
-	RGB 21, 21, 21
-	RGB 11, 11, 11
-	RGB 21, 21, 21
-	RGB 11, 11, 11
+	RGB 21,21,21, 11,11,11 ; morn/day
+	RGB 21,21,21, 11,11,11; nite
 
 ; group 1 (Olivine)
-	RGB 14, 17, 31
-	RGB 07, 11, 15
-	RGB 09, 09, 17
-	RGB 05, 07, 13
+	RGB 14,17,31, 07,11,15 ; morn/day
+	RGB 09,09,17, 05,07,13; nite
 
 ; group 2 (Mahogany)
-	RGB 12, 19, 00
-	RGB 06, 10, 00
-	RGB 06, 09, 07
-	RGB 04, 05, 06
+	RGB 12,19,00, 06,10,00 ; morn/day
+	RGB 06,09,07, 04,05,06; nite
 
 ; group 3 (dungeons)
-	RGB 21, 21, 21
-	RGB 11, 11, 11
-	RGB 21, 21, 21
-	RGB 17, 08, 07
+	RGB 21,21,21, 11,11,11 ; morn/day
+	RGB 21,21,21, 17,08,07; nite
 
 ; group 4 (Ecruteak)
-	RGB 31, 19, 00
-	RGB 27, 10, 05
-	RGB 15, 07, 02
-	RGB 11, 04, 02
+	RGB 31,19,00, 27,10,05 ; morn/day
+	RGB 15,07,02, 11,04,02; nite
 
 ; group 5 (Blackthorn)
-	RGB 11, 10, 16
-	RGB 05, 06, 07
-	RGB 03, 04, 08
-	RGB 00, 00, 00
+	RGB 11,10,16, 05,06,07 ; morn/day
+	RGB 03,04,08, 00,00,00; nite
 
 ; group 6 (Cinnabar)
-	RGB 31, 10, 00
-	RGB 18, 06, 00
-	RGB 18, 05, 09
-	RGB 17, 08, 07
+	RGB 31,10,00, 18,06,00 ; morn/day
+	RGB 18,05,09, 17,08,07; nite
 
 ; group 7 (Cerulean)
-	RGB 17, 27, 31
-	RGB 05, 15, 31
-	RGB 07, 08, 22
-	RGB 07, 07, 16
+	RGB 17,27,31, 05,15,31 ; morn/day
+	RGB 07,08,22, 07,07,16; nite
 
 ; group 8 (Azalea)
-	RGB 22, 20, 10
-	RGB 17, 14, 03
-	RGB 11, 11, 05
-	RGB 10, 09, 07
+	RGB 22,20,10, 17,14,03 ; morn/day
+	RGB 11,11,05, 10,09,07; nite
 
 ; group 9 (Lake of Rage)
-	RGB 31, 08, 04
-	RGB 09, 09, 08
-	RGB 18, 05, 09
-	RGB 09, 09, 08
+	RGB 31,08,04, 09,09,08 ; morn/day
+	RGB 18,05,09, 09,09,08; nite
 
 ; group 10 (Violet)
-	RGB 24, 14, 31
-	RGB 13, 07, 21
-	RGB 12, 03, 18
-	RGB 09, 03, 15
+	RGB 24,14,31, 13,07,21 ; morn/day
+	RGB 12,03,18, 09,03,15; nite
 
 ; group 11 (Goldenrod)
-	RGB 25, 25, 00
-	RGB 20, 17, 08
-	RGB 12, 12, 00
-	RGB 10, 09, 05
+	RGB 25,25,00, 20,17,08 ; morn/day
+	RGB 12,12,00, 10,09,05; nite
 
 ; group 12 (Vermilion)
-	RGB 27, 23, 01
-	RGB 23, 11, 00
-	RGB 15, 11, 01
-	RGB 11, 10, 01
+	RGB 27,23,01, 23,11,00 ; morn/day
+	RGB 15,11,01, 11,10,01; nite
 
 ; group 13 (Pallet)
-	RGB 27, 28, 31
-	RGB 17, 19, 22
-	RGB 14, 14, 18
-	RGB 10, 09, 13
+	RGB 27,28,31, 17,19,22 ; morn/day
+	RGB 14,14,18, 10,09,13; nite
 
 ; group 14 (Pewter)
-	RGB 19, 19, 16
-	RGB 10, 12, 15
-	RGB 09, 09, 11
-	RGB 04, 05, 07
+	RGB 19,19,16, 10,12,15 ; morn/day
+	RGB 09,09,11, 04,05,07; nite
 
 ; group 15 (Mount Moon Square)
-	RGB 14, 17, 31
-	RGB 07, 11, 15
-	RGB 09, 13, 19
-	RGB 07, 07, 16
+	RGB 14,17,31, 07,11,15 ; morn/day
+	RGB 09,13,19, 07,07,16; nite
 
 ; group 16 (Indigo)
-	RGB 21, 21, 21
-	RGB 13, 13, 13
-	RGB 11, 11, 19
-	RGB 07, 07, 12
+	RGB 21,21,21, 13,13,13 ; morn/day
+	RGB 11,11,19, 07,07,12; nite
 
 ; group 17 (Fuchsia)
-	RGB 31, 18, 29
-	RGB 17, 13, 20
-	RGB 14, 06, 12
-	RGB 11, 03, 10
+	RGB 31,18,29, 17,13,20 ; morn/day
+	RGB 14,06,12, 11,03,10; nite
 
 ; group 18 (Lavender)
-	RGB 23, 15, 31
-	RGB 16, 05, 31
-	RGB 12, 07, 17
-	RGB 08, 06, 10
+	RGB 23,15,31, 16,05,31 ; morn/day
+	RGB 12,07,17, 08,06,10; nite
 
 ; group 19 (Silver Cave)
-	RGB 21, 21, 25
-	RGB 16, 16, 16
-	RGB 13, 13, 13
-	RGB 07, 07, 07
+	RGB 21,21,25, 16,16,16 ; morn/day
+	RGB 13,13,13, 07,07,07; nite
 
 ; group 20 (Cable Club)
-	RGB 21, 21, 21
-	RGB 11, 11, 11
-	RGB 21, 21, 21
-	RGB 11, 11, 11
+	RGB 21,21,21, 11,11,11 ; morn/day
+	RGB 21,21,21, 11,11,11; nite
 
 ; group 21 (Celadon)
-	RGB 19, 31, 15
-	RGB 31, 22, 02
-	RGB 12, 13, 09
-	RGB 09, 12, 03
+	RGB 19,31,15, 31,22,02 ; morn/day
+	RGB 12,13,09, 09,12,03; nite
 
 ; group 22 (Cianwood)
-	RGB 15, 10, 31
-	RGB 07, 05, 15
-	RGB 06, 05, 17
-	RGB 02, 02, 08
+	RGB 15,10,31, 07,05,15 ; morn/day
+	RGB 06,05,17, 02,02,08; nite
 
 ; group 23 (Viridian)
-	RGB 21, 31, 07
-	RGB 13, 25, 04
-	RGB 09, 14, 08
-	RGB 06, 10, 04
+	RGB 21,31,07, 13,25,04 ; morn/day
+	RGB 09,14,08, 06,10,04; nite
 
 ; group 24 (New Bark)
-	RGB 20, 31, 14
-	RGB 11, 23, 05
-	RGB 09, 13, 08
-	RGB 06, 09, 04
+	RGB 20,31,14, 11,23,05 ; morn/day
+	RGB 09,13,08, 06,09,04; nite
 
 ; group 25 (Saffron)
-	RGB 31, 26, 00
-	RGB 31, 15, 00
-	RGB 13, 13, 01
-	RGB 08, 08, 01
+	RGB 31,26,00, 31,15,00 ; morn/day
+	RGB 13,13,01, 08,08,01; nite
 
 ; group 26 (Cherrygrove)
-	RGB 31, 14, 28
-	RGB 31, 05, 21
-	RGB 14, 07, 17
-	RGB 13, 00, 08
+	RGB 31,14,28, 31,05,21 ; morn/day
+	RGB 14,07,17, 13,00,08; nite