diff --git a/include/SFML/Audio/SoundBuffer.h b/include/SFML/Audio/SoundBuffer.h index 96cf06b..ad29dbc 100644 --- a/include/SFML/Audio/SoundBuffer.h +++ b/include/SFML/Audio/SoundBuffer.h @@ -92,7 +92,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* str /// \return A new sfSoundBuffer object (NULL if failed) /// //////////////////////////////////////////////////////////// -CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelCount, unsigned int sampleRate); +CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, sfUint64 sampleCount, unsigned int channelCount, unsigned int sampleRate); //////////////////////////////////////////////////////////// /// \brief Create a new sound buffer by copying an existing one diff --git a/include/SFML/Graphics/CircleShape.h b/include/SFML/Graphics/CircleShape.h index 75492bf..764029d 100644 --- a/include/SFML/Graphics/CircleShape.h +++ b/include/SFML/Graphics/CircleShape.h @@ -34,6 +34,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -352,7 +353,7 @@ CSFML_GRAPHICS_API float sfCircleShape_getOutlineThickness(const sfCircleShape* /// \return Number of points of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API unsigned int sfCircleShape_getPointCount(const sfCircleShape* shape); +CSFML_GRAPHICS_API size_t sfCircleShape_getPointCount(const sfCircleShape* shape); //////////////////////////////////////////////////////////// /// \brief Get a point of a circle shape @@ -365,7 +366,7 @@ CSFML_GRAPHICS_API unsigned int sfCircleShape_getPointCount(const sfCircleShape* /// \return Index-th point of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, unsigned int index); +CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, size_t index); //////////////////////////////////////////////////////////// /// \brief Set the radius of a circle @@ -393,7 +394,7 @@ CSFML_GRAPHICS_API float sfCircleShape_getRadius(const sfCircleShape* shape); /// \param count New number of points of the circle /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API void sfCircleShape_setPointCount(sfCircleShape* shape, unsigned int count); +CSFML_GRAPHICS_API void sfCircleShape_setPointCount(sfCircleShape* shape, size_t count); //////////////////////////////////////////////////////////// /// \brief Get the local bounding rectangle of a circle shape diff --git a/include/SFML/Graphics/ConvexShape.h b/include/SFML/Graphics/ConvexShape.h index 21dfecb..08438e7 100644 --- a/include/SFML/Graphics/ConvexShape.h +++ b/include/SFML/Graphics/ConvexShape.h @@ -34,6 +34,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -352,7 +353,7 @@ CSFML_GRAPHICS_API float sfConvexShape_getOutlineThickness(const sfConvexShape* /// \return Number of points of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API unsigned int sfConvexShape_getPointCount(const sfConvexShape* shape); +CSFML_GRAPHICS_API size_t sfConvexShape_getPointCount(const sfConvexShape* shape); //////////////////////////////////////////////////////////// /// \brief Get a point of a convex shape @@ -365,7 +366,7 @@ CSFML_GRAPHICS_API unsigned int sfConvexShape_getPointCount(const sfConvexShape* /// \return Index-th point of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index); +CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, size_t index); //////////////////////////////////////////////////////////// /// \brief Set the number of points of a convex shap @@ -376,7 +377,7 @@ CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, /// \param count New number of points of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, unsigned int count); +CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, size_t count); //////////////////////////////////////////////////////////// /// \brief Set the position of a point in a convex shape @@ -392,7 +393,7 @@ CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, unsign /// \param point New point /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API void sfConvexShape_setPoint(sfConvexShape* shape, unsigned int index, sfVector2f point); +CSFML_GRAPHICS_API void sfConvexShape_setPoint(sfConvexShape* shape, size_t index, sfVector2f point); //////////////////////////////////////////////////////////// /// \brief Get the local bounding rectangle of a convex shape diff --git a/include/SFML/Graphics/RectangleShape.h b/include/SFML/Graphics/RectangleShape.h index 91eda35..beca257 100644 --- a/include/SFML/Graphics/RectangleShape.h +++ b/include/SFML/Graphics/RectangleShape.h @@ -34,6 +34,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -352,7 +353,7 @@ CSFML_GRAPHICS_API float sfRectangleShape_getOutlineThickness(const sfRectangleS /// \return Number of points of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API unsigned int sfRectangleShape_getPointCount(const sfRectangleShape* shape); +CSFML_GRAPHICS_API size_t sfRectangleShape_getPointCount(const sfRectangleShape* shape); //////////////////////////////////////////////////////////// /// \brief Get a point of a rectangle shape @@ -365,7 +366,7 @@ CSFML_GRAPHICS_API unsigned int sfRectangleShape_getPointCount(const sfRectangle /// \return Index-th point of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, unsigned int index); +CSFML_GRAPHICS_API sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, size_t index); //////////////////////////////////////////////////////////// /// \brief Set the size of a rectangle shape diff --git a/include/SFML/Graphics/RenderTexture.h b/include/SFML/Graphics/RenderTexture.h index 95d32b3..754aacf 100644 --- a/include/SFML/Graphics/RenderTexture.h +++ b/include/SFML/Graphics/RenderTexture.h @@ -36,6 +36,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -216,7 +217,7 @@ CSFML_GRAPHICS_API void sfRenderTexture_drawVertexArray(sfRenderTexture* renderT /// //////////////////////////////////////////////////////////// CSFML_GRAPHICS_API void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture, - const sfVertex* vertices, unsigned int vertexCount, + const sfVertex* vertices, size_t vertexCount, sfPrimitiveType type, const sfRenderStates* states); //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/RenderWindow.h b/include/SFML/Graphics/RenderWindow.h index caf167f..41c13f5 100644 --- a/include/SFML/Graphics/RenderWindow.h +++ b/include/SFML/Graphics/RenderWindow.h @@ -40,6 +40,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -441,7 +442,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWin /// //////////////////////////////////////////////////////////// CSFML_GRAPHICS_API void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow, - const sfVertex* vertices, unsigned int vertexCount, + const sfVertex* vertices, size_t vertexCount, sfPrimitiveType type, const sfRenderStates* states); //////////////////////////////////////////////////////////// diff --git a/include/SFML/Graphics/Shape.h b/include/SFML/Graphics/Shape.h index 709514f..60c90aa 100644 --- a/include/SFML/Graphics/Shape.h +++ b/include/SFML/Graphics/Shape.h @@ -34,10 +34,11 @@ #include #include #include +#include -typedef unsigned int (*sfShapeGetPointCountCallback)(void*); ///< Type of the callback used to get the number of points in a shape -typedef sfVector2f (*sfShapeGetPointCallback)(unsigned int, void*); ///< Type of the callback used to get a point of a shape +typedef size_t (*sfShapeGetPointCountCallback)(void*); ///< Type of the callback used to get the number of points in a shape +typedef sfVector2f (*sfShapeGetPointCallback)(size_t, void*); ///< Type of the callback used to get a point of a shape //////////////////////////////////////////////////////////// /// \brief Create a new shape @@ -351,7 +352,7 @@ CSFML_GRAPHICS_API float sfShape_getOutlineThickness(const sfShape* shape); /// \return Number of points of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API unsigned int sfShape_getPointCount(const sfShape* shape); +CSFML_GRAPHICS_API size_t sfShape_getPointCount(const sfShape* shape); //////////////////////////////////////////////////////////// /// \brief Get a point of a shape @@ -364,7 +365,7 @@ CSFML_GRAPHICS_API unsigned int sfShape_getPointCount(const sfShape* shape); /// \return Index-th point of the shape /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API sfVector2f sfShape_getPoint(const sfShape* shape, unsigned int index); +CSFML_GRAPHICS_API sfVector2f sfShape_getPoint(const sfShape* shape, size_t index); //////////////////////////////////////////////////////////// /// \brief Get the local bounding rectangle of a shape diff --git a/include/SFML/Graphics/VertexArray.h b/include/SFML/Graphics/VertexArray.h index 5494a33..7262b35 100644 --- a/include/SFML/Graphics/VertexArray.h +++ b/include/SFML/Graphics/VertexArray.h @@ -33,6 +33,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////// @@ -69,7 +70,7 @@ CSFML_GRAPHICS_API void sfVertexArray_destroy(sfVertexArray* vertexArray); /// \return Number of vertices in the array /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API unsigned int sfVertexArray_getVertexCount(const sfVertexArray* vertexArray); +CSFML_GRAPHICS_API size_t sfVertexArray_getVertexCount(const sfVertexArray* vertexArray); //////////////////////////////////////////////////////////// /// \brief Get access to a vertex by its index @@ -84,7 +85,7 @@ CSFML_GRAPHICS_API unsigned int sfVertexArray_getVertexCount(const sfVertexArray /// \return Pointer to the index-th vertex /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, unsigned int index); +CSFML_GRAPHICS_API sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, size_t index); //////////////////////////////////////////////////////////// /// \brief Clear a vertex array @@ -112,7 +113,7 @@ CSFML_GRAPHICS_API void sfVertexArray_clear(sfVertexArray* vertexArray); /// \param vertexCount New size of the array (number of vertices) /// //////////////////////////////////////////////////////////// -CSFML_GRAPHICS_API void sfVertexArray_resize(sfVertexArray* vertexArray, unsigned int vertexCount); +CSFML_GRAPHICS_API void sfVertexArray_resize(sfVertexArray* vertexArray, size_t vertexCount); //////////////////////////////////////////////////////////// /// \brief Add a vertex to a vertex array array diff --git a/src/SFML/Audio/SoundBuffer.cpp b/src/SFML/Audio/SoundBuffer.cpp index 185394b..e3510bf 100644 --- a/src/SFML/Audio/SoundBuffer.cpp +++ b/src/SFML/Audio/SoundBuffer.cpp @@ -80,7 +80,7 @@ sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* stream) //////////////////////////////////////////////////////////// -sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelCount, unsigned int sampleRate) +sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, sfUint64 sampleCount, unsigned int channelCount, unsigned int sampleRate) { sfSoundBuffer* buffer = new sfSoundBuffer; diff --git a/src/SFML/Graphics/CircleShape.cpp b/src/SFML/Graphics/CircleShape.cpp index 74e2bda..707a74b 100644 --- a/src/SFML/Graphics/CircleShape.cpp +++ b/src/SFML/Graphics/CircleShape.cpp @@ -277,14 +277,14 @@ float sfCircleShape_getOutlineThickness(const sfCircleShape* shape) //////////////////////////////////////////////////////////// -unsigned int sfCircleShape_getPointCount(const sfCircleShape* shape) +size_t sfCircleShape_getPointCount(const sfCircleShape* shape) { CSFML_CALL_RETURN(shape, getPointCount(), 0); } //////////////////////////////////////////////////////////// -sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, unsigned int index) +sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, size_t index) { sfVector2f point = {0, 0}; CSFML_CHECK_RETURN(shape, point); @@ -312,7 +312,7 @@ float sfCircleShape_getRadius(const sfCircleShape* shape) //////////////////////////////////////////////////////////// -void sfCircleShape_setPointCount(sfCircleShape* shape, unsigned int count) +void sfCircleShape_setPointCount(sfCircleShape* shape, size_t count) { CSFML_CALL(shape, setPointCount(count)); } diff --git a/src/SFML/Graphics/ConvexShape.cpp b/src/SFML/Graphics/ConvexShape.cpp index 14bb5c3..90336bf 100644 --- a/src/SFML/Graphics/ConvexShape.cpp +++ b/src/SFML/Graphics/ConvexShape.cpp @@ -274,14 +274,14 @@ float sfConvexShape_getOutlineThickness(const sfConvexShape* shape) //////////////////////////////////////////////////////////// -unsigned int sfConvexShape_getPointCount(const sfConvexShape* shape) +size_t sfConvexShape_getPointCount(const sfConvexShape* shape) { CSFML_CALL_RETURN(shape, getPointCount(), 0); } //////////////////////////////////////////////////////////// -sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index) +sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, size_t index) { sfVector2f point = {0, 0}; CSFML_CHECK_RETURN(shape, point); @@ -295,14 +295,14 @@ sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index //////////////////////////////////////////////////////////// -void sfConvexShape_setPointCount(sfConvexShape* shape, unsigned int count) +void sfConvexShape_setPointCount(sfConvexShape* shape, size_t count) { CSFML_CALL(shape, setPointCount(count)); } //////////////////////////////////////////////////////////// -void sfConvexShape_setPoint(sfConvexShape* shape, unsigned int index, sfVector2f point) +void sfConvexShape_setPoint(sfConvexShape* shape, size_t index, sfVector2f point) { CSFML_CALL(shape, setPoint(index, sf::Vector2f(point.x, point.y))); } diff --git a/src/SFML/Graphics/RectangleShape.cpp b/src/SFML/Graphics/RectangleShape.cpp index 4c4b201..17de250 100644 --- a/src/SFML/Graphics/RectangleShape.cpp +++ b/src/SFML/Graphics/RectangleShape.cpp @@ -274,14 +274,14 @@ float sfRectangleShape_getOutlineThickness(const sfRectangleShape* shape) //////////////////////////////////////////////////////////// -unsigned int sfRectangleShape_getPointCount(const sfRectangleShape* shape) +size_t sfRectangleShape_getPointCount(const sfRectangleShape* shape) { CSFML_CALL_RETURN(shape, getPointCount(), 0); } //////////////////////////////////////////////////////////// -sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, unsigned int index) +sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, size_t index) { sfVector2f point = {0, 0}; CSFML_CHECK_RETURN(shape, point); diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index 24b3bc6..d80b13f 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -218,7 +218,7 @@ void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture, const sfVer //////////////////////////////////////////////////////////// void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture, - const sfVertex* vertices, unsigned int vertexCount, + const sfVertex* vertices, size_t vertexCount, sfPrimitiveType type, const sfRenderStates* states) { CSFML_CALL(renderTexture, draw(reinterpret_cast(vertices), vertexCount, @@ -280,4 +280,4 @@ void sfRenderTexture_setRepeated(sfRenderTexture* renderTexture, sfBool repeated sfBool sfRenderTexture_isRepeated(const sfRenderTexture* renderTexture) { CSFML_CALL_RETURN(renderTexture, isRepeated(), sfFalse); -} \ No newline at end of file +} diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index a72e528..8ead1ae 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -475,7 +475,7 @@ void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWindow, const sfVertex //////////////////////////////////////////////////////////// void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow, - const sfVertex* vertices, unsigned int vertexCount, + const sfVertex* vertices, size_t vertexCount, sfPrimitiveType type, const sfRenderStates* states) { CSFML_CALL(renderWindow, draw(reinterpret_cast(vertices), vertexCount, diff --git a/src/SFML/Graphics/Shape.cpp b/src/SFML/Graphics/Shape.cpp index c12c76f..d7647c3 100644 --- a/src/SFML/Graphics/Shape.cpp +++ b/src/SFML/Graphics/Shape.cpp @@ -267,14 +267,14 @@ float sfShape_getOutlineThickness(const sfShape* shape) //////////////////////////////////////////////////////////// -unsigned int sfShape_getPointCount(const sfShape* shape) +size_t sfShape_getPointCount(const sfShape* shape) { CSFML_CALL_RETURN(shape, getPointCount(), 0); } //////////////////////////////////////////////////////////// -sfVector2f sfShape_getPoint(const sfShape* shape, unsigned int index) +sfVector2f sfShape_getPoint(const sfShape* shape, size_t index) { sfVector2f point = {0, 0}; CSFML_CHECK_RETURN(shape, point); diff --git a/src/SFML/Graphics/ShapeStruct.h b/src/SFML/Graphics/ShapeStruct.h index c284e38..9f48f65 100644 --- a/src/SFML/Graphics/ShapeStruct.h +++ b/src/SFML/Graphics/ShapeStruct.h @@ -51,12 +51,12 @@ public : { } - virtual unsigned int getPointCount() const + virtual std::size_t getPointCount() const { return myGetPointCountCallback(myUserData); } - virtual sf::Vector2f getPoint(unsigned int index) const + virtual sf::Vector2f getPoint(std::size_t index) const { sfVector2f point = myGetPointCallback(index, myUserData); return sf::Vector2f(point.x, point.y); diff --git a/src/SFML/Graphics/VertexArray.cpp b/src/SFML/Graphics/VertexArray.cpp index 820454b..d9b911c 100644 --- a/src/SFML/Graphics/VertexArray.cpp +++ b/src/SFML/Graphics/VertexArray.cpp @@ -54,14 +54,14 @@ void sfVertexArray_destroy(sfVertexArray* vertexArray) //////////////////////////////////////////////////////////// -unsigned int sfVertexArray_getVertexCount(const sfVertexArray* vertexArray) +size_t sfVertexArray_getVertexCount(const sfVertexArray* vertexArray) { CSFML_CALL_RETURN(vertexArray, getVertexCount(), 0); } //////////////////////////////////////////////////////////// -sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, unsigned int index) +sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, size_t index) { CSFML_CHECK_RETURN(vertexArray, NULL); @@ -78,7 +78,7 @@ void sfVertexArray_clear(sfVertexArray* vertexArray) //////////////////////////////////////////////////////////// -void sfVertexArray_resize(sfVertexArray* vertexArray, unsigned int vertexCount) +void sfVertexArray_resize(sfVertexArray* vertexArray, size_t vertexCount) { CSFML_CALL(vertexArray, resize(vertexCount)); }