mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Polymer: Fix ART offset and sprite flipping interaction.
git-svn-id: https://svn.eduke32.com/eduke32@3633 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e3ae81262e
commit
0abef3b8cd
1 changed files with 17 additions and 9 deletions
|
@ -3578,6 +3578,15 @@ void polymer_updatesprite(int32_t snum)
|
||||||
|
|
||||||
flipu = flipv = 0;
|
flipu = flipv = 0;
|
||||||
|
|
||||||
|
if ((tspr->cstat & 4) && (((tspr->cstat>>4) & 3) != 2))
|
||||||
|
flipu = !flipu;
|
||||||
|
|
||||||
|
if (!(tspr->cstat & 4) && (((tspr->cstat>>4) & 3) == 2))
|
||||||
|
flipu = !flipu;
|
||||||
|
|
||||||
|
if ((tspr->cstat & 8) && (((tspr->cstat>>4) & 3) != 2))
|
||||||
|
flipv = !flipv;
|
||||||
|
|
||||||
if (pr_billboardingmode && !((tspr->cstat>>4) & 3))
|
if (pr_billboardingmode && !((tspr->cstat>>4) & 3))
|
||||||
{
|
{
|
||||||
// do surgery on the face tspr to make it look like a wall sprite
|
// do surgery on the face tspr to make it look like a wall sprite
|
||||||
|
@ -3585,6 +3594,14 @@ void polymer_updatesprite(int32_t snum)
|
||||||
tspr->ang = (viewangle + 1024) & 2047;
|
tspr->ang = (viewangle + 1024) & 2047;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flipu) {
|
||||||
|
xoff = -xoff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flipv) {
|
||||||
|
yoff = -yoff;
|
||||||
|
}
|
||||||
|
|
||||||
switch ((tspr->cstat>>4) & 3)
|
switch ((tspr->cstat>>4) & 3)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -3620,15 +3637,6 @@ void polymer_updatesprite(int32_t snum)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tspr->cstat & 4) && (((tspr->cstat>>4) & 3) != 2))
|
|
||||||
flipu = !flipu;
|
|
||||||
|
|
||||||
if (!(tspr->cstat & 4) && (((tspr->cstat>>4) & 3) == 2))
|
|
||||||
flipu = !flipu;
|
|
||||||
|
|
||||||
if ((tspr->cstat & 8) && (((tspr->cstat>>4) & 3) != 2))
|
|
||||||
flipv = !flipv;
|
|
||||||
|
|
||||||
bglGetFloatv(GL_MODELVIEW_MATRIX, spritemodelview);
|
bglGetFloatv(GL_MODELVIEW_MATRIX, spritemodelview);
|
||||||
bglPopMatrix();
|
bglPopMatrix();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue