diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 21:20:54 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 21:20:54 +0200 |
commit | 79deed3c44a26642154a9af25e92709036e2b459 (patch) | |
tree | bf3a110824438f51711a6af0a417570a436d2c53 /mapGen/README.md | |
parent | 52583613b1f926d48ba76038259cde735d06fb43 (diff) | |
download | scripts-79deed3c44a26642154a9af25e92709036e2b459.tar.gz scripts-79deed3c44a26642154a9af25e92709036e2b459.zip |
Added option to magGen.sh to choose output file.
Diffstat (limited to 'mapGen/README.md')
-rw-r--r-- | mapGen/README.md | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/mapGen/README.md b/mapGen/README.md index 242b5d4..10078e2 100644 --- a/mapGen/README.md +++ b/mapGen/README.md @@ -15,7 +15,7 @@ xxxxx ## Dependencies - A POSIX-compliant shell (`bash`, `dash`, `sh`, `zsh`) -- ImageMagick +- [ImageMagick](https://imagemagick.org/index.php) - Tools expected in a Unix environment: `grep`, `sed`, `awk` ## Motivation @@ -26,10 +26,11 @@ The want for Vim to be a map maker. Given a text file in which each character represents a cell, have a script draw that map. -`mapGen.sh` takes as input a text file with a block of text which ideally has a block of characters -with no missing ones. It also takes a folder in which tile images are supposed to be. For each -character in the file, it randomly takes one image in that folder which name starts with that -characters and creates an image from the text file. +`mapGen.sh` takes as input a text file which ideally has a block of characters of any size but of +rectangular shape with no missing ones. It also takes a folder in which tile images are supposed to +be. For each character in the file it randomly takes one image in that folder which name starts +with that character and composes it into the map image with the help of the `convert` command from +ImageMagick. ## Examples @@ -71,12 +72,15 @@ XXXXXXXXXooXXXXXXXXX ## Usage ``` -mapGen.sh [-s SIZE] [-f TILE_FOLDER] SOURCE_FILE +mapGen.sh [-s SIZE] [-f TILE_FOLDER] [-o OUTPUT_FILE] SOURCE_FILE ``` -Where `SIZE` is the size of the tile images in pixels (default 8), `TILE_FOLDER` is the folder -where the tile images are stored (default `./tiles`) and `SOURCE_FILE` is the text file with the -layout of the map. +Where + +- `SIZE` is the size of the tile images in pixels (default 8), +- `TILE_FOLDER` is the folder where the tile images are stored (default `./tiles`), +- `OUTPUT_FILE` is the path to the resulting image (default `out.jpg`), +- and `SOURCE_FILE` is the text file with the layout of the map. ## Possibilities |