Compile CSFML with SFML 3.0

This commit is contained in:
Miron Alexandru authored and Chris Thrasher committed 2024-03-28 17:59:11 -06:00
1 parent 0d292bdb3c
commit 61bcbc5906
62 files changed
+431 -655

No files matched your search

+3 -1
View File
@@ -224,9 +224,11 @@ CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfImage* image, sfColor colo
/// \param destY Y coordinate of the destination position
/// \param sourceRect Sub-rectangle of the source image to copy
/// \param applyAlpha Should the copy take in account the source transparency?
///
/// \return True if the operation was successful, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, bool applyAlpha);
CSFML_GRAPHICS_API bool sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, bool applyAlpha);
////////////////////////////////////////////////////////////
/// \brief Change the color of a pixel in an image
+1 -16
View File
@@ -40,21 +40,6 @@
#include <stddef.h>
////////////////////////////////////////////////////////////
/// \brief Construct a new render texture
///
/// \param width Width of the render texture
/// \param height Height of the render texture
/// \param depthBuffer Do you want a depth-buffer attached? (useful only if you're doing 3D OpenGL on the rendertexture)
///
/// \return A new sfRenderTexture object, or NULL if it failed
///
/// \deprecated
/// Use sfRenderTexture_createWithSettings instead.
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, bool depthBuffer);
////////////////////////////////////////////////////////////
/// \brief Construct a new render texture
///
@@ -65,7 +50,7 @@ CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, u
/// \return A new sfRenderTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_createWithSettings(unsigned int width, unsigned int height, const sfContextSettings* settings);
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing render texture
+4 -4
View File
@@ -52,7 +52,7 @@
/// \param settings Creation settings (pass NULL to use default values)
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint32_t style, const sfContextSettings* settings);
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint32_t style, sfWindowState state, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Construct a new render window (with a UTF-32 title)
@@ -63,7 +63,7 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const
/// \param settings Creation settings (pass NULL to use default values)
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style, const sfContextSettings* settings);
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const sfChar32* title, uint32_t style, sfWindowState state, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Construct a render window from an existing control
@@ -196,7 +196,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_setTitle(sfRenderWindow* renderWindow, co
/// \param title New title
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_setUnicodeTitle(sfRenderWindow* renderWindow, const uint32_t* title);
CSFML_GRAPHICS_API void sfRenderWindow_setUnicodeTitle(sfRenderWindow* renderWindow, const sfChar32* title);
////////////////////////////////////////////////////////////
/// \brief Change a render window's icon
@@ -352,7 +352,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_display(sfRenderWindow* renderWindow);
/// \return Window handle
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_getSystemHandle(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_getNativeHandle(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Clear a render window with the given color
+3 -1
View File
@@ -39,11 +39,13 @@
////////////////////////////////////////////////////////////
/// \brief Create a new sprite
///
/// \param texture Source texture
///
/// \return A new sfSprite object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfSprite* sfSprite_create(void);
CSFML_GRAPHICS_API sfSprite* sfSprite_create(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Copy an existing sprite
+6 -4
View File
@@ -52,11 +52,13 @@ typedef enum
////////////////////////////////////////////////////////////
/// \brief Create a new text
///
/// \param font Font used to draw the string
///
/// \return A new sfText object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfText* sfText_create(void);
CSFML_GRAPHICS_API sfText* sfText_create(const sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Copy an existing text
@@ -247,7 +249,7 @@ CSFML_GRAPHICS_API void sfText_setString(sfText* text, const char* string);
/// \param string New string
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const uint32_t* string);
CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const sfChar32* string);
////////////////////////////////////////////////////////////
/// \brief Set the font of a text
@@ -391,13 +393,13 @@ CSFML_GRAPHICS_API const char* sfText_getString(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the string of a text (returns a unicode string)
///
///
/// \param text Text object
///
/// \return String as UTF-32
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API const uint32_t* sfText_getUnicodeString(const sfText* text);
CSFML_GRAPHICS_API const sfChar32* sfText_getUnicodeString(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the font used by a text