summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-25 19:39:00 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-25 19:39:00 -0300
commit763a74a71b66eb779529f795e64341077d571fa0 (patch)
tree264139821c74c2a50b5b6e250c3ceedf7dfc7384 /misc
parent74568a92fad46e9e895f26fbd77b08f413970f3d (diff)
downloadtools-763a74a71b66eb779529f795e64341077d571fa0.tar.gz
tools-763a74a71b66eb779529f795e64341077d571fa0.tar.bz2
tools-763a74a71b66eb779529f795e64341077d571fa0.tar.xz
tools-763a74a71b66eb779529f795e64341077d571fa0.zip
Build all maze layers, so it can be automapped right at start
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/maze.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/misc/maze.py b/misc/maze.py
index 8e192db..081e1c5 100755
--- a/misc/maze.py
+++ b/misc/maze.py
@@ -96,6 +96,14 @@ def MakeMaze(maze):
yc+=3
return TRUEMAZE
+def BuildLayer(LayerName, w, h, LayerData):
+ return("""
+ <layer name="%s" width="%d" height="%d">
+ <data encoding="csv">
+%s
+ </data>
+ </layer>""" % (LayerName, w, (h+1)*3, LayerData))
+
# Begin
print "Begin!"
@@ -137,20 +145,14 @@ while MazeID < MaxMazes:
""" % (width, (y+1)*3))
# Build set layer
- f.write("""
- <layer name="set" width="%d" height="%d">
- <data encoding="csv">
-%s
- </data>
- </layer>""" % (width, (y+1)*3, MAZEDATA))
-
- # Build heights layer
- f.write("""
- <layer name="Heights" width="%d" height="%d">
- <data encoding="csv">
-%s
- </data>
- </layer>""" % (width, (y+1)*3, MAZEMPTY))
+ f.write(BuildLayer("set", width, y, MAZEDATA))
+
+ # Build the other layers
+ f.write(BuildLayer("Ground", width, y, MAZEMPTY))
+ f.write(BuildLayer("Fringe", width, y, MAZEMPTY))
+ f.write(BuildLayer("Over", width, y, MAZEMPTY))
+ f.write(BuildLayer("Collision", width, y, MAZEMPTY))
+ f.write(BuildLayer("Heights", width, y, MAZEMPTY))
# Close the mapfile
f.write(""" <objectgroup name="Objects"/>