- transitioned FTexture.

Mostly working. Note: Brightmaps must be per-translation!
This commit is contained in:
Christoph Oelckers 2020-05-24 19:12:22 +02:00
parent 71ab8c0b10
commit 7a84887fc4
18 changed files with 1425 additions and 395 deletions

View file

@ -42,15 +42,15 @@
void AnimTexture::SetSize(int width, int height)
{
Size.x = width;
Size.y = height;
Width = width;
Height = height;
Image.Resize(width*height);
}
void AnimTexture::SetFrame(const uint8_t *palette, const void *data_)
{
memcpy(Palette, palette, 768);
memcpy(Image.Data(), data_, Size.x * Size.y);
memcpy(Image.Data(), data_, Width*Height);
DeleteHardwareTextures();
}
@ -64,11 +64,11 @@ FBitmap AnimTexture::GetBgraBitmap(const PalEntry* remap, int* trans)
{
FBitmap bmp;
bmp.Create(Size.x, Size.y);
bmp.Create(Width, Height);
auto spix = Image.Data();
auto dpix = bmp.GetPixels();
for (int i = 0; i < Size.x * Size.y; i++)
for (int i = 0; i < Width * Height; i++)
{
int p = i * 4;
int index = spix[i];