build engine: docs/guide sections (ART tiles, Build maps) with inputs from tools/fixtures/docs_build.py, bench lines, type fixes; bundles rebuilt
This commit is contained in:
1 parent
aacc78fac2
commit
082ea2019e
10 files changed
+3575
-1085
No files matched your search
@@ -60,17 +60,17 @@ local readu16 = buffer.readu16
|
||||
-- ------------------------------------------------------------------------------------------------ sniff
|
||||
local function layout(b: buffer, o: number, limit: number): (number?, number?, number?, number?)
|
||||
if limit - o < HEADER then
|
||||
return nil
|
||||
return nil, nil, nil, nil
|
||||
end
|
||||
local ns = readu16(b, o + 20)
|
||||
local p = o + HEADER + ns * SECTOR_SIZE
|
||||
if p + 2 > limit then
|
||||
return nil
|
||||
return nil, nil, nil, nil
|
||||
end
|
||||
local nw = readu16(b, p)
|
||||
p += 2 + nw * WALL_SIZE
|
||||
if p + 2 > limit then
|
||||
return nil
|
||||
return nil, nil, nil, nil
|
||||
end
|
||||
local nsp = readu16(b, p)
|
||||
p += 2 + nsp * SPRITE_SIZE
|
||||
@@ -148,9 +148,9 @@ function BuildMap.parse(r: Bytes.Reader, opts: DecodeOptions?): (Map?, Err.Err?)
|
||||
z = buffer.readi32(b, o + 12),
|
||||
ang = buffer.readi16(b, o + 16),
|
||||
cursectnum = buffer.readi16(b, o + 18),
|
||||
sectors = table.create(ns),
|
||||
walls = table.create(nw),
|
||||
sprites = table.create(nsp),
|
||||
sectors = table.create(ns) :: { Sector },
|
||||
walls = table.create(nw) :: { Wall },
|
||||
sprites = table.create(nsp) :: { Sprite },
|
||||
}
|
||||
local p = o + HEADER
|
||||
for i = 1, ns do
|
||||
|
||||
Reference in new issue
Block a user