- added caching for true color images as well
This commit is contained in:
parent
2e7bcf9e41
commit
4cd60fbe99
13 changed files with 161 additions and 83 deletions
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue