mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-10 23:40:35 +00:00
- disabled the 0<->255 color swap because no support code to handle this exists yet.
This commit is contained in:
parent
6bffdf80a1
commit
7225dbd6a4
2 changed files with 6 additions and 1 deletions
|
@ -325,7 +325,6 @@ void DMenu::Drawer ()
|
||||||
{
|
{
|
||||||
auto texid = TexMan.CheckForTexture("engine/graphics/m_back.png", ETextureType::Any);
|
auto texid = TexMan.CheckForTexture("engine/graphics/m_back.png", ETextureType::Any);
|
||||||
if (texid.isValid())
|
if (texid.isValid())
|
||||||
if (tex)
|
|
||||||
{
|
{
|
||||||
auto tex = TexMan.GetTexture(texid);
|
auto tex = TexMan.GetTexture(texid);
|
||||||
int w = tex->GetDisplayWidth() * CleanXfac;
|
int w = tex->GetDisplayWidth() * CleanXfac;
|
||||||
|
|
|
@ -113,12 +113,14 @@ 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 0
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
@ -544,6 +546,7 @@ 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 0
|
||||||
// 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++)
|
||||||
|
@ -552,9 +555,11 @@ 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 0
|
||||||
// ... 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++)
|
||||||
|
@ -563,6 +568,7 @@ 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