- Fixes to compile with GCC 4.5.0.

SVN r2660 (trunk)
This commit is contained in:
Randy Heit 2010-09-01 03:30:18 +00:00
commit a2573e4bb3
9 changed files with 65 additions and 16 deletions

View file

@ -202,7 +202,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
{
DWORD palette[256];
BYTE pngpal[256][3];
};
} p;
BYTE trans[256];
bool havetRNS = false;
DWORD len, id;
@ -260,14 +260,14 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
case MAKE_ID('P','L','T','E'):
PaletteSize = MIN<int> (len / 3, 256);
lump.Read (pngpal, PaletteSize * 3);
lump.Read (p.pngpal, PaletteSize * 3);
if (PaletteSize * 3 != (int)len)
{
lump.Seek (len - PaletteSize * 3, SEEK_CUR);
}
for (i = PaletteSize - 1; i >= 0; --i)
{
palette[i] = MAKERGB(pngpal[i][0], pngpal[i][1], pngpal[i][2]);
p.palette[i] = MAKERGB(p.pngpal[i][0], p.pngpal[i][1], p.pngpal[i][2]);
}
break;
@ -314,7 +314,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
case 3: // Paletted
PaletteMap = new BYTE[PaletteSize];
GPalette.MakeRemap (palette, PaletteMap, trans, PaletteSize);
GPalette.MakeRemap (p.palette, PaletteMap, trans, PaletteSize);
for (i = 0; i < PaletteSize; ++i)
{
if (trans[i] == 0)