Font color now uses g_ColorXlat

This commit is contained in:
Justin Marshall
2020-06-14 10:00:41 -07:00
parent 7f00bc46d4
commit e8c09e7b36
+2
View File
@@ -6,6 +6,7 @@
#include "Image.h"
extern byte backbuffer_palette[768];
extern uint8_t g_ColorXlat[16];
void GL_RenderImage(Image_t* image, int x, int y, int width, int height) {
ImVec2 mi(x, y);
@@ -24,6 +25,7 @@ void GL_FillRect(int color, int x, int y, int width, int height) {
void GL_DrawText(int color, int x, int y, char* text) {
ImVec2 pos(x, y);
color = g_ColorXlat[color % 15];
float r = backbuffer_palette[(color * 3) + 0] / 255.0f;
float g = backbuffer_palette[(color * 3) + 1] / 255.0f;
float b = backbuffer_palette[(color * 3) + 2] / 255.0f;