SDL API renaming: SDL_pixels.h

Fixes https://github.com/libsdl-org/SDL/issues/6886
This commit is contained in:
Sam Lantinga
2022-12-27 06:08:13 -08:00
parent 3d063d7295
commit 083e436a1a
18 changed files with 126 additions and 96 deletions

View File

@@ -121,6 +121,14 @@
#define KMOD_SCROLL SDL_KMOD_SCROLL
#define KMOD_SHIFT SDL_KMOD_SHIFT
/* ##SDL_pixels.h */
#define SDL_AllocFormat SDL_CreatePixelFormat
#define SDL_AllocPalette SDL_CreatePalette
#define SDL_FreeFormat SDL_DestroyPixelFormat
#define SDL_FreePalette SDL_DestroyPalette
#define SDL_MasksToPixelFormatEnum SDL_GetPixelFormatEnumForMasks
#define SDL_PixelFormatEnumToMasks SDL_GetMasksForPixelFormatEnum
/* ##SDL_platform.h */
#ifdef __IOS__
#define __IPHONEOS__ __IOS__
@@ -218,6 +226,14 @@
#define KMOD_SCROLL KMOD_SCROLL_renamed_SDL_KMOD_SCROLL
#define KMOD_SHIFT KMOD_SHIFT_renamed_SDL_KMOD_SHIFT
/* ##SDL_pixels.h */
#define SDL_AllocFormat SDL_AllocFormat_renamed_SDL_CreatePixelFormat
#define SDL_AllocPalette SDL_AllocPalette_renamed_SDL_CreatePalette
#define SDL_FreeFormat SDL_FreeFormat_renamed_SDL_DestroyPixelFormat
#define SDL_FreePalette SDL_FreePalette_renamed_SDL_DestroyPalette
#define SDL_MasksToPixelFormatEnum SDL_MasksToPixelFormatEnum_renamed_SDL_GetPixelFormatEnumForMasks
#define SDL_PixelFormatEnumToMasks SDL_PixelFormatEnumToMasks_renamed_SDL_GetMasksForPixelFormatEnum
/* ##SDL_platform.h */
#ifdef __IOS__
#define __IPHONEOS__ __IPHONEOS___renamed___IOS__

View File

@@ -363,9 +363,9 @@ extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_MasksToPixelFormatEnum
* \sa SDL_GetPixelFormatEnumForMasks
*/
extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
extern DECLSPEC SDL_bool SDLCALL SDL_GetMasksForPixelFormatEnum(Uint32 format,
int *bpp,
Uint32 * Rmask,
Uint32 * Gmask,
@@ -387,9 +387,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_PixelFormatEnumToMasks
* \sa SDL_GetMasksForPixelFormatEnum
*/
extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
extern DECLSPEC Uint32 SDLCALL SDL_GetPixelFormatEnumForMasks(int bpp,
Uint32 Rmask,
Uint32 Gmask,
Uint32 Bmask,
@@ -408,20 +408,20 @@ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_FreeFormat
* \sa SDL_DestroyPixelFormat
*/
extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_CreatePixelFormat(Uint32 pixel_format);
/**
* Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
* Free an SDL_PixelFormat structure allocated by SDL_CreatePixelFormat().
*
* \param format the SDL_PixelFormat structure to free
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocFormat
* \sa SDL_CreatePixelFormat
*/
extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
extern DECLSPEC void SDLCALL SDL_DestroyPixelFormat(SDL_PixelFormat *format);
/**
* Create a palette structure with the specified number of color entries.
@@ -435,9 +435,9 @@ extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_FreePalette
* \sa SDL_DestroyPalette
*/
extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
extern DECLSPEC SDL_Palette *SDLCALL SDL_CreatePalette(int ncolors);
/**
* Set the palette for a pixel format structure.
@@ -449,8 +449,8 @@ extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocPalette
* \sa SDL_FreePalette
* \sa SDL_CreatePalette
* \sa SDL_DestroyPalette
*/
extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
SDL_Palette *palette);
@@ -467,7 +467,7 @@ extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocPalette
* \sa SDL_CreatePalette
* \sa SDL_CreateSurface
*/
extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
@@ -475,15 +475,15 @@ extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
int firstcolor, int ncolors);
/**
* Free a palette created with SDL_AllocPalette().
* Free a palette created with SDL_CreatePalette().
*
* \param palette the SDL_Palette structure to be freed
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocPalette
* \sa SDL_CreatePalette
*/
extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
extern DECLSPEC void SDLCALL SDL_DestroyPalette(SDL_Palette * palette);
/**
* Map an RGB triple to an opaque pixel value for a given pixel format.

View File

@@ -562,7 +562,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface)
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocFormat
* \sa SDL_CreatePixelFormat
* \sa SDL_ConvertSurfaceFormat
* \sa SDL_CreateSurface
*/
@@ -585,7 +585,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface(SDL_Surface *surface,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AllocFormat
* \sa SDL_CreatePixelFormat
* \sa SDL_ConvertSurface
* \sa SDL_CreateSurface
*/