- Fixed: Memory error when loading BMF palettes.

- Fixed: When locating WhiteIndex and BlackIndex in the palette index 0 was skipped.
- Fixed: When filling an area black for vid_fps or pillarbox/letterbox use GPalette.BlackIndex instead of assuming palette index 0 is black.

SVN r3807 (trunk)
This commit is contained in:
Braden Obrzut 2012-08-06 09:49:15 +00:00
commit cb413c600e
4 changed files with 9 additions and 9 deletions

View file

@ -1304,7 +1304,7 @@ void FSingleLumpFont::FixupPalette (BYTE *identity, double *luminosity, const BY
identity[0] = 0;
palette += 3; // Skip the transparent color
for (i = 1; i <= ActiveColors; ++i, palette += 3)
for (i = 1; i < ActiveColors; ++i, palette += 3)
{
int r = palette[0];
int g = palette[1];
@ -1331,7 +1331,7 @@ void FSingleLumpFont::FixupPalette (BYTE *identity, double *luminosity, const BY
{
diver = 1.0 / 255.0;
}
for (i = 1; i <= ActiveColors; ++i)
for (i = 1; i < ActiveColors; ++i)
{
luminosity[i] = (luminosity[i] - minlum) * diver;
}