From e8a5f5410a0e876d889a2a8137c34bb925f65408 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 8 Apr 2022 01:29:54 +0200 Subject: Assets. --- tools/gentextures.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tools/gentextures.sh (limited to 'tools/gentextures.sh') diff --git a/tools/gentextures.sh b/tools/gentextures.sh new file mode 100644 index 0000000..cacd968 --- /dev/null +++ b/tools/gentextures.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# 2022 +# depression: c4ab8b b39e83 +# depression (old): c4bd9c +# marsh: 939874 747e5c +# mountain: b3b37d 9a9a6e +# desert: ccbda4 d6c5aa + +cat tools/wetland.pbm | pgmtoppm "#747e5c-#939874" | ppmquant 2 | pnmtopng > texture_marsh.png +#pngtopnm tools/scree_overlay@2x.png | pgmtoppm "black-#c4ab8b" | ppmquant 2 | pnmtopng > texture_scree.png +pngtopnm tools/scree_overlay@2x.png | pgmtoppm "black-#c4bd9c" | ppmquant 2 | pnmtopng > texture_scree.png +#pngtopnm tools/rock_overlay@2x.png | pnmnorm | pgmtoppm "#aaa26f-#bab079" | ppmquant 2 | pnmtopng > texture_mountain.png +pngtopnm tools/rock_overlay@2x.png | pnmnorm | pgmtoppm "#9d9d6a-#aaaa77" | ppmquant 2 | pnmtopng > texture_mountain.png +pngtopnm tools/rock_overlay@2x.png | pnmnorm | pgmtoppm "#ccbda4-#d6c5aa" | ppmquant 2 | pnmtopng > texture_clear.png +pngtopnm tools/rock_overlay@2x.png | pnmnorm | pgmtoppm "#bba487-#c4ab8b" | ppmquant 2 | pnmtopng > texture_depression.png + +for PNG in texture_*.png +do + zopflipng -y $PNG $PNG +done + +exit 0 + +OUT=textures.svg +rm -f $OUT +for PNG in texture_*.png +do +SIZE=$(file $PNG | sed 's/[^0-9]*//;s/ .*//') +echo '' >> $OUT +echo '' >> $OUT +echo '"' >> $OUT +echo >> $OUT +done -- cgit v1.2.3