const fix, assertion fix

This commit is contained in:
Glenn Maynard
2004-05-18 03:15:51 +00:00
parent a5fd0fc48e
commit b59e1cce88
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ void mySDL_GetBitsPerChannel(const SDL_PixelFormat *fmt, Uint32 bits[4])
/* SDL_SetPalette only works when SDL video has been initialized, even on software
* surfaces. */
void mySDL_SetPalette(SDL_Surface *dst, SDL_Color *colors, int start, int cnt)
void mySDL_SetPalette(SDL_Surface *dst, const SDL_Color *colors, int start, int cnt)
{
ASSERT( dst->format->palette );
ASSERT( start+cnt <= dst->format->palette->ncolors );
@@ -1169,7 +1169,7 @@ void mySDL_FixupPalettedAlpha( SDL_Surface *img )
void mySDL_AddColorKey( SDL_Surface *img, Uint32 color )
{
ASSERT_M( img->format->BitsPerPixel == 8, ssprintf( "%i", img->format->BitsPerPixel) );
ASSERT_M( (int) color < img->format->palette->ncolors, ssprintf("%i < %i", color, img->format->palette->ncolors ) );
ASSERT_M( color < (Uint32) img->format->palette->ncolors, ssprintf("%i < %i", color, img->format->palette->ncolors ) );
img->format->palette->colors[ color ].unused = 0;
}