From 3de83b8943e1ed13aaad9da723f0671b8c3dad40 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Tue, 11 Oct 2016 17:20:58 -0500 Subject: [PATCH] Added PSPF_FLIP. Flips the overlay on the X axis. --- src/p_pspr.h | 1 + src/r_things.cpp | 2 +- wadsrc/static/actors/constants.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_pspr.h b/src/p_pspr.h index 7e5109657..ea03e109f 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -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 diff --git a/src/r_things.cpp b/src/r_things.cpp index 179ffec97..ab75c15b0 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -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; diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index dce2488c2..df3bb860b 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -598,6 +598,7 @@ enum PSPF_ADDBOB = 1 << 1, PSPF_POWDOUBLE = 1 << 2, PSPF_CVARFAST = 1 << 3, + PSPF_FLIP = 1 << 6, }; // Default psprite layers