Run clang-format

This commit is contained in:
Chris Thrasher committed 2024-09-01 11:32:18 -06:00
1 parent 42aec92642
commit 54d28325b9
134 files changed
+598 -330

No files matched your search

+1 -1
View File
@@ -28,7 +28,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System.h>
#include <CSFML/Audio/Listener.h> #include <CSFML/Audio/Listener.h>
#include <CSFML/Audio/Music.h> #include <CSFML/Audio/Music.h>
#include <CSFML/Audio/Sound.h> #include <CSFML/Audio/Sound.h>
@@ -37,3 +36,4 @@
#include <CSFML/Audio/SoundRecorder.h> #include <CSFML/Audio/SoundRecorder.h>
#include <CSFML/Audio/SoundStatus.h> #include <CSFML/Audio/SoundStatus.h>
#include <CSFML/Audio/SoundStream.h> #include <CSFML/Audio/SoundStream.h>
#include <CSFML/System.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
+2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/SoundStatus.h> #include <CSFML/Audio/SoundStatus.h>
#include <CSFML/Audio/Types.h> #include <CSFML/Audio/Types.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
#include <stddef.h> #include <stddef.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/SoundStatus.h> #include <CSFML/Audio/SoundStatus.h>
#include <CSFML/Audio/Types.h> #include <CSFML/Audio/Types.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
+5 -2
View File
@@ -28,10 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/Types.h>
#include <CSFML/Audio/SoundChannel.h> #include <CSFML/Audio/SoundChannel.h>
#include <CSFML/Audio/Types.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <stddef.h> #include <stddef.h>
@@ -94,7 +96,8 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* str
/// \return A new sfSoundBuffer object (NULL if failed) /// \return A new sfSoundBuffer object (NULL if failed)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const int16_t* samples, CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(
const int16_t* samples,
uint64_t sampleCount, uint64_t sampleCount,
unsigned int channelCount, unsigned int channelCount,
unsigned int sampleRate, unsigned int sampleRate,
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/Types.h> #include <CSFML/Audio/Types.h>
+2
View File
@@ -28,8 +28,10 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/Types.h> #include <CSFML/Audio/Types.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <stddef.h> #include <stddef.h>
+5 -2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Export.h> #include <CSFML/Audio/Export.h>
#include <CSFML/Audio/SoundChannel.h>
#include <CSFML/Audio/SoundStatus.h> #include <CSFML/Audio/SoundStatus.h>
#include <CSFML/Audio/Types.h> #include <CSFML/Audio/Types.h>
#include <CSFML/Audio/SoundChannel.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
#include <stddef.h> #include <stddef.h>
@@ -64,7 +66,8 @@ typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///< T
/// \return A new sfSoundStream object /// \return A new sfSoundStream object
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfSoundStream* sfSoundStream_create(sfSoundStreamGetDataCallback onGetData, CSFML_AUDIO_API sfSoundStream* sfSoundStream_create(
sfSoundStreamGetDataCallback onGetData,
sfSoundStreamSeekCallback onSeek, sfSoundStreamSeekCallback onSeek,
unsigned int channelCount, unsigned int channelCount,
unsigned int sampleRate, unsigned int sampleRate,
+1 -1
View File
@@ -28,8 +28,8 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+1 -1
View File
@@ -28,7 +28,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window.h>
#include <CSFML/Graphics/BlendMode.h> #include <CSFML/Graphics/BlendMode.h>
#include <CSFML/Graphics/CircleShape.h> #include <CSFML/Graphics/CircleShape.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
@@ -54,3 +53,4 @@
#include <CSFML/Graphics/VertexArray.h> #include <CSFML/Graphics/VertexArray.h>
#include <CSFML/Graphics/VertexBuffer.h> #include <CSFML/Graphics/VertexBuffer.h>
#include <CSFML/Graphics/View.h> #include <CSFML/Graphics/View.h>
#include <CSFML/Window.h>
+2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+4 -1
View File
@@ -28,10 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/FontInfo.h> #include <CSFML/Graphics/FontInfo.h>
#include <CSFML/Graphics/Glyph.h> #include <CSFML/Graphics/Glyph.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <stddef.h> #include <stddef.h>
@@ -96,7 +98,8 @@ CSFML_GRAPHICS_API void sfFont_destroy(sfFont* font);
/// \return The corresponding glyph /// \return The corresponding glyph
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(const sfFont* font, uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness); CSFML_GRAPHICS_API sfGlyph
sfFont_getGlyph(const sfFont* font, uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Determine if this font has a glyph representing the requested code point /// \brief Determine if this font has a glyph representing the requested code point
+1 -1
View File
@@ -27,8 +27,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Transform.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
+2
View File
@@ -28,12 +28,14 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Buffer.h> #include <CSFML/System/Buffer.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/BlendMode.h> #include <CSFML/Graphics/BlendMode.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
+45 -19
View File
@@ -28,14 +28,16 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/PrimitiveType.h> #include <CSFML/Graphics/PrimitiveType.h>
#include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/RenderStates.h> #include <CSFML/Graphics/RenderStates.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Vertex.h> #include <CSFML/Graphics/Vertex.h>
#include <CSFML/Window/Window.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/Window/Window.h>
#include <stddef.h> #include <stddef.h>
@@ -171,7 +173,8 @@ CSFML_GRAPHICS_API sfIntRect sfRenderTexture_getViewport(const sfRenderTexture*
/// \return The converted point, in "world" units /// \return The converted point, in "world" units
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfVector2f sfRenderTexture_mapPixelToCoords(const sfRenderTexture* renderTexture, sfVector2i point, const sfView* view); CSFML_GRAPHICS_API sfVector2f
sfRenderTexture_mapPixelToCoords(const sfRenderTexture* renderTexture, sfVector2i point, const sfView* view);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Convert a point from world coordinates to texture coordinates /// \brief Convert a point from world coordinates to texture coordinates
@@ -197,7 +200,8 @@ CSFML_GRAPHICS_API sfVector2f sfRenderTexture_mapPixelToCoords(const sfRenderTex
/// \return The converted point, in target coordinates (pixels) /// \return The converted point, in target coordinates (pixels)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfVector2i sfRenderTexture_mapCoordsToPixel(const sfRenderTexture* renderTexture, sfVector2f point, const sfView* view); CSFML_GRAPHICS_API sfVector2i
sfRenderTexture_mapCoordsToPixel(const sfRenderTexture* renderTexture, sfVector2f point, const sfView* view);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw a drawable object to the render-target /// \brief Draw a drawable object to the render-target
@@ -207,14 +211,30 @@ CSFML_GRAPHICS_API sfVector2i sfRenderTexture_mapCoordsToPixel(const sfRenderTex
/// \param states Render states to use for drawing (NULL to use the default states) /// \param states Render states to use for drawing (NULL to use the default states)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderTexture_drawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderTexture_drawSprite(sfRenderTexture* renderTexture,
CSFML_GRAPHICS_API void sfRenderTexture_drawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states); const sfSprite* object,
CSFML_GRAPHICS_API void sfRenderTexture_drawShape(sfRenderTexture* renderTexture, const sfShape* object, const sfRenderStates* states); const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderTexture_drawText(sfRenderTexture* renderTexture,
CSFML_GRAPHICS_API void sfRenderTexture_drawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states); const sfText* object,
CSFML_GRAPHICS_API void sfRenderTexture_drawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states); const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderTexture_drawShape(sfRenderTexture* renderTexture,
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBuffer(sfRenderTexture* renderTexture, const sfVertexBuffer* object, const sfRenderStates* states); const sfShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawCircleShape(sfRenderTexture* renderTexture,
const sfCircleShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawConvexShape(sfRenderTexture* renderTexture,
const sfConvexShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawRectangleShape(sfRenderTexture* renderTexture,
const sfRectangleShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture,
const sfVertexArray* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBuffer(sfRenderTexture* renderTexture,
const sfVertexBuffer* object,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by a vertex buffer. /// \brief Draw primitives defined by a vertex buffer.
@@ -226,9 +246,12 @@ CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBuffer(sfRenderTexture* render
/// \param states Render states to use for drawing /// \param states Render states to use for drawing
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBufferRange(sfRenderTexture* renderTexture, CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBufferRange(
const sfVertexBuffer* object, size_t firstVertex, sfRenderTexture* renderTexture,
size_t vertexCount, const sfRenderStates* states); const sfVertexBuffer* object,
size_t firstVertex,
size_t vertexCount,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by an array of vertices to a render texture /// \brief Draw primitives defined by an array of vertices to a render texture
@@ -240,9 +263,12 @@ CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBufferRange(sfRenderTexture* r
/// \param states Render states to use for drawing (NULL to use the default states) /// \param states Render states to use for drawing (NULL to use the default states)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture, CSFML_GRAPHICS_API void sfRenderTexture_drawPrimitives(
const sfVertex* vertices, size_t vertexCount, sfRenderTexture* renderTexture,
sfPrimitiveType type, const sfRenderStates* states); const sfVertex* vertices,
size_t vertexCount,
sfPrimitiveType type,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Save the current OpenGL render states and matrices /// \brief Save the current OpenGL render states and matrices
+57 -21
View File
@@ -28,17 +28,19 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/PrimitiveType.h> #include <CSFML/Graphics/PrimitiveType.h>
#include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/RenderStates.h> #include <CSFML/Graphics/RenderStates.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Vertex.h> #include <CSFML/Graphics/Vertex.h>
#include <CSFML/System/Vector2.h>
#include <CSFML/Window/Event.h> #include <CSFML/Window/Event.h>
#include <CSFML/Window/VideoMode.h> #include <CSFML/Window/VideoMode.h>
#include <CSFML/Window/WindowHandle.h>
#include <CSFML/Window/Window.h> #include <CSFML/Window/Window.h>
#include <CSFML/System/Vector2.h> #include <CSFML/Window/WindowHandle.h>
#include <stddef.h> #include <stddef.h>
@@ -51,7 +53,12 @@
/// \param settings Creation settings (pass NULL to use default values) /// \param settings Creation settings (pass NULL to use default values)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint32_t style, sfWindowState state, 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) /// \brief Construct a new render window (with a UTF-32 title)
@@ -62,7 +69,12 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const
/// \param settings Creation settings (pass NULL to use default values) /// \param settings Creation settings (pass NULL to use default values)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const sfChar32* title, uint32_t style, sfWindowState state, 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 /// \brief Construct a render window from an existing control
@@ -429,7 +441,8 @@ CSFML_GRAPHICS_API sfIntRect sfRenderWindow_getViewport(const sfRenderWindow* re
/// \return The converted point, in "world" units /// \return The converted point, in "world" units
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfVector2f sfRenderWindow_mapPixelToCoords(const sfRenderWindow* renderWindow, sfVector2i point, const sfView* view); CSFML_GRAPHICS_API sfVector2f
sfRenderWindow_mapPixelToCoords(const sfRenderWindow* renderWindow, sfVector2i point, const sfView* view);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Convert a point from world coordinates to window coordinates /// \brief Convert a point from world coordinates to window coordinates
@@ -455,7 +468,8 @@ CSFML_GRAPHICS_API sfVector2f sfRenderWindow_mapPixelToCoords(const sfRenderWind
/// \return The converted point, in target coordinates (pixels) /// \return The converted point, in target coordinates (pixels)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfVector2i sfRenderWindow_mapCoordsToPixel(const sfRenderWindow* renderWindow, sfVector2f point, const sfView* view); CSFML_GRAPHICS_API sfVector2i
sfRenderWindow_mapCoordsToPixel(const sfRenderWindow* renderWindow, sfVector2f point, const sfView* view);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw a drawable object to the render-target /// \brief Draw a drawable object to the render-target
@@ -465,14 +479,26 @@ CSFML_GRAPHICS_API sfVector2i sfRenderWindow_mapCoordsToPixel(const sfRenderWind
/// \param states Render states to use for drawing (NULL to use the default states) /// \param states Render states to use for drawing (NULL to use the default states)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_drawSprite(sfRenderWindow* renderWindow, const sfSprite* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderWindow_drawSprite(sfRenderWindow* renderWindow,
const sfSprite* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderWindow_drawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawShape(sfRenderWindow* renderWindow, const sfShape* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderWindow_drawShape(sfRenderWindow* renderWindow, const sfShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawCircleShape(sfRenderWindow* renderWindow, const sfCircleShape* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderWindow_drawCircleShape(sfRenderWindow* renderWindow,
CSFML_GRAPHICS_API void sfRenderWindow_drawConvexShape(sfRenderWindow* renderWindow, const sfConvexShape* object, const sfRenderStates* states); const sfCircleShape* object,
CSFML_GRAPHICS_API void sfRenderWindow_drawRectangleShape(sfRenderWindow* renderWindow, const sfRectangleShape* object, const sfRenderStates* states); const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWindow, const sfVertexArray* object, const sfRenderStates* states); CSFML_GRAPHICS_API void sfRenderWindow_drawConvexShape(sfRenderWindow* renderWindow,
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBuffer(sfRenderWindow* renderWindow, const sfVertexBuffer* object, const sfRenderStates* states); const sfConvexShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawRectangleShape(sfRenderWindow* renderWindow,
const sfRectangleShape* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWindow,
const sfVertexArray* object,
const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBuffer(sfRenderWindow* renderWindow,
const sfVertexBuffer* object,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by a vertex buffer. /// \brief Draw primitives defined by a vertex buffer.
@@ -484,9 +510,12 @@ CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBuffer(sfRenderWindow* renderWi
/// \param states Render states to use for drawing /// \param states Render states to use for drawing
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBufferRange(sfRenderWindow* renderWindow, CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBufferRange(
const sfVertexBuffer* object, size_t firstVertex, sfRenderWindow* renderWindow,
size_t vertexCount, const sfRenderStates* states); const sfVertexBuffer* object,
size_t firstVertex,
size_t vertexCount,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by an array of vertices to a render window /// \brief Draw primitives defined by an array of vertices to a render window
@@ -498,9 +527,12 @@ CSFML_GRAPHICS_API void sfRenderWindow_drawVertexBufferRange(sfRenderWindow* ren
/// \param states Render states to use for drawing (NULL to use the default states) /// \param states Render states to use for drawing (NULL to use the default states)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow, CSFML_GRAPHICS_API void sfRenderWindow_drawPrimitives(
const sfVertex* vertices, size_t vertexCount, sfRenderWindow* renderWindow,
sfPrimitiveType type, const sfRenderStates* states); const sfVertex* vertices,
size_t vertexCount,
sfPrimitiveType type,
const sfRenderStates* states);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Save the current OpenGL render states and matrices /// \brief Save the current OpenGL render states and matrices
@@ -600,4 +632,8 @@ CSFML_GRAPHICS_API sfVector2i sfTouch_getPositionRenderWindow(unsigned int finge
/// \return True if surface creation was successful, false otherwise /// \return True if surface creation was successful, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API bool sfRenderWindow_createVulkanSurface(sfRenderWindow* renderWindow, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator); CSFML_GRAPHICS_API bool sfRenderWindow_createVulkanSurface(
sfRenderWindow* renderWindow,
const VkInstance* instance,
VkSurfaceKHR* surface,
const VkAllocationCallbacks* allocator);
+11 -3
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Glsl.h> #include <CSFML/Graphics/Glsl.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
@@ -35,6 +36,7 @@
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
#include <stddef.h> #include <stddef.h>
@@ -56,7 +58,9 @@
/// \return A new sfShader object, or NULL if it failed /// \return A new sfShader object, or NULL if it failed
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfShader* sfShader_createFromFile(const char* vertexShaderFilename, const char* geometryShaderFilename, const char* fragmentShaderFilename); CSFML_GRAPHICS_API sfShader* sfShader_createFromFile(const char* vertexShaderFilename,
const char* geometryShaderFilename,
const char* fragmentShaderFilename);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Load the vertex, geometry and fragment shaders from source code in memory /// \brief Load the vertex, geometry and fragment shaders from source code in memory
@@ -76,7 +80,9 @@ CSFML_GRAPHICS_API sfShader* sfShader_createFromFile(const char* vertexShaderFil
/// \return A new sfShader object, or NULL if it failed /// \return A new sfShader object, or NULL if it failed
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfShader* sfShader_createFromMemory(const char* vertexShader, const char* geometryShader, const char* fragmentShader); CSFML_GRAPHICS_API sfShader* sfShader_createFromMemory(const char* vertexShader,
const char* geometryShader,
const char* fragmentShader);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Load the vertex, geometry and fragment shaders from custom streams /// \brief Load the vertex, geometry and fragment shaders from custom streams
@@ -96,7 +102,9 @@ CSFML_GRAPHICS_API sfShader* sfShader_createFromMemory(const char* vertexShader,
/// \return A new sfShader object, or NULL if it failed /// \return A new sfShader object, or NULL if it failed
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream, sfInputStream* geometryShaderStream, sfInputStream* fragmentShaderStream); CSFML_GRAPHICS_API sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream,
sfInputStream* geometryShaderStream,
sfInputStream* fragmentShaderStream);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Destroy an existing shader /// \brief Destroy an existing shader
+2
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/BlendMode.h> #include <CSFML/Graphics/BlendMode.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
+3 -1
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+3 -1
View File
@@ -28,11 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/Window/Types.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/Window/Types.h>
#include <stddef.h> #include <stddef.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+3 -4
View File
@@ -28,12 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Encapsulate a 3x3 transform matrix /// \brief Encapsulate a 3x3 transform matrix
/// ///
@@ -66,9 +66,8 @@ CSFML_GRAPHICS_API const sfTransform sfTransform_Identity;
/// \return A new sfTransform object /// \return A new sfTransform object
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfTransform sfTransform_fromMatrix(float a00, float a01, float a02, CSFML_GRAPHICS_API sfTransform
float a10, float a11, float a12, sfTransform_fromMatrix(float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22);
float a20, float a21, float a22);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the 4x4 matrix of a transform /// \brief Return the 4x4 matrix of a transform
+2 -1
View File
@@ -28,8 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
+2
View File
@@ -28,10 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/PrimitiveType.h> #include <CSFML/Graphics/PrimitiveType.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Vertex.h> #include <CSFML/Graphics/Vertex.h>
#include <stddef.h> #include <stddef.h>
+6 -1
View File
@@ -28,9 +28,11 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/PrimitiveType.h> #include <CSFML/Graphics/PrimitiveType.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/Graphics/Vertex.h> #include <CSFML/Graphics/Vertex.h>
#include <stddef.h> #include <stddef.h>
@@ -128,7 +130,10 @@ CSFML_GRAPHICS_API unsigned int sfVertexBuffer_getVertexCount(const sfVertexBuff
/// \return true if the update was successful /// \return true if the update was successful
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API bool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer, const sfVertex* vertices, unsigned int vertexCount, unsigned int offset); CSFML_GRAPHICS_API bool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer,
const sfVertex* vertices,
unsigned int vertexCount,
unsigned int offset);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Copy the contents of another buffer into this buffer /// \brief Copy the contents of another buffer into this buffer
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Export.h> #include <CSFML/Graphics/Export.h>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Types.h> #include <CSFML/Graphics/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
+1 -1
View File
@@ -28,7 +28,6 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System.h>
#include <CSFML/Network/Ftp.h> #include <CSFML/Network/Ftp.h>
#include <CSFML/Network/Http.h> #include <CSFML/Network/Http.h>
#include <CSFML/Network/IpAddress.h> #include <CSFML/Network/IpAddress.h>
@@ -38,3 +37,4 @@
#include <CSFML/Network/TcpListener.h> #include <CSFML/Network/TcpListener.h>
#include <CSFML/Network/TcpSocket.h> #include <CSFML/Network/TcpSocket.h>
#include <CSFML/Network/UdpSocket.h> #include <CSFML/Network/UdpSocket.h>
#include <CSFML/System.h>
+8 -1
View File
@@ -28,8 +28,10 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/IpAddress.h> #include <CSFML/Network/IpAddress.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <stddef.h> #include <stddef.h>
@@ -521,7 +523,12 @@ CSFML_NETWORK_API sfFtpResponse* sfFtp_download(sfFtp* ftp, const char* remoteFi
/// \return Server response to the request /// \return Server response to the request
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfFtpResponse* sfFtp_upload(sfFtp* ftp, const char* localFile, const char* remotePath, sfFtpTransferMode mode, bool append); CSFML_NETWORK_API sfFtpResponse* sfFtp_upload(
sfFtp* ftp,
const char* localFile,
const char* remotePath,
sfFtpTransferMode mode,
bool append);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Send a command to the FTP server /// \brief Send a command to the FTP server
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
+2
View File
@@ -28,7 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <stddef.h> #include <stddef.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
+2 -1
View File
@@ -28,8 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/SocketStatus.h>
#include <CSFML/Network/IpAddress.h> #include <CSFML/Network/IpAddress.h>
#include <CSFML/Network/SocketStatus.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
+4 -1
View File
@@ -28,10 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/IpAddress.h> #include <CSFML/Network/IpAddress.h>
#include <CSFML/Network/SocketStatus.h> #include <CSFML/Network/SocketStatus.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <stddef.h> #include <stddef.h>
@@ -133,7 +135,8 @@ CSFML_NETWORK_API unsigned short sfTcpSocket_getRemotePort(const sfTcpSocket* so
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_connect(sfTcpSocket* socket, sfIpAddress remoteAddress, unsigned short remotePort, sfTime timeout); CSFML_NETWORK_API sfSocketStatus
sfTcpSocket_connect(sfTcpSocket* socket, sfIpAddress remoteAddress, unsigned short remotePort, sfTime timeout);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Disconnect a TCP socket from its remote peer /// \brief Disconnect a TCP socket from its remote peer
+15 -4
View File
@@ -28,9 +28,11 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Network/Export.h> #include <CSFML/Network/Export.h>
#include <CSFML/Network/IpAddress.h> #include <CSFML/Network/IpAddress.h>
#include <CSFML/Network/SocketStatus.h> #include <CSFML/Network/SocketStatus.h>
#include <CSFML/Network/Types.h> #include <CSFML/Network/Types.h>
#include <stddef.h> #include <stddef.h>
@@ -139,7 +141,8 @@ CSFML_NETWORK_API void sfUdpSocket_unbind(sfUdpSocket* socket);
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const void* data, size_t size, sfIpAddress remoteAddress, unsigned short remotePort); CSFML_NETWORK_API sfSocketStatus
sfUdpSocket_send(sfUdpSocket* socket, const void* data, size_t size, sfIpAddress remoteAddress, unsigned short remotePort);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Receive raw data from a remote peer with a UDP socket /// \brief Receive raw data from a remote peer with a UDP socket
@@ -161,7 +164,13 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const voi
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, void* data, size_t size, size_t* received, sfIpAddress* remoteAddress, unsigned short* remotePort); CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(
sfUdpSocket* socket,
void* data,
size_t size,
size_t* received,
sfIpAddress* remoteAddress,
unsigned short* remotePort);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Send a formatted packet of data to a remote peer with a UDP socket /// \brief Send a formatted packet of data to a remote peer with a UDP socket
@@ -178,7 +187,8 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, void*
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_sendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress remoteAddress, unsigned short remotePort); CSFML_NETWORK_API sfSocketStatus
sfUdpSocket_sendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress remoteAddress, unsigned short remotePort);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Receive a formatted packet of data from a remote peer with a UDP socket /// \brief Receive a formatted packet of data from a remote peer with a UDP socket
@@ -193,7 +203,8 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_sendPacket(sfUdpSocket* socket, sfP
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* remoteAddress, unsigned short* remotePort); CSFML_NETWORK_API sfSocketStatus
sfUdpSocket_receivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* remoteAddress, unsigned short* remotePort);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the maximum number of bytes that can be /// \brief Return the maximum number of bytes that can be
+1 -1
View File
@@ -36,9 +36,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#if defined(CSFML_SYSTEM_WINDOWS) #if defined(CSFML_SYSTEM_WINDOWS)
#include <windows.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#include <windows.h>
#elif defined(CSFML_SYSTEM_LINUX) || defined(CSFML_SYSTEM_FREEBSD) #elif defined(CSFML_SYSTEM_LINUX) || defined(CSFML_SYSTEM_FREEBSD)
+1
View File
@@ -29,6 +29,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Config.h> #include <CSFML/Config.h>
#include <CSFML/System/Buffer.h> #include <CSFML/System/Buffer.h>
#include <CSFML/System/Clock.h> #include <CSFML/System/Clock.h>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
+2
View File
@@ -28,7 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System/Export.h> #include <CSFML/System/Export.h>
#include <CSFML/System/Types.h> #include <CSFML/System/Types.h>
#include <stddef.h> #include <stddef.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System/Export.h> #include <CSFML/System/Export.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
#include <CSFML/System/Types.h> #include <CSFML/System/Types.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System/Export.h> #include <CSFML/System/Export.h>
#include <stdlib.h> #include <stdlib.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System/Export.h> #include <CSFML/System/Export.h>
#include <CSFML/System/Time.h> #include <CSFML/System/Time.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Types.h> #include <CSFML/Window/Types.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Types.h> #include <CSFML/Window/Types.h>
#include <CSFML/Window/Window.h> #include <CSFML/Window/Window.h>
+2 -1
View File
@@ -27,8 +27,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/System/Vector2.h>
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/System/Vector2.h>
#include <CSFML/Window/Types.h> #include <CSFML/Window/Types.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Joystick.h> #include <CSFML/Window/Joystick.h>
#include <CSFML/Window/Keyboard.h> #include <CSFML/Window/Keyboard.h>
#include <CSFML/Window/Mouse.h> #include <CSFML/Window/Mouse.h>
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/JoystickIdentification.h> #include <CSFML/Window/JoystickIdentification.h>
+2 -1
View File
@@ -28,8 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/Window/Types.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -28,8 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Types.h>
#include <CSFML/System/Vector3.h> #include <CSFML/System/Vector3.h>
#include <CSFML/Window/Types.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -28,8 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Types.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/Window/Types.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2
View File
@@ -28,7 +28,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <stddef.h> #include <stddef.h>
+3 -1
View File
@@ -26,12 +26,14 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <stddef.h> #include <stddef.h>
typedef struct VkInstance_T* VkInstance; typedef struct VkInstance_T* VkInstance;
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || \
defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
typedef struct VkSurfaceKHR_T* VkSurfaceKHR; typedef struct VkSurfaceKHR_T* VkSurfaceKHR;
+18 -5
View File
@@ -28,12 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/System/Vector2.h>
#include <CSFML/Window/Event.h> #include <CSFML/Window/Event.h>
#include <CSFML/Window/Types.h>
#include <CSFML/Window/VideoMode.h> #include <CSFML/Window/VideoMode.h>
#include <CSFML/Window/WindowBase.h> #include <CSFML/Window/WindowBase.h>
#include <CSFML/Window/WindowHandle.h> #include <CSFML/Window/WindowHandle.h>
#include <CSFML/Window/Types.h>
#include <CSFML/System/Vector2.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -86,7 +87,11 @@ typedef struct
/// \return A new sfWindow object /// \return A new sfWindow object
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, uint32_t style, sfWindowState state, const sfContextSettings* settings); CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode,
const char* title,
uint32_t style,
sfWindowState state,
const sfContextSettings* settings);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct a new window (with a UTF-32 title) /// \brief Construct a new window (with a UTF-32 title)
@@ -110,7 +115,12 @@ CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title,
/// \return A new sfWindow object /// \return A new sfWindow object
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const sfChar32* title, uint32_t style, sfWindowState state, const sfContextSettings* settings); CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(
sfVideoMode mode,
const sfChar32* title,
uint32_t style,
sfWindowState state,
const sfContextSettings* settings);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct a window from an existing control /// \brief Construct a window from an existing control
@@ -485,4 +495,7 @@ CSFML_WINDOW_API sfWindowHandle sfWindow_getNativeHandle(const sfWindow* window)
/// \return True if surface creation was successful, false otherwise /// \return True if surface creation was successful, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_WINDOW_API bool sfWindow_createVulkanSurface(sfWindow* window, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator); CSFML_WINDOW_API bool sfWindow_createVulkanSurface(sfWindow* window,
const VkInstance* instance,
VkSurfaceKHR* surface,
const VkAllocationCallbacks* allocator);
+10 -6
View File
@@ -28,12 +28,13 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Window/Export.h> #include <CSFML/Window/Export.h>
#include <CSFML/Window/Event.h>
#include <CSFML/Window/VideoMode.h>
#include <CSFML/Window/WindowHandle.h>
#include <CSFML/Window/Types.h>
#include <CSFML/Window/Vulkan.h>
#include <CSFML/System/Vector2.h> #include <CSFML/System/Vector2.h>
#include <CSFML/Window/Event.h>
#include <CSFML/Window/Types.h>
#include <CSFML/Window/VideoMode.h>
#include <CSFML/Window/Vulkan.h>
#include <CSFML/Window/WindowHandle.h>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -388,4 +389,7 @@ CSFML_WINDOW_API sfWindowHandle sfWindowBase_getNativeHandle(const sfWindowBase*
/// \return True if surface creation was successful, false otherwise /// \return True if surface creation was successful, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_WINDOW_API bool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator); CSFML_WINDOW_API bool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase,
const VkInstance* instance,
VkSurfaceKHR* surface,
const VkAllocationCallbacks* allocator);
+1 -1
View File
@@ -26,9 +26,9 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Listener.h> #include <CSFML/Audio/Listener.h>
#include <SFML/Audio/Listener.hpp>
#include <CSFML/System/ConvertVector3.hpp> #include <CSFML/System/ConvertVector3.hpp>
#include <SFML/Audio/Listener.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+4 -3
View File
@@ -27,8 +27,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Music.h> #include <CSFML/Audio/Music.h>
#include <CSFML/Audio/MusicStruct.hpp> #include <CSFML/Audio/MusicStruct.hpp>
#include <CSFML/System/ConvertVector3.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector3.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -126,8 +126,9 @@ sfTimeSpan sfMusic_getLoopPoints(const sfMusic* music)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfMusic_setLoopPoints(sfMusic* music, sfTimeSpan timePoints) void sfMusic_setLoopPoints(sfMusic* music, sfTimeSpan timePoints)
{ {
CSFML_CALL(music, setLoopPoints(sf::Music::TimeSpan({ sf::microseconds(timePoints.offset.microseconds), CSFML_CALL(music,
sf::microseconds(timePoints.length.microseconds)}))); setLoopPoints(sf::Music::TimeSpan(
{sf::microseconds(timePoints.offset.microseconds), sf::microseconds(timePoints.length.microseconds)})));
} }
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Music.hpp>
#include <CSFML/CallbackStream.hpp> #include <CSFML/CallbackStream.hpp>
#include <SFML/Audio/Music.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfMusic // Internal structure of sfMusic
+1 -1
View File
@@ -27,8 +27,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/Sound.h> #include <CSFML/Audio/Sound.h>
#include <CSFML/Audio/SoundStruct.hpp> #include <CSFML/Audio/SoundStruct.hpp>
#include <CSFML/System/ConvertVector3.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector3.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -2
View File
@@ -53,7 +53,6 @@ sfSoundBuffer* sfSoundBuffer_createFromMemory(const void* data, size_t sizeInByt
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* stream) sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* stream)
{ {
@@ -69,7 +68,8 @@ sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* stream)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSoundBuffer* sfSoundBuffer_createFromSamples(const int16_t* samples, sfSoundBuffer* sfSoundBuffer_createFromSamples(
const int16_t* samples,
uint64_t sampleCount, uint64_t sampleCount,
unsigned int channelCount, unsigned int channelCount,
unsigned int sampleRate, unsigned int sampleRate,
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundBufferRecorder.hpp>
#include <CSFML/Audio/SoundBufferStruct.hpp> #include <CSFML/Audio/SoundBufferStruct.hpp>
#include <SFML/Audio/SoundBufferRecorder.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfSoundBufferRecorder // Internal structure of sfSoundBufferRecorder
+2 -3
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/SoundRecorder.hpp>
#include <CSFML/Audio/SoundRecorder.h> #include <CSFML/Audio/SoundRecorder.h>
#include <SFML/Audio/SoundRecorder.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Helper class implementing the callback forwarding from // Helper class implementing the callback forwarding from
@@ -38,7 +39,6 @@
class sfSoundRecorderImpl : public sf::SoundRecorder class sfSoundRecorderImpl : public sf::SoundRecorder
{ {
public: public:
sfSoundRecorderImpl(sfSoundRecorderStartCallback onStart, sfSoundRecorderImpl(sfSoundRecorderStartCallback onStart,
sfSoundRecorderProcessCallback onProcess, sfSoundRecorderProcessCallback onProcess,
sfSoundRecorderStopCallback onStop, sfSoundRecorderStopCallback onStop,
@@ -51,7 +51,6 @@ public :
} }
private: private:
bool onStart() override bool onStart() override
{ {
if (myStartCallback) if (myStartCallback)
+3 -2
View File
@@ -27,12 +27,13 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/SoundStream.h> #include <CSFML/Audio/SoundStream.h>
#include <CSFML/Audio/SoundStreamStruct.hpp> #include <CSFML/Audio/SoundStreamStruct.hpp>
#include <CSFML/System/ConvertVector3.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector3.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSoundStream* sfSoundStream_create(sfSoundStreamGetDataCallback onGetData, sfSoundStream* sfSoundStream_create(
sfSoundStreamGetDataCallback onGetData,
sfSoundStreamSeekCallback onSeek, sfSoundStreamSeekCallback onSeek,
unsigned int channelCount, unsigned int channelCount,
unsigned int sampleRate, unsigned int sampleRate,
+1 -2
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Audio/SoundChannel.h> #include <CSFML/Audio/SoundChannel.h>
#include <SFML/Audio/SoundStream.hpp> #include <SFML/Audio/SoundStream.hpp>
@@ -38,7 +39,6 @@
class sfSoundStreamImpl : public sf::SoundStream class sfSoundStreamImpl : public sf::SoundStream
{ {
public: public:
sfSoundStreamImpl(sfSoundStreamGetDataCallback onGetData, sfSoundStreamImpl(sfSoundStreamGetDataCallback onGetData,
sfSoundStreamSeekCallback onSeek, sfSoundStreamSeekCallback onSeek,
unsigned int channelCount, unsigned int channelCount,
@@ -57,7 +57,6 @@ public :
} }
private: private:
bool onGetData(Chunk& data) override bool onGetData(Chunk& data) override
{ {
sfSoundStreamChunk chunk = {nullptr, 0}; sfSoundStreamChunk chunk = {nullptr, 0};
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Sound.hpp>
#include <CSFML/Audio/SoundBufferStruct.hpp> #include <CSFML/Audio/SoundBufferStruct.hpp>
#include <SFML/Audio/Sound.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfSound // Internal structure of sfSound
+3 -5
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/InputStream.hpp>
#include <CSFML/System/InputStream.h> #include <CSFML/System/InputStream.h>
#include <SFML/System/InputStream.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Adapts a CSFML input stream to a SFML input stream /// \brief Adapts a CSFML input stream to a SFML input stream
@@ -38,7 +39,6 @@
class CallbackStream : public sf::InputStream class CallbackStream : public sf::InputStream
{ {
public: public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Default constructor /// \brief Default constructor
/// ///
@@ -51,8 +51,7 @@ public:
/// \param stream CSFML input stream callbacks /// \param stream CSFML input stream callbacks
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CallbackStream(sfInputStream* stream) : CallbackStream(sfInputStream* stream) : myStream(*stream)
myStream(*stream)
{ {
} }
@@ -134,7 +133,6 @@ public:
} }
private: private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+3 -1
View File
@@ -27,8 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/String.hpp>
#include <CSFML/Config.h> #include <CSFML/Config.h>
#include <SFML/System/String.hpp>
#include <string.h> #include <string.h>
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Event.hpp>
#include <CSFML/Window/Event.h> #include <CSFML/Window/Event.h>
#include <SFML/Window/Event.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Define a function to convert a sf::Event to a sfEvent // Define a function to convert a sf::Event to a sfEvent
+16 -12
View File
@@ -29,25 +29,29 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendAlpha = { sfBlendFactorSrcAlpha, sfBlendFactorOneMinusSrcAlpha, sfBlendEquationAdd, const sfBlendMode sfBlendAlpha = {sfBlendFactorSrcAlpha,
sfBlendFactorOne, sfBlendFactorOneMinusSrcAlpha, sfBlendEquationAdd }; sfBlendFactorOneMinusSrcAlpha,
sfBlendEquationAdd,
sfBlendFactorOne,
sfBlendFactorOneMinusSrcAlpha,
sfBlendEquationAdd};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendAdd = { sfBlendFactorSrcAlpha, sfBlendFactorOne, sfBlendEquationAdd, const sfBlendMode sfBlendAdd =
sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationAdd }; {sfBlendFactorSrcAlpha, sfBlendFactorOne, sfBlendEquationAdd, sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationAdd};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendMultiply = { sfBlendFactorDstColor, sfBlendFactorZero, sfBlendEquationAdd, const sfBlendMode sfBlendMultiply =
sfBlendFactorDstColor, sfBlendFactorZero, sfBlendEquationAdd }; {sfBlendFactorDstColor, sfBlendFactorZero, sfBlendEquationAdd, sfBlendFactorDstColor, sfBlendFactorZero, sfBlendEquationAdd};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendMin = { sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMin, const sfBlendMode sfBlendMin =
sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMin }; {sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMin, sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMin};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendMax = { sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMax, const sfBlendMode sfBlendMax =
sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMax }; {sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMax, sfBlendFactorOne, sfBlendFactorOne, sfBlendEquationMax};
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfBlendMode sfBlendNone = { sfBlendFactorOne, sfBlendFactorZero, sfBlendEquationAdd, const sfBlendMode sfBlendNone =
sfBlendFactorOne, sfBlendFactorZero, sfBlendEquationAdd }; {sfBlendFactorOne, sfBlendFactorZero, sfBlendEquationAdd, sfBlendFactorOne, sfBlendFactorZero, sfBlendEquationAdd};
+3 -2
View File
@@ -29,10 +29,11 @@
#include <CSFML/Graphics/CircleShapeStruct.hpp> #include <CSFML/Graphics/CircleShapeStruct.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -27,10 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/CircleShape.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/CircleShape.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfCircleShape // Internal structure of sfCircleShape
+1
View File
@@ -27,6 +27,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <algorithm> #include <algorithm>
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/Color.h> #include <CSFML/Graphics/Color.h>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Convert sf::Color to sfColor // Convert sf::Color to sfColor
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Rect.hpp>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <SFML/Graphics/Rect.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Convert sf::Rect<T> to CSFML Rect // Convert sf::Rect<T> to CSFML Rect
+4 -3
View File
@@ -27,11 +27,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/RenderStates.h>
#include <SFML/Graphics/RenderStates.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/RenderStates.h>
#include <CSFML/Graphics/ShaderStruct.hpp> #include <CSFML/Graphics/ShaderStruct.hpp>
#include <CSFML/Graphics/TextureStruct.hpp>
#include <SFML/Graphics/RenderStates.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+1
View File
@@ -28,6 +28,7 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/Transform.hpp> #include <SFML/Graphics/Transform.hpp>
+6 -5
View File
@@ -25,14 +25,15 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/ConvexShape.h>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvexShape.h>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -27,10 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/ConvexShape.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/ConvexShape.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfConvexShape // Internal structure of sfConvexShape
+2 -2
View File
@@ -25,11 +25,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/CallbackStream.hpp>
#include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/Graphics/Font.h> #include <CSFML/Graphics/Font.h>
#include <CSFML/Graphics/FontStruct.hpp> #include <CSFML/Graphics/FontStruct.hpp>
#include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/CallbackStream.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+4 -2
View File
@@ -27,9 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Font.hpp>
#include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/CallbackStream.hpp> #include <CSFML/CallbackStream.hpp>
#include <CSFML/Graphics/TextureStruct.hpp>
#include <SFML/Graphics/Font.hpp>
#include <map> #include <map>
+5 -5
View File
@@ -25,14 +25,14 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Image.h> #include <CSFML/CallbackStream.hpp>
#include <CSFML/Graphics/ImageStruct.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/Image.h>
#include <CSFML/System/BufferStruct.hpp> #include <CSFML/Graphics/ImageStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/CallbackStream.hpp> #include <CSFML/System/BufferStruct.hpp>
#include <CSFML/System/ConvertVector2.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+4 -3
View File
@@ -25,11 +25,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Rect.h>
#include <SFML/Graphics/Rect.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Rect.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+5 -4
View File
@@ -25,14 +25,15 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/RectangleShape.h>
#include <CSFML/Graphics/RectangleShapeStruct.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/RectangleShape.h>
#include <CSFML/Graphics/RectangleShapeStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -27,10 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/RectangleShape.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/RectangleShape.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfRectangleShape // Internal structure of sfRectangleShape
+2 -1
View File
@@ -29,7 +29,8 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfRenderStates sfRenderStates_default() { sfRenderStates sfRenderStates_default()
{
sfRenderStates states = { sfRenderStates states = {
sfBlendAlpha, sfBlendAlpha,
sfTransform_Identity, sfTransform_Identity,
+24 -17
View File
@@ -25,21 +25,21 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/RenderTexture.h>
#include <CSFML/Graphics/RenderTextureStruct.hpp>
#include <CSFML/Graphics/SpriteStruct.hpp>
#include <CSFML/Graphics/TextStruct.hpp>
#include <CSFML/Graphics/ShapeStruct.hpp>
#include <CSFML/Graphics/CircleShapeStruct.hpp> #include <CSFML/Graphics/CircleShapeStruct.hpp>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <CSFML/Graphics/RectangleShapeStruct.hpp>
#include <CSFML/Graphics/VertexArrayStruct.hpp>
#include <CSFML/Graphics/VertexBufferStruct.hpp>
#include <CSFML/Graphics/ConvertRenderStates.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertRenderStates.hpp>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <CSFML/Graphics/RectangleShapeStruct.hpp>
#include <CSFML/Graphics/RenderTexture.h>
#include <CSFML/Graphics/RenderTextureStruct.hpp>
#include <CSFML/Graphics/ShapeStruct.hpp>
#include <CSFML/Graphics/SpriteStruct.hpp>
#include <CSFML/Graphics/TextStruct.hpp>
#include <CSFML/Graphics/VertexArrayStruct.hpp>
#include <CSFML/Graphics/VertexBufferStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <CSFML/Window/ConvertContextSettings.hpp> #include <CSFML/Window/ConvertContextSettings.hpp>
@@ -214,8 +214,10 @@ void sfRenderTexture_drawVertexBuffer(sfRenderTexture* renderTexture, const sfVe
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfRenderTexture_drawVertexBufferRange(sfRenderTexture* renderTexture, void sfRenderTexture_drawVertexBufferRange(sfRenderTexture* renderTexture,
const sfVertexBuffer* object, size_t firstVertex, const sfVertexBuffer* object,
size_t vertexCount, const sfRenderStates* states) size_t firstVertex,
size_t vertexCount,
const sfRenderStates* states)
{ {
CSFML_CHECK(object); CSFML_CHECK(object);
CSFML_CALL(renderTexture, draw(object->This, firstVertex, vertexCount, convertRenderStates(states))); CSFML_CALL(renderTexture, draw(object->This, firstVertex, vertexCount, convertRenderStates(states)));
@@ -224,11 +226,16 @@ void sfRenderTexture_drawVertexBufferRange(sfRenderTexture* renderTexture,
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture, void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture,
const sfVertex* vertices, size_t vertexCount, const sfVertex* vertices,
sfPrimitiveType type, const sfRenderStates* states) size_t vertexCount,
sfPrimitiveType type,
const sfRenderStates* states)
{ {
CSFML_CALL(renderTexture, draw(reinterpret_cast<const sf::Vertex*>(vertices), vertexCount, CSFML_CALL(renderTexture,
static_cast<sf::PrimitiveType>(type), convertRenderStates(states))); draw(reinterpret_cast<const sf::Vertex*>(vertices),
vertexCount,
static_cast<sf::PrimitiveType>(type),
convertRenderStates(states)));
} }
+2 -1
View File
@@ -27,10 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/RenderTexture.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/ViewStruct.hpp> #include <CSFML/Graphics/ViewStruct.hpp>
#include <SFML/Graphics/RenderTexture.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfRenderTexture // Internal structure of sfRenderTexture
+41 -16
View File
@@ -27,10 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/ConvertEvent.hpp> #include <CSFML/ConvertEvent.hpp>
#include <CSFML/Graphics/CircleShapeStruct.hpp> #include <CSFML/Graphics/CircleShapeStruct.hpp>
#include <CSFML/Graphics/ConvertRenderStates.hpp>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/Graphics/ConvertRenderStates.hpp>
#include <CSFML/Graphics/ConvexShapeStruct.hpp>
#include <CSFML/Graphics/ImageStruct.hpp> #include <CSFML/Graphics/ImageStruct.hpp>
#include <CSFML/Graphics/RectangleShapeStruct.hpp> #include <CSFML/Graphics/RectangleShapeStruct.hpp>
#include <CSFML/Graphics/RenderWindow.h> #include <CSFML/Graphics/RenderWindow.h>
@@ -41,15 +41,20 @@
#include <CSFML/Graphics/VertexArrayStruct.hpp> #include <CSFML/Graphics/VertexArrayStruct.hpp>
#include <CSFML/Graphics/VertexBufferStruct.hpp> #include <CSFML/Graphics/VertexBufferStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/Window/ConvertContextSettings.hpp>
#include <CSFML/Window/CursorStruct.hpp>
#include <CSFML/Window/ConvertVideoMode.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/System/ConvertVector2.hpp>
#include <CSFML/Window/ConvertContextSettings.hpp>
#include <CSFML/Window/ConvertVideoMode.hpp>
#include <CSFML/Window/CursorStruct.hpp>
#include <SFML/Window/Touch.hpp> #include <SFML/Window/Touch.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint32_t style, sfWindowState state, const sfContextSettings* settings) sfRenderWindow* sfRenderWindow_create(sfVideoMode mode,
const char* title,
uint32_t style,
sfWindowState state,
const sfContextSettings* settings)
{ {
// Convert context settings // Convert context settings
const sf::ContextSettings params = settings ? convertContextSettings(*settings) : sf::ContextSettings(); const sf::ContextSettings params = settings ? convertContextSettings(*settings) : sf::ContextSettings();
@@ -64,14 +69,23 @@ sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint3
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const sfChar32* title, uint32_t style, sfWindowState state, const sfContextSettings* settings) sfRenderWindow* sfRenderWindow_createUnicode(
sfVideoMode mode,
const sfChar32* title,
uint32_t style,
sfWindowState state,
const sfContextSettings* settings)
{ {
// Convert context settings // Convert context settings
const sf::ContextSettings params = settings ? convertContextSettings(*settings) : sf::ContextSettings(); const sf::ContextSettings params = settings ? convertContextSettings(*settings) : sf::ContextSettings();
// Create the window // Create the window
sfRenderWindow* renderWindow = new sfRenderWindow; sfRenderWindow* renderWindow = new sfRenderWindow;
renderWindow->This.create(convertVideoMode(mode), reinterpret_cast<const char32_t*>(title), style, static_cast<sf::State>(state), params); renderWindow->This.create(convertVideoMode(mode),
reinterpret_cast<const char32_t*>(title),
style,
static_cast<sf::State>(state),
params);
renderWindow->DefaultView.This = renderWindow->This.getDefaultView(); renderWindow->DefaultView.This = renderWindow->This.getDefaultView();
renderWindow->CurrentView.This = renderWindow->This.getView(); renderWindow->CurrentView.This = renderWindow->This.getView();
@@ -170,7 +184,8 @@ sfVector2i sfRenderWindow_getPosition(const sfRenderWindow* renderWindow)
{ {
CSFML_CHECK_RETURN(renderWindow, {}); CSFML_CHECK_RETURN(renderWindow, {});
return convertVector2(renderWindow->This.getPosition());; return convertVector2(renderWindow->This.getPosition());
;
} }
@@ -434,8 +449,10 @@ void sfRenderWindow_drawVertexBuffer(sfRenderWindow* renderWindow, const sfVerte
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfRenderWindow_drawVertexBufferRange(sfRenderWindow* renderWindow, void sfRenderWindow_drawVertexBufferRange(sfRenderWindow* renderWindow,
const sfVertexBuffer* object, size_t firstVertex, const sfVertexBuffer* object,
size_t vertexCount, const sfRenderStates* states) size_t firstVertex,
size_t vertexCount,
const sfRenderStates* states)
{ {
CSFML_CHECK(object); CSFML_CHECK(object);
CSFML_CALL(renderWindow, draw(object->This, firstVertex, vertexCount, convertRenderStates(states))); CSFML_CALL(renderWindow, draw(object->This, firstVertex, vertexCount, convertRenderStates(states)));
@@ -444,11 +461,16 @@ void sfRenderWindow_drawVertexBufferRange(sfRenderWindow* renderWindow,
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow, void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow,
const sfVertex* vertices, size_t vertexCount, const sfVertex* vertices,
sfPrimitiveType type, const sfRenderStates* states) size_t vertexCount,
sfPrimitiveType type,
const sfRenderStates* states)
{ {
CSFML_CALL(renderWindow, draw(reinterpret_cast<const sf::Vertex*>(vertices), vertexCount, CSFML_CALL(renderWindow,
static_cast<sf::PrimitiveType>(type), convertRenderStates(states))); draw(reinterpret_cast<const sf::Vertex*>(vertices),
vertexCount,
static_cast<sf::PrimitiveType>(type),
convertRenderStates(states)));
} }
@@ -504,7 +526,10 @@ sfVector2i sfTouch_getPositionRenderWindow(unsigned int finger, const sfRenderWi
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
bool sfRenderWindow_createVulkanSurface(sfRenderWindow* renderWindow, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator) bool sfRenderWindow_createVulkanSurface(sfRenderWindow* renderWindow,
const VkInstance* instance,
VkSurfaceKHR* surface,
const VkAllocationCallbacks* allocator)
{ {
CSFML_CHECK_RETURN(instance, false); CSFML_CHECK_RETURN(instance, false);
CSFML_CHECK_RETURN(surface, false); CSFML_CHECK_RETURN(surface, false);
+2 -1
View File
@@ -27,9 +27,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/RenderWindow.hpp>
#include <CSFML/Graphics/ViewStruct.hpp> #include <CSFML/Graphics/ViewStruct.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfRenderWindow // Internal structure of sfRenderWindow
+8 -4
View File
@@ -25,16 +25,18 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/CallbackStream.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/Shader.h> #include <CSFML/Graphics/Shader.h>
#include <CSFML/Graphics/ShaderStruct.hpp> #include <CSFML/Graphics/ShaderStruct.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/CallbackStream.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfShader* sfShader_createFromFile(const char* vertexShaderFilename, const char* geometryShaderFilename, const char* fragmentShaderFilename) sfShader* sfShader_createFromFile(const char* vertexShaderFilename,
const char* geometryShaderFilename,
const char* fragmentShaderFilename)
{ {
bool success = false; bool success = false;
sf::Shader shader; sf::Shader shader;
@@ -128,7 +130,9 @@ sfShader* sfShader_createFromMemory(const char* vertexShader, const char* geomet
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream, sfInputStream* geometryShaderStream, sfInputStream* fragmentShaderStream) sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream,
sfInputStream* geometryShaderStream,
sfInputStream* fragmentShaderStream)
{ {
bool success = false; bool success = false;
sf::Shader shader; sf::Shader shader;
+7 -8
View File
@@ -25,20 +25,19 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Shape.h>
#include <CSFML/Graphics/ShapeStruct.hpp>
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/Shape.h>
#include <CSFML/Graphics/ShapeStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfShape* sfShape_create(sfShapeGetPointCountCallback getPointCount, sfShape* sfShape_create(sfShapeGetPointCountCallback getPointCount, sfShapeGetPointCallback getPoint, void* userData)
sfShapeGetPointCallback getPoint,
void* userData)
{ {
return new sfShape(getPointCount, getPoint, userData); return new sfShape(getPointCount, getPoint, userData);
} }
+4 -9
View File
@@ -28,11 +28,12 @@
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Shape.h> #include <CSFML/Graphics/Shape.h>
#include <SFML/Graphics/Shape.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Shape.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Helper class implementing the callback forwarding from // Helper class implementing the callback forwarding from
@@ -41,10 +42,7 @@
class sfShapeImpl : public sf::Shape class sfShapeImpl : public sf::Shape
{ {
public: public:
sfShapeImpl(sfShapeGetPointCountCallback getPointCount, sfShapeGetPointCallback getPoint, void* userData) :
sfShapeImpl(sfShapeGetPointCountCallback getPointCount,
sfShapeGetPointCallback getPoint,
void* userData) :
myGetPointCountCallback(getPointCount), myGetPointCountCallback(getPointCount),
myGetPointCallback(getPoint), myGetPointCallback(getPoint),
myUserData(userData) myUserData(userData)
@@ -64,7 +62,6 @@ public :
using sf::Shape::update; using sf::Shape::update;
private: private:
sfShapeGetPointCountCallback myGetPointCountCallback; sfShapeGetPointCountCallback myGetPointCountCallback;
sfShapeGetPointCallback myGetPointCallback; sfShapeGetPointCallback myGetPointCallback;
void* myUserData; void* myUserData;
@@ -76,9 +73,7 @@ private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct sfShape struct sfShape
{ {
sfShape(sfShapeGetPointCountCallback getPointCount, sfShape(sfShapeGetPointCountCallback getPointCount, sfShapeGetPointCallback getPoint, void* userData) :
sfShapeGetPointCallback getPoint,
void* userData) :
This(getPointCount, getPoint, userData) This(getPointCount, getPoint, userData)
{ {
} }
+7 -6
View File
@@ -25,15 +25,16 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Sprite.h>
#include <CSFML/Graphics/SpriteStruct.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Image.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/Sprite.h>
#include <CSFML/Graphics/SpriteStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Image.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+2 -1
View File
@@ -27,10 +27,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Sprite.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/Sprite.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Internal structure of sfSprite // Internal structure of sfSprite
+7 -7
View File
@@ -25,15 +25,16 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Text.h>
#include <CSFML/Graphics/TextStruct.hpp>
#include <CSFML/Graphics/Font.h>
#include <SFML/Graphics/Color.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvertColor.hpp> #include <CSFML/Graphics/ConvertColor.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/Font.h>
#include <CSFML/Graphics/Text.h>
#include <CSFML/Graphics/TextStruct.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Color.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -288,7 +289,6 @@ float sfText_getLineSpacing(const sfText* text)
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
uint32_t sfText_getStyle(const sfText* text) uint32_t sfText_getStyle(const sfText* text)
{ {
+3 -1
View File
@@ -27,10 +27,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Text.hpp>
#include <CSFML/Graphics/FontStruct.hpp> #include <CSFML/Graphics/FontStruct.hpp>
#include <CSFML/Graphics/Rect.h> #include <CSFML/Graphics/Rect.h>
#include <CSFML/Graphics/Transform.h> #include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/Text.hpp>
#include <string> #include <string>
+6 -6
View File
@@ -25,15 +25,15 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Texture.h> #include <CSFML/CallbackStream.hpp>
#include <CSFML/Graphics/TextureStruct.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/Graphics/ImageStruct.hpp> #include <CSFML/Graphics/ImageStruct.hpp>
#include <CSFML/Graphics/RenderWindowStruct.hpp> #include <CSFML/Graphics/RenderWindowStruct.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/Texture.h>
#include <CSFML/Window/WindowStruct.hpp> #include <CSFML/Graphics/TextureStruct.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/CallbackStream.hpp> #include <CSFML/System/ConvertVector2.hpp>
#include <CSFML/Window/WindowStruct.hpp>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+12 -11
View File
@@ -25,18 +25,19 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <CSFML/Graphics/Transform.h>
#include <SFML/Graphics/Transform.hpp>
#include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/ConvertRect.hpp> #include <CSFML/Graphics/ConvertRect.hpp>
#include <CSFML/System/ConvertVector2.hpp> #include <CSFML/Graphics/ConvertTransform.hpp>
#include <CSFML/Graphics/Transform.h>
#include <CSFML/Internal.hpp> #include <CSFML/Internal.hpp>
#include <CSFML/System/ConvertVector2.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <cstring> #include <cstring>
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const sfTransform sfTransform_Identity = const sfTransform sfTransform_Identity = {
{
// clang-format off // clang-format off
1, 0, 0, 1, 0, 0,
0, 1, 0, 0, 1, 0,
@@ -46,9 +47,7 @@ const sfTransform sfTransform_Identity =
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfTransform sfTransform_fromMatrix(float a00, float a01, float a02, sfTransform sfTransform_fromMatrix(float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22)
float a10, float a11, float a12,
float a20, float a21, float a22)
{ {
sfTransform transform = {a00, a01, a02, a10, a11, a12, a20, a21, a22}; sfTransform transform = {a00, a01, a02, a10, a11, a12, a20, a21, a22};
return transform; return transform;
@@ -154,8 +153,10 @@ bool sfTransform_equal(sfTransform* left, sfTransform* right)
CSFML_CHECK_RETURN(left, false); CSFML_CHECK_RETURN(left, false);
CSFML_CHECK_RETURN(right, false); CSFML_CHECK_RETURN(right, false);
for (int i = 0; i < 9; ++i) { for (int i = 0; i < 9; ++i)
if (left->matrix[i] != right->matrix[i]) return false; {
if (left->matrix[i] != right->matrix[i])
return false;
} }
return true; return true;
} }
Loaded 100 of 134 files, more files were not shown because too many files have changed in this diff. Show more