Skip to content

Commit c6a78ee

Browse files
committed
Update documentation and license text
Fixes #104 and #54
1 parent 3b85ea4 commit c6a78ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+190
-979
lines changed

CPPLINT.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ linelength=120
44
exclude_files=vendor
55
exclude_files=docs
66
filter=-runtime/explicit
7+
filter=-legal/copyright

examples/core/core_drop_files.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main() {
3939
// Draw
4040
//----------------------------------------------------------------------------------
4141
BeginDrawing();
42-
42+
{
4343
ClearBackground(RAYWHITE);
4444

4545
// Check if there are files to process.
@@ -62,7 +62,7 @@ int main() {
6262

6363
DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY);
6464
}
65-
65+
}
6666
EndDrawing();
6767
//----------------------------------------------------------------------------------
6868
}

include/AudioDevice.hpp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
262
#define RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
273

@@ -63,9 +39,8 @@ class AudioDevice {
6339
/**
6440
* Close the audio device and context.
6541
*/
66-
inline AudioDevice& Close() {
42+
inline void Close() {
6743
::CloseAudioDevice();
68-
return *this;
6944
}
7045

7146
/**

include/AudioStream.hpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
262
#define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
273

@@ -143,7 +119,7 @@ class AudioStream : public ::AudioStream {
143119
::SetAudioStreamBufferSizeDefault(size);
144120
}
145121

146-
protected:
122+
private:
147123
inline void set(const ::AudioStream& stream) {
148124
buffer = stream.buffer;
149125
sampleRate = stream.sampleRate;

include/BoundingBox.hpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
262
#define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
273

@@ -87,7 +63,7 @@ class BoundingBox : public ::BoundingBox {
8763
return CheckCollisionRayBox(ray, *this);
8864
}
8965

90-
protected:
66+
private:
9167
inline void set(const ::BoundingBox& box) {
9268
min = box.min;
9369
max = box.max;

include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ install(FILES
2222
Model.hpp
2323
Mouse.hpp
2424
Music.hpp
25+
physac.hpp
2526
Physics.hpp
2627
RayHitInfo.hpp
2728
Ray.hpp

include/Camera2D.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
262
#define RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
273

@@ -30,6 +6,9 @@
306
#include "./raylib-cpp-utils.hpp"
317

328
namespace raylib {
9+
/**
10+
* Camera2D type, defines a 2d camera
11+
*/
3312
class Camera2D : public ::Camera2D {
3413
public:
3514
Camera2D() {}
@@ -86,7 +65,7 @@ class Camera2D : public ::Camera2D {
8665
return ::GetScreenToWorld2D(position, *this);
8766
}
8867

89-
protected:
68+
private:
9069
inline void set(const ::Camera2D& camera) {
9170
offset = camera.offset;
9271
target = camera.target;

include/Camera3D.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
262
#define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
273

@@ -30,6 +6,9 @@
306
#include "./raylib-cpp-utils.hpp"
317

328
namespace raylib {
9+
/**
10+
* Camera type, defines a camera position/orientation in 3d space
11+
*/
3312
class Camera3D : public ::Camera3D {
3413
public:
3514
Camera3D(const ::Camera3D& camera) {
@@ -171,7 +150,7 @@ class Camera3D : public ::Camera3D {
171150
return *this;
172151
}
173152

174-
protected:
153+
private:
175154
inline void set(const ::Camera3D& camera) {
176155
position = camera.position;
177156
target = camera.target;

include/Color.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_COLOR_HPP_
262
#define RAYLIB_CPP_INCLUDE_COLOR_HPP_
273

@@ -32,6 +8,9 @@
328
#include "./raylib-cpp-utils.hpp"
339

3410
namespace raylib {
11+
/**
12+
* Color type, RGBA (32bit)
13+
*/
3514
class Color : public ::Color {
3615
public:
3716
Color(const ::Color& color) {
@@ -264,7 +243,7 @@ class Color : public ::Color {
264243
inline static Color Magenta() { return MAGENTA; }
265244
inline static Color RayWhite() { return RAYWHITE; }
266245

267-
protected:
246+
private:
268247
inline void set(const ::Color& color) {
269248
r = color.r;
270249
g = color.g;

include/Font.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
251
#ifndef RAYLIB_CPP_INCLUDE_FONT_HPP_
262
#define RAYLIB_CPP_INCLUDE_FONT_HPP_
273

@@ -31,6 +7,9 @@
317
#include "./raylib-cpp-utils.hpp"
328

339
namespace raylib {
10+
/**
11+
* Font type, includes texture and charSet array data
12+
*/
3413
class Font : public ::Font {
3514
public:
3615
Font() {
@@ -138,7 +117,7 @@ class Font : public ::Font {
138117
return ::ImageTextEx(*this, text.c_str(), fontSize, spacing, tint);
139118
}
140119

141-
protected:
120+
private:
142121
void set(const ::Font& font) {
143122
baseSize = font.baseSize;
144123
charsCount = font.charsCount;

include/Functions.hpp

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
1-
/*
2-
* LICENSE: zlib/libpng
3-
*
4-
* raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
5-
* BSD-like license that allows static linking with closed source software:
6-
*
7-
* Copyright (c) 2020 Rob Loach (@RobLoach)
8-
*
9-
* This software is provided "as-is", without any express or implied warranty. In no event
10-
* will the authors be held liable for any damages arising from the use of this software.
11-
*
12-
* Permission is granted to anyone to use this software for any purpose, including commercial
13-
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14-
*
15-
* 1. The origin of this software must not be misrepresented; you must not claim that you
16-
* wrote the original software. If you use this software in a product, an acknowledgment
17-
* in the product documentation would be appreciated but is not required.
18-
*
19-
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20-
* as being the original software.
21-
*
22-
* 3. This notice may not be removed or altered from any source distribution.
23-
*/
24-
1+
/**
2+
* C++ wrapper functions for raylib.
3+
*/
254
#ifndef RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
265
#define RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
276

@@ -243,7 +222,7 @@ RLCPPAPI inline ::Image LoadImageAnim(const std::string& fileName, int *frames)
243222
}
244223

245224
/**
246-
* Load image from memory buffer, fileType refers to extension: i.e. "png"
225+
* Load image from memory buffer, fileType refers to extension like "png"
247226
*/
248227
RLCPPAPI inline ::Image LoadImageFromMemory(const std::string& fileType,
249228
const unsigned char *fileData,

0 commit comments

Comments
 (0)