mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +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
|
end
|
||||||
|
|
||||||
if (artargend==nil or artargend==0) then
|
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
|
return -1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -107,15 +107,19 @@ function success(map, fn)
|
||||||
if (pic < 0 or pic > 30720) then -- MAXTILES
|
if (pic < 0 or pic > 30720) then -- MAXTILES
|
||||||
badoverpicnum = true
|
badoverpicnum = true
|
||||||
else
|
else
|
||||||
ysiz = tile.sizy[pic]
|
|
||||||
|
|
||||||
if (bit.band(wall[w].cstat, 16+32)==0) then
|
if (bit.band(wall[w].cstat, 16+32)==0) then
|
||||||
-- we don't care about non-masked/1-way walls
|
-- we don't care about non-masked/1-way walls
|
||||||
ysiz = 0
|
ysiz = nil
|
||||||
|
else
|
||||||
|
ysiz = tile.sizy[pic]
|
||||||
end
|
end
|
||||||
end
|
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
|
if (ysiz~=nil and ysiz > 0 and bit.band(ysiz, bit.bnot(ysiz-1))~=ysiz) then
|
||||||
-- non-pow2 ysize
|
-- non-pow2 ysize
|
||||||
|
|
||||||
|
@ -132,6 +136,10 @@ function success(map, fn)
|
||||||
|
|
||||||
-- report our findings
|
-- report our findings
|
||||||
|
|
||||||
|
if (#np2walls == 0) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- sort in wall index order
|
-- sort in wall index order
|
||||||
table.sort(np2walls)
|
table.sort(np2walls)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue