Wall layout data

This commit is contained in:
Linus Probert 2019-03-04 07:35:26 +01:00
parent 13ca11c70e
commit 1c4e600dd4
1 changed files with 46 additions and 12 deletions

View File

@ -1,5 +1,7 @@
local random = map_random
local pits = {}
local walls = {}
local fences = {}
local function readLayoutFile(file)
local layoutfile = read_file(file)
@ -78,20 +80,52 @@ local module = {}
function module.load_textures(map)
local t_pit0 = add_texture(map, "Objects/Pit0.png")
local t_pit1 = add_texture(map, "Objects/Pit1.png")
local pit_yo = (random(5) + random(3)) * (16 * 2)
local t_wall = add_texture(map, "Objects/Wall.png")
local t_fence = add_texture(map, "Objects/Fence.png")
local yoffset = (random(5) + random(3)) * (16 * 2)
pits = {
center = { t_pit0, t_pit1, 16, pit_yo + 16, false, false, false, true },
top = { t_pit0, t_pit1, 16, pit_yo, false, false, false, true },
left = { t_pit0, t_pit1, 0, pit_yo + 16, false, false, false, true },
right = { t_pit0, t_pit1, 32, pit_yo + 16, false, false, false, true },
topleft = { t_pit0, t_pit1, 0, pit_yo, false, false, false, true },
topright = { t_pit0, t_pit1, 32, pit_yo, false, false, false, true },
innerleft = { t_pit0, t_pit1, 80, pit_yo, false, false, false, true },
innermid = { t_pit0, t_pit1, 96, pit_yo, false, false, false, true },
innerright = { t_pit0, t_pit1, 112, pit_yo, false, false, false, true },
topcrevice = { t_pit0, t_pit1, 64, pit_yo, false, false, false, true },
bottomcrevice = { t_pit0, t_pit1, 64, pit_yo + 16, false, false, false, true },
center = { t_pit0, t_pit1, 16, yoffset + 16, false, false, false, true },
top = { t_pit0, t_pit1, 16, yoffset, false, false, false, true },
left = { t_pit0, t_pit1, 0, yoffset + 16, false, false, false, true },
right = { t_pit0, t_pit1, 32, yoffset + 16, false, false, false, true },
topleft = { t_pit0, t_pit1, 0, yoffset, false, false, false, true },
topright = { t_pit0, t_pit1, 32, yoffset, false, false, false, true },
innerleft = { t_pit0, t_pit1, 80, yoffset, false, false, false, true },
innermid = { t_pit0, t_pit1, 96, yoffset, false, false, false, true },
innerright = { t_pit0, t_pit1, 112, yoffset, false, false, false, true },
topcrevice = { t_pit0, t_pit1, 64, yoffset, false, false, false, true },
bottomcrevice = { t_pit0, t_pit1, 64, yoffset + 16, false, false, false, true },
}
local yoffset = 48
walls = {
topleft = { t_wall, nil, 0, yoffset, true },
top = { t_wall, nil, 16, yoffset, true },
topright = { t_wall, nil, 32, yoffset, true },
left = { t_wall, nil, 0, yoffset + 16, true },
bottomleft = { t_wall, nil, 0, yoffset + 32, true },
bottomright = { t_wall, nil, 32, yoffset + 32, true },
top_t = { t_wall, nil, 64, yoffset, true },
left_t = { t_wall, nil, 48, yoffset + 16, true },
cross = { t_wall, nil, 64, yoffset + 16, true },
right_t = { t_wall, nil, 80, yoffset + 16, true },
bottom_t = { t_wall, nil, 64, yoffset + 32, true },
}
local yoffset = 48
fences = {
topleft = { t_fence, nil, 0, yoffset, true },
top = { t_fence, nil, 16, yoffset, true },
topright = { t_fence, nil, 32, yoffset, true },
left = { t_fence, nil, 0, yoffset + 16, true },
bottomleft = { t_fence, nil, 0, yoffset + 32, true },
bottomright = { t_fence, nil, 32, yoffset + 32, true },
top_t = { t_fence, nil, 64, yoffset, true },
left_t = { t_fence, nil, 48, yoffset + 16, true },
cross = { t_fence, nil, 64, yoffset + 16, true },
right_t = { t_fence, nil, 80, yoffset + 16, true },
bottom_t = { t_fence, nil, 64, yoffset + 32, true },
}
end