summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile69
1 files changed, 34 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 6d432ec9..e6ca41ce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc
+roms := pokeyellow.gbc pokeyellow_debug.gbc
rom_obj := \
audio.o \
@@ -8,12 +8,12 @@ maps.o \
text.o \
wram.o \
gfx/pics.o \
+gfx/pikachu.o \
gfx/sprites.o \
gfx/tilesets.o
-pokered_obj := $(rom_obj:.o=_red.o)
-pokeblue_obj := $(rom_obj:.o=_blue.o)
-pokeblue_debug_obj := $(rom_obj:.o=_blue_debug.o)
+pokeyellow_obj := $(rom_obj)
+pokeyellow_debug_obj := $(rom_obj:.o=_debug.o)
### Build tools
@@ -37,18 +37,18 @@ RGBLINK ?= $(RGBDS)rgblink
.SECONDEXPANSION:
.PRECIOUS:
.SECONDARY:
-.PHONY: all red blue blue_debug clean tidy compare tools
+.PHONY: all yellow yellow_debug clean tidy compare tools
all: $(roms)
-red: pokered.gbc
-blue: pokeblue.gbc
-blue_debug: pokeblue_debug.gbc
+yellow: pokeyellow.gbc
+yellow_debug: pokeyellow_debug.gbc
clean: tidy
find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete
+ find audio/pikachu_cries \( -iname '*.pcm' \) -delete
tidy:
- rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
+ rm -f $(roms) $(pokeyellow_obj) $(pokeyellow_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
$(MAKE) clean -C tools/
compare: $(roms)
@@ -64,9 +64,7 @@ ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
endif
-$(pokered_obj): RGBASMFLAGS += -D _RED
-$(pokeblue_obj): RGBASMFLAGS += -D _BLUE
-$(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _DEBUG
+$(pokeyellow_debug_obj): RGBASMFLAGS += -D _DEBUG
rgbdscheck.o: rgbdscheck.asm
$(RGBASM) -o $@ $<
@@ -85,10 +83,9 @@ ifeq (,$(filter clean tidy tools,$(MAKECMDGOALS)))
$(info $(shell $(MAKE) -C tools))
-# Dependencies for objects (drop _red and _blue from asm file basenames)
-$(foreach obj, $(pokered_obj), $(eval $(call DEP,$(obj),$(obj:_red.o=.asm))))
-$(foreach obj, $(pokeblue_obj), $(eval $(call DEP,$(obj),$(obj:_blue.o=.asm))))
-$(foreach obj, $(pokeblue_debug_obj), $(eval $(call DEP,$(obj),$(obj:_blue_debug.o=.asm))))
+# Dependencies for objects
+$(foreach obj, $(pokeyellow_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
+$(foreach obj, $(pokeyellow_debug_obj), $(eval $(call DEP,$(obj),$(obj:_debug.o=.asm))))
endif
@@ -96,17 +93,14 @@ endif
%.asm: ;
-pokered_pad = 0x00
-pokeblue_pad = 0x00
-pokeblue_debug_pad = 0xff
+pokeyellow_pad = 0x00
+pokeyellow_debug_pad = 0xff
-pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED"
-pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
-pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
+opts = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 -t "POKEMON YELLOW"
%.gbc: $$(%_obj) layout.link
- $(RGBLINK) -p $($*_pad) -d -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^)
- $(RGBFIX) -p $($*_pad) $($*_opt) $@
+ $(RGBLINK) -p $($*_pad) -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^)
+ $(RGBFIX) -p $($*_pad) $(opts) $@
### Misc file-specific graphics rules
@@ -114,25 +108,22 @@ pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
gfx/battle/attack_anim_1.2bpp: tools/gfx += --trim-whitespace
gfx/battle/attack_anim_2.2bpp: tools/gfx += --trim-whitespace
-gfx/intro/blue_jigglypuff_1.2bpp: rgbgfx += -h
-gfx/intro/blue_jigglypuff_2.2bpp: rgbgfx += -h
-gfx/intro/blue_jigglypuff_3.2bpp: rgbgfx += -h
-gfx/intro/red_nidorino_1.2bpp: rgbgfx += -h
-gfx/intro/red_nidorino_2.2bpp: rgbgfx += -h
-gfx/intro/red_nidorino_3.2bpp: rgbgfx += -h
-gfx/intro/gengar.2bpp: rgbgfx += -h
-gfx/intro/gengar.2bpp: tools/gfx += --remove-duplicates --preserve=0x19,0x76
-
gfx/credits/the_end.2bpp: tools/gfx += --interleave --png=$<
-gfx/slots/red_slots_1.2bpp: tools/gfx += --trim-whitespace
-gfx/slots/blue_slots_1.2bpp: tools/gfx += --trim-whitespace
+gfx/slots/slots_1.2bpp: tools/gfx += --trim-whitespace
gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
gfx/tilesets/reds_house.2bpp: tools/gfx += --preserve=0x48
+gfx/title/pokemon_logo.2bpp: tools/gfx += --trim-whitespace
+
gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates
+gfx/sgb/border.2bpp: tools/gfx += --trim-whitespace
+
+gfx/surfing_pikachu/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
+gfx/surfing_pikachu/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
+
### Catch-all graphics rules
@@ -150,3 +141,11 @@ gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates
%.pic: %.2bpp
tools/pkmncompress $< $@
+
+
+### Catch-all audio rules
+
+%.wav: ;
+
+%.pcm: %.wav
+ tools/pcm $< $@