85 |
end |
end |
86 |
|
|
87 |
function fill_floor(name, x0,y0, w,h) |
function fill_floor(name, x0,y0, w,h) |
88 |
|
if x0 == nil then x0 = 0 end |
89 |
|
if y0 == nil then y0 = 0 end |
90 |
|
if w == nil then w = level_width end |
91 |
|
if h == nil then h = level_height end |
92 |
for y=y0,y0+h-1 do |
for y=y0,y0+h-1 do |
93 |
for x=x0,x0+w-1 do set_floor(name, x, y) end |
for x=x0,x0+w-1 do set_floor(name, x, y) end |
94 |
end |
end |
145 |
end |
end |
146 |
end |
end |
147 |
|
|
148 |
function draw_border(stonename) |
function draw_border(stonename, x0, y0, w, h) |
149 |
draw_stones(stonename, {0,0}, {1,0}, level_width) |
if x0 == nil then x0 = 0 end |
150 |
draw_stones(stonename, {0,level_height-1},{1,0}, level_width) |
if y0 == nil then y0 = 0 end |
151 |
draw_stones(stonename, {0,0}, {0,1}, level_height) |
if w == nil then w = level_width end |
152 |
draw_stones(stonename, {level_width-1,0},{0,1}, level_height) |
if h == nil then h = level_height end |
153 |
|
draw_stones(stonename, {x0,y0}, {1,0}, w) |
154 |
|
draw_stones(stonename, {x0,y0+h-1},{1,0}, w) |
155 |
|
draw_stones(stonename, {x0,y0}, {0,1}, h) |
156 |
|
draw_stones(stonename, {x0+w-1,y0},{0,1}, h) |
157 |
end |
end |
158 |
|
|
159 |
function set_stones(name, poslist, attrs) |
function set_stones(name, poslist, attrs) |