Polymer: Fix one-sided y-flipped floor-aligned sprites, introduced in r3776.

Add a test case in test_tileoffsets.map.

git-svn-id: https://svn.eduke32.com/eduke32@3869 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-06-11 20:03:39 +00:00
parent e955860950
commit d25dcbff17
2 changed files with 10 additions and 2 deletions

View file

@ -1484,8 +1484,12 @@ void polymer_drawsprite(int32_t snum)
}
}
if ((tspr->cstat & 64) && ((tspr->cstat>>4) & 3))
if ((tspr->cstat & 64) && (tspr->cstat & SPR_ALIGN_MASK))
{
if ((tspr->cstat & SPR_ALIGN_MASK)==SPR_FLOOR && (tspr->cstat & SPR_YFLIP))
SWITCH_CULL_DIRECTION;
bglEnable(GL_CULL_FACE);
}
if ((!depth || mirrors[depth-1].plane) && !pr_ati_nodepthoffset)
bglEnable(GL_POLYGON_OFFSET_FILL);
@ -1495,8 +1499,12 @@ void polymer_drawsprite(int32_t snum)
if ((!depth || mirrors[depth-1].plane) && !pr_ati_nodepthoffset)
bglDisable(GL_POLYGON_OFFSET_FILL);
if ((tspr->cstat & 64) && ((tspr->cstat>>4) & 3))
if ((tspr->cstat & 64) && (tspr->cstat & SPR_ALIGN_MASK))
{
if ((tspr->cstat & SPR_ALIGN_MASK)==SPR_FLOOR && (tspr->cstat & SPR_YFLIP))
SWITCH_CULL_DIRECTION;
bglDisable(GL_CULL_FACE);
}
}
void polymer_setanimatesprites(animatespritesptr animatesprites, int32_t x, int32_t y, int32_t a, int32_t smoothratio)