minor fixes to color handling

This commit is contained in:
Zeno Rogue committed 2019-02-06 18:54:29 +01:00
1 parent 9cee52cf81
commit 952f1c44fe
4 files changed
+6 -12

No files matched your search

+1 -2
View File
@@ -306,8 +306,7 @@ void setGLProjection(color_t col) {
DEBB(DF_GRAPH, (debugfile,"setGLProjection\n"));
GLERR("pre_setGLProjection");
unsigned char *c = (unsigned char*) (&col);
glClearColor(c[2] / 255.0, c[1] / 255.0, c[0]/255.0, 1);
glClearColor(part(col, 2) / 255.0, part(col, 1) / 255.0, part(col, 0) / 255.0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GLERR("setGLProjection #1");