From e59624d1f5a3e0ca4e33c250bce3c1937b06b908 Mon Sep 17 00:00:00 2001 From: Sylvie <35663410+Rangi42@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:39:33 -0400 Subject: [PATCH] Generate Unown sprite palette based on all front+back sprites (#1146) --- Makefile | 12 ++++++++---- data/pokemon/palettes.asm | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index baa2a6b92..6b6e12633 100644 --- a/Makefile +++ b/Makefile @@ -225,10 +225,14 @@ gfx/trainers/%.2bpp: gfx/trainers/%.png gfx/trainers/%.gbcpal gfx/pokemon/egg/front.2bpp: gfx/pokemon/egg/front.png gfx/pokemon/egg/front.gbcpal gfx/pokemon/egg/front.2bpp: rgbgfx += --colors gbc:$(word 2,$^) -# Unown letters share one normal.pal, so they don't already build each normal.gbcpal -$(foreach png, $(wildcard gfx/pokemon/unown_*/front.png),\ - $(eval $(png:.png=.2bpp): $(png) $(png:front.png=normal.gbcpal))) -gfx/pokemon/unown_%/front.2bpp: rgbgfx += --colors gbc:$(@:front.2bpp=normal.gbcpal) +# Unown letters share one normal.gbcpal +unown_pngs := $(wildcard gfx/pokemon/unown_*/front.png) $(wildcard gfx/pokemon/unown_*/back.png) +$(foreach png, $(unown_pngs),\ + $(eval $(png:.png=.2bpp): $(png) gfx/pokemon/unown/normal.gbcpal)) +gfx/pokemon/unown_%/back.2bpp: rgbgfx += --colors gbc:$(word 2,$^) +gfx/pokemon/unown_%/front.2bpp: rgbgfx += --colors gbc:$(word 2,$^) +gfx/pokemon/unown/normal.gbcpal: $(subst .png,.gbcpal,$(unown_pngs)) + tools/gbcpal $(tools/gbcpal) $@ $^ ### Misc file-specific graphics rules diff --git a/data/pokemon/palettes.asm b/data/pokemon/palettes.asm index 1ea96302d..ca38dee1d 100644 --- a/data/pokemon/palettes.asm +++ b/data/pokemon/palettes.asm @@ -415,7 +415,7 @@ INCBIN "gfx/pokemon/slowking/normal.gbcpal", middle_colors INCLUDE "gfx/pokemon/slowking/shiny.pal" INCBIN "gfx/pokemon/misdreavus/normal.gbcpal", middle_colors INCLUDE "gfx/pokemon/misdreavus/shiny.pal" -INCLUDE "gfx/pokemon/unown/normal.pal" ; not normal.gbcpal +INCBIN "gfx/pokemon/unown/normal.gbcpal", middle_colors INCLUDE "gfx/pokemon/unown/shiny.pal" INCBIN "gfx/pokemon/wobbuffet/normal.gbcpal", middle_colors INCLUDE "gfx/pokemon/wobbuffet/shiny.pal"