.PHONY: all clean

all: splashtest.wsc

CEL2WST=../bin/cel2wst
PAL2WSP=../bin/pal2wsp
MAP2RLE=../bin/map2rle

clean:
	@echo " RM"
	@rm -f *.wsc

splashtest.wsc: testrom.asm *.wsp *.wst *.rle
	@echo " AS  $@"
	@nasm $< -o $@

bs_splash.palette.wsp: datafiles/Splash.tiles.pal
	@echo " P2W $@"
	@${PAL2WSP} -i $^ -o $@

bs_splash.tiles.wst: datafiles/Splash.tiles.cel
	@echo " C2W $@"
	@${CEL2WST} -i $^ -o $@ -t 28

bs_splash.screen1.rle: datafiles/Splash.BrokeStudio_Bootsplash.layer-Front\ BG.map001.map
	@echo " M2R $@"
	@${MAP2RLE} -i "$<" -o $@ -s 9

bs_splash.screen2.rle: datafiles/Splash.BrokeStudio_Bootsplash.layer-Back\ BG.map001.map
	@echo " M2R $@"
	@${MAP2RLE} -i "$<" -o $@ -s 3 -f 14

bs_splash.screen3.rle: datafiles/Splash.BrokeStudio_Bootsplash.layer-Bg\ Single\ Color.map001.map
	@echo " M2R $@"
	@${MAP2RLE} -i "$<" -o $@ -s 15