From 763a74a71b66eb779529f795e64341077d571fa0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 25 Jun 2020 19:39:00 -0300 Subject: Build all maze layers, so it can be automapped right at start --- misc/maze.py | 30 ++++++++++++++++-------------- 1 file 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(""" + + +%s + + """ % (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(""" - - -%s - - """ % (width, (y+1)*3, MAZEDATA)) - - # Build heights layer - f.write(""" - - -%s - - """ % (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(""" -- cgit v1.2.3-70-g09d2