Grayscale Half-Life fonts upon loading them

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5545 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2019-09-17 18:43:59 +00:00
parent 6e3c5f2d8d
commit 40b7193cef

View file

@ -1191,9 +1191,12 @@ static struct charcache_s *Font_TryLoadGlyph(font_t *f, CHARIDXTYPE charidx)
} }
else else
{ {
out[(x+y*gw)*4+0] = pal[*in*3+0]; qbyte val;
out[(x+y*gw)*4+1] = pal[*in*3+1]; val = max(pal[*in*3+0], pal[*in*3+1]);
out[(x+y*gw)*4+2] = pal[*in*3+2]; val = max(val, pal[*in*3+2]);
out[(x+y*gw)*4+0] =
out[(x+y*gw)*4+1] =
out[(x+y*gw)*4+2] = val;
out[(x+y*gw)*4+3] = 0xff; out[(x+y*gw)*4+3] = 0xff;
} }
} }