diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-05 12:39:34 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-05 12:39:34 +0200 |
commit | 9af10c2b7851e74f0f67fbbbcb2c299f566285f9 (patch) | |
tree | e0dd21f592139f27c60e79b4798d339c62e0bbcf /maps/mapprint.py | |
parent | a4bd0d8b339c74ba626b99c3a4993b3e56e7b240 (diff) |
remove map sketches and added technical operation summary + discussion notes
Diffstat (limited to 'maps/mapprint.py')
-rwxr-xr-x | maps/mapprint.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/maps/mapprint.py b/maps/mapprint.py deleted file mode 100755 index 4b56db6..0000000 --- a/maps/mapprint.py +++ /dev/null @@ -1,24 +0,0 @@ -import sys -from struct import unpack - -def mapprint(filename): - file = open(filename, 'rb') - contents = file.read() - file.close() - - width, height = unpack('>HH', contents[0:4]) - - for y in range(height): - for x in range(width): - nibble = x + y * width - byte = int(nibble / 2) - shift = byte * 2 - nibble + 1 - num = (contents[4 + byte] & (0xf << 4 * shift)) >> 4 * shift - print(" ─│┘──└┴│┐│┤┌┬├┼"[num], end='') - print("\n", end='') - -if __name__ == "__main__": - if len(sys.argv) > 1: - mapprint(sys.argv[1]) - else: - exit(1) |