SDL_FindColor() can be static

This commit is contained in:
Sam Lantinga
2025-11-10 13:02:26 -08:00
parent ead02b08dd
commit 6389f4db4c
2 changed files with 1 additions and 2 deletions

View File

@@ -1187,7 +1187,7 @@ void SDL_DitherPalette(SDL_Palette *palette)
/*
* 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
unsigned int smallest;

View File

@@ -50,7 +50,6 @@ extern bool SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst);
// Miscellaneous functions
extern bool SDL_IsSamePalette(const SDL_Palette *src, const SDL_Palette *dst);
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 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);