mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 20:41:25 +00:00
Change the render flags to extra flags and improve SF_NOSUPERSPRITES
This commit is contained in:
parent
3f086ff612
commit
228668ce98
4 changed files with 26 additions and 24 deletions
|
@ -4351,6 +4351,8 @@ const char *const MOBJEFLAG_LIST[] = {
|
|||
"SPRUNG", // Mobj was already sprung this tic
|
||||
"APPLYPMOMZ", // Platform movement
|
||||
"TRACERANGLE", // Compute and trigger on mobj angle relative to tracer
|
||||
"FORCESUPER", // Forces an object to use super sprites with SPR_PLAY.
|
||||
"FORCENOSUPER", // Forces an object to NOT use super sprites with SPR_PLAY.
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -4905,9 +4907,6 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"RF_SHADOWDRAW",RF_SHADOWDRAW},
|
||||
{"RF_SHADOWEFFECTS",RF_SHADOWEFFECTS},
|
||||
{"RF_DROPSHADOW",RF_DROPSHADOW},
|
||||
{"RF_FORCESUPER",RF_FORCESUPER},
|
||||
{"RF_FORCENOSUPER",RF_FORCENOSUPER},
|
||||
{"RF_REVERSESUPER",RF_REVERSESUPER},
|
||||
|
||||
// Level flags
|
||||
{"LF_SCRIPTISFILE",LF_SCRIPTISFILE},
|
||||
|
|
12
src/p_mobj.c
12
src/p_mobj.c
|
@ -397,15 +397,17 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
UINT16 stateframe = st->frame;
|
||||
|
||||
// Add/Remove FF_SPR2SUPER based on certain conditions
|
||||
if (player->powers[pw_super] && !(player->charflags & SF_NOSUPERSPRITES))
|
||||
if (player->charflags & SF_NOSUPERSPRITES)
|
||||
stateframe = stateframe & ~FF_SPR2SUPER;
|
||||
else if (player->powers[pw_super])
|
||||
stateframe = stateframe | FF_SPR2SUPER;
|
||||
|
||||
if (stateframe & FF_SPR2SUPER)
|
||||
{
|
||||
if (mobj->renderflags & RF_FORCENOSUPER)
|
||||
if (mobj->eflags & MFE_FORCENOSUPER)
|
||||
stateframe = stateframe & ~FF_SPR2SUPER;
|
||||
}
|
||||
else if (mobj->renderflags & RF_FORCESUPER)
|
||||
else if (mobj->eflags & MFE_FORCESUPER)
|
||||
stateframe = stateframe | FF_SPR2SUPER;
|
||||
|
||||
// Get the sprite2 and frame number
|
||||
|
@ -543,10 +545,10 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
|
|||
// Add/Remove FF_SPR2SUPER based on certain conditions
|
||||
if (stateframe & FF_SPR2SUPER)
|
||||
{
|
||||
if (mobj->renderflags & RF_FORCENOSUPER)
|
||||
if (mobj->eflags & MFE_FORCENOSUPER)
|
||||
stateframe = stateframe & ~FF_SPR2SUPER;
|
||||
}
|
||||
else if (mobj->renderflags & RF_FORCESUPER)
|
||||
else if (mobj->eflags & MFE_FORCESUPER)
|
||||
stateframe = stateframe | FF_SPR2SUPER;
|
||||
|
||||
// Get the sprite2 and frame number
|
||||
|
|
|
@ -245,6 +245,11 @@ typedef enum
|
|||
// Compute and trigger on mobj angle relative to tracer
|
||||
// See Linedef Exec 457 (Track mobj angle to point)
|
||||
MFE_TRACERANGLE = 1<<11,
|
||||
// Forces an object to use super sprites with SPR_PLAY.
|
||||
MFE_FORCESUPER = 1<<12,
|
||||
// Forces an object to NOT use super sprites with SPR_PLAY.
|
||||
MFE_FORCENOSUPER = 1<<13,
|
||||
|
||||
// free: to and including 1<<15
|
||||
} mobjeflag_t;
|
||||
|
||||
|
|
|
@ -738,10 +738,6 @@ typedef enum
|
|||
RF_SHADOWDRAW = 0x10000, // Stretches and skews the sprite like a shadow.
|
||||
RF_SHADOWEFFECTS = 0x20000, // Scales and becomes transparent like a shadow.
|
||||
RF_DROPSHADOW = (RF_SHADOWDRAW | RF_SHADOWEFFECTS | RF_FULLDARK),
|
||||
|
||||
RF_FORCESUPER = 0x40000, // Forces an object to use super sprites with SPR_PLAY.
|
||||
RF_FORCENOSUPER = 0x80000, // Forces an object to NOT use super sprites with SPR_PLAY.
|
||||
RF_REVERSESUPER = (RF_FORCESUPER | RF_FORCENOSUPER), //Use normal sprites in place of super sprites and vice-versa
|
||||
} renderflags_t;
|
||||
|
||||
typedef enum
|
||||
|
|
Loading…
Reference in a new issue