Minor changes for Lunatic utils, replace missed sound flag literals with macros.

git-svn-id: https://svn.eduke32.com/eduke32@4067 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-09-21 13:38:07 +00:00
parent eac9dd04bf
commit d2cd8af510
3 changed files with 13 additions and 3 deletions

View file

@ -2169,9 +2169,9 @@ void C_DefineSound(int32_t sndidx, const char *fn, int32_t args[5])
snd->ps = args[0];
snd->pe = args[1];
snd->pr = args[2];
snd->m = args[3] & ~32;
if (args[3] & 1)
snd->m |= 32;
snd->m = args[3] & ~SF_ONEINST_INTERNAL;
if (args[3] & SF_LOOP)
snd->m |= SF_ONEINST_INTERNAL;
snd->vo = args[4];
if (sndidx > g_maxSoundPos)

View file

@ -20,8 +20,10 @@ module(...)
local ENEMY_NAME = {
--[[
[D.BOSS1] = "BOSS1",
[D.BOSS1STAYPUT] = "BOSS1STAYPUT",
--]]
[D.BOSS2] = "BOSS2",
[D.BOSS3] = "BOSS3",
[D.BOSS4] = "BOSS4",

View file

@ -27,6 +27,9 @@
-- $ prog='if (map.version==9) then print(map.numbunches.." ".. math.max(unpack(map.sectsperbunch[0],0)) .." "..fn) end'
-- $ ./findmaps.sh ~/.eduke32 "$prog" |sort -n -k 2
-- Print all MUSICANDSFX sprites that play sounds with bit 1 set.
-- ./findmaps.sh /g/Games/Eduke32c/grp 'sprite: .picnum==5 and eq(.lotag, {170, 186, 187, 279, 382, 347}) :: io. write(" ".. tostring(.lotag))'
local B = require "build"
local string = require "string"
local io = require "io"
@ -94,6 +97,11 @@ if (modname:sub(1,2) == "-e") then
end
local successfunc, errmsg = loadstring([[
local function eq(x, tab)
for i=1,#tab do
if (x==tab[i]) then return true end
end
end
local d=require('build').readdefs('../../names.h') or error('Need ../../names.h') -- XXX
local numsectors, numwalls, numsprites, sector, wall, sprite
return function (map, fn)