mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
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:
parent
4ea4bf2ea9
commit
1fab90da10
1 changed files with 12 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue