mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
defs.c: in '2dcol' DEF token, clamp R, G, B values to [0 .. 63].
git-svn-id: https://svn.eduke32.com/eduke32@4232 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
70d84cd75b
commit
74f789d083
1 changed files with 4 additions and 0 deletions
|
@ -429,6 +429,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if ((unsigned)col < 256)
|
||||
{
|
||||
r = clamp(r, 0, 63);
|
||||
g = clamp(g, 0, 63);
|
||||
b = clamp(b, 0, 63);
|
||||
|
||||
vgapal16[col*4+0] = b; // blue
|
||||
vgapal16[col*4+1] = g; // green
|
||||
vgapal16[col*4+2] = r; // red
|
||||
|
|
Loading…
Reference in a new issue