lunatic/util/mapypan.lua: omit MIRROR, don't print maps w/o problematic tiles.

git-svn-id: https://svn.eduke32.com/eduke32@4483 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-05-28 22:40:12 +00:00
parent 4ea4bf2ea9
commit 1fab90da10

View file

@ -33,7 +33,7 @@ function init(arg)
end
if (artargend==nil or artargend==0) then
printf("Usage: luajit ./foreachmap.lua <tilesXXX.ART> [, ...] -- <filename1.map> ...\n")
printf("Usage: luajit ./foreachmap.lua %s <tilesXXX.ART> [, ...] -- <filename1.map> ...\n", arg[1])
return -1
end
@ -107,15 +107,19 @@ function success(map, fn)
if (pic < 0 or pic > 30720) then -- MAXTILES
badoverpicnum = true
else
ysiz = tile.sizy[pic]
if (bit.band(wall[w].cstat, 16+32)==0) then
-- we don't care about non-masked/1-way walls
ysiz = 0
ysiz = nil
else
ysiz = tile.sizy[pic]
end
end
end
if (pic == 560) then -- Don't care for MIRROR
ysiz = nil
end
if (ysiz~=nil and ysiz > 0 and bit.band(ysiz, bit.bnot(ysiz-1))~=ysiz) then
-- non-pow2 ysize
@ -132,6 +136,10 @@ function success(map, fn)
-- report our findings
if (#np2walls == 0) then
return
end
-- sort in wall index order
table.sort(np2walls)