Added PSPF_FLIP.

Flips the overlay on the X axis.
This commit is contained in:
Major Cooke 2016-10-11 17:20:58 -05:00
parent 5dc94a10c3
commit 3de83b8943
3 changed files with 3 additions and 1 deletions

View file

@ -57,6 +57,7 @@ enum PSPFlags
PSPF_ADDBOB = 1 << 1,
PSPF_POWDOUBLE = 1 << 2,
PSPF_CVARFAST = 1 << 3,
PSPF_FLIP = 1 << 6,
};
class DPSprite : public DObject

View file

@ -1404,7 +1404,7 @@ void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double
vis->pic = tex;
vis->ColormapNum = 0;
if (flip)
if (!(flip) != !(pspr->Flags & PSPF_FLIP))
{
vis->xiscale = -FLOAT2FIXED(pspritexiscale * tex->Scale.X);
vis->startfrac = (tex->GetWidth() << FRACBITS) - 1;

View file

@ -598,6 +598,7 @@ enum
PSPF_ADDBOB = 1 << 1,
PSPF_POWDOUBLE = 1 << 2,
PSPF_CVARFAST = 1 << 3,
PSPF_FLIP = 1 << 6,
};
// Default psprite layers