mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
add comment about "Carmack's typo"
This commit is contained in:
parent
f001b48f8f
commit
3c572f8395
@ -208,6 +208,8 @@ void V_InitColorTranslation(void)
|
|||||||
double green = *palsrc++ / 256.0;
|
double green = *palsrc++ / 256.0;
|
||||||
double blue = *palsrc++ / 256.0;
|
double blue = *palsrc++ / 256.0;
|
||||||
|
|
||||||
|
// formula is taken from dcolors.c preseving "Carmack's typo"
|
||||||
|
// https://doomwiki.org/wiki/Carmack%27s_typo
|
||||||
int gray = (red * 0.299 + green * 0.587 + blue * 0.144) * 255;
|
int gray = (red * 0.299 + green * 0.587 + blue * 0.144) * 255;
|
||||||
invul_gray[i] = I_GetPaletteIndex(playpal, gray, gray, gray);
|
invul_gray[i] = I_GetPaletteIndex(playpal, gray, gray, gray);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user