- changed return value of CreatePalettedPixels.
The new struct will allpw return of static pixel data without reallocation and copying.
This commit is contained in:
parent
4e4642d0ed
commit
1a0aa95ff4
24 changed files with 103 additions and 84 deletions
|
|
@ -58,7 +58,7 @@ public:
|
|||
FVoxelTexture(FVoxel *voxel);
|
||||
|
||||
int CopyPixels(FBitmap *bmp, int conversion) override;
|
||||
TArray<uint8_t> CreatePalettedPixels(int conversion) override;
|
||||
PalettedPixels CreatePalettedPixels(int conversion) override;
|
||||
|
||||
protected:
|
||||
FVoxel *SourceVox;
|
||||
|
|
@ -84,10 +84,10 @@ FVoxelTexture::FVoxelTexture(FVoxel *vox)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
TArray<uint8_t> FVoxelTexture::CreatePalettedPixels(int conversion)
|
||||
PalettedPixels FVoxelTexture::CreatePalettedPixels(int conversion)
|
||||
{
|
||||
// GetPixels gets called when a translated palette is used so we still need to implement it here.
|
||||
TArray<uint8_t> Pixels(256, true);
|
||||
PalettedPixels Pixels(256);
|
||||
uint8_t *pp = SourceVox->Palette.Data();
|
||||
|
||||
if(pp != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue