Apply HICTINT_APPLYOVERALTPAL where it should in texcache_fetch.

git-svn-id: https://svn.eduke32.com/eduke32@5144 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-04-14 08:07:23 +00:00
parent d4fb3dfe96
commit 71f576769b

View file

@ -121,11 +121,13 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3
* effects are applied to the palette 0 texture if it exists * effects are applied to the palette 0 texture if it exists
*/ */
const int32_t checktintpal = (hictinting[si->palnum].f & HICTINT_APPLYOVERALTPAL) ? 0 : si->palnum;
// load a replacement // load a replacement
for (pthtyp *pth = texcache.list[j]; pth; pth = pth->next) for (pthtyp *pth = texcache.list[j]; pth; pth = pth->next)
{ {
if (pth->picnum == dapicnum && pth->palnum == si->palnum && if (pth->picnum == dapicnum && pth->palnum == si->palnum &&
(si->palnum > 0 ? 1 : (pth->effects == hictinting[dapalnum].f)) && (checktintpal > 0 ? 1 : (pth->effects == hictinting[dapalnum].f)) &&
(pth->flags & (PTH_CLAMPED + PTH_HIGHTILE + PTH_SKYBOX)) == (pth->flags & (PTH_CLAMPED + PTH_HIGHTILE + PTH_SKYBOX)) ==
(TO_PTH_CLAMPED(dameth) + PTH_HIGHTILE + (drawingskybox > 0) * PTH_SKYBOX) && (TO_PTH_CLAMPED(dameth) + PTH_HIGHTILE + (drawingskybox > 0) * PTH_SKYBOX) &&
(drawingskybox > 0 ? (pth->skyface == drawingskybox) : 1)) (drawingskybox > 0 ? (pth->skyface == drawingskybox) : 1))
@ -135,7 +137,7 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3
pth->flags &= ~PTH_INVALIDATED; pth->flags &= ~PTH_INVALIDATED;
int32_t tilestat = gloadtile_hi(dapicnum, dapalnum, drawingskybox, si, dameth, pth, 0, int32_t tilestat = gloadtile_hi(dapicnum, dapalnum, drawingskybox, si, dameth, pth, 0,
(si->palnum > 0) ? 0 : hictinting[dapalnum].f); // reload tile (checktintpal > 0) ? 0 : hictinting[dapalnum].f); // reload tile
if (!tilestat) if (!tilestat)
continue; continue;
@ -156,7 +158,7 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3
return pth; return pth;
int32_t tilestat = int32_t tilestat =
gloadtile_hi(dapicnum, dapalnum, drawingskybox, si, dameth, pth, 1, (si->palnum > 0) ? 0 : hictinting[dapalnum].f); gloadtile_hi(dapicnum, dapalnum, drawingskybox, si, dameth, pth, 1, (checktintpal > 0) ? 0 : hictinting[dapalnum].f);
if (!tilestat) if (!tilestat)
{ {