src/video/SDL_surface.c
branchSDL-1.3
changeset 1682 7ae8018b2e5d
parent 1678 90bf530ced8e
child 1683 396a35389351
     1.1 --- a/src/video/SDL_surface.c	Thu Jun 15 07:07:07 2006 +0000
     1.2 +++ b/src/video/SDL_surface.c	Fri Jun 16 06:00:31 2006 +0000
     1.3 @@ -39,7 +39,6 @@
     1.4                       int width, int height, int depth,
     1.5                       Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
     1.6  {
     1.7 -    SDL_VideoDevice *_this = SDL_GetVideoDevice();
     1.8      SDL_Surface *screen;
     1.9      SDL_Surface *surface;
    1.10  
    1.11 @@ -170,7 +169,7 @@
    1.12   * Set the palette in a blittable surface
    1.13   */
    1.14  int
    1.15 -SDL_SetColors(SDL_Surface * surface, SDL_Color * colors, int firstcolor,
    1.16 +SDL_SetColors(SDL_Surface * surface, const SDL_Color * colors, int firstcolor,
    1.17                int ncolors)
    1.18  {
    1.19      SDL_Palette *pal;
    1.20 @@ -557,7 +556,6 @@
    1.21  int
    1.22  SDL_FillRect(SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color)
    1.23  {
    1.24 -    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.25      int x, y;
    1.26      Uint8 *row;
    1.27  
    1.28 @@ -789,9 +787,9 @@
    1.29      if (format->palette != NULL) {
    1.30          int i;
    1.31          for (i = 0; i < format->palette->ncolors; ++i) {
    1.32 -            if ((format->palette->colors[i].r != 0) ||
    1.33 -                (format->palette->colors[i].g != 0) ||
    1.34 -                (format->palette->colors[i].b != 0))
    1.35 +            if ((format->palette->colors[i].r != 0xFF) ||
    1.36 +                (format->palette->colors[i].g != 0xFF) ||
    1.37 +                (format->palette->colors[i].b != 0xFF))
    1.38                  break;
    1.39          }
    1.40          if (i == format->palette->ncolors) {