Merge pull request #123 from RobLoach/doc-update-license

Update documentation and license text
This commit is contained in:
Rob Loach
2021-02-21 16:41:31 -05:00
committed by GitHub
42 changed files with 190 additions and 979 deletions

View File

@@ -4,3 +4,4 @@ linelength=120
exclude_files=vendor
exclude_files=docs
filter=-runtime/explicit
filter=-legal/copyright

View File

@@ -39,7 +39,7 @@ int main() {
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
{
ClearBackground(RAYWHITE);
// Check if there are files to process.
@@ -62,7 +62,7 @@ int main() {
DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY);
}
}
EndDrawing();
//----------------------------------------------------------------------------------
}

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
#define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
@@ -63,9 +39,8 @@ class AudioDevice {
/**
* Close the audio device and context.
*/
inline AudioDevice& Close() {
inline void Close() {
::CloseAudioDevice();
return *this;
}
/**

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
#define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
@@ -143,7 +119,7 @@ class AudioStream : public ::AudioStream {
::SetAudioStreamBufferSizeDefault(size);
}
protected:
private:
inline void set(const ::AudioStream& stream) {
buffer = stream.buffer;
sampleRate = stream.sampleRate;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
#define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
@@ -87,7 +63,7 @@ class BoundingBox : public ::BoundingBox {
return CheckCollisionRayBox(ray, *this);
}
protected:
private:
inline void set(const ::BoundingBox& box) {
min = box.min;
max = box.max;

View File

@@ -22,6 +22,7 @@ install(FILES
Model.hpp
Mouse.hpp
Music.hpp
physac.hpp
Physics.hpp
RayHitInfo.hpp
Ray.hpp

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
#define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
@@ -30,6 +6,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Camera2D type, defines a 2d camera
*/
class Camera2D : public ::Camera2D {
public:
Camera2D() {}
@@ -86,7 +65,7 @@ class Camera2D : public ::Camera2D {
return ::GetScreenToWorld2D(position, *this);
}
protected:
private:
inline void set(const ::Camera2D& camera) {
offset = camera.offset;
target = camera.target;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
#define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
@@ -30,6 +6,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Camera type, defines a camera position/orientation in 3d space
*/
class Camera3D : public ::Camera3D {
public:
Camera3D(const ::Camera3D& camera) {
@@ -171,7 +150,7 @@ class Camera3D : public ::Camera3D {
return *this;
}
protected:
private:
inline void set(const ::Camera3D& camera) {
position = camera.position;
target = camera.target;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_
#define RAYLIB_CPP_INCLUDE_COLOR_HPP_
@@ -32,6 +8,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Color type, RGBA (32bit)
*/
class Color : public ::Color {
public:
Color(const ::Color& color) {
@@ -264,7 +243,7 @@ class Color : public ::Color {
inline static Color Magenta() { return MAGENTA; }
inline static Color RayWhite() { return RAYWHITE; }
protected:
private:
inline void set(const ::Color& color) {
r = color.r;
g = color.g;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_
#define RAYLIB_CPP_INCLUDE_FONT_HPP_
@@ -31,6 +7,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Font type, includes texture and charSet array data
*/
class Font : public ::Font {
public:
Font() {
@@ -138,7 +117,7 @@ class Font : public ::Font {
return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
}
protected:
private:
void set(const ::Font& font) {
baseSize = font.baseSize;
charsCount = font.charsCount;

View File

@@ -1,27 +1,6 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
/**
* C++ wrapper functions for raylib.
*/
#ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
#define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
@@ -243,7 +222,7 @@ RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int *frames)
}
/**
* Load image from memory buffer, fileType refers to extension: i.e. "png"
* Load image from memory buffer, fileType refers to extension like "png"
*/
RLCPPAPI inline ::Image LoadImageFromMemory(const std::string& fileType,
const unsigned char *fileData,

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
#define RAYLIB_CPP_INCLUDE_GAMEPAD_HPP_
@@ -31,6 +7,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Input-related functions: gamepads
*/
class Gamepad {
public:
Gamepad(int gamepadNumber = 0) {
@@ -136,7 +115,7 @@ class Gamepad {
return ::GetGamepadAxisMovement(number, axis);
}
protected:
private:
inline void set(int gamepadNumber) {
number = gamepadNumber;
}

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_IMAGE_HPP_
#define RAYLIB_CPP_INCLUDE_IMAGE_HPP_
@@ -31,6 +7,11 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Image type, bpp always RGBA (32bit)
*
* Data stored in CPU memory (RAM)
*/
class Image : public ::Image {
public:
Image(const ::Image& image) {
@@ -561,7 +542,7 @@ class Image : public ::Image {
return LoadTexture();
}
protected:
private:
inline void set(const ::Image& image) {
data = image.data;
width = image.width;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
#define RAYLIB_CPP_INCLUDE_MATERIAL_HPP_
@@ -32,6 +8,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Material type (generic)
*/
class Material : public ::Material {
public:
Material(const ::Material& material) {
@@ -85,7 +64,7 @@ class Material : public ::Material {
return *this;
}
protected:
private:
inline void set(const ::Material& material) {
shader = material.shader;
maps = material.maps;

View File

@@ -1,48 +1,18 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_
#define RAYLIB_CPP_INCLUDE_MATRIX_HPP_
#ifdef __cplusplus
extern "C" {
#endif
#include "raylib.h" // NOLINT
#ifndef RAYLIB_CPP_NO_MATH
#include "raymath.h" // NOLINT
#endif
#ifdef __cplusplus
}
#endif
#include "./raylib.hpp"
#include "./raylib-cpp-utils.hpp"
#include "./raymath.hpp"
#ifndef RAYLIB_CPP_NO_MATH
#include <cmath>
#endif
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Matrix type (OpenGL style 4x4 - right handed, column major)
*/
class Matrix : public ::Matrix {
public:
Matrix(const ::Matrix& mat) {
@@ -261,7 +231,7 @@ class Matrix : public ::Matrix {
#endif
protected:
private:
inline void set(const ::Matrix& mat) {
m0 = mat.m0;
m1 = mat.m1;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MESH_HPP_
#define RAYLIB_CPP_INCLUDE_MESH_HPP_
@@ -34,6 +10,9 @@
#include "./Model.hpp"
namespace raylib {
/**
* Vertex data definning a mesh
*/
class Mesh : public ::Mesh {
public:
Mesh(const ::Mesh& mesh) {
@@ -157,6 +136,9 @@ class Mesh : public ::Mesh {
return ExportMesh(*this, fileName.c_str());
}
/**
* Unload mesh from memory (RAM and/or VRAM)
*/
inline void Unload() {
if (vboId != NULL) {
::UnloadMesh(*this);
@@ -216,7 +198,7 @@ class Mesh : public ::Mesh {
return ::LoadModelFromMesh(*this);
}
protected:
private:
inline void set(const ::Mesh& mesh) {
vertexCount = mesh.vertexCount;
triangleCount = mesh.triangleCount;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MODEL_HPP_
#define RAYLIB_CPP_INCLUDE_MODEL_HPP_
@@ -32,6 +8,9 @@
#include "./Mesh.hpp"
namespace raylib {
/**
* Model type
*/
class Model : public ::Model {
public:
Model(const ::Model& model) {
@@ -160,7 +139,7 @@ class Model : public ::Model {
return *this;
}
protected:
private:
inline void set(const ::Model& model) {
transform = model.transform;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
#define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
@@ -87,7 +63,7 @@ class ModelAnimation : public ::ModelAnimation {
return ::IsModelAnimationValid(model, *this);
}
protected:
private:
inline void set(const ::ModelAnimation& model) {
boneCount = model.boneCount;
bones = model.bones;

View File

@@ -1,32 +1,7 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MOUSE_HPP_
#define RAYLIB_CPP_INCLUDE_MOUSE_HPP_
#include "./raylib.hpp"
#include "./Vector2.hpp"
namespace raylib {

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_MUSIC_HPP_
#define RAYLIB_CPP_INCLUDE_MUSIC_HPP_
@@ -31,6 +7,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Music stream type (audio file streaming from memory)
*/
class Music : public ::Music {
public:
Music(const ::Music& music) {
@@ -146,7 +125,7 @@ class Music : public ::Music {
return ::GetMusicTimePlayed(*this);
}
protected:
private:
inline void set(const ::Music& music) {
ctxType = music.ctxType;
ctxData = music.ctxData;

View File

@@ -1,43 +1,14 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
#define RAYLIB_CPP_INCLUDE_PHYSICS_HPP_
#include "./raylib.hpp"
#ifdef __cplusplus
extern "C" {
#endif
#include "physac.h" // NOLINT
#ifdef __cplusplus
}
#endif
#include "./physac.hpp"
#include "./Vector2.hpp"
namespace raylib {
/**
* 2D Physics library for videogames
*/
class Physics {
public:
Physics() {

View File

@@ -1,34 +1,8 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAY_HPP_
#define RAYLIB_CPP_INCLUDE_RAY_HPP_
#include "./raylib.hpp"
#include "./raylib-cpp-utils.hpp"
#include "./RayHitInfo.hpp"
namespace raylib {
@@ -109,7 +83,7 @@ class Ray : public ::Ray {
return GetCollisionRayGround(*this, groundHeight);
}
protected:
private:
inline void set(const ::Ray& ray) {
position = ray.position;
direction = ray.direction;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
#define RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
@@ -83,7 +59,7 @@ class RayHitInfo : public ::RayHitInfo {
GETTERSETTER(::Vector3, Position, position)
GETTERSETTER(::Vector3, Normal, normal)
protected:
private:
inline void set(const ::RayHitInfo& ray) {
hit = ray.hit;
distance = ray.distance;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
#define RAYLIB_CPP_INCLUDE_RECTANGLE_HPP_
@@ -30,6 +6,9 @@
#include "./Vector2.hpp"
namespace raylib {
/**
* Rectangle type
*/
class Rectangle : public ::Rectangle {
public:
Rectangle(const ::Rectangle& vec) {
@@ -173,7 +152,7 @@ class Rectangle : public ::Rectangle {
return SetPosition(position.x, position.y);
}
protected:
private:
inline void set(const ::Rectangle& rect) {
x = rect.x;
y = rect.y;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
#define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
@@ -29,6 +5,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* RenderTexture type, for texture rendering
*/
class RenderTexture : public ::RenderTexture {
public:
RenderTexture(const ::RenderTexture& renderTexture) {
@@ -76,7 +55,7 @@ class RenderTexture : public ::RenderTexture {
return *this;
}
protected:
private:
inline void set(const ::RenderTexture& renderTexture) {
id = renderTexture.id;
texture = renderTexture.texture;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_SHADER_HPP_
#define RAYLIB_CPP_INCLUDE_SHADER_HPP_
@@ -32,6 +8,9 @@
#include "Texture.hpp"
namespace raylib {
/**
* Shader type (generic)
*/
class Shader : public ::Shader {
public:
Shader(const ::Shader& shader) {
@@ -171,7 +150,7 @@ class Shader : public ::Shader {
return ::GenTextureBRDF(*this, size);
}
protected:
private:
inline void set(const ::Shader& shader) {
id = shader.id;
locs = shader.locs;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_SOUND_HPP_
#define RAYLIB_CPP_INCLUDE_SOUND_HPP_
@@ -33,6 +9,11 @@
namespace raylib {
/**
* Wave/Sound management functions
*
* @code
* raylib::Sound boom("boom.wav");
* boom.Play();
* @endcode
*/
class Sound : public ::Sound {
public:
@@ -146,7 +127,7 @@ class Sound : public ::Sound {
return *this;
}
protected:
private:
inline void set(const ::Sound& sound) {
sampleCount = sound.sampleCount;
stream = sound.stream;

View File

@@ -1,30 +1,6 @@
/*
* Font Loading and Text Drawing Functions (Module: text)
*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
/**
* Text drawing functions
*/
#ifndef RAYLIB_CPP_INCLUDE_TEXT_HPP_
#define RAYLIB_CPP_INCLUDE_TEXT_HPP_
@@ -67,6 +43,13 @@ RLCPPAPI inline bool TextIsEqual(const std::string& text1, const std::string& te
return ::TextIsEqual(text1.c_str(), text2.c_str());
}
/**
* Check if two text string are equal
*/
RLCPPAPI inline unsigned int TextLength(const std::string& text) {
return ::TextLength(text.c_str());
}
// TODO(RobLoach): Add remaining raylib C functions with string c_str() wrappers.
} // namespace raylib

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
#define RAYLIB_CPP_INCLUDE_TEXTURE_HPP_
@@ -246,7 +222,7 @@ class Texture : public ::Texture {
return *this;
}
protected:
private:
inline void set(const ::Texture& texture) {
id = texture.id;
width = texture.width;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
#define RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
@@ -34,6 +10,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Vector2 type
*/
class Vector2 : public ::Vector2 {
public:
Vector2(const ::Vector2& vec) {
@@ -340,7 +319,7 @@ class Vector2 : public ::Vector2 {
return ::CheckCollisionLines(*this, endPos1, startPos2, endPos2, collisionPoint);
}
protected:
private:
inline void set(const ::Vector2& vec) {
x = vec.x;
y = vec.y;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
#define RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
@@ -34,6 +10,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Vector3 type
*/
class Vector3 : public ::Vector3 {
public:
Vector3(const ::Vector3& vec) {
@@ -324,7 +303,7 @@ class Vector3 : public ::Vector3 {
return CheckCollisionSpheres(*this, radius1, center2, radius2);
}
protected:
private:
inline void set(const ::Vector3& vec) {
x = vec.x;
y = vec.y;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
#define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
@@ -35,6 +11,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Vector4 type
*/
class Vector4 : public ::Vector4 {
public:
Vector4(const ::Vector4& vec) {
@@ -169,7 +148,7 @@ class Vector4 : public ::Vector4 {
return ColorFromNormalized();
}
protected:
private:
inline void set(const ::Vector4& vec4) {
x = vec4.x;
y = vec4.y;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
#define RAYLIB_CPP_INCLUDE_VRSIMULATOR_HPP_
@@ -29,6 +5,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* VR control functions
*/
class VrSimulator {
public:
VrSimulator() {

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_WAVE_HPP_
#define RAYLIB_CPP_INCLUDE_WAVE_HPP_
@@ -31,6 +7,9 @@
#include "./raylib-cpp-utils.hpp"
namespace raylib {
/**
* Wave type, defines audio wave data
*/
class Wave : public ::Wave {
public:
Wave(const ::Wave& wave) {
@@ -62,6 +41,9 @@ class Wave : public ::Wave {
set(::LoadWaveFromMemory(fileType.c_str(), fileData, dataSize));
}
/**
* Unload wave data
*/
~Wave() {
Unload();
}
@@ -161,7 +143,7 @@ class Wave : public ::Wave {
return LoadSound();
}
protected:
private:
inline void set(const ::Wave& wave) {
sampleCount = wave.sampleCount;
sampleRate = wave.sampleRate;

View File

@@ -1,27 +1,3 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_WINDOW_HPP_
#define RAYLIB_CPP_INCLUDE_WINDOW_HPP_
@@ -32,14 +8,6 @@
namespace raylib {
/**
* Window and Graphics Device Functions.
*
* @code
*
* raylib::Window w(640, 480, "raylib-cpp");
* while (!w.ShouldClose()) {
* // Update
* }
* @endcode
*/
class Window {
public:
@@ -53,6 +21,9 @@ class Window {
}
}
/**
* Close window and unload OpenGL context
*/
~Window() {
Close();
}

15
include/physac.hpp Normal file
View File

@@ -0,0 +1,15 @@
/**
* C++ header to wrap physac.h.
*/
#ifndef RAYLIB_CPP_INCLUDE_PHYSAC_HPP_
#define RAYLIB_CPP_INCLUDE_PHYSAC_HPP_
#ifdef __cplusplus
extern "C" {
#endif
#include "physac.h" // NOLINT
#ifdef __cplusplus
}
#endif
#endif // RAYLIB_CPP_INCLUDE_PHYSAC_HPP_

View File

@@ -1,27 +1,6 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
/**
* Utility for raylib-cpp.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_
#define RAYLIB_CPP_INCLUDE_RAYLIB_CPP_UTILS_HPP_
@@ -34,7 +13,9 @@
* @param name The machine-readable name of the property.
*/
#define GETTERSETTER(type, method, name) \
inline type Get##method() const { return name; } \
/** Retrieves the name value for the object. @return The name value of the object. */ \
inline type Get##method() const { return name; } \
/** Sets the name value for the object. @param value The value of which to set name to. */ \
inline void Set##method(type value) { name = value; }
#endif

View File

@@ -1,68 +1,32 @@
/**
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright 2020 Rob Loach (RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
* \mainpage raylib-cpp
*
* [raylib-cpp](https://github.com/robloach/raylib-cpp) is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.
*
* See the ::raylib namespace for all available classes.
*
* @code
* #include "raylib-cpp.hpp"
*
* int main()
* {
* int screenWidth = 800;
* int screenHeight = 450;
*
* raylib::Window w(screenWidth, screenHeight, "raylib-cpp - basic window");
* raylib::Texture logo("raylib_logo.png");
*
* SetTargetFPS(60);
*
* while (!w.ShouldClose())
* {
* BeginDrawing();
*
* ClearBackground(RAYWHITE);
*
* DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
*
* // Object methods.
* logo.Draw(
* screenWidth / 2 - texture.getWidth() / 2,
* screenHeight / 2 - texture.getHeight() / 2);
*
* EndDrawing();
* }
*
* // UnloadTexture() and CloseWindow() are called automatically.
*
* return 0;
* }
* @endcode
*
*/
* raylib-cpp is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.
*
* @see raylib namespace for a list of all available classes.
* @mainpage raylib-cpp
* @include core_basic_window.cpp
* @author Rob Loach (RobLoach)
* @copyright zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright 2020 Rob Loach (RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_CPP_HPP_
#define RAYLIB_CPP_INCLUDE_RAYLIB_CPP_HPP_
@@ -73,8 +37,8 @@
#include "./Camera2D.hpp"
#include "./Camera3D.hpp"
#include "./Color.hpp"
#include "./Functions.hpp"
#include "./Font.hpp"
#include "./Functions.hpp"
#include "./Gamepad.hpp"
#include "./Image.hpp"
#include "./Material.hpp"
@@ -90,6 +54,7 @@
#include "./RenderTexture.hpp"
#include "./Shader.hpp"
#include "./Sound.hpp"
#include "./Text.hpp"
#include "./Texture.hpp"
#include "./Vector2.hpp"
#include "./Vector3.hpp"
@@ -99,7 +64,7 @@
#include "./Window.hpp"
/**
* Provides all the classes associated with raylib-cpp.
* All raylib-cpp classes and functions appear in the raylib namespace.
*/
namespace raylib {
// Nothing.

View File

@@ -1,27 +1,6 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
/**
* C++ header to wrap raylib.h.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAYLIB_HPP_
#define RAYLIB_CPP_INCLUDE_RAYLIB_HPP_

View File

@@ -1,27 +1,6 @@
/*
* LICENSE: zlib/libpng
*
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
* Copyright (c) 2020 Rob Loach (@RobLoach)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
/**
* C++ header to wrap raymath.h.
*/
#ifndef RAYLIB_CPP_INCLUDE_RAYMATH_HPP_
#define RAYLIB_CPP_INCLUDE_RAYMATH_HPP_

View File

@@ -42,6 +42,7 @@
"include/Model.hpp",
"include/Mouse.hpp",
"include/Music.hpp",
"include/physac.hpp",
"include/Physics.hpp",
"include/RayHitInfo.hpp",
"include/Ray.hpp",

View File

@@ -409,13 +409,13 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = YES
EXTRACT_ALL = NO
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = YES
EXTRACT_PRIVATE = NO
# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
# scope will be included in the documentation.
@@ -452,7 +452,7 @@ EXTRACT_LOCAL_METHODS = NO
# are hidden.
# The default value is: NO.
EXTRACT_ANON_NSPACES = YES
EXTRACT_ANON_NSPACES = NO
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
@@ -468,7 +468,7 @@ HIDE_UNDOC_MEMBERS = NO
# no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
HIDE_UNDOC_CLASSES = YES
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# (class|struct|union) declarations. If set to NO these declarations will be
@@ -822,7 +822,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
EXAMPLE_PATH =
EXAMPLE_PATH = examples
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -836,7 +836,7 @@ EXAMPLE_PATTERNS =
# irrespective of the value of the RECURSIVE tag.
# The default value is: NO.
EXAMPLE_RECURSIVE = NO
EXAMPLE_RECURSIVE = YES
# The IMAGE_PATH tag can be used to specify one or more files or directories
# that contain images that are to be included in the documentation (see the
@@ -1961,7 +1961,7 @@ EXPAND_AS_DEFINED =
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SKIP_FUNCTION_MACROS = YES
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
# Configuration options related to external references