From 9675503933d488736bb59f81337ab103fc0b2f57 Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 11 Jul 2023 23:00:41 +0100 Subject: implement save on exit for editor --- tools/createmap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/createmap.py') diff --git a/tools/createmap.py b/tools/createmap.py index b5c5b2e..ed5715a 100755 --- a/tools/createmap.py +++ b/tools/createmap.py @@ -8,8 +8,8 @@ outfile = "map.tiles" ATLASFILE = "atlas.png" TILESIZE = 16 -WIDTH = 2**10 -HEIGHT = 2**10 +WIDTH = 64 +HEIGHT = 64 # create atlas bytes image = Image.open(ATLASFILE).convert("RGBA") @@ -40,7 +40,7 @@ with open(outfile, "wb") as file: for y in range(HEIGHT): for x in range(WIDTH): - index = (x + y) % 5 + index = 0; file.write(index.to_bytes(tilebytes, 'big')); file.write(TILESIZE.to_bytes(4, 'big')); -- cgit v1.2.1