mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fix decal upscaling
This commit is contained in:
parent
15d599813b
commit
9e15f26923
1 changed files with 16 additions and 3 deletions
|
@ -124,6 +124,8 @@ const uint8_t *FSoftwareTexture::GetPixels(int style)
|
||||||
auto tempbuffer = mTexture->CreateTexBuffer(0, mBufferFlags);
|
auto tempbuffer = mTexture->CreateTexBuffer(0, mBufferFlags);
|
||||||
Pixels.Resize(GetPhysicalWidth()*GetPhysicalHeight());
|
Pixels.Resize(GetPhysicalWidth()*GetPhysicalHeight());
|
||||||
PalEntry *pe = (PalEntry*)tempbuffer.mBuffer;
|
PalEntry *pe = (PalEntry*)tempbuffer.mBuffer;
|
||||||
|
if (!style)
|
||||||
|
{
|
||||||
for (int y = 0; y < GetPhysicalHeight(); y++)
|
for (int y = 0; y < GetPhysicalHeight(); y++)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < GetPhysicalWidth(); x++)
|
for (int x = 0; x < GetPhysicalWidth(); x++)
|
||||||
|
@ -132,6 +134,17 @@ const uint8_t *FSoftwareTexture::GetPixels(int style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int y = 0; y < GetPhysicalHeight(); y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < GetPhysicalWidth(); x++)
|
||||||
|
{
|
||||||
|
Pixels[y + x * GetPhysicalHeight()] = pe[x + y * GetPhysicalWidth()].r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Pixels.Data();
|
return Pixels.Data();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue