mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Fix maskwall array indirection bug and two if conditional oversights from r7612
git-svn-id: https://svn.eduke32.com/eduke32@7615 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
aa4cfed3f1
commit
2228af8658
2 changed files with 3 additions and 11 deletions
|
@ -8571,7 +8571,7 @@ killsprite:
|
||||||
|
|
||||||
for (i = 0; i < maskwallcnt;)
|
for (i = 0; i < maskwallcnt;)
|
||||||
{
|
{
|
||||||
if (polymost_maskWallHasTranslucency((uwalltype *) &wall[thewall[maskwallcnt-1]]))
|
if (polymost_maskWallHasTranslucency((uwalltype *) &wall[thewall[maskwall[maskwallcnt-1]]]))
|
||||||
{
|
{
|
||||||
int16_t maskSwap = maskwall[i];
|
int16_t maskSwap = maskwall[i];
|
||||||
maskwall[i] = maskwall[maskwallcnt-1];
|
maskwall[i] = maskwall[maskwallcnt-1];
|
||||||
|
|
|
@ -2064,15 +2064,11 @@ int32_t polymost_maskWallHasTranslucency(uwalltype const * const wall)
|
||||||
if (!usehightile)
|
if (!usehightile)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int method = DAMETH_MASK | DAMETH_WALL;
|
|
||||||
if (wall->cstat & CSTAT_WALL_TRANSLUCENT)
|
|
||||||
method = DAMETH_WALL | (((wall->cstat & CSTAT_WALL_TRANS_FLIP)) ? DAMETH_TRANS2 : DAMETH_TRANS1);
|
|
||||||
|
|
||||||
uint8_t pal = wall->pal;
|
uint8_t pal = wall->pal;
|
||||||
if (palookup[pal] == NULL)
|
if (palookup[pal] == NULL)
|
||||||
pal = 0;
|
pal = 0;
|
||||||
|
|
||||||
pthtyp* pth = texcache_fetch(wall->picnum, pal, 0, method);
|
pthtyp* pth = texcache_fetch(wall->picnum, pal, 0, DAMETH_MASK | DAMETH_WALL);
|
||||||
return pth && (pth->flags & PTH_HASALPHA) && !(pth->flags & PTH_ONEBITALPHA);
|
return pth && (pth->flags & PTH_HASALPHA) && !(pth->flags & PTH_ONEBITALPHA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2086,15 +2082,11 @@ int32_t polymost_spriteHasTranslucency(uspritetype const * const tspr)
|
||||||
if (!usehightile)
|
if (!usehightile)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int32_t method = DAMETH_MASK | DAMETH_CLAMPED;
|
|
||||||
if (tspr->cstat & CSTAT_SPRITE_TRANSLUCENT)
|
|
||||||
method = DAMETH_CLAMPED | ((tspr->cstat & CSTAT_SPRITE_TRANSLUCENT_INVERT) ? DAMETH_TRANS2 : DAMETH_TRANS1);
|
|
||||||
|
|
||||||
uint8_t pal = tspr->shade;
|
uint8_t pal = tspr->shade;
|
||||||
if (palookup[pal] == NULL)
|
if (palookup[pal] == NULL)
|
||||||
pal = 0;
|
pal = 0;
|
||||||
|
|
||||||
pthtyp* pth = texcache_fetch(tspr->picnum, pal, 0, method);
|
pthtyp* pth = texcache_fetch(tspr->picnum, pal, 0, DAMETH_MASK | DAMETH_CLAMPED);
|
||||||
return pth && (pth->flags & PTH_HASALPHA) && !(pth->flags & PTH_ONEBITALPHA);
|
return pth && (pth->flags & PTH_HASALPHA) && !(pth->flags & PTH_ONEBITALPHA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue