FF_AFFINEPAPER and RF2_AFFINEPAPER
He made a BANDAID so TRASH even his TEAM clowned him
This commit is contained in:
parent
ac5cc2eaaa
commit
afacf55067
4 changed files with 18 additions and 2 deletions
|
|
@ -949,6 +949,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"FF_PAPERSPRITE",FF_PAPERSPRITE},
|
||||
{"FF_FLOORSPRITE",FF_FLOORSPRITE},
|
||||
{"FF_NOAFFINE",FF_NOAFFINE},
|
||||
{"FF_AFFINEPAPER",FF_AFFINEPAPER},
|
||||
{"FF_BLENDMASK",FF_BLENDMASK},
|
||||
{"FF_BLENDSHIFT",FF_BLENDSHIFT},
|
||||
{"FF_ADD",FF_ADD},
|
||||
|
|
@ -1059,6 +1060,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"RF_GHOSTLY",RF_GHOSTLY},
|
||||
{"RF_GHOSTLYMASK",RF_GHOSTLYMASK},
|
||||
{"RF2_NOAFFINE",RF2_NOAFFINE},
|
||||
{"RF2_AFFINEPAPER",RF2_AFFINEPAPER},
|
||||
|
||||
// Level flags
|
||||
{"LF_SCRIPTISFILE",LF_SCRIPTISFILE},
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ extern "C" {
|
|||
/// \brief Frame flags: Turns off Mode 7-style scaling and rotation
|
||||
#define FF_NOAFFINE 0x04000000
|
||||
|
||||
/// \brief Frame flags: Enables "affine papersprites"
|
||||
#define FF_AFFINEPAPER 0x08000000
|
||||
|
||||
/// \brief Frame flags - Animate: Simple stateless animation
|
||||
#define FF_ANIMATE 0x10000000
|
||||
/// \brief Frame flags - Animate: Sync animation to global timer (mutually exclusive with below, currently takes priority)
|
||||
|
|
|
|||
|
|
@ -1039,6 +1039,7 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
RF2_NOAFFINE = 0x00000001, // Disables affine drawing for this sprite
|
||||
RF2_AFFINEPAPER = 0x00000002, // Enables "affine papersprites"
|
||||
} renderflags2_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
|||
|
|
@ -4296,12 +4296,22 @@ boolean R_ThingVerticallyFlipped(mobj_t *thing)
|
|||
|
||||
boolean R_ThingIsPaperSprite(mobj_t *thing)
|
||||
{
|
||||
return (thing->frame & FF_PAPERSPRITE || thing->renderflags & RF_PAPERSPRITE);
|
||||
boolean affinepaper = (thing->frame & FF_AFFINEPAPER || thing->renderflags2 & RF2_AFFINEPAPER);
|
||||
|
||||
return (thing->frame & FF_PAPERSPRITE || thing->renderflags & RF_PAPERSPRITE || affinepaper);
|
||||
}
|
||||
|
||||
boolean R_ThingIsAffineSprite(mobj_t *thing)
|
||||
{
|
||||
return (!(thing->frame & FF_NOAFFINE || thing->renderflags2 & RF2_NOAFFINE));
|
||||
boolean affinepaper = (thing->frame & FF_AFFINEPAPER || thing->renderflags2 & RF2_AFFINEPAPER);
|
||||
|
||||
// Affine papersprites are messy in software rendering; let modders enable them at their own discretion.
|
||||
// Yes, I'm lazy; I've been at this for TWO WEEKS.
|
||||
boolean papersprite = (R_ThingIsPaperSprite(thing) && !affinepaper);
|
||||
|
||||
boolean notaffine = ((thing->frame & FF_NOAFFINE || thing->renderflags2 & RF2_NOAFFINE) || papersprite);
|
||||
|
||||
return (!notaffine);
|
||||
}
|
||||
|
||||
boolean R_ThingIsFloorSprite(mobj_t *thing)
|
||||
|
|
|
|||
Loading…
Reference in a new issue