Hackily implement spriteext.alpha into Classic by internally attaching 33% and 66% to the cstat bits.

git-svn-id: https://svn.eduke32.com/eduke32@3607 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2013-03-25 04:31:31 +00:00
parent d7e30a65dd
commit 4c5fd9d9e2

View file

@ -5545,6 +5545,32 @@ static void drawsprite_classic(int32_t snum)
DO_TILE_ANIM(tspr->picnum, spritenum+32768);
#ifdef USE_OPENGL
{
// hack pending proper alpha implentation
// TODO: a real implementation
float alpha = spriteext[tspr->owner].alpha;
if (alpha >= 0.33f) // if alpha is 0 (which is the default) this structure should only necessitate one comparison
{
if ((cstat&2) && alpha >= 0.5f) // this covers the multiplicative aspect used in the Polymodes
cstat |= 512;
cstat |= 2;
if (alpha >= 0.66f)
{
cstat |= 512;
if (alpha >= 1.0f)
return;
}
tspr->cstat = cstat;
}
}
#endif
tilenum = tspr->picnum;
if ((cstat&48)==48)