- Just remembered that the true color stuff generates textures differently. Changed the previous commit to expand 1, 2, and 4 bit grayscale images while reading the PNG instead of changing the palette.
SVN r4289 (trunk)
This commit is contained in:
parent
dabd48ab81
commit
b493d8e823
4 changed files with 30 additions and 43 deletions
|
|
@ -56,29 +56,13 @@ struct TexCreateInfo
|
|||
};
|
||||
|
||||
BYTE FTexture::GrayMap[256];
|
||||
BYTE FTexture::GrayMap4bit[16];
|
||||
BYTE FTexture::GrayMap2bit[4];
|
||||
BYTE FTexture::GrayMap1bit[2];
|
||||
|
||||
void FTexture::InitGrayMap()
|
||||
{
|
||||
for (int i = 0; i < 256; ++i)
|
||||
{
|
||||
GrayMap[i] = ColorMatcher.Pick (i, i, i);
|
||||
if(i < 16)
|
||||
{
|
||||
const int i4 = i|(i<<4);
|
||||
GrayMap4bit[i] = ColorMatcher.Pick (i4, i4, i4);
|
||||
}
|
||||
if(i < 4)
|
||||
{
|
||||
const int i2 = i|(i<<2)|(i<<4)|(i<<6);
|
||||
GrayMap4bit[i] = ColorMatcher.Pick (i2, i2, i2);
|
||||
}
|
||||
}
|
||||
|
||||
GrayMap1bit[0] = ColorMatcher.Pick (0, 0, 0);
|
||||
GrayMap1bit[1] = ColorMatcher.Pick (255, 255, 255);
|
||||
}
|
||||
|
||||
FTexture *IMGZTexture_TryCreate(FileReader &, int lumpnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue