comparison tools/ppl.c @ 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 3a768f8d409d
comparison
equal deleted inserted replaced
1970:36fc21dbdfa6 1971:c27f7cd25684
623 dmErrorMsg("Could not load font from file, %d: %s\n", 623 dmErrorMsg("Could not load font from file, %d: %s\n",
624 result, dmErrorStr(result)); 624 result, dmErrorStr(result));
625 goto error_exit; 625 goto error_exit;
626 } 626 }
627 627
628 SDL_Color pal[DMFONT_NPALETTE];
629 for (int n = 0; n < DMFONT_NPALETTE; n++)
630 {
631 pal[n].r = pal[n].g = pal[n].b = 0;
632 pal[n].a = n > 0 ? 255 : 0;
633 }
634 dmSetBitmapFontPalette(font, pal, 0, DMFONT_NPALETTE);
635
628 // Initialize SDL components 636 // Initialize SDL components
629 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER) != 0) 637 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER) != 0)
630 { 638 {
631 dmErrorMsg("Could not initialize SDL: %s\n", SDL_GetError()); 639 dmErrorMsg("Could not initialize SDL: %s\n", SDL_GetError());
632 goto error_exit; 640 goto error_exit;