shithub: pokecrystal

Download patch

ref: c5d9ecae9c343677150273b810703a1fd8d9d87a
parent: 4161ec98b4ab19863ae35502c9959892effbf6ea
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Wed Jan 17 17:48:57 EST 2018

More SGB documentation

--- a/constants/scgb_constants.asm
+++ b/constants/scgb_constants.asm
@@ -38,31 +38,31 @@
 ; PredefPals indexes (see gfx/sgb/predef.pal)
 	const_def
 	const PREDEFPAL_00
-	const PREDEFPAL_01
-	const PREDEFPAL_02
-	const PREDEFPAL_03
-	const PREDEFPAL_04
-	const PREDEFPAL_05
-	const PREDEFPAL_06
-	const PREDEFPAL_07
-	const PREDEFPAL_08
-	const PREDEFPAL_09
-	const PREDEFPAL_0A
-	const PREDEFPAL_0B
-	const PREDEFPAL_0C
-	const PREDEFPAL_0D
-	const PREDEFPAL_0E
-	const PREDEFPAL_0F
-	const PREDEFPAL_10
-	const PREDEFPAL_11
-	const PREDEFPAL_12
-	const PREDEFPAL_13
-	const PREDEFPAL_14
-	const PREDEFPAL_15
-	const PREDEFPAL_16
-	const PREDEFPAL_17
-	const PREDEFPAL_18
-	const PREDEFPAL_19
+	const PREDEFPAL_PALLET
+	const PREDEFPAL_VIRIDIAN
+	const PREDEFPAL_PEWTER
+	const PREDEFPAL_CERULEAN
+	const PREDEFPAL_LAVENDER
+	const PREDEFPAL_VERMILION
+	const PREDEFPAL_CELADON
+	const PREDEFPAL_FUCHSIA
+	const PREDEFPAL_CINNABAR
+	const PREDEFPAL_SAFFRON
+	const PREDEFPAL_INDIGO
+	const PREDEFPAL_NEW_BARK
+	const PREDEFPAL_CHERRYGROVE
+	const PREDEFPAL_VIOLET
+	const PREDEFPAL_AZALEA
+	const PREDEFPAL_GOLDENROD
+	const PREDEFPAL_ECRUTEAK
+	const PREDEFPAL_OLIVINE
+	const PREDEFPAL_CIANWOOD
+	const PREDEFPAL_MAHOGANY
+	const PREDEFPAL_BLACKTHORN
+	const PREDEFPAL_LAKE_OF_RAGE
+	const PREDEFPAL_SILVER_CAVE
+	const PREDEFPAL_DUNGEONS
+	const PREDEFPAL_NITE
 	const PREDEFPAL_1A
 	const PREDEFPAL_1B
 	const PREDEFPAL_1C
--- a/engine/cgb_layouts.asm
+++ b/engine/cgb_layouts.asm
@@ -767,7 +767,7 @@
 
 _CGB_MoveList: ; 9373
 	ld de, wBGPals1
-	ld a, PREDEFPAL_10
+	ld a, PREDEFPAL_GOLDENROD
 	call GetPredefPal
 	call LoadHLPaletteIntoDE
 	ld a, [PlayerHPPal]
--- a/engine/sgb_layouts.asm
+++ b/engine/sgb_layouts.asm
@@ -555,7 +555,7 @@
 	ld a, [TimeOfDayPal]
 	cp NITE_F
 	jr c, .morn_day
-	ld a, $19
+	ld a, PREDEFPAL_NITE
 	ret
 
 .morn_day
@@ -583,15 +583,15 @@
 	ret
 
 .cave
-	ld a, PREDEFPAL_18
+	ld a, PREDEFPAL_DUNGEONS
 	ret
 
 .perm5
-	ld a, PREDEFPAL_06
+	ld a, PREDEFPAL_VERMILION
 	ret
 
 .gate
-	ld a, PREDEFPAL_03
+	ld a, PREDEFPAL_PEWTER
 	ret
 ; 8a45
 
--- a/gfx/sgb/blk_packets.asm
+++ b/gfx/sgb/blk_packets.asm
@@ -1,4 +1,6 @@
 ; macros taken from pokered's data/sgb_packets.asm
+; names taken from pandocs
+; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands
 
 attr_blk: MACRO
 	db (SGB_ATTR_BLK << 3) + ((\1 * 6) / 16 + 1)
@@ -10,6 +12,7 @@
 	db \2 + (\3 << 2) + (\4 << 4) ; palette for each region
 	db \5, \6, \7, \8 ; x1, y1, x2, y2
 ENDM
+
 
 BlkPacket_9a86:
 	attr_blk 1
--- a/gfx/sgb/data_snd_packets.asm
+++ b/gfx/sgb/data_snd_packets.asm
@@ -2,22 +2,13 @@
 ; names taken from pandocs
 ; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands
 
-sgb_mask_en: MACRO
-	db ($17 << 3) + 1
-	db \1
-	ds 14
-ENDM
-
 sgb_data_snd: MACRO
-	db ($0f << 3) + 1
+	db (SGB_DATA_SND << 3) + 1
 	dw \1 ; address
 	db \2 ; bank
 	db \3 ; length (1-11)
 ENDM
 
-
-MaskEnFreezePacket: sgb_mask_en 1
-MaskEnCancelPacket: sgb_mask_en 0
 
 ; These are packets containing SNES code.
 ; This set of packets is found in several Japanese SGB-compatible titles.
--- a/gfx/sgb/pal_packets.asm
+++ b/gfx/sgb/pal_packets.asm
@@ -38,7 +38,13 @@
 	ds 15
 ENDM
 
+sgb_mask_en: MACRO
+	db (SGB_MASK_EN << 3) + 1
+	db \1
+	ds 14
+ENDM
 
+
 PalPacket_9b96: sgb_pal_set 48, 49, 4A, 4B
 PalPacket_9ba6: sgb_pal_set 2B, 24, 20, 00
 PalPacket_9bb6: sgb_pal_set 41, 42, 43, 44
@@ -82,3 +88,6 @@
 MltReq2Packet: sgb_mlt_req 2
 ChrTrnPacket:  sgb_chr_trn 0, 0
 PctTrnPacket:  sgb_pct_trn
+
+MaskEnFreezePacket: sgb_mask_en 1
+MaskEnCancelPacket: sgb_mask_en 0
--- a/gfx/sgb/predef.pal
+++ b/gfx/sgb/predef.pal
@@ -1,394 +1,394 @@
-; $00 (_CGB_BattleGrayscale via PalPacket_9c66)
+; PREDEFPAL_00 (_CGB_BattleGrayscale via PalPacket_9c66)
 	RGB 31, 31, 31
 	RGB 22, 25, 19
 	RGB 16, 21, 30
 	RGB 00, 00, 00
-; $01 (Pallet map group)
+; PREDEFPAL_PALLET
 	RGB 31, 31, 31
 	RGB 27, 28, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $02 (Viridian map group)
+; PREDEFPAL_VIRIDIAN
 	RGB 31, 31, 31
 	RGB 24, 28, 19
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $03 (Pewter map group)
+; PREDEFPAL_PEWTER
 	RGB 31, 31, 31
 	RGB 24, 24, 24
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $04 (Cerulean map group)
+; PREDEFPAL_CERULEAN
 	RGB 31, 31, 31
 	RGB 21, 23, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $05 (Lavender map group)
+; PREDEFPAL_LAVENDER
 	RGB 31, 31, 31
 	RGB 24, 21, 27
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $06 (Vermilion map group)
+; PREDEFPAL_VERMILION
 	RGB 31, 31, 31
 	RGB 31, 24, 16
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $07 (Celadon map group)
+; PREDEFPAL_CELADON
 	RGB 31, 31, 31
 	RGB 25, 30, 26
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $08 (Fuchsia map group)
+; PREDEFPAL_FUCHSIA
 	RGB 31, 31, 31
 	RGB 31, 25, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $09 (Cinnabar map group)
+; PREDEFPAL_CINNABAR
 	RGB 31, 31, 31
 	RGB 31, 20, 19
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0a (Saffron map group)
+; PREDEFPAL_SAFFRON
 	RGB 31, 31, 31
 	RGB 31, 26, 19
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0b (Indigo map group)
+; PREDEFPAL_INDIGO
 	RGB 31, 31, 31
 	RGB 27, 28, 27
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0c (New Bark map group)
+; PREDEFPAL_NEW_BARK
 	RGB 31, 31, 31
 	RGB 24, 30, 23
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0d (Cherrygrove map group)
+; PREDEFPAL_CHERRYGROVE
 	RGB 31, 31, 31
 	RGB 29, 24, 29
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0e (Violet map group)
+; PREDEFPAL_VIOLET
 	RGB 31, 31, 31
 	RGB 26, 23, 29
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $0f (Azalea map group)
+; PREDEFPAL_AZALEA
 	RGB 31, 31, 31
 	RGB 25, 23, 20
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $10 (Goldenrod map group, _CGB_MoveList)
+; PREDEFPAL_GOLDENROD
 	RGB 31, 31, 31
 	RGB 29, 26, 18
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $11 (Ecruteak map group)
+; PREDEFPAL_ECRUTEAK
 	RGB 31, 31, 31
 	RGB 31, 21, 18
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $12 (Olivine map group)
+; PREDEFPAL_OLIVINE
 	RGB 31, 31, 31
 	RGB 26, 25, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $13 (Cianwood map group)
+; PREDEFPAL_CIANWOOD
 	RGB 31, 31, 31
 	RGB 22, 21, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $14 (Mahogany map group)
+; PREDEFPAL_MAHOGANY
 	RGB 31, 31, 31
 	RGB 22, 25, 21
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $15 (Blackthorn map group)
+; PREDEFPAL_BLACKTHORN
 	RGB 31, 31, 31
 	RGB 21, 21, 22
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $16 (Lake of Rage map group)
+; PREDEFPAL_LAKE_OF_RAGE
 	RGB 31, 31, 31
 	RGB 31, 20, 20
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $17 (Silver Cave map group)
+; PREDEFPAL_SILVER_CAVE
 	RGB 31, 31, 31
 	RGB 26, 26, 26
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $18 (dungeon map group)
+; PREDEFPAL_DUNGEONS
 	RGB 31, 31, 31
 	RGB 21, 14, 09
 	RGB 15, 20, 20
 	RGB 00, 00, 00
-; $19
+; PREDEFPAL_NITE
 	RGB 31, 31, 31
 	RGB 12, 28, 22
 	RGB 15, 20, 20
 	RGB 00, 00, 00
-; $1a (_CGB_Evolution, _CGB_BattleGrayscale via PalPacket_9c66)
+; PREDEFPAL_1A (_CGB_Evolution, _CGB_BattleGrayscale via PalPacket_9c66)
 	RGB 31, 31, 31
 	RGB 07, 07, 07
 	RGB 02, 03, 03
 	RGB 00, 00, 00
-; $1b (_CGB_Diploma via PalPacket_9cb6, _CGB0d via PalPacket_9cb6)
+; PREDEFPAL_1B (_CGB_Diploma via PalPacket_9cb6, _CGB0d via PalPacket_9cb6)
 	RGB 31, 31, 31
 	RGB 30, 22, 17
 	RGB 16, 14, 19
 	RGB 00, 00, 00
-; $1c (_CGB_TradeTube, Unreferenced_Function97cc)
+; PREDEFPAL_1C (_CGB_TradeTube, Unreferenced_Function97cc)
 	RGB 31, 31, 31
 	RGB 18, 20, 27
 	RGB 11, 15, 23
 	RGB 00, 00, 00
-; $1d (_CGB_Pokedex, _CGB_BillsPC, _CGB_PokedexUnownMode, _CGB_PokedexSearchOption)
+; PREDEFPAL_1D (_CGB_Pokedex, _CGB_BillsPC, _CGB_PokedexUnownMode, _CGB_PokedexSearchOption)
 	RGB 31, 31, 31
 	RGB 31, 20, 10
 	RGB 26, 10, 06
 	RGB 00, 00, 00
-; $1e
+; PREDEFPAL_1E
 	RGB 31, 31, 31
 	RGB 21, 25, 29
 	RGB 14, 19, 25
 	RGB 00, 00, 00
-; $1f
+; PREDEFPAL_1F
 	RGB 31, 31, 31
 	RGB 27, 22, 24
 	RGB 21, 15, 23
 	RGB 00, 00, 00
-; $20
+; PREDEFPAL_20
 	RGB 31, 31, 31
 	RGB 28, 20, 15
 	RGB 21, 14, 09
 	RGB 00, 00, 00
-; $21 (Unreferenced_Function97cc)
+; PREDEFPAL_21 (Unreferenced_Function97cc)
 	RGB 31, 31, 31
 	RGB 20, 26, 16
 	RGB 09, 20, 11
 	RGB 00, 00, 00
-; $22
+; PREDEFPAL_22
 	RGB 31, 31, 31
 	RGB 30, 22, 24
 	RGB 28, 15, 21
 	RGB 00, 00, 00
-; $23
+; PREDEFPAL_23
 	RGB 31, 31, 31
 	RGB 31, 28, 14
 	RGB 26, 20, 00
 	RGB 00, 00, 00
-; $24 (_CGB_TrainerCard, _CGB13 via PalPacket_9ba6)
+; PREDEFPAL_24 (_CGB_TrainerCard, _CGB13 via PalPacket_9ba6)
 	RGB 31, 31, 31
 	RGB 26, 21, 22
 	RGB 15, 15, 18
 	RGB 00, 00, 00
-; $25
+; PREDEFPAL_25
 	RGB 31, 31, 31
 	RGB 23, 19, 13
 	RGB 14, 12, 17
 	RGB 00, 00, 00
-; $26
+; PREDEFPAL_26
 	RGB 31, 31, 31
 	RGB 16, 18, 21
 	RGB 10, 12, 18
 	RGB 00, 00, 00
-; $27
+; PREDEFPAL_27
 	RGB 31, 31, 31
 	RGB 22, 15, 16
 	RGB 17, 02, 05
 	RGB 00, 00, 00
-; $28
+; PREDEFPAL_28
 	RGB 31, 31, 31
 	RGB 15, 20, 20
 	RGB 05, 16, 16
 	RGB 00, 00, 00
-; $29
+; PREDEFPAL_29
 	RGB 31, 31, 31
 	RGB 23, 15, 19
 	RGB 14, 04, 12
 	RGB 00, 00, 00
-; $2a
+; PREDEFPAL_2A
 	RGB 31, 31, 31
 	RGB 20, 17, 18
 	RGB 18, 13, 11
 	RGB 00, 00, 00
-; $2b (_CGB13 via PalPacket_9ba6)
+; PREDEFPAL_2B (_CGB13 via PalPacket_9ba6)
 	RGB 31, 31, 31
 	RGB 23, 21, 16
 	RGB 12, 12, 10
 	RGB 00, 00, 00
-; $2c
+; PREDEFPAL_2C
 	RGB 31, 31, 31
 	RGB 21, 25, 29
 	RGB 30, 22, 24
 	RGB 00, 00, 00
-; $2d
+; PREDEFPAL_2D
 	RGB 31, 31, 31
 	RGB 26, 23, 16
 	RGB 29, 14, 09
 	RGB 00, 00, 00
-; $2e (_CGB_PartyMenu via PalPacket_9c56)
+; PREDEFPAL_2E (_CGB_PartyMenu via PalPacket_9c56)
 	RGB 31, 31, 31
 	RGB 18, 18, 18
 	RGB 10, 10, 10
 	RGB 00, 00, 00
-; $2f (_CGB_PartyMenu via PalPacket_9c56)
+; PREDEFPAL_2F (_CGB_PartyMenu via PalPacket_9c56)
 	RGB 31, 31, 31
 	RGB 30, 26, 15
 	RGB 00, 23, 00
 	RGB 00, 00, 00
-; $30
+; PREDEFPAL_30
 	RGB 31, 31, 31
 	RGB 30, 26, 15
 	RGB 31, 23, 00
 	RGB 00, 00, 00
-; $31
+; PREDEFPAL_31
 	RGB 31, 31, 31
 	RGB 30, 26, 15
 	RGB 31, 00, 00
 	RGB 00, 00, 00
-; $32
+; PREDEFPAL_32
 	RGB 31, 31, 31
 	RGB 29, 26, 19
 	RGB 27, 20, 14
 	RGB 00, 00, 00
-; $33 (_CGB06 via PalPacket_9ca6)
+; PREDEFPAL_33 (_CGB06 via PalPacket_9ca6)
 	RGB 31, 31, 31
 	RGB 24, 20, 10
 	RGB 21, 00, 04
 	RGB 00, 00, 00
-; $34 (_CGB06 via PalPacket_9ca6)
+; PREDEFPAL_34 (_CGB06 via PalPacket_9ca6)
 	RGB 31, 31, 31
 	RGB 31, 20, 10
 	RGB 21, 00, 04
 	RGB 00, 00, 00
-; $35
+; PREDEFPAL_35
 	RGB 31, 31, 31
 	RGB 30, 26, 16
 	RGB 16, 12, 09
 	RGB 00, 00, 00
-; $36
+; PREDEFPAL_36
 	RGB 31, 31, 31
 	RGB 15, 28, 26
 	RGB 12, 22, 26
 	RGB 03, 16, 14
-; $37
+; PREDEFPAL_37
 	RGB 31, 31, 31
 	RGB 15, 28, 26
 	RGB 23, 24, 24
 	RGB 00, 00, 00
-; $38 (_CGB07.Function9166)
+; PREDEFPAL_38 (_CGB07.Function9166)
 	RGB 31, 31, 24
 	RGB 07, 27, 19
 	RGB 26, 20, 10
 	RGB 19, 12, 08
-; $39 (_CGB07.Function9166, _CGB0f via PalPacket_9c46)
+; PREDEFPAL_39 (_CGB07.Function9166, _CGB0f via PalPacket_9c46)
 	RGB 31, 31, 31
 	RGB 31, 28, 14
 	RGB 31, 13, 31
 	RGB 00, 00, 00
-; $3a (_CGB07.Function9180)
+; PREDEFPAL_3A (_CGB07.Function9180)
 	RGB 31, 31, 31
 	RGB 16, 18, 21
 	RGB 10, 12, 18
 	RGB 00, 00, 00
-; $3b (Unreferenced_Function8b4d)
+; PREDEFPAL_3B (Unreferenced_Function8b4d)
 	RGB 31, 31, 31
 	RGB 23, 21, 16
 	RGB 12, 12, 10
 	RGB 00, 00, 00
-; $3c (_CGB06, Unreferenced_Function8b67, _CGB07.Function9180 via PalPacket_9c36)
+; PREDEFPAL_3C (_CGB06, Unreferenced_Function8b67, _CGB07.Function9180 via PalPacket_9c36)
 	RGB 31, 31, 31
 	RGB 31, 14, 00
 	RGB 07, 11, 15
 	RGB 00, 00, 00
-; $3d
+; PREDEFPAL_3D
 	RGB 31, 31, 31
 	RGB 26, 21, 22
 	RGB 26, 10, 06
 	RGB 00, 00, 00
-; $3e
+; PREDEFPAL_3E
 	RGB 31, 31, 31
 	RGB 30, 27, 04
 	RGB 24, 20, 11
 	RGB 00, 00, 00
-; $3f
+; PREDEFPAL_3F
 	RGB 31, 31, 31
 	RGB 31, 13, 25
 	RGB 24, 20, 11
 	RGB 00, 00, 00
-; $40
+; PREDEFPAL_40
 	RGB 31, 31, 31
 	RGB 16, 19, 29
 	RGB 24, 20, 11
 	RGB 00, 00, 00
-; $41
+; PREDEFPAL_41
 	RGB 31, 31, 31
 	RGB 30, 22, 24
 	RGB 18, 18, 18
 	RGB 16, 10, 07
-; $42
+; PREDEFPAL_42
 	RGB 31, 31, 31
 	RGB 21, 25, 29
 	RGB 18, 18, 18
 	RGB 16, 10, 07
-; $43
+; PREDEFPAL_43
 	RGB 31, 31, 31
 	RGB 20, 26, 16
 	RGB 18, 18, 18
 	RGB 16, 10, 07
-; $44
+; PREDEFPAL_44
 	RGB 31, 31, 31
 	RGB 31, 28, 14
 	RGB 18, 18, 18
 	RGB 16, 10, 07
-; $45
+; PREDEFPAL_45
 	RGB 31, 31, 31
 	RGB 18, 18, 18
 	RGB 26, 10, 06
 	RGB 00, 00, 00
-; $46
+; PREDEFPAL_46
 	RGB 31, 31, 31
 	RGB 30, 22, 24
 	RGB 28, 15, 21
 	RGB 00, 00, 00
-; $47
+; PREDEFPAL_47
 	RGB 31, 31, 31
 	RGB 26, 20, 00
 	RGB 16, 19, 29
 	RGB 00, 00, 00
-; $48
+; PREDEFPAL_48
 	RGB 31, 31, 31
 	RGB 16, 02, 30
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $49
+; PREDEFPAL_49
 	RGB 31, 31, 31
 	RGB 16, 13, 04
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $4a
+; PREDEFPAL_4A
 	RGB 31, 31, 31
 	RGB 28, 04, 02
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $4b
+; PREDEFPAL_4B
 	RGB 31, 31, 31
 	RGB 18, 23, 31
 	RGB 15, 20, 31
 	RGB 00, 00, 00
-; $4c (_CGB_UnownPuzzle)
+; PREDEFPAL_4C (_CGB_UnownPuzzle)
 	RGB 31, 31, 31
 	RGB 24, 20, 11
 	RGB 18, 13, 11
 	RGB 00, 00, 00
-; $4d
+; PREDEFPAL_4D
 	RGB 31, 31, 31
 	RGB 31, 31, 31
 	RGB 25, 30, 00
 	RGB 25, 30, 00
-; $4e (_CGB_GamefreakLogo)
+; PREDEFPAL_4E (_CGB_GamefreakLogo)
 	RGB 00, 00, 00
 	RGB 08, 11, 11
 	RGB 21, 21, 21
--- a/gfx/sgb/roof_pal_inds.asm
+++ b/gfx/sgb/roof_pal_inds.asm
@@ -2,31 +2,31 @@
 
 MapGroupRoofSGBPalInds: ; 8a45
 ; entries correspond to map groups
-	db PREDEFPAL_00 ; group 0 (unused)
-	db PREDEFPAL_12 ; group 1 (Olivine)
-	db PREDEFPAL_14 ; group 2 (Mahogany)
-	db PREDEFPAL_18 ; group 3 (dungeons)
-	db PREDEFPAL_11 ; group 4 (Ecruteak)
-	db PREDEFPAL_15 ; group 5 (Blackthorn)
-	db PREDEFPAL_09 ; group 6 (Cinnabar)
-	db PREDEFPAL_04 ; group 7 (Cerulean)
-	db PREDEFPAL_0F ; group 8 (Azalea)
-	db PREDEFPAL_16 ; group 9 (Lake of Rage)
-	db PREDEFPAL_0E ; group 10 (Violet)
-	db PREDEFPAL_10 ; group 11 (Goldenrod)
-	db PREDEFPAL_06 ; group 12 (Vermilion)
-	db PREDEFPAL_01 ; group 13 (Pallet)
-	db PREDEFPAL_03 ; group 14 (Pewter)
-	db PREDEFPAL_06 ; group 15 (Mount Moon Square)
-	db PREDEFPAL_0B ; group 16 (Indigo)
-	db PREDEFPAL_08 ; group 17 (Fuchsia)
-	db PREDEFPAL_05 ; group 18 (Lavender)
-	db PREDEFPAL_17 ; group 19 (Silver Cave)
-	db PREDEFPAL_08 ; group 20 (Cable Club)
-	db PREDEFPAL_07 ; group 21 (Celadon)
-	db PREDEFPAL_13 ; group 22 (Cianwood)
-	db PREDEFPAL_02 ; group 23 (Viridian)
-	db PREDEFPAL_0C ; group 24 (New Bark)
-	db PREDEFPAL_0A ; group 25 (Saffron)
-	db PREDEFPAL_0D ; group 26 (Cherrygrove)
+	db PREDEFPAL_00
+	db PREDEFPAL_OLIVINE
+	db PREDEFPAL_MAHOGANY
+	db PREDEFPAL_DUNGEONS
+	db PREDEFPAL_ECRUTEAK
+	db PREDEFPAL_BLACKTHORN
+	db PREDEFPAL_CINNABAR
+	db PREDEFPAL_CERULEAN
+	db PREDEFPAL_AZALEA
+	db PREDEFPAL_LAKE_OF_RAGE
+	db PREDEFPAL_VIOLET
+	db PREDEFPAL_GOLDENROD
+	db PREDEFPAL_VERMILION
+	db PREDEFPAL_PALLET
+	db PREDEFPAL_PEWTER
+	db PREDEFPAL_VERMILION
+	db PREDEFPAL_INDIGO
+	db PREDEFPAL_FUCHSIA
+	db PREDEFPAL_LAVENDER
+	db PREDEFPAL_SILVER_CAVE
+	db PREDEFPAL_FUCHSIA
+	db PREDEFPAL_CELADON
+	db PREDEFPAL_CIANWOOD
+	db PREDEFPAL_VIRIDIAN
+	db PREDEFPAL_NEW_BARK
+	db PREDEFPAL_SAFFRON
+	db PREDEFPAL_CHERRYGROVE
 ; 8a60