From 9b0002161be17ff7369a987a3de3c8776992d3a7 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 30 Oct 2020 16:12:25 -0400 Subject: [PATCH] Extract more RGB data to .pal files --- engine/gfx/cgb_layouts.asm | 20 +++----------------- engine/gfx/color.asm | 18 ++++++------------ engine/gfx/crystal_layouts.asm | 15 +++------------ engine/movie/intro.asm | 14 ++++---------- gfx/intro/gs_magikarp_bg.pal | 4 ++++ gfx/intro/gs_magikarp_ob.pal | 4 ++++ gfx/intro/gs_shellder_lapras_bg.pal | 4 ++++ gfx/intro/gs_shellder_lapras_ob.pal | 9 +++++++++ gfx/intro/unown_1.pal | 4 ++++ gfx/intro/unown_2.pal | 4 ++++ gfx/mystery_gift/gs_mystery_gift.pal | 4 ++++ gfx/mystery_gift/mobile_text.pal | 4 ++++ gfx/mystery_gift/name_card_bg.pal | 4 ++++ gfx/mystery_gift/name_card_ob.pal | 4 ++++ 14 files changed, 61 insertions(+), 51 deletions(-) create mode 100644 gfx/intro/gs_magikarp_bg.pal create mode 100644 gfx/intro/gs_magikarp_ob.pal create mode 100644 gfx/intro/gs_shellder_lapras_bg.pal create mode 100644 gfx/intro/gs_shellder_lapras_ob.pal create mode 100644 gfx/intro/unown_1.pal create mode 100644 gfx/intro/unown_2.pal create mode 100644 gfx/mystery_gift/gs_mystery_gift.pal create mode 100644 gfx/mystery_gift/mobile_text.pal create mode 100644 gfx/mystery_gift/name_card_bg.pal create mode 100644 gfx/mystery_gift/name_card_ob.pal diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index 66aeca079..ee4e2caeb 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -464,21 +464,10 @@ _CGB_GSIntro: ret .ShellderLaprasBGPalette: - RGB 19, 31, 19 - RGB 18, 23, 31 - RGB 11, 21, 28 - RGB 04, 16, 24 +INCLUDE "gfx/intro/gs_shellder_lapras_bg.pal" .ShellderLaprasOBPals: - RGB 29, 29, 29 - RGB 20, 19, 20 - RGB 19, 06, 04 - RGB 03, 04, 06 - - RGB 31, 31, 31 - RGB 31, 31, 31 - RGB 31, 00, 00 - RGB 03, 04, 06 +INCLUDE "gfx/intro/gs_shellder_lapras_ob.pal" .JigglypuffPikachuScene: ld de, wBGPals1 @@ -991,7 +980,4 @@ GS_CGB_MysteryGift: ; unreferenced ret .MysteryGiftPalette: - RGB 31, 31, 31 - RGB 09, 31, 31 - RGB 10, 12, 31 - RGB 00, 03, 19 +INCLUDE "gfx/mystery_gift/gs_mystery_gift.pal" diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index 9f42d24f6..a0de280af 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -138,13 +138,13 @@ Intro_LoadMagikarpPalettes: ; unreferenced ret z ; CGB only - ld hl, .BGPal + ld hl, .MagikarpBGPal ld de, wBGPals1 ld bc, 1 palettes ld a, BANK(wBGPals1) call FarCopyWRAM - ld hl, .OBPal + ld hl, .MagikarpOBPal ld de, wOBPals1 ld bc, 1 palettes ld a, BANK(wOBPals1) @@ -155,17 +155,11 @@ Intro_LoadMagikarpPalettes: ; unreferenced ldh [hCGBPalUpdate], a ret -.BGPal: - RGB 31, 31, 31 - RGB 18, 23, 31 - RGB 15, 20, 31 - RGB 00, 00, 00 +.MagikarpBGPal: +INCLUDE "gfx/intro/gs_magikarp_bg.pal" -.OBPal: - RGB 31, 31, 31 - RGB 31, 31, 12 - RGB 08, 16, 28 - RGB 00, 00, 00 +.MagikarpOBPal: +INCLUDE "gfx/intro/gs_magikarp_ob.pal" Intro_LoadAllPal0: ; unreferenced call CheckCGB diff --git a/engine/gfx/crystal_layouts.asm b/engine/gfx/crystal_layouts.asm index 1d3cca3ed..caf4f4775 100644 --- a/engine/gfx/crystal_layouts.asm +++ b/engine/gfx/crystal_layouts.asm @@ -163,10 +163,7 @@ _CrystalCGB_MobileLayout1: ret .TextPalette: - RGB 31, 31, 31 - RGB 26, 31, 00 - RGB 20, 16, 03 - RGB 00, 00, 00 +INCLUDE "gfx/mystery_gift/mobile_text.pal" Function49480: hlcoord 0, 0, wAttrmap @@ -211,16 +208,10 @@ _CrystalCGB_NameCard: ret .BGPalette: - RGB 31, 31, 31 - RGB 23, 16, 07 - RGB 23, 07, 07 - RGB 03, 07, 20 +INCLUDE "gfx/mystery_gift/name_card_bg.pal" .OBPalette: - RGB 00, 00, 00 - RGB 07, 05, 31 - RGB 14, 18, 31 - RGB 31, 31, 31 +INCLUDE "gfx/mystery_gift/name_card_ob.pal" Function49742: ld hl, .MobileBorderPalettes diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index 15c7fb512..6e2ea8529 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -1386,17 +1386,11 @@ Intro_Scene20_AppearUnown: ldh [hCGBPalUpdate], a ret -.pal1 - RGB 24, 12, 09 - RGB 31, 31, 31 - RGB 12, 00, 31 - RGB 00, 00, 00 +.pal1: +INCLUDE "gfx/intro/unown_1.pal" -.pal2 - RGB 24, 12, 09 - RGB 31, 31, 31 - RGB 31, 31, 31 - RGB 31, 31, 31 +.pal2: +INCLUDE "gfx/intro/unown_2.pal" Intro_FadeUnownWordPals: add a diff --git a/gfx/intro/gs_magikarp_bg.pal b/gfx/intro/gs_magikarp_bg.pal new file mode 100644 index 000000000..9edb529e3 --- /dev/null +++ b/gfx/intro/gs_magikarp_bg.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 18, 23, 31 + RGB 15, 20, 31 + RGB 00, 00, 00 diff --git a/gfx/intro/gs_magikarp_ob.pal b/gfx/intro/gs_magikarp_ob.pal new file mode 100644 index 000000000..088793791 --- /dev/null +++ b/gfx/intro/gs_magikarp_ob.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 31, 31, 12 + RGB 08, 16, 28 + RGB 00, 00, 00 diff --git a/gfx/intro/gs_shellder_lapras_bg.pal b/gfx/intro/gs_shellder_lapras_bg.pal new file mode 100644 index 000000000..37400e503 --- /dev/null +++ b/gfx/intro/gs_shellder_lapras_bg.pal @@ -0,0 +1,4 @@ + RGB 19, 31, 19 + RGB 18, 23, 31 + RGB 11, 21, 28 + RGB 04, 16, 24 diff --git a/gfx/intro/gs_shellder_lapras_ob.pal b/gfx/intro/gs_shellder_lapras_ob.pal new file mode 100644 index 000000000..c443ff72d --- /dev/null +++ b/gfx/intro/gs_shellder_lapras_ob.pal @@ -0,0 +1,9 @@ + RGB 29, 29, 29 + RGB 20, 19, 20 + RGB 19, 06, 04 + RGB 03, 04, 06 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 00, 00 + RGB 03, 04, 06 diff --git a/gfx/intro/unown_1.pal b/gfx/intro/unown_1.pal new file mode 100644 index 000000000..7dfebf802 --- /dev/null +++ b/gfx/intro/unown_1.pal @@ -0,0 +1,4 @@ + RGB 24, 12, 09 + RGB 31, 31, 31 + RGB 12, 00, 31 + RGB 00, 00, 00 diff --git a/gfx/intro/unown_2.pal b/gfx/intro/unown_2.pal new file mode 100644 index 000000000..650eeb198 --- /dev/null +++ b/gfx/intro/unown_2.pal @@ -0,0 +1,4 @@ + RGB 24, 12, 09 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 diff --git a/gfx/mystery_gift/gs_mystery_gift.pal b/gfx/mystery_gift/gs_mystery_gift.pal new file mode 100644 index 000000000..529d71de6 --- /dev/null +++ b/gfx/mystery_gift/gs_mystery_gift.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 09, 31, 31 + RGB 10, 12, 31 + RGB 00, 03, 19 diff --git a/gfx/mystery_gift/mobile_text.pal b/gfx/mystery_gift/mobile_text.pal new file mode 100644 index 000000000..036905b87 --- /dev/null +++ b/gfx/mystery_gift/mobile_text.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 26, 31, 00 + RGB 20, 16, 03 + RGB 00, 00, 00 diff --git a/gfx/mystery_gift/name_card_bg.pal b/gfx/mystery_gift/name_card_bg.pal new file mode 100644 index 000000000..b7f9dc5db --- /dev/null +++ b/gfx/mystery_gift/name_card_bg.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 23, 16, 07 + RGB 23, 07, 07 + RGB 03, 07, 20 diff --git a/gfx/mystery_gift/name_card_ob.pal b/gfx/mystery_gift/name_card_ob.pal new file mode 100644 index 000000000..880b220e8 --- /dev/null +++ b/gfx/mystery_gift/name_card_ob.pal @@ -0,0 +1,4 @@ + RGB 00, 00, 00 + RGB 07, 05, 31 + RGB 14, 18, 31 + RGB 31, 31, 31