- replaced MIN/MAX in common code.
This commit is contained in:
parent
07a181090b
commit
eb69bbcae0
63 changed files with 200 additions and 236 deletions
|
|
@ -244,7 +244,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, int width, int height,
|
|||
break;
|
||||
|
||||
case MAKE_ID('P','L','T','E'):
|
||||
PaletteSize = MIN<int> (len / 3, 256);
|
||||
PaletteSize = min<int> (len / 3, 256);
|
||||
StartOfPalette = (uint32_t)lump.Tell();
|
||||
lump.Seek(len, FileReader::SeekCur);
|
||||
break;
|
||||
|
|
@ -762,7 +762,7 @@ FBitmap FPNGFileTexture::GetBgraBitmap(const PalEntry *remap, int *trans)
|
|||
lump->Seek (len, FileReader::SeekCur);
|
||||
else
|
||||
{
|
||||
PaletteSize = std::min<int> (len / 3, 256);
|
||||
PaletteSize = min<int> (len / 3, 256);
|
||||
for(int i = 0; i < PaletteSize; i++)
|
||||
{
|
||||
pe[i].r = lump->ReadUInt8();
|
||||
|
|
@ -794,4 +794,4 @@ FBitmap FPNGFileTexture::GetBgraBitmap(const PalEntry *remap, int *trans)
|
|||
bmp.CopyPixelDataRGB(0, 0, Pixels.Data(), Width, Height, 3, pixwidth, 0, CF_RGB);
|
||||
}
|
||||
return bmp;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue