diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-22 12:53:03 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-22 12:53:03 +0100 |
commit | cf000407b8d2d4e75a6f56b5d111f3e55e7400e5 (patch) | |
tree | 9ed14ce5c38213acfad0994018dbfe0c807197ab /tools/rotate.md | |
parent | f89c327501a841d5bdcb5d26be065819e0e13229 (diff) | |
download | tr8vm-cf000407b8d2d4e75a6f56b5d111f3e55e7400e5.tar.gz tr8vm-cf000407b8d2d4e75a6f56b5d111f3e55e7400e5.zip |
Added rotate tiles tool
Diffstat (limited to 'tools/rotate.md')
-rw-r--r-- | tools/rotate.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/rotate.md b/tools/rotate.md new file mode 100644 index 0000000..ab95c07 --- /dev/null +++ b/tools/rotate.md @@ -0,0 +1,40 @@ +# Rotate tiles + +This tool can be used to transform an image containing a tileset into a new +one with a single column of tiles, so can be loaded with ".incpng" and the +result is easy to index. + +For example, given 6 tiles of 8x8 pixels in `origin.ong`: + +``` +012345 +``` + +The command `./rotate.py origin.png 8 8 dest.png` will generate an image with +the tiles rearranged like this: + +``` +0 +1 +2 +3 +4 +5 +``` + +In this way tile 0 is in `addr`, tile 1 in `addr + 64`, tile 2 in `addr + 128`, etc. + +## Requirements + +The tool requires: + +- Python 3 +- PIL (or Pillow) + +For example, you can install Pillow with: + +``` +python3 -m pip install --upgrade pip +python3 -m pip install --upgrade Pillow +``` + |