10604
|
1 |
|
|
2 |
function onPreviewInit()
|
|
3 |
onGameInit()
|
|
4 |
end
|
|
5 |
|
|
6 |
function onGameInit()
|
|
7 |
MapGen = mgDrawn
|
|
8 |
TemplateFilter = 0
|
11064
|
9 |
local step = 80 + 10 * MapFeatureSize
|
|
10 |
local width = 1 + div(math.max(0, MapFeatureSize-12), 6)
|
|
11 |
-- center maze
|
|
12 |
local xoff = div((4000 % step), 2)
|
11063
|
13 |
for y = 48,2048,step do
|
11064
|
14 |
for x = 48+xoff,4048-step,step do
|
10604
|
15 |
if GetRandom(2) == 0 then
|
11064
|
16 |
AddPoint(x,y,width)
|
11063
|
17 |
AddPoint(x+step,y+step)
|
10604
|
18 |
else
|
11064
|
19 |
AddPoint(x,y+step,width)
|
11063
|
20 |
AddPoint(x+step,y)
|
10604
|
21 |
end
|
|
22 |
end
|
|
23 |
end
|
|
24 |
FlushPoints()
|
|
25 |
end
|