diff src/video/SDL_surface.c @ 1682:7ae8018b2e5d SDL-1.3

Default palette entries to white, instead of black. More palettized video mode support...
author Sam Lantinga <slouken@libsdl.org>
date Fri, 16 Jun 2006 06:00:31 +0000
parents 90bf530ced8e
children 396a35389351
line wrap: on
line diff
--- a/src/video/SDL_surface.c	Thu Jun 15 07:07:07 2006 +0000
+++ b/src/video/SDL_surface.c	Fri Jun 16 06:00:31 2006 +0000
@@ -39,7 +39,6 @@
                      int width, int height, int depth,
                      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 {
-    SDL_VideoDevice *_this = SDL_GetVideoDevice();
     SDL_Surface *screen;
     SDL_Surface *surface;
 
@@ -170,7 +169,7 @@
  * Set the palette in a blittable surface
  */
 int
-SDL_SetColors(SDL_Surface * surface, SDL_Color * colors, int firstcolor,
+SDL_SetColors(SDL_Surface * surface, const SDL_Color * colors, int firstcolor,
               int ncolors)
 {
     SDL_Palette *pal;
@@ -557,7 +556,6 @@
 int
 SDL_FillRect(SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color)
 {
-    SDL_VideoDevice *_this = SDL_GetVideoDevice();
     int x, y;
     Uint8 *row;
 
@@ -789,9 +787,9 @@
     if (format->palette != NULL) {
         int i;
         for (i = 0; i < format->palette->ncolors; ++i) {
-            if ((format->palette->colors[i].r != 0) ||
-                (format->palette->colors[i].g != 0) ||
-                (format->palette->colors[i].b != 0))
+            if ((format->palette->colors[i].r != 0xFF) ||
+                (format->palette->colors[i].g != 0xFF) ||
+                (format->palette->colors[i].b != 0xFF))
                 break;
         }
         if (i == format->palette->ncolors) {