diff options
-rwxr-xr-x | misc/maze.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/misc/maze.py b/misc/maze.py index 081e1c5..9a2c2d7 100755 --- a/misc/maze.py +++ b/misc/maze.py @@ -96,13 +96,17 @@ def MakeMaze(maze): yc+=3 return TRUEMAZE -def BuildLayer(LayerName, w, h, LayerData): +def BuildLayer(LayerName, w, h, LayerData, invisible=False): + if invisible: + inv=' visible="0"' + else: + inv="" return(""" - <layer name="%s" width="%d" height="%d"> + <layer name="%s" width="%d" height="%d"%s> <data encoding="csv"> %s </data> - </layer>""" % (LayerName, w, (h+1)*3, LayerData)) + </layer>""" % (LayerName, w, (h+1)*3, inv, LayerData)) # Begin print "Begin!" @@ -147,12 +151,14 @@ while MazeID < MaxMazes: # Build set layer f.write(BuildLayer("set", width, y, MAZEDATA)) - # Build the other layers + # Build the other tile 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)) + + # Build the other invisible layers + f.write(BuildLayer("Collision", width, y, MAZEMPTY, True)) + f.write(BuildLayer("Heights", width, y, MAZEMPTY, True)) # Close the mapfile f.write(""" <objectgroup name="Objects"/> |