CON: allow passing more than one flag to the 'spriteflags' directive.

These will be bitwise-OR'd.

git-svn-id: https://svn.eduke32.com/eduke32@4841 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-12-26 17:29:58 +00:00
parent 2eff7bf6ce
commit a1091233d2
2 changed files with 8 additions and 5 deletions

View File

@ -4514,8 +4514,10 @@ static int32_t C_ParseCommand(int32_t loop)
g_scriptPtr--;
j = *g_scriptPtr;
C_GetNextValue(LABEL_DEFINE);
g_scriptPtr--;
int32_t flags = 0;
do
C_BitOrNextValue(&flags);
while (C_GetKeyword() == -1);
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
{
@ -4524,7 +4526,7 @@ static int32_t C_ParseCommand(int32_t loop)
continue;
}
g_tile[j].flags = *g_scriptPtr;
g_tile[j].flags = flags;
continue;
}

View File

@ -1305,6 +1305,7 @@ function Cmd.xspriteflags(tilenum, flags, override)
contprintf(false, "at %s %d:%d", loc[1], loc[2], loc[3])
end
-- Mark the last 'spriteflags' or 'sprite*' directive for the given actor.
g_code.aflagsloc[tilenum] = getLocation(format("'%s' for actor", g_lastkw), pos)
if (ffi and ok) then
@ -1840,8 +1841,8 @@ local Couter = {
spriteshadow = cmd(D)
/ function(tilenum, flags) Cmd.xspriteflags(tilenum, conl.SFLAG.SFLAG_SHADOW) end,
spriteflags = cmd(D,D) -- also see inner
/ function(tilenum, flags) Cmd.xspriteflags(tilenum, flags, true) end,
spriteflags = (sp1 * tok.define)^2 -- also see inner
/ function(tilenum, ...) Cmd.xspriteflags(tilenum, bit.bor(...), true) end,
--- 4. Game Variables / Arrays
gamevar = cmd(I,D,D)