mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 16:40:40 +00:00
- removed helper #ifdefs.
This commit is contained in:
parent
758e4ad7cb
commit
94cb36ae53
2 changed files with 0 additions and 8 deletions
|
@ -265,7 +265,6 @@ void palettePostLoadLookups(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 1 //def SWAP_255
|
|
||||||
// Swap colors 0 and 255 in all tables so that all paletted images have their transparent color at index 0.
|
// Swap colors 0 and 255 in all tables so that all paletted images have their transparent color at index 0.
|
||||||
// This means:
|
// This means:
|
||||||
// - Swap palette and remap entries in all stored remap tables
|
// - Swap palette and remap entries in all stored remap tables
|
||||||
|
@ -288,7 +287,6 @@ void palettePostLoadLookups(void)
|
||||||
}
|
}
|
||||||
colorswap(&GPalette.GlobalBrightmap);
|
colorswap(&GPalette.GlobalBrightmap);
|
||||||
std::swap(GPalette.BaseColors[0], GPalette.BaseColors[255]);
|
std::swap(GPalette.BaseColors[0], GPalette.BaseColors[255]);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -113,14 +113,12 @@ static FTexture* GetTileTexture(const char* name, const TArray<uint8_t>& backing
|
||||||
auto tex = new FArtTile(backingstore, offset, width, height);
|
auto tex = new FArtTile(backingstore, offset, width, height);
|
||||||
auto p = &backingstore[offset];
|
auto p = &backingstore[offset];
|
||||||
auto siz = width * height;
|
auto siz = width * height;
|
||||||
#if 1 //def SWAP_255
|
|
||||||
for (int i = 0; i < siz; i++, p++)
|
for (int i = 0; i < siz; i++, p++)
|
||||||
{
|
{
|
||||||
// move transparent color to index 0 to get in line with the rest of the texture management.
|
// move transparent color to index 0 to get in line with the rest of the texture management.
|
||||||
if (*p == 0) *p = 255;
|
if (*p == 0) *p = 255;
|
||||||
else if (*p == 255) *p = 0;
|
else if (*p == 255) *p = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (tex)
|
if (tex)
|
||||||
{
|
{
|
||||||
|
@ -509,7 +507,6 @@ int32_t tileGetCRC32(int tileNum)
|
||||||
auto size = tile->GetWidth() * tile->GetHeight();
|
auto size = tile->GetWidth() * tile->GetHeight();
|
||||||
if (size == 0) return 0;
|
if (size == 0) return 0;
|
||||||
|
|
||||||
#if 1 //def SWAP_255
|
|
||||||
// Temporarily revert the data to its original form with 255 being transparent. Otherwise the CRC won't match.
|
// Temporarily revert the data to its original form with 255 being transparent. Otherwise the CRC won't match.
|
||||||
auto p = pixels;
|
auto p = pixels;
|
||||||
for (int i = 0; i < size; i++, p++)
|
for (int i = 0; i < size; i++, p++)
|
||||||
|
@ -518,11 +515,9 @@ int32_t tileGetCRC32(int tileNum)
|
||||||
if (*p == 0) *p = 255;
|
if (*p == 0) *p = 255;
|
||||||
else if (*p == 255) *p = 0;
|
else if (*p == 255) *p = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
auto crc = crc32(0, (const Bytef*)pixels, size);
|
auto crc = crc32(0, (const Bytef*)pixels, size);
|
||||||
|
|
||||||
#if 1 //def SWAP_255
|
|
||||||
// ... and back again.
|
// ... and back again.
|
||||||
p = pixels;
|
p = pixels;
|
||||||
for (int i = 0; i < size; i++, p++)
|
for (int i = 0; i < size; i++, p++)
|
||||||
|
@ -531,7 +526,6 @@ int32_t tileGetCRC32(int tileNum)
|
||||||
if (*p == 0) *p = 255;
|
if (*p == 0) *p = 255;
|
||||||
else if (*p == 255) *p = 0;
|
else if (*p == 255) *p = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return crc;
|
return crc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue