- fixed: palette index 0 (transparent) was left uninitialized for BMF fonts.

This commit is contained in:
Christoph Oelckers 2021-08-10 18:18:44 +02:00
parent 4cee567b23
commit 61efe76ffd

View file

@ -407,6 +407,7 @@ void FSingleLumpFont::LoadBMF(int lump, const uint8_t *data)
count = LastChar - FirstChar + 1; count = LastChar - FirstChar + 1;
Chars.Resize(count); Chars.Resize(count);
// BMF palettes are only six bits per component. Fix that. // BMF palettes are only six bits per component. Fix that.
Palette[0] = 0;
for (i = 0; i < ActiveColors; ++i) for (i = 0; i < ActiveColors; ++i)
{ {
int r = (data[17 + i * 3] << 2) | (data[17 + i * 3] >> 4); int r = (data[17 + i * 3] << 2) | (data[17 + i * 3] >> 4);