From 95a1e6b5b126af2541c7ea0d0e978f021cea2018 Mon Sep 17 00:00:00 2001 From: frank <420@shampoo.ooo> Date: Sat, 26 Jun 2021 20:25:03 -0400 Subject: [PATCH] added licensing info --- LICENSE.txt | 19 +++++++++++++++ LICENSE_BPmono.txt | 18 ++++++++++++++ README | 56 ++++++++++++++++++++++++++++++++++++------- src/Box.hpp | 6 +++-- src/Configuration.cpp | 1 + src/Game.hpp | 1 + src/Node.hpp | 2 +- src/Segment.hpp | 6 +++-- 8 files changed, 96 insertions(+), 13 deletions(-) create mode 100644 LICENSE.txt create mode 100644 LICENSE_BPmono.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..c422805 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2021 Nuggets Select <420@shampoo.ooo> + +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. diff --git a/LICENSE_BPmono.txt b/LICENSE_BPmono.txt new file mode 100644 index 0000000..b28f1e5 --- /dev/null +++ b/LICENSE_BPmono.txt @@ -0,0 +1,18 @@ +Creative Commons Attribution-No Derivative Works 3.0 Unported +(http://creativecommons.org/licenses/by-nd/3.0/) + +You are free: + +to Share — to copy, distribute and transmit the work + +Under the following conditions: + +Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). + +No Derivative Works. You may not alter, transform, or build upon this work. + +For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. + +Any of the above conditions can be waived if you get permission from the copyright holder. + +Nothing in this license impairs or restricts the author's moral rights. \ No newline at end of file diff --git a/README b/README index faeda24..f1fc65f 100644 --- a/README +++ b/README @@ -15,7 +15,8 @@ contexts. Requirements ```````````` -The SFW source includes some external libraries in lib/, but there are other +The SFW source includes some external libraries in lib/ that the default +Makefile included with the demo shows how to compile, but there are other libraries that must also be present in order to compile a project which uses the framework @@ -37,7 +38,7 @@ your platform's usual library location. libSDL2: - Download from http://libsdl.org/download-2.0.php -- Run ./configure --prefix=[YOUR LIBRARIES PATH] (I'm using ~/local/sdl) +- Run ./configure --prefix=[YOUR LIBRARIES PATH] (I'm using $HOME/local/sdl) - Run make && make install libSDL2-image, libSDL2-ttf, libSDL2-mixer: @@ -47,7 +48,7 @@ libSDL2-image, libSDL2-ttf, libSDL2-mixer: - https://www.libsdl.org/projects/SDL_ttf/ - https://www.libsdl.org/projects/SDL_mixer/ - Run ./configure --prefix=[YOUR LIB PATH] --with-sdl-prefix=[YOUR SDL PATH] -- In my case, prefix and SDL prefix are both ~/local/sdl +- In my case, prefix and SDL prefix are both $HOME/local/sdl OpenGL/GLES/GLES2: @@ -62,11 +63,50 @@ to demonstrate switching between 3D and 2D contexts. In order to compile the demo, you will have to edit the paths in the Makefile to point to the locations of the necessary libraries on your system. +Other libraries +``````````````` +These are other libraries that have been used in projects that use this +framework but aren't required by the framework + +opencv: + +- Download from https://opencv.org/releases/ +- configure (with custom installation path) + cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/opencv .. +- make && make install + +zbar: + +- Download from http://zbar.sourceforge.net/download.html +- configure to only use image processing features (requires imagemagick) and + choose your installation directory + ./configure --without-gtk --without-python --without-qt --disable-video --prefix=$HOME/local/zbar +- make && make install + License ``````` -This software is dedicated to the public domain. See -http://creativecommons.org/publicdomain/zero/1.0/ for details. +The original code for this framework is licensed to freely use, copy, modify and +sell, without restriction under the zlib license. See LICENSE.txt for details. -Author -`````` -420 [AT] shampoo.ooo +BPmono.ttf is licensed under the Creative Commons Attribution - No Derivative +Works 3.0 license. See LICENSE_BPmono.txt for details. + +gif-h is unlicensed, public domain code released under the The Unlicense. See +lib/gif-h/LICENSE + +GLEW is included under a permissive license in lib/glew/LICENSE.txt + +GLM is included under the MIT license in lib/glm/LICENSE + +nlohmann's json library is included under the MIT license in +lib/json/LICENSE.MIT + +SDL2 GFX is included under a permissive license in lib/sdl2-gfx/LICENSE + +superxbr.cpp is included under a permissive license at the top of +lib/superxbr.cpp + + +Business +```````` +420@shampoo.ooo diff --git a/src/Box.hpp b/src/Box.hpp index 2085adf..7cd4bae 100644 --- a/src/Box.hpp +++ b/src/Box.hpp @@ -10,11 +10,13 @@ #include "glm/common.hpp" #include "glm/vec2.hpp" -struct Segment; +class Segment; -struct Box : SDL_FRect +class Box : public SDL_FRect { +public: + Box(const glm::vec2& = {0, 0}, const glm::vec2& = {0, 0}); Box(const SDL_Rect&); float get_x() const; diff --git a/src/Configuration.cpp b/src/Configuration.cpp index eb75cb9..b091bce 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -14,6 +14,7 @@ Configuration::Configuration(Node *parent, fs::path path) : Node(parent) merge(); } +/* Fill the system level config JSON with default values set by the framework */ void Configuration::set_defaults() { sys_config["keys"] = { diff --git a/src/Game.hpp b/src/Game.hpp index 36c6d43..77c773d 100644 --- a/src/Game.hpp +++ b/src/Game.hpp @@ -1,6 +1,7 @@ #ifndef Game_h_ #define Game_h_ +#include #include #include #include diff --git a/src/Node.hpp b/src/Node.hpp index 42306a2..6adefb6 100644 --- a/src/Node.hpp +++ b/src/Node.hpp @@ -14,7 +14,7 @@ class Game; struct Delegate; struct Display; struct Input; -struct Box; +class Box; struct Audio; class Node diff --git a/src/Segment.hpp b/src/Segment.hpp index 5de674a..4b4437b 100644 --- a/src/Segment.hpp +++ b/src/Segment.hpp @@ -7,12 +7,14 @@ #include "glm/vec2.hpp" -struct Box; +class Box; struct Sprite; -struct Segment +class Segment { +public: + glm::vec2 start, end; Segment(const glm::vec2&, const glm::vec2&);