diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 927f5428d8..d42efd28b3 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,10 @@ +October 21, 2006 (Changes by Graf Zahl) +- Fixed: The yellow color range contained gaps in its definition which + resulted in incorrect colors. +- Fixed: FFont::BuildTranslations didn't clamp the RGB color values. This + can happen if some font colors overflow or underflow due to incomplete + range specifications. + October 20, 2006 - Fixed: ExpData::EvalConst() did not NULL the children pointers for binary operators after deleting them, so ~ExpData() would try to delete them again diff --git a/src/v_font.cpp b/src/v_font.cpp index 784252e780..9d16569ec5 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -578,6 +578,9 @@ void FFont::BuildTranslations (const double *luminosity, const BYTE *identity, c int r = ((parms->Start[0] << 8) + rangev * (parms->End[0] - parms->Start[0])) >> 8; // red int g = ((parms->Start[1] << 8) + rangev * (parms->End[1] - parms->Start[1])) >> 8; // green int b = ((parms->Start[2] << 8) + rangev * (parms->End[2] - parms->Start[2])) >> 8; // blue + r=clamp(r, 0, 255); + g=clamp(g, 0, 255); + b=clamp(b, 0, 255); *range++ = ColorMatcher.Pick (r, g, b); } diff --git a/wadsrc/textcolors.txt b/wadsrc/textcolors.txt index 81ba7ed8e4..87c723c7aa 100644 --- a/wadsrc/textcolors.txt +++ b/wadsrc/textcolors.txt @@ -85,7 +85,7 @@ Console: Yellow { #272727 #515151 0 64 - #865318 #EB9F18 80 192 + #784918 #F3A718 65 207 #F3A82A #FCD043 208 256 Console: #000000 #7F7F00 0 127