mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-05 01:17:06 +00:00
@@ -60,7 +60,7 @@ namespace raylib {
|
||||
ResumeAudioStream(*this);
|
||||
}
|
||||
bool IsPlaying() {
|
||||
IsAudioStreamPlaying(*this);
|
||||
return IsAudioStreamPlaying(*this);
|
||||
}
|
||||
void Stop() {
|
||||
StopAudioStream(*this);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user