mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
LunaCON: Add -Wall option and sector[].*bunch, warn on some NYI gamevar flags.
git-svn-id: https://svn.eduke32.com/eduke32@3804 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
85cf8de0f3
commit
1ee43d5a6e
4 changed files with 25 additions and 12 deletions
|
@ -122,7 +122,6 @@ enum GamevarFlags_t {
|
|||
GAMEVAR_CHARPTR = 0x00010000, // plValues is a pointer to a char
|
||||
GAMEVAR_PTR_MASK = GAMEVAR_INTPTR|GAMEVAR_FLOATPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR,
|
||||
|
||||
// GAMEVAR_NORESET = 0x00020000, // var values are not reset when restoring map state
|
||||
GAMEVAR_SPECIAL = 0x00040000, // flag for structure member shortcut vars
|
||||
};
|
||||
|
||||
|
@ -142,7 +141,6 @@ enum GamearrayFlags_t {
|
|||
GAMEARRAY_VARSIZE = 0x00000020,
|
||||
|
||||
GAMEARRAY_RESET = 0x00000008,
|
||||
/// GAMEARRAY_NORESET = 0x00000001,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -725,8 +725,8 @@ local SectorLabels = {
|
|||
hitag = SEC".hitag",
|
||||
extra = SEC".extra",
|
||||
|
||||
ceilingbunch = {},
|
||||
floorbunch = {},
|
||||
ceilingbunch = { SEC".ceilingbunch" },
|
||||
floorbunch = { SEC".floorbunch" },
|
||||
|
||||
ulotag = S2U(SEC".lotag"),
|
||||
uhitag = S2U(SEC".hitag"),
|
||||
|
|
|
@ -1376,7 +1376,7 @@ local function our_require(modname, ...)
|
|||
errorf(ERRLEV-1, "Couldn't open file \"%s\"", modfn)
|
||||
end
|
||||
|
||||
local modfunc, errmsg = loadstring(str)
|
||||
local modfunc, errmsg = loadstring(str, modfn)
|
||||
if (modfunc == nil) then
|
||||
errorf(ERRLEV-1, "Couldn't load \"%s\": %s", modname, errmsg)
|
||||
end
|
||||
|
|
|
@ -1113,6 +1113,12 @@ function Cmd.gamevar(identifier, initval, flags)
|
|||
return
|
||||
end
|
||||
|
||||
local GVFLAG_NYI = GVFLAG.NODEFAULT + GVFLAG.NORESET
|
||||
if (bit.band(flags, GVFLAG_NYI) ~= 0) then
|
||||
warnprintf("gamevar \"%s\" flag(s) %d: not yet implemented",
|
||||
identifier, bit.band(flags, GVFLAG_NYI))
|
||||
end
|
||||
|
||||
if (flags==GVFLAG.PERPLAYER+GVFLAG.PERACTOR) then
|
||||
errprintf("invalid gamevar flags: must be either PERPLAYER or PERACTOR, not both")
|
||||
return
|
||||
|
@ -3227,14 +3233,23 @@ local function handle_cmdline_arg(str)
|
|||
local val = true
|
||||
local warnstr = str:sub(3)
|
||||
|
||||
if (warnstr:sub(1,3)=="no-") then
|
||||
val = false
|
||||
warnstr = warnstr:sub(4)
|
||||
end
|
||||
|
||||
if (type(g_warn[warnstr])=="boolean") then
|
||||
g_warn[warnstr] = val
|
||||
if (warnstr == "all") then
|
||||
-- Enable all warnings.
|
||||
for wopt in pairs(g_warn) do
|
||||
g_warn[wopt] = true
|
||||
end
|
||||
ok = true
|
||||
else
|
||||
-- Enable or disable a particular warning.
|
||||
if (warnstr:sub(1,3)=="no-") then
|
||||
val = false
|
||||
warnstr = warnstr:sub(4)
|
||||
end
|
||||
|
||||
if (type(g_warn[warnstr])=="boolean") then
|
||||
g_warn[warnstr] = val
|
||||
ok = true
|
||||
end
|
||||
end
|
||||
|
||||
-- -fno* special handling
|
||||
|
|
Loading…
Reference in a new issue