mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-30 13:28:13 +08:00
SDL_FindColor() can be static
This commit is contained in:
@@ -1187,7 +1187,7 @@ void SDL_DitherPalette(SDL_Palette *palette)
|
|||||||
/*
|
/*
|
||||||
* Match an RGB value to a particular palette index
|
* Match an RGB value to a particular palette index
|
||||||
*/
|
*/
|
||||||
Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
static Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
||||||
{
|
{
|
||||||
// Do colorspace distance matching
|
// Do colorspace distance matching
|
||||||
unsigned int smallest;
|
unsigned int smallest;
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ extern bool SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst);
|
|||||||
// Miscellaneous functions
|
// Miscellaneous functions
|
||||||
extern bool SDL_IsSamePalette(const SDL_Palette *src, const SDL_Palette *dst);
|
extern bool SDL_IsSamePalette(const SDL_Palette *src, const SDL_Palette *dst);
|
||||||
extern void SDL_DitherPalette(SDL_Palette *palette);
|
extern void SDL_DitherPalette(SDL_Palette *palette);
|
||||||
extern Uint8 SDL_FindColor(const SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
|
||||||
extern Uint8 SDL_LookupRGBAColor(SDL_HashTable *palette_map, Uint32 pixelvalue, const SDL_Palette *pal);
|
extern Uint8 SDL_LookupRGBAColor(SDL_HashTable *palette_map, Uint32 pixelvalue, const SDL_Palette *pal);
|
||||||
extern void SDL_DetectPalette(const SDL_Palette *pal, bool *is_opaque, bool *has_alpha_channel);
|
extern void SDL_DetectPalette(const SDL_Palette *pal, bool *is_opaque, bool *has_alpha_channel);
|
||||||
extern SDL_Surface *SDL_DuplicatePixels(int width, int height, SDL_PixelFormat format, SDL_Colorspace colorspace, void *pixels, int pitch);
|
extern SDL_Surface *SDL_DuplicatePixels(int width, int height, SDL_PixelFormat format, SDL_Colorspace colorspace, void *pixels, int pitch);
|
||||||
|
|||||||
Reference in New Issue
Block a user