Skip to content

Update documentation and license text #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ linelength=120
exclude_files=vendor
exclude_files=docs
filter=-runtime/explicit
filter=-legal/copyright
4 changes: 2 additions & 2 deletions examples/core/core_drop_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main() {
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();

{
ClearBackground(RAYWHITE);

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

DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY);
}

}
EndDrawing();
//----------------------------------------------------------------------------------
}
Expand Down
27 changes: 1 addition & 26 deletions include/AudioDevice.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand Down Expand Up @@ -63,9 +39,8 @@ class AudioDevice {
/**
* Close the audio device and context.
*/
inline AudioDevice& Close() {
inline void Close() {
::CloseAudioDevice();
return *this;
}

/**
Expand Down
26 changes: 1 addition & 25 deletions include/AudioStream.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand Down Expand Up @@ -143,7 +119,7 @@ class AudioStream : public ::AudioStream {
::SetAudioStreamBufferSizeDefault(size);
}

protected:
private:
inline void set(const ::AudioStream& stream) {
buffer = stream.buffer;
sampleRate = stream.sampleRate;
Expand Down
26 changes: 1 addition & 25 deletions include/BoundingBox.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ install(FILES
Model.hpp
Mouse.hpp
Music.hpp
physac.hpp
Physics.hpp
RayHitInfo.hpp
Ray.hpp
Expand Down
29 changes: 4 additions & 25 deletions include/Camera2D.hpp
Original file line number Diff line number Diff line change
@@ -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_

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

namespace raylib {
/**
* Camera2D type, defines a 2d camera
*/
class Camera2D : public ::Camera2D {
public:
Camera2D() {}
Expand Down Expand Up @@ -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;
Expand Down
29 changes: 4 additions & 25 deletions include/Camera3D.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand All @@ -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) {
Expand Down Expand Up @@ -171,7 +150,7 @@ class Camera3D : public ::Camera3D {
return *this;
}

protected:
private:
inline void set(const ::Camera3D& camera) {
position = camera.position;
target = camera.target;
Expand Down
29 changes: 4 additions & 25 deletions include/Color.hpp
Original file line number Diff line number Diff line change
@@ -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_

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

namespace raylib {
/**
* Color type, RGBA (32bit)
*/
class Color : public ::Color {
public:
Color(const ::Color& color) {
Expand Down Expand Up @@ -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;
Expand Down
29 changes: 4 additions & 25 deletions include/Font.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand All @@ -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() {
Expand Down Expand Up @@ -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;
Expand Down
29 changes: 4 additions & 25 deletions include/Functions.hpp
Original file line number Diff line number Diff line change
@@ -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_

Expand Down Expand Up @@ -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,
Expand Down
Loading