From 38520e36c8fcd1585e43b079c970e36cf4a01d7f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 28 May 2021 12:11:34 +0200 Subject: [PATCH] - fixed generation of default color range for the option menu font. --- src/common/fonts/v_font.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/fonts/v_font.cpp b/src/common/fonts/v_font.cpp index 280fd5856..8313b18e5 100644 --- a/src/common/fonts/v_font.cpp +++ b/src/common/fonts/v_font.cpp @@ -714,13 +714,16 @@ static void CalcDefaultTranslation(FFont* base, int index) { int index = int(lum * 255); remap[index] = GPalette.BaseColors[i]; + remap[index].a = 255; } } // todo: fill the gaps. - remap[0] = 0; + //remap[0] = 0; int lowindex = 0; - int highindex = 1; + while (lowindex < 255 && remap[lowindex].a == 0) lowindex++; + lowindex++; + int highindex = lowindex + 1; while (lowindex < 255) {