diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 14:41:53 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 14:41:53 +0200 |
commit | 4e7cf6c285f1e932a04e16cf144917333b78e579 (patch) | |
tree | d65cf35abcccc73c25e2e16953b888dc8b99a266 /mapGen | |
parent | 1ce6627eb3c82b110eb24a28fa7697e271c21ffa (diff) | |
download | scripts-4e7cf6c285f1e932a04e16cf144917333b78e579.tar.gz scripts-4e7cf6c285f1e932a04e16cf144917333b78e579.zip |
i3blocks: short mem text and fixed exit when cmus not running.
Diffstat (limited to 'mapGen')
-rw-r--r-- | mapGen/bigmap.dg | 55 | ||||
-rw-r--r-- | mapGen/chamber.xcf | bin | 0 -> 777 bytes | |||
-rw-r--r-- | mapGen/door.xcf | bin | 0 -> 804 bytes | |||
-rw-r--r-- | mapGen/floor.xcf | bin | 0 -> 723 bytes | |||
-rw-r--r-- | mapGen/grass.xcf | bin | 0 -> 801 bytes | |||
-rw-r--r-- | mapGen/greenBlueRedOut.jpg | bin | 0 -> 16272 bytes | |||
-rw-r--r-- | mapGen/map.dg | 5 | ||||
-rwxr-xr-x | mapGen/mapGen.sh | 38 | ||||
-rw-r--r-- | mapGen/mapOut.jpg | bin | 0 -> 263440 bytes | |||
-rw-r--r-- | mapGen/out.jpg | bin | 0 -> 15478 bytes | |||
-rw-r--r-- | mapGen/passage.xcf | bin | 0 -> 795 bytes | |||
-rw-r--r-- | mapGen/randomMap.dg | 26 | ||||
-rw-r--r-- | mapGen/secretDoor.xcf | bin | 0 -> 801 bytes | |||
-rw-r--r-- | mapGen/tiles/Cchamber.jpg | bin | 0 -> 1278 bytes | |||
-rw-r--r-- | mapGen/tiles/Ddoor.jpg | bin | 0 -> 1282 bytes | |||
-rw-r--r-- | mapGen/tiles/Ggrass.jpg | bin | 0 -> 1275 bytes | |||
-rw-r--r-- | mapGen/tiles/Ppassage.jpg | bin | 0 -> 1286 bytes | |||
-rw-r--r-- | mapGen/tiles/SsecretDoor.jpg | bin | 0 -> 1280 bytes | |||
-rw-r--r-- | mapGen/tiles/Xwall.jpg | bin | 0 -> 1267 bytes | |||
-rw-r--r-- | mapGen/tiles/ofloor.jpg | bin | 0 -> 1263 bytes | |||
-rw-r--r-- | mapGen/wall.xcf | bin | 0 -> 768 bytes |
21 files changed, 124 insertions, 0 deletions
diff --git a/mapGen/bigmap.dg b/mapGen/bigmap.dg new file mode 100644 index 0000000..26f5289 --- /dev/null +++ b/mapGen/bigmap.dg @@ -0,0 +1,55 @@ +xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGG +-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx +xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGG +-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxx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xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx- +xGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxxxGGxx +xxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGGxxGGG +-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx-xGGx +-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx diff --git a/mapGen/chamber.xcf b/mapGen/chamber.xcf Binary files differnew file mode 100644 index 0000000..2198b9b --- /dev/null +++ b/mapGen/chamber.xcf diff --git a/mapGen/door.xcf b/mapGen/door.xcf Binary files differnew file mode 100644 index 0000000..fa1cc1a --- /dev/null +++ b/mapGen/door.xcf diff --git a/mapGen/floor.xcf b/mapGen/floor.xcf Binary files differnew file mode 100644 index 0000000..a83e4c2 --- /dev/null +++ b/mapGen/floor.xcf diff --git a/mapGen/grass.xcf b/mapGen/grass.xcf Binary files differnew file mode 100644 index 0000000..3b11c90 --- /dev/null +++ b/mapGen/grass.xcf diff --git a/mapGen/greenBlueRedOut.jpg b/mapGen/greenBlueRedOut.jpg Binary files differnew file mode 100644 index 0000000..7448cc8 --- /dev/null +++ b/mapGen/greenBlueRedOut.jpg diff --git a/mapGen/map.dg b/mapGen/map.dg new file mode 100644 index 0000000..7da4706 --- /dev/null +++ b/mapGen/map.dg @@ -0,0 +1,5 @@ +xxxxx +xGGxx +xxaaG +xxGax +xxxxx diff --git a/mapGen/mapGen.sh b/mapGen/mapGen.sh new file mode 100755 index 0000000..1be77f7 --- /dev/null +++ b/mapGen/mapGen.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# mapGen.sh +# +# Generate a map with ImageMagick from an input text file + +inputFile="$1" + +cellSize=8 + +tilesDir="./tiles" + +height="$(wc -l <"$inputFile")" +width="$(awk '{print length($0)}' "$inputFile" | sort -nr | sed 1q)" + +height=$((height*cellSize)) +width=$((width*cellSize)) + +echo $width $height + +convert -size "$width"x"$height" xc:cyan out.jpg + +row=0 +col=0 + +while read line; do + echo "$line" | ( + while read -n1 char; do + tileFile="$(find $tilesDir | sed 's|.*/||' | grep "^$char")" + tileFile="${tilesDir}/${tileFile}" + echo "$tileFile" | wc -l | grep 1 >/dev/null || continue + convert out.jpg "$tileFile" -geometry +"$col"+"$row" -composite out.jpg || + convert out.jpg -fill red -draw "point $col,$row" out.jpg + col=$((col+cellSize)) + done) + row=$((row+cellSize)) + col=0 +done <"$inputFile" diff --git a/mapGen/mapOut.jpg b/mapGen/mapOut.jpg Binary files differnew file mode 100644 index 0000000..7067c52 --- /dev/null +++ b/mapGen/mapOut.jpg diff --git a/mapGen/out.jpg b/mapGen/out.jpg Binary files differnew file mode 100644 index 0000000..d4a3964 --- /dev/null +++ b/mapGen/out.jpg diff --git a/mapGen/passage.xcf b/mapGen/passage.xcf Binary files differnew file mode 100644 index 0000000..926783a --- /dev/null +++ b/mapGen/passage.xcf diff --git a/mapGen/randomMap.dg b/mapGen/randomMap.dg new file mode 100644 index 0000000..2ead560 --- /dev/null +++ b/mapGen/randomMap.dg @@ -0,0 +1,26 @@ +XXXXXXXXXXXXXXXXXXXX +XXXXXXooooooooXXXXXX +XXXXXXoooooooooXXXXX +XXXXXXooooooooooooXX +XXXXCDooooooooooooDX +XXXXXXooooooooooooXX +XXXXXXooooooooooooXX +XXXXXXoooooooooXXXXX +XXXXXXooooooooXXXXXX +XXXXXXXXXSXXXXXXXXXX +XXXXXXXXooooXXXXXXXX +XXXXXXXooooooXXXXXXX +XXXXXXooooooooXXXXXX +XooooXoooCooooXooooX +XoCooXooooooooXooooX +XooooXooooooooXooooX +XooooXXooooooXXooooX +XooooXXXooooXXXooooX +XooooXXXXooXXXXooooX +XXXoXXXXXooXXXXXooXX +XXXoXXXXooooXXXXooXX +XXXoooooooooooooooXX +XXXXXXooooooooooooXX +XXXXXXXXooooXXXXXXXX +XXXXXXXXXooXXXXXXXXX +XXXXXXXXXooXXXXXXXXX diff --git a/mapGen/secretDoor.xcf b/mapGen/secretDoor.xcf Binary files differnew file mode 100644 index 0000000..6963426 --- /dev/null +++ b/mapGen/secretDoor.xcf diff --git a/mapGen/tiles/Cchamber.jpg b/mapGen/tiles/Cchamber.jpg Binary files differnew file mode 100644 index 0000000..a325761 --- /dev/null +++ b/mapGen/tiles/Cchamber.jpg diff --git a/mapGen/tiles/Ddoor.jpg b/mapGen/tiles/Ddoor.jpg Binary files differnew file mode 100644 index 0000000..167a16d --- /dev/null +++ b/mapGen/tiles/Ddoor.jpg diff --git a/mapGen/tiles/Ggrass.jpg b/mapGen/tiles/Ggrass.jpg Binary files differnew file mode 100644 index 0000000..a3f79e6 --- /dev/null +++ b/mapGen/tiles/Ggrass.jpg diff --git a/mapGen/tiles/Ppassage.jpg b/mapGen/tiles/Ppassage.jpg Binary files differnew file mode 100644 index 0000000..d21a0e9 --- /dev/null +++ b/mapGen/tiles/Ppassage.jpg diff --git a/mapGen/tiles/SsecretDoor.jpg b/mapGen/tiles/SsecretDoor.jpg Binary files differnew file mode 100644 index 0000000..ee974fa --- /dev/null +++ b/mapGen/tiles/SsecretDoor.jpg diff --git a/mapGen/tiles/Xwall.jpg b/mapGen/tiles/Xwall.jpg Binary files differnew file mode 100644 index 0000000..7d70085 --- /dev/null +++ b/mapGen/tiles/Xwall.jpg diff --git a/mapGen/tiles/ofloor.jpg b/mapGen/tiles/ofloor.jpg Binary files differnew file mode 100644 index 0000000..d79d794 --- /dev/null +++ b/mapGen/tiles/ofloor.jpg diff --git a/mapGen/wall.xcf b/mapGen/wall.xcf Binary files differnew file mode 100644 index 0000000..e1cc359 --- /dev/null +++ b/mapGen/wall.xcf |