changeset 1971:c27f7cd25684

Set the PPL font palette to be more appropriate.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Jun 2018 18:09:34 +0300
parents 36fc21dbdfa6
children cedb5ca1533b
files tools/ppl.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ppl.c	Sat Jun 30 18:08:11 2018 +0300
+++ b/tools/ppl.c	Sat Jun 30 18:09:34 2018 +0300
@@ -625,6 +625,14 @@
         goto error_exit;
     }
 
+    SDL_Color pal[DMFONT_NPALETTE];
+    for (int n = 0; n < DMFONT_NPALETTE; n++)
+    {
+        pal[n].r = pal[n].g = pal[n].b = 0;
+        pal[n].a = n > 0 ? 255 : 0;
+    }
+    dmSetBitmapFontPalette(font, pal, 0, DMFONT_NPALETTE);
+
     // Initialize SDL components
     if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER) != 0)
     {