- added caching for true color images as well

This commit is contained in:
Christoph Oelckers 2018-12-10 02:35:10 +01:00
commit 4cd60fbe99
13 changed files with 161 additions and 83 deletions

View file

@ -51,14 +51,17 @@ public:
UseType = ETextureType::MiscPatch;
}
int CopyPixels(FBitmap *bmp)
FBitmap GetBgraBitmap(PalEntry *, int *trans) override
{
PalEntry *pe = (PalEntry*)bmp->GetPixels();
FBitmap bmp;
bmp.Create(256, 1);
PalEntry *pe = (PalEntry*)bmp.GetPixels();
for (int i = 0; i < 256; i++)
{
pe[i] = GPalette.BaseColors[i].d | 0xff000000;
}
return 0;
if (trans) *trans = 0;
return bmp;
}
};