const fix, assertion fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Uint32 mySDL_SetRGBAV(const SDL_PixelFormat *fmt, const Uint8 *v);
|
||||
void mySDL_SetRGBAV(Uint8 *p, const SDL_Surface *src, const Uint8 *v);
|
||||
|
||||
void mySDL_GetBitsPerChannel(const SDL_PixelFormat *fmt, Uint32 bits[4]);
|
||||
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 );
|
||||
void CopySDLSurface( SDL_Surface *src, SDL_Surface *dest );
|
||||
bool ConvertSDLSurface( SDL_Surface *src, SDL_Surface *&dst,
|
||||
int width, int height, int bpp,
|
||||
|
||||
Reference in New Issue
Block a user