Commits

Andrey Lesnikov committed 5233c10

ui_sdl: init_colors(): Updated.

Comments (0)

Files changed (1)

 
 static void
 init_colors (void){
-  Uint8 x = 255;
-  SDL_PixelFormat *fmt = screen->format;
-  red      = SDL_MapRGBA(fmt, x, 0, 0, x);
-  green    = SDL_MapRGBA(fmt, 0, x, 0, x);
-  blue     = SDL_MapRGBA(fmt, 0, 0, x, x);
-  white    = SDL_MapRGBA(fmt, x, x, x, x);
-  black    = SDL_MapRGBA(fmt, 0, 0, 0, x);
-  grey     = SDL_MapRGBA(fmt, 150, 150, 150, 255);
-  darkgrey = SDL_MapRGBA(fmt, 80, 80, 80, 255);
+  SDL_PixelFormat *f = screen->format;
+  red      = SDL_MapRGBA(f, 255,   0,   0, 255);
+  green    = SDL_MapRGBA(f,   0, 255,   0, 255);
+  blue     = SDL_MapRGBA(f,   0,   0, 255, 255);
+  white    = SDL_MapRGBA(f, 255, 255, 255, 255);
+  black    = SDL_MapRGBA(f,   0,   0,   0, 255);
+  grey     = SDL_MapRGBA(f, 150, 150, 150, 255);
+  darkgrey = SDL_MapRGBA(f,  80,  80,  80, 255);
 }
  
 static void