- changed return value of CreatePalettedPixels.

The new struct will allpw return of static pixel data without reallocation and copying.
This commit is contained in:
Christoph Oelckers 2023-01-07 17:55:55 +01:00
commit 1a0aa95ff4
24 changed files with 103 additions and 84 deletions

View file

@ -55,9 +55,9 @@ FBuildTexture::FBuildTexture(const FString &pathprefix, int tilenum, const uint8
TopOffset = top;
}
TArray<uint8_t> FBuildTexture::CreatePalettedPixels(int conversion)
PalettedPixels FBuildTexture::CreatePalettedPixels(int conversion)
{
TArray<uint8_t> Pixels(Width * Height, true);
PalettedPixels Pixels(Width * Height);
FRemapTable *Remap = Translation;
for (int i = 0; i < Width*Height; i++)
{