aboutsummaryrefslogtreecommitdiff
path: root/scripts/tiled.mk.awk
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tiled.mk.awk')
-rwxr-xr-xscripts/tiled.mk.awk16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/tiled.mk.awk b/scripts/tiled.mk.awk
new file mode 100755
index 0000000..7728cf3
--- /dev/null
+++ b/scripts/tiled.mk.awk
@@ -0,0 +1,16 @@
+#!/bin/awk -f
+BEGIN {
+ targets=""
+ print "tiled_dir:\n\tmkdir -p tiled"
+}
+1 {
+ for (i = 0; i < $2; i++) {
+ target = sprintf("tiled/%s_%02d.png", $1,i)
+ printf target" "
+ targets = targets" "target
+ }
+ printf "&: %s.bin\n",$1
+ printf "\t$(TILEMAP2TILED) $<\n\n"
+}
+END { print "tiled: tiled_dir"targets }
+