2 regmap(t
.width
,t
.height
,t
.spawn
[1],t
.spawn
[2])
3 for i
,p
in pairs(t
.platforms
) do
4 regplatform(p
[1],p
[2],p
[3],p
[4],p
.passable
,p
.color
[1],p
.color
[2],p
.color
[3])
6 for i
,w
in pairs(t
.weapons
) do
7 regweapon(w
.name
, w
.spawn
[1], w
.spawn
[2])
9 for i
,e
in pairs(t
.enemies
) do
10 regenemy(e
.name
, e
.spawn
[1], e
.spawn
[2])
16 if t
.passable
== nil then
19 if t
.color
== nil then
21 t
.color
= {0.5,0.5,0.5}