summaryrefslogtreecommitdiff
path: root/createmap.py
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-10 00:29:01 +0100
committerdavidovski <david@davidovski.xyz>2023-07-10 00:29:57 +0100
commitb87245927e08887af7746ce0f7a91d3f73af0572 (patch)
tree0c05b62e5de041e62f5373b747f292b348ce9491 /createmap.py
parentab6501461a12894795661914096704451c343344 (diff)
cleanup project
Diffstat (limited to 'createmap.py')
-rwxr-xr-xcreatemap.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/createmap.py b/createmap.py
deleted file mode 100755
index 59fb315..0000000
--- a/createmap.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-import sys
-
-outfile = "map.tiles"
-
-WIDTH = 500
-HEIGHT = 100
-# number of bytes each tile needs to represent
-TILEBYTES = 25
-
-HEADER = "TILEFILEv1"
-
-with open(outfile, "wb") as file:
- file.write(bytes(HEADER, "ascii"))
- file.write(WIDTH.to_bytes(4, 'big'));
- file.write(HEIGHT.to_bytes(4, 'big'));
- file.write(TILEBYTES.to_bytes(4, 'big'));
-
- for y in range(HEIGHT):
- for x in range(WIDTH):
- index = (x + y) % 5
- file.write(index.to_bytes(TILEBYTES, 'big'));
-