mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Added polysoft render support for PSPF_MIRROR.
This commit is contained in:
parent
17fc58f712
commit
b86aed5b01
1 changed files with 8 additions and 5 deletions
|
@ -232,7 +232,7 @@ void RenderPolyPlayerSprites::RenderSprite(DPSprite *pspr, AActor *owner, float
|
|||
|
||||
if (pspr->Flags & PSPF_ADDBOB)
|
||||
{
|
||||
sx += bobx;
|
||||
sx += (pspr->Flags & PSPF_MIRROR) ? -bobx : bobx;
|
||||
sy += boby;
|
||||
}
|
||||
|
||||
|
@ -248,17 +248,20 @@ void RenderPolyPlayerSprites::RenderSprite(DPSprite *pspr, AActor *owner, float
|
|||
double pspriteyscale = pspritexscale * yaspectMul;
|
||||
double pspritexiscale = 1 / pspritexscale;
|
||||
|
||||
// calculate edges of the shape
|
||||
tx = sx - BASEXCENTER;
|
||||
int tleft = tex->GetScaledLeftOffset();
|
||||
int twidth = tex->GetScaledWidth();
|
||||
|
||||
// calculate edges of the shape
|
||||
//tx = sx - BASEXCENTER;
|
||||
tx = (pspr->Flags & PSPF_MIRROR) ? ((BASEXCENTER - twidth) - (sx - tleft)) : ((sx - BASEXCENTER) - tleft);
|
||||
|
||||
tx -= tex->GetScaledLeftOffset();
|
||||
x1 = xs_RoundToInt(viewwindow.centerx + tx * pspritexscale);
|
||||
|
||||
// off the right side
|
||||
if (x1 > viewwidth)
|
||||
return;
|
||||
|
||||
tx += tex->GetScaledWidth();
|
||||
tx += twidth;
|
||||
x2 = xs_RoundToInt(viewwindow.centerx + tx * pspritexscale);
|
||||
|
||||
// off the left side
|
||||
|
|
Loading…
Reference in a new issue