# Simple generation of 64x64 tiles
+imgdir=../../koperkapel/images
+
for dir in roach
do
- mkdir -p ../../images/$dir
+ mkdir -p ${imgdir}/$dir
for x in $dir/*
do
- inkscape -z -e ../../images/${x%.*}.png -w 64 -h 64 $x
+ inkscape -z -e ${imgdir}/${x%.*}.png -w 64 -h 64 $x
done
done
for size in 32 21
do
- mkdir -p ../../images/roach_${size}
+ mkdir -p ${imgdir}/roach_${size}
for x in roach/*
do
xbase=`basename $x`
- inkscape -z -e ../../images/roach_${size}/${xbase%.*}.png -w ${size} -h ${size} $x
+ inkscape -z -e ${imgdir}/roach_${size}/${xbase%.*}.png -w ${size} -h ${size} $x
done
done
# Roach quartet
-mkdir -p ../../images/roach_quartet
+mkdir -p ${imgdir}/roach_quartet
function quartet_tile {
for tile in roach eyes
do
- montage ../../images/roach_32/${tile}_${1}.png ../../images/roach_32/${tile}_${2}.png ../../images/roach_32/${tile}_${3}.png ../../images/roach_32/${tile}_${4}.png -geometry -10+0 -background none ../../images/roach_quartet/${tile}_${1}.png
+ montage ${imgdir}/roach_32/${tile}_${1}.png ${imgdir}/roach_32/${tile}_${2}.png ${imgdir}/roach_32/${tile}_${3}.png ${imgdir}/roach_32/${tile}_${4}.png -geometry -10+0 -background none ${imgdir}/roach_quartet/${tile}_${1}.png
done
}
# Roach nonet
-mkdir -p ../../images/roach_nonet
+mkdir -p ${imgdir}/roach_nonet
function nonet_tile {
for tile in roach eyes
do
- montage ../../images/roach_21/${tile}_${1}.png ../../images/roach_21/${tile}_${2}.png ../../images/roach_21/${tile}_${3}.png ../../images/roach_21/${tile}_${4}.png ../../images/roach_21/${tile}_${1}.png ../../images/roach_21/${tile}_${2}.png ../../images/roach_21/${tile}_${3}.png ../../images/roach_21/${tile}_${4}.png ../../images/roach_21/${tile}_${1}.png -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 ../../images/roach_nonet/${tile}_${1}.png
+ montage ${imgdir}/roach_21/${tile}_${1}.png ${imgdir}/roach_21/${tile}_${2}.png ${imgdir}/roach_21/${tile}_${3}.png ${imgdir}/roach_21/${tile}_${4}.png ${imgdir}/roach_21/${tile}_${1}.png ${imgdir}/roach_21/${tile}_${2}.png ${imgdir}/roach_21/${tile}_${3}.png ${imgdir}/roach_21/${tile}_${4}.png ${imgdir}/roach_21/${tile}_${1}.png -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 ${imgdir}/roach_nonet/${tile}_${1}.png
done
}