diff --git a/include/raylib/AudioStream.hpp b/include/raylib/AudioStream.hpp index 6d26928..ca6ba0d 100644 --- a/include/raylib/AudioStream.hpp +++ b/include/raylib/AudioStream.hpp @@ -60,7 +60,7 @@ namespace raylib { ResumeAudioStream(*this); } bool IsPlaying() { - IsAudioStreamPlaying(*this); + return IsAudioStreamPlaying(*this); } void Stop() { StopAudioStream(*this); diff --git a/include/raylib/Image.hpp b/include/raylib/Image.hpp index a24c0e8..255f8d0 100644 --- a/include/raylib/Image.hpp +++ b/include/raylib/Image.hpp @@ -54,19 +54,19 @@ namespace raylib { format = image.format; } - bool Load(const std::string& fileName) { + void Load(const std::string& fileName) { set(LoadImage(fileName.c_str())); } - bool LoadEx(::Color *pixels, int width, int height) { + void LoadEx(::Color *pixels, int width, int height) { set(LoadImageEx(pixels, width, height)); } - bool LoadPro(void *data, int width, int height, int format) { + void LoadPro(void *data, int width, int height, int format) { set(LoadImagePro(data, width, height, format)); } - bool LoadRaw(const std::string& fileName, int width, int height, int format, int headerSize) { + void LoadRaw(const std::string& fileName, int width, int height, int format, int headerSize) { set(LoadImageRaw(fileName.c_str(), width, height, format, headerSize)); } diff --git a/include/raylib/Mesh.hpp b/include/raylib/Mesh.hpp index 95ac65f..ac8b6c5 100644 --- a/include/raylib/Mesh.hpp +++ b/include/raylib/Mesh.hpp @@ -13,7 +13,7 @@ namespace raylib { set(mesh); }; - Mesh(float VertexCount = 0, float TriangleCount = 0) { + Mesh(int VertexCount = 0, int TriangleCount = 0) { vertexCount = VertexCount; triangleCount = TriangleCount; }; @@ -36,8 +36,8 @@ namespace raylib { vboId = mesh.vboId; } - GETTERSETTER(float,VertexCount,vertexCount) - GETTERSETTER(float,TriangleCount,triangleCount) + GETTERSETTER(int,VertexCount,vertexCount) + GETTERSETTER(int,TriangleCount,triangleCount) Mesh& operator=(const ::Mesh& mesh) { set(mesh); diff --git a/include/raylib/Rectangle.hpp b/include/raylib/Rectangle.hpp index f883278..c20de93 100644 --- a/include/raylib/Rectangle.hpp +++ b/include/raylib/Rectangle.hpp @@ -41,7 +41,7 @@ namespace raylib { } void Draw(::Color color) { - DrawRectangle(x, y, width, height, color); + ::DrawRectangle(x, y, width, height, color); } void Draw(::Vector2 origin, float rotation, ::Color color) { ::DrawRectanglePro(*this, origin, rotation, color); diff --git a/include/raylib/RenderTexture2D.hpp b/include/raylib/RenderTexture2D.hpp index f5970d1..72ae89e 100644 --- a/include/raylib/RenderTexture2D.hpp +++ b/include/raylib/RenderTexture2D.hpp @@ -24,7 +24,7 @@ namespace raylib { depthTexture = renderTexture.depthTexture; } - GETTERSETTER(float,Id,id) + GETTERSETTER(unsigned int,Id,id) GETTERSETTER(Texture2D,Texture,texture) GETTERSETTER(Texture2D,Depth,depth) GETTERSETTER(bool,DepthTexture,depthTexture) diff --git a/include/raylib/Texture2D.hpp b/include/raylib/Texture2D.hpp index 4eccbd8..23ddf62 100644 --- a/include/raylib/Texture2D.hpp +++ b/include/raylib/Texture2D.hpp @@ -49,10 +49,11 @@ namespace raylib { return *this; } - bool LoadFromImage(::Image& image) { + void LoadFromImage(::Image& image) { set(LoadTextureFromImage(image)); } - bool Load(const std::string& fileName) { + + void Load(const std::string& fileName) { set(LoadTexture(fileName.c_str())); } @@ -86,7 +87,7 @@ namespace raylib { void Unload() { UnloadTexture(*this); - }; + } void SetMaterialTexture(Material *material, int mapType) { ::SetMaterialTexture(material, mapType, *this); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 756a1a8..935f96b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -38,6 +38,7 @@ list(APPEND SOURCES catch.hpp raylib_test.cpp) list(APPEND LIBS raylib-cpp raylib) add_executable(raylib_test ${SOURCES}) +target_compile_options(raylib_test PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion) target_link_libraries(raylib_test ${LIBS})