mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- fixed: +FLIPSPRITE works in mirrors in OpenGL now.
This commit is contained in:
parent
00a4993654
commit
5a450b5eaa
1 changed files with 9 additions and 1 deletions
|
@ -814,7 +814,12 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
||||||
if (thing->renderflags & RF_YFLIP) std::swap(vt, vb);
|
if (thing->renderflags & RF_YFLIP) std::swap(vt, vb);
|
||||||
|
|
||||||
gltexture->GetSpriteRect(&r);
|
gltexture->GetSpriteRect(&r);
|
||||||
if ((mirror ^ !!(thing->renderflags & RF_XFLIP)) || (thing->flags7 & MF7_SPRITEFLIP))
|
|
||||||
|
// [SP] SpriteFlip
|
||||||
|
if (thing->flags7 & MF7_SPRITEFLIP)
|
||||||
|
thing->renderflags ^= RF_XFLIP;
|
||||||
|
|
||||||
|
if (mirror ^ !!(thing->renderflags & RF_XFLIP))
|
||||||
{
|
{
|
||||||
r.left = -r.width - r.left; // mirror the sprite's x-offset
|
r.left = -r.width - r.left; // mirror the sprite's x-offset
|
||||||
ul = gltexture->GetSpriteUL();
|
ul = gltexture->GetSpriteUL();
|
||||||
|
@ -826,6 +831,9 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
||||||
ur = gltexture->GetSpriteUL();
|
ur = gltexture->GetSpriteUL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thing->flags7 & MF7_SPRITEFLIP) // [SP] Flip back
|
||||||
|
thing->renderflags ^= RF_XFLIP;
|
||||||
|
|
||||||
r.Scale(sprscale.X, sprscale.Y);
|
r.Scale(sprscale.X, sprscale.Y);
|
||||||
|
|
||||||
float rightfac = -r.left;
|
float rightfac = -r.left;
|
||||||
|
|
Loading…
Reference in a new issue