added fire and a stub for level 5
This commit is contained in:
parent
f050baafbc
commit
02e72795cc
7 changed files with 88 additions and 9 deletions
15
Makefile
15
Makefile
|
@ -1,18 +1,22 @@
|
|||
.PHONY: all clean
|
||||
|
||||
FIRE_ANIM = $(foreach angle, $(shell seq 0 6 359), build/fire$(angle).png)
|
||||
|
||||
IMAGES = $(foreach name, apple wall, public/assets/$(name)32.png)
|
||||
TILESETS = $(foreach name, hole, public/assets/$(name)-ts.png)
|
||||
ANIMATIONS = $(foreach name, fire, public/assets/$(name)-anim.png)
|
||||
JSON = $(foreach name, snake levelList config, public/assets/$(name).json)
|
||||
ICON = public/assets/icon32.png public/assets/icon256.png public/favicon.ico
|
||||
CSS = public/css/snek.css
|
||||
JS = public/js/snek.js
|
||||
|
||||
OUTPUT = $(IMAGES) $(TILESETS) $(JSON) $(ICON) $(CSS) $(JS)
|
||||
OUTPUT = $(IMAGES) $(TILESETS) $(ANIMATIONS) $(JSON) $(ICON) $(CSS) $(JS)
|
||||
|
||||
all: images tilesets json icon css js
|
||||
all: images tilesets animations json icon css js
|
||||
|
||||
images: $(IMAGES)
|
||||
tilesets: $(TILESETS)
|
||||
animations: $(ANIMATIONS)
|
||||
json: $(JSON)
|
||||
icon: $(ICON)
|
||||
css: $(CSS)
|
||||
|
@ -34,6 +38,12 @@ public/assets/%256.png: assets/%.jpg
|
|||
public/assets/%-ts.png: assets/%.png
|
||||
convert $^ -scale 32x $@
|
||||
|
||||
public/assets/fire-anim.png: $(FIRE_ANIM)
|
||||
convert $^ -append -scale 32x $@
|
||||
|
||||
build/fire%.png: assets/fire.png
|
||||
convert $^ -distort ScaleRotateTranslate $(shell echo $@ | sed 's/[^0-9]*//g') $@
|
||||
|
||||
public/assets/%.json: assets/%.json
|
||||
cp $^ $@
|
||||
|
||||
|
@ -44,4 +54,5 @@ public/js/snek.js: $(wildcard src/js/*.js)
|
|||
node mergejs.js $^ > $@
|
||||
|
||||
clean:
|
||||
rm -f build/*.*
|
||||
rm -f $(OUTPUT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue