mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Hopefully fix color conversion.
Hard to tell because the triangle rendering is still messed up. However, storing negative values in bytes doesn't work :)
This commit is contained in:
parent
be9c0697a2
commit
d41bf32d91
1 changed files with 2 additions and 2 deletions
|
@ -83,12 +83,12 @@ static byte
|
|||
convert_color (byte *rgb)
|
||||
{
|
||||
//FIXME slow!
|
||||
byte dist[3];
|
||||
int dist[3];
|
||||
int d, bestd = 256 * 256 * 3, bestc = -1;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
VectorSubtract (vid.basepal, rgb, dist);
|
||||
VectorSubtract (vid.basepal + i * 3, rgb, dist);
|
||||
d = DotProduct (dist, dist);
|
||||
if (d < bestd) {
|
||||
bestd = d;
|
||||
|
|
Loading…
Reference in a new issue