- finished verification of proper texture generation and fixed a few remaining issues.
Aside from PCX 4 bit, uncompressed PCX and TGA grayscale for which I was unable to obtain test images, all others now produce proper textures in both 8 and 32 bit mode.
This commit is contained in:
parent
0a07f4c144
commit
4c781a8f65
4 changed files with 17 additions and 16 deletions
|
|
@ -392,19 +392,20 @@ uint8_t *FPCXTexture::MakeTexture(FRenderStyle style)
|
|||
{
|
||||
if (bitcount < 8)
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
PaletteMap[i] = RGBToPalettePrecise(alphatex, header.palette[i * 3], header.palette[i * 3 + 1], header.palette[i * 3 + 2]);
|
||||
}
|
||||
|
||||
switch (bitcount)
|
||||
{
|
||||
default:
|
||||
case 1:
|
||||
PaletteMap[0] = alphatex? 0 : GrayMap[0];
|
||||
PaletteMap[1] = alphatex? 255 : GrayMap[255];
|
||||
ReadPCX1bit (Pixels, lump, &header);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
PaletteMap[i] = RGBToPalettePrecise(alphatex, header.palette[i * 3], header.palette[i * 3 + 1], header.palette[i * 3 + 2]);
|
||||
}
|
||||
ReadPCX4bits (Pixels, lump, &header);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue