Use SDL_PixelFormatEnum as type

This commit is contained in:
Susko3
2024-03-06 19:59:05 +01:00
committed by Sam Lantinga
parent 38c54b8e0e
commit 424616e032
9 changed files with 51 additions and 51 deletions

View File

@@ -699,7 +699,7 @@ typedef struct SDL_Palette
*/
typedef struct SDL_PixelFormat
{
Uint32 format;
SDL_PixelFormatEnum format;
SDL_Palette *palette;
Uint8 bits_per_pixel;
Uint8 bytes_per_pixel;
@@ -729,7 +729,7 @@ typedef struct SDL_PixelFormat
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(SDL_PixelFormatEnum format);
/**
* Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
@@ -747,7 +747,7 @@ extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
*
* \sa SDL_GetPixelFormatEnumForMasks
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GetMasksForPixelFormatEnum(Uint32 format,
extern DECLSPEC SDL_bool SDLCALL SDL_GetMasksForPixelFormatEnum(SDL_PixelFormatEnum format,
int *bpp,
Uint32 * Rmask,
Uint32 * Gmask,
@@ -792,7 +792,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetPixelFormatEnumForMasks(int bpp,
*
* \sa SDL_DestroyPixelFormat
*/
extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_CreatePixelFormat(Uint32 pixel_format);
extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_CreatePixelFormat(SDL_PixelFormatEnum pixel_format);
/**
* Free an SDL_PixelFormat structure allocated by SDL_CreatePixelFormat().

View File

@@ -80,7 +80,7 @@ typedef struct SDL_RendererInfo
const char *name; /**< The name of the renderer */
Uint32 flags; /**< Supported ::SDL_RendererFlags */
int num_texture_formats; /**< The number of available texture formats */
Uint32 texture_formats[16]; /**< The available texture formats */
SDL_PixelFormatEnum texture_formats[16]; /**< The available texture formats */
int max_texture_width; /**< The maximum texture width */
int max_texture_height; /**< The maximum texture height */
} SDL_RendererInfo;

View File

@@ -153,7 +153,7 @@ typedef int (SDLCALL *SDL_blit) (struct SDL_Surface *src, const SDL_Rect *srcrec
* \sa SDL_DestroySurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateSurface
(int width, int height, Uint32 format);
(int width, int height, SDL_PixelFormatEnum format);
/**
* Allocate a new RGB surface with a specific pixel format and existing pixel
@@ -182,7 +182,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateSurface
* \sa SDL_DestroySurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateSurfaceFrom
(void *pixels, int width, int height, int pitch, Uint32 format);
(void *pixels, int width, int height, int pitch, SDL_PixelFormatEnum format);
/**
* Free an RGB surface.
@@ -713,7 +713,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface(SDL_Surface *surface, co
* \sa SDL_ConvertSurface
* \sa SDL_CreateSurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat(SDL_Surface *surface, Uint32 pixel_format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat(SDL_Surface *surface, SDL_PixelFormatEnum pixel_format);
/**
* Copy an existing surface to a new surface of the specified format and
@@ -736,7 +736,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat(SDL_Surface *surfa
* \sa SDL_ConvertSurface
* \sa SDL_CreateSurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormatAndColorspace(SDL_Surface *surface, Uint32 pixel_format, SDL_Colorspace colorspace, SDL_PropertiesID props);
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormatAndColorspace(SDL_Surface *surface, SDL_PixelFormatEnum pixel_format, SDL_Colorspace colorspace, SDL_PropertiesID props);
/**
* Copy a block of pixels of one format to another format.
@@ -754,7 +754,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormatAndColorspace(SDL_S
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch);
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, SDL_PixelFormatEnum src_format, const void *src, int src_pitch, SDL_PixelFormatEnum dst_format, void *dst, int dst_pitch);
/**
* Copy a block of pixels of one format and colorspace to another format and
@@ -781,7 +781,7 @@ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, Uint32 src_
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_ConvertPixelsAndColorspace(int width, int height, Uint32 src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, const void *src, int src_pitch, Uint32 dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, void *dst, int dst_pitch);
extern DECLSPEC int SDLCALL SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormatEnum src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, const void *src, int src_pitch, SDL_PixelFormatEnum dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, void *dst, int dst_pitch);
/**
* Premultiply the alpha on a block of pixels.
@@ -803,7 +803,7 @@ extern DECLSPEC int SDLCALL SDL_ConvertPixelsAndColorspace(int width, int height
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch);
extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormatEnum src_format, const void *src, int src_pitch, SDL_PixelFormatEnum dst_format, void *dst, int dst_pitch);
/**
* Perform a fast fill of a rectangle with a specific color.