Fix build.lua's loadarts(), add bigytiles.lua.

git-svn-id: https://svn.eduke32.com/eduke32@3312 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-12-23 14:00:00 +00:00
parent 9af1cf8368
commit d975a6a24f
2 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,16 @@
#!/usr/bin/env luajit
if (arg[1]==nil) then
print("Usage: "..arg[0].." ../path/to/*.ART")
return 1
end
B = require "build"
tile = B.loadarts(arg)
for i=0,B.MAX.TILES-1 do
if (tile.sizy[i] > 256) then
print(i..": "..tile.sizy[i])
end
end

View file

@ -64,7 +64,7 @@ typedef struct
local C = ffi.C
local MAX =
MAX =
{
SECTORS = { [7]=1024, [8]=4096, [9]=4096 },
WALLS = { [7]=8192, [8]=16384, [9]=16384 },
@ -343,7 +343,8 @@ function loadarts(filenames)
end
local localtilestart = cd[2]
local numtileshere = cd[3]-localtilestart
local numtileshere = cd[3]-localtilestart+1
-- print(fn.. ": "..cd[2].. ", "..cd[3])
if (numtileshere < 0 or localtilestart+numtileshere >= MAX.TILES) then
fh:close()