mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
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:
parent
d7e30a65dd
commit
4c5fd9d9e2
1 changed files with 26 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue