cut down 75% of build time for portals (closes #41)

Nathan DECHER 5 years ago
parent 7121c230fc
commit fb1653e231
  1. 32
      Makefile

@ -3,10 +3,7 @@
FIRE_ANIM = $(foreach angle, $(shell seq 0 6 359), build/fire$(angle).png)
PEACH_DECAY_ANIM = $(foreach percent, $(shell seq 99 -1 0), build/peach-decay$(percent).png)
PEACH_RAINBOW_ANIM = $(foreach percent, $(shell seq 100 2 299), build/peach-rainbow$(percent).png)
PORTAL_A_ANIM = $(foreach angle, $(shell seq 0 6 359), build/portal-a$(angle).png)
PORTAL_B_ANIM = $(foreach angle, $(shell seq 0 6 359), build/portal-b$(angle).png)
PORTAL_C_ANIM = $(foreach angle, $(shell seq 0 6 359), build/portal-c$(angle).png)
PORTAL_D_ANIM = $(foreach angle, $(shell seq 0 6 359), build/portal-d$(angle).png)
PORTAL_ANIM = $(foreach angle, $(shell seq 0 6 359), build/portal-a$(angle).png)
IMAGES = $(foreach name, apple wall oil key door, public/assets/$(name)32.png)
TILESETS = $(foreach name, hole switch spikes, public/assets/$(name)-ts.png)
@ -62,30 +59,17 @@ public/assets/peach-rainbow-anim.png: $(PEACH_RAINBOW_ANIM)
build/peach-rainbow%.png: assets/peach.png
convert $^ -modulate 100,100,$(shell echo $@ | sed 's/[^0-9]*//g') -resize 32x $@
build/portal-b.png: assets/portal.png
convert $^ -modulate 100,100,200 $@
build/portal-c.png: assets/portal.png
convert $^ -modulate 100,100,150 $@
build/portal-d.png: assets/portal.png
convert $^ -modulate 100,100,50 $@
build/portal-a%.png: assets/portal.png
convert $^ -distort ScaleRotateTranslate $(shell echo $@ | sed 's/[^0-9]*//g') -resize 32x $@
build/portal-b%.png: build/portal-b.png
convert $^ -distort ScaleRotateTranslate $(shell echo $@ | sed 's/[^0-9]*//g') -resize 32x $@
build/portal-c%.png: build/portal-c.png
convert $^ -distort ScaleRotateTranslate $(shell echo $@ | sed 's/[^0-9]*//g') -resize 32x $@
build/portal-d%.png: build/portal-d.png
convert $^ -distort ScaleRotateTranslate $(shell echo $@ | sed 's/[^0-9]*//g') -resize 32x $@
public/assets/portal-a-anim.png: $(PORTAL_A_ANIM)
convert $^ -append $@
public/assets/portal-b-anim.png: $(PORTAL_B_ANIM)
convert $^ -append $@
public/assets/portal-c-anim.png: $(PORTAL_C_ANIM)
convert $^ -append $@
public/assets/portal-d-anim.png: $(PORTAL_D_ANIM)
public/assets/portal-a-anim.png: $(PORTAL_ANIM)
convert $^ -append $@
public/assets/portal-b-anim.png: public/assets/portal-a-anim.png
convert $^ -modulate 100,100,200 $@
public/assets/portal-c-anim.png: public/assets/portal-a-anim.png
convert $^ -modulate 100,100,150 $@
public/assets/portal-d-anim.png: public/assets/portal-a-anim.png
convert $^ -modulate 100,100,50 $@
public/assets/%.json: assets/%.json
cp $^ $@

Loading…
Cancel
Save