Polymer: factor out polymer_invalidateartmap(), use it in invalidatetile().

This fixes updating the viewscreen in Polymer's ART mapping mode.

git-svn-id: https://svn.eduke32.com/eduke32@4304 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-02-08 14:37:53 +00:00
parent e379cd3655
commit b1b0da2852
3 changed files with 15 additions and 6 deletions

View file

@ -340,6 +340,17 @@ static inline void polymer_invalidatesprite(int32_t i)
prsprites[i]->crc = 0xDEADBEEF;
}
static inline void polymer_invalidateartmap(int32_t tilenum)
{
extern GLuint prartmaps[MAXTILES];
if (prartmaps[tilenum])
{
bglDeleteTextures(1, &prartmaps[tilenum]);
prartmaps[tilenum] = 0;
}
}
# ifdef POLYMER_C
// CORE

View file

@ -17381,6 +17381,9 @@ void invalidatetile(int16_t tilenume, int32_t pal, int32_t how)
for (np = firstpal; np < firstpal+numpals; np++)
gltexinvalidate(tilenume, np, hp);
}
if (getrendermode() == REND_POLYMER)
polymer_invalidateartmap(tilenume);
}
#endif
}

View file

@ -2231,12 +2231,7 @@ static void polymer_freeboard(void)
i = 0;
while (i < MAXTILES)
{
if (prartmaps[i])
{
bglDeleteTextures(1, &prartmaps[i]);
prartmaps[i] = 0;
}
polymer_invalidateartmap(i);
i++;
}