mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 03:20:44 +00:00
Before aliasing empty palookups to #0, check existing ones if they are identical to #0, and if so, also alias them. This saves memory in Polymost with tileshades enabled.
git-svn-id: https://svn.eduke32.com/eduke32@5368 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cac05f8305
commit
8437d22bf2
1 changed files with 6 additions and 0 deletions
|
@ -8524,8 +8524,14 @@ void fillemptylookups(void)
|
||||||
{
|
{
|
||||||
// Alias remaining unused pal numbers to the base shade table.
|
// Alias remaining unused pal numbers to the base shade table.
|
||||||
for (int32_t j=1; j<MAXPALOOKUPS; j++)
|
for (int32_t j=1; j<MAXPALOOKUPS; j++)
|
||||||
|
{
|
||||||
|
// If an existing lookup is identical to #0, free it.
|
||||||
|
if (palookup[j] && palookup[j] != palookup[0] && !Bmemcmp(palookup[0], palookup[j], 256*numshades))
|
||||||
|
removepalookup(j);
|
||||||
|
|
||||||
if (!palookup[j])
|
if (!palookup[j])
|
||||||
makepalookup(j, NULL, 0,0,0, 1);
|
makepalookup(j, NULL, 0,0,0, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue