#!/usr/bin/python # generate a map # map will be bottom-left (0,0) - 256 x 256 in dimensions. # player will be at (32,32) due north # sector 0 will be the only sector with light level 120, floor 0, # ceiling 128, no specials # floor will be floor0_1 # sky will be f_sky1 # linedefs will all have a mid-texture STARTAN2 # things first: each int is 2 bytes le; from struct import pack, unpack import sys x = y = 32 angle = 0 doomed = 0x01 # player start flags = 0x0001 | 0x0002 | 0x0004 THINGS = pack("<5h", x, y, angle, doomed, flags) # vertices next: we'll go clockwise from the start point vertices = [ (0,0), (0,128), (0,256), (256,256), (256,128), (256,0) ] VERTEXES = ''.join( map(''.join, map(lambda tuple: map(lambda x: pack("