- texture manager fixes from GZDoom

* missing null check in FPngTexture.
* ignore identity translations when creating textures.
This commit is contained in:
Christoph Oelckers 2020-09-27 10:39:10 +02:00
parent f8ae35f8a5
commit 0314cdec55
5 changed files with 68 additions and 66 deletions

View file

@ -357,6 +357,7 @@ FTextureBuffer FTexture::CreateTexBuffer(int translation, int flags)
memset(buffer, 0, W * (H + 1) * 4);
auto remap = translation <= 0 ? nullptr : GPalette.TranslationToTable(translation);
if (remap && remap->Inactive) remap = nullptr;
if (remap) translation = remap->Index;
FBitmap bmp(buffer, W * 4, W, H);