mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
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:
parent
2eff7bf6ce
commit
a1091233d2
2 changed files with 8 additions and 5 deletions
|
@ -4514,8 +4514,10 @@ static int32_t C_ParseCommand(int32_t loop)
|
||||||
g_scriptPtr--;
|
g_scriptPtr--;
|
||||||
j = *g_scriptPtr;
|
j = *g_scriptPtr;
|
||||||
|
|
||||||
C_GetNextValue(LABEL_DEFINE);
|
int32_t flags = 0;
|
||||||
g_scriptPtr--;
|
do
|
||||||
|
C_BitOrNextValue(&flags);
|
||||||
|
while (C_GetKeyword() == -1);
|
||||||
|
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
|
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
|
||||||
{
|
{
|
||||||
|
@ -4524,7 +4526,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_tile[j].flags = *g_scriptPtr;
|
g_tile[j].flags = flags;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1305,6 +1305,7 @@ function Cmd.xspriteflags(tilenum, flags, override)
|
||||||
contprintf(false, "at %s %d:%d", loc[1], loc[2], loc[3])
|
contprintf(false, "at %s %d:%d", loc[1], loc[2], loc[3])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Mark the last 'spriteflags' or 'sprite*' directive for the given actor.
|
||||||
g_code.aflagsloc[tilenum] = getLocation(format("'%s' for actor", g_lastkw), pos)
|
g_code.aflagsloc[tilenum] = getLocation(format("'%s' for actor", g_lastkw), pos)
|
||||||
|
|
||||||
if (ffi and ok) then
|
if (ffi and ok) then
|
||||||
|
@ -1840,8 +1841,8 @@ local Couter = {
|
||||||
spriteshadow = cmd(D)
|
spriteshadow = cmd(D)
|
||||||
/ function(tilenum, flags) Cmd.xspriteflags(tilenum, conl.SFLAG.SFLAG_SHADOW) end,
|
/ function(tilenum, flags) Cmd.xspriteflags(tilenum, conl.SFLAG.SFLAG_SHADOW) end,
|
||||||
|
|
||||||
spriteflags = cmd(D,D) -- also see inner
|
spriteflags = (sp1 * tok.define)^2 -- also see inner
|
||||||
/ function(tilenum, flags) Cmd.xspriteflags(tilenum, flags, true) end,
|
/ function(tilenum, ...) Cmd.xspriteflags(tilenum, bit.bor(...), true) end,
|
||||||
|
|
||||||
--- 4. Game Variables / Arrays
|
--- 4. Game Variables / Arrays
|
||||||
gamevar = cmd(I,D,D)
|
gamevar = cmd(I,D,D)
|
||||||
|
|
Loading…
Reference in a new issue