diff --git a/vendor/raylib-cpp/.editorconfig b/vendor/raylib-cpp/.editorconfig new file mode 100644 index 0000000..2e27058 --- /dev/null +++ b/vendor/raylib-cpp/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +charset = utf-8 +end_of_line = lf +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/vendor/raylib-cpp/.github/workflows/Tests.yml b/vendor/raylib-cpp/.github/workflows/Tests.yml new file mode 100644 index 0000000..dd02215 --- /dev/null +++ b/vendor/raylib-cpp/.github/workflows/Tests.yml @@ -0,0 +1,52 @@ +name: Build and tests + +on: + push: + branches: + - '*' + paths-ignore: + - '**/README.md' + pull_request: + branches: + - '*' + workflow_dispatch: + +jobs: + build: + name: ${{ matrix.platform.os }} ${{ matrix.config.name }} ${{ matrix.type.name }} + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + # - { name: Windows VS2019, os: windows-2019 } + # - { name: Windows VS2022, os: windows-2022 } + - { name: Linux GCC, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=17 } + - { name: Linux Clang, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 } + #- { name: Linux GCC, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=14 } + #- { name: Linux Clang, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=14 } + # - { name: MacOS XCode, os: macos-latest } + config: + - { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE } + - { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE } + type: + - { name: Release, flags: -DCMAKE_BUILD_TYPE=Release } + - { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug } + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install Linux Dependencies + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev + + - name: Configure + run: cmake -B build -S . -DGLFW_BUILD_WAYLAND=OFF -DBUILD_TESTING=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic" ${{ matrix.platform.flags }} ${{ matrix.type.flags }} ${{ matrix.config.flags }} + + - name: Build + run: cmake --build build + + - name: Test + run: ctest --verbose --test-dir build diff --git a/vendor/raylib-cpp/.gitignore b/vendor/raylib-cpp/.gitignore new file mode 100644 index 0000000..dfcbe19 --- /dev/null +++ b/vendor/raylib-cpp/.gitignore @@ -0,0 +1,7 @@ +build +/.vscode +package-lock.json +node_modules +cmake-build-debug +.idea +docs diff --git a/vendor/raylib-cpp/.gitmodules b/vendor/raylib-cpp/.gitmodules new file mode 100644 index 0000000..aa4c25b --- /dev/null +++ b/vendor/raylib-cpp/.gitmodules @@ -0,0 +1,5 @@ +[submodule "projects/Doxygen/doxygen-awesome-css"] + path = projects/Doxygen/doxygen-awesome-css + url = https://github.com/jothepro/doxygen-awesome-css.git + branch = main + ignore = dirty diff --git a/vendor/raylib-cpp/CMakeLists.txt b/vendor/raylib-cpp/CMakeLists.txt new file mode 100644 index 0000000..b4340f7 --- /dev/null +++ b/vendor/raylib-cpp/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.11) +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +project (raylib_cpp + VERSION 5.0.2 + DESCRIPTION "raylib-cpp C++ Object Oriented Wrapper for raylib" + HOMEPAGE_URL "https://github.com/robloach/raylib-cpp" + LANGUAGES C CXX +) + +# Options +if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + set(RAYLIB_CPP_IS_MAIN TRUE) +else() + set(RAYLIB_CPP_IS_MAIN FALSE) +endif() +option(BUILD_RAYLIB_CPP_EXAMPLES "Examples" ${RAYLIB_CPP_IS_MAIN}) + +# Include Directory +add_subdirectory(include) + +# Examples +if(BUILD_RAYLIB_CPP_EXAMPLES) + add_subdirectory(examples) + set(BUILD_RAYLIB_CPP_STATIC ON) + + # Testing + include(CTest) + enable_testing() + if(BUILD_TESTING) + set(CTEST_CUSTOM_TESTS_IGNORE + pkg-config--static + ) + add_subdirectory(tests) + endif() +endif() diff --git a/vendor/raylib-cpp/CPPLINT.cfg b/vendor/raylib-cpp/CPPLINT.cfg new file mode 100644 index 0000000..b95edee --- /dev/null +++ b/vendor/raylib-cpp/CPPLINT.cfg @@ -0,0 +1,7 @@ +set noparent +root=.. +linelength=120 +exclude_files=vendor +exclude_files=docs +filter=-runtime/explicit +filter=-legal/copyright diff --git a/vendor/raylib-cpp/LICENSE b/vendor/raylib-cpp/LICENSE new file mode 100644 index 0000000..a663e98 --- /dev/null +++ b/vendor/raylib-cpp/LICENSE @@ -0,0 +1,16 @@ +Copyright (c) 2019-2021 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. diff --git a/vendor/raylib-cpp/README.md b/vendor/raylib-cpp/README.md new file mode 100644 index 0000000..7056600 --- /dev/null +++ b/vendor/raylib-cpp/README.md @@ -0,0 +1,347 @@ +![raylib-cpp Logo](projects/Doxygen/raylib-cpp_256x256.png) + +# raylib-cpp ![Targeting raylib 5.0](https://img.shields.io/badge/for_raylib-5.0-blue) [![Tests](https://github.com/RobLoach/raylib-cpp/workflows/Tests/badge.svg)](https://github.com/RobLoach/raylib-cpp/actions?query=workflow%3ATests+branch%3Amaster) [![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE) + +[raylib-cpp](https://github.com/robloach/raylib-cpp) is a C++ wrapper library for [raylib](https://www.raylib.com), a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around *raylib*'s struct interfaces. *raylib-cpp* is not required to use *raylib* in C++, but the classes do bring using the raylib API more inline with C++'s language paradigm. + +## Example + +``` cpp +#include "raylib-cpp.hpp" + +int main() { + int screenWidth = 800; + int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); + raylib::Texture logo("raylib_logo.png"); + + SetTargetFPS(60); + + while (!window.ShouldClose()) + { + BeginDrawing(); + + window.ClearBackground(RAYWHITE); + + DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); + + // Object methods. + logo.Draw( + screenWidth / 2 - logo.GetWidth() / 2, + screenHeight / 2 - logo.GetHeight() / 2); + + EndDrawing(); + } + + // UnloadTexture() and CloseWindow() are called automatically. + + return 0; +} +``` + +See the [examples folder](examples) for more of the raylib examples that have been ported over to *raylib-cpp*. + +## Features + +There are a few conventions that raylib-cpp takes on when adopting raylib. See the [raylib-cpp documentation](https://robloach.github.io/raylib-cpp/index.html) for details on the entire API. + +### Constructors + +Object constructors load raylib objects. + +``` cpp +// raylib +Texture2D texture = LoadTexture("texture.png"); + +// raylib-cpp +raylib::Texture2D texture("texture.png"); +``` + +### Object Methods + +When a raylib method has an object as one of its arguments, you can call the method on the object itself. + +``` cpp +// raylib +Vector2 position(50, 50); +DrawPixelV(position, PURPLE); + +// raylib-cpp +raylib::Vector2 position(50, 50); +position.DrawPixel(PURPLE); +``` + +### Method Names + +If a method's name contains an object's name, it is removed from its name to shorten the method name. + +``` cpp +// raylib +DrawTexture(texture, 50, 50, WHITE); + +// raylib-cpp +texture.Draw(50, 50, WHITE); +``` + +### Optional Parameters + +Many methods have optional parameters with sane defaults. + +``` cpp +// raylib +DrawTexture(texture, 50, 50, WHITE); + +// raylib-cpp +texture.Draw(50, 50); // WHITE is provided as the default tint. +``` + +### Object Destructors + +Objects will attempt to unload their respective raylib resources on destruction. This means that there is no need to call Unload or Close methods. This applies to the window, textures, images, sounds, etc. + +``` cpp +// raylib +InitWindow(640, 480, "Hello World"); +CloseWindow(); + +// raylib-cpp +raylib::Window window(640, 480, "Hello World"); +// window.Close() will be called automatically when the object is destructed. +``` + +### Property Get/Set + +Properties can be assigned through getter and setter methods. However, you still have access to the internal properties. + +``` cpp +// raylib +Vector2 position; +position.x = 50; +position.y = 100; + +// raylib-cpp +raylib::Vector2 position; +position.SetX(50); +position.SetY(100); + +// ... or +position.x = 50; +position.y = 100; +``` + +### Function Overloading + +Many similar raylib method names have different name suffixes based on what arguments they take. With raylib-cpp, these cases use [function overloading](https://en.wikipedia.org/wiki/Function_overloading) to allow using the same method names. + +``` cpp +// raylib +Color color = GRAY; +DrawPixel(50, 50, color); +Vector2 position = {50.0f, 50.0f}; +DrawPixelV(position, color); // Extra V in method name. + +// raylib-cpp +raylib::Color color = raylib::Color::Gray(); +color.DrawPixel(50, 50); +Vector2 position(50.0f, 50.0f); +color.DrawPixel(position); // No V in method name. +position.DrawPixel(color); // Alternatively +``` + +### Method Chaining + +When there's a method that doesn't return anything, in most cases it'll return the object itself, allowing [method chaining](https://en.wikipedia.org/wiki/Method_chaining). + +``` cpp +// raylib +Image cat = ImageLoad("cat.png"); +ImageCrop(&cat, (Rectangle){ 100, 10, 280, 380 }); +ImageFlipHorizontal(&cat); +ImageResize(&cat, 150, 200); + +// raylib-cpp +raylib::Image cat("cat.png"); +cat.Crop(100, 10, 280, 380) + .FlipHorizontal() + .Resize(150, 200); +``` + +### Operators + +There are [operator overloads](https://en.wikipedia.org/wiki/Operator_overloading) implemented for objects. + +``` cpp +// raylib +Vector2 position = {50, 50}; +Vector2 speed = {10, 10}; +position.x += speed.x; +position.y += speed.y; + +// raylib-cpp +raylib::Vector2 position(50, 50); +raylib::Vector2 speed(10, 10); +position += speed; // Addition assignment operator override. +``` + +### Vector-Based Returns + +When there is a function that would return a pointer-array, there is a wrapper that allows returning a [vector](https://www.cplusplus.com/reference/vector/vector/) of objects instead. + +``` cpp +// raylib +FilePathList files = LoadDirectoryFiles("."); +TraceLog(LOG_INFO, "Count: %i", files.count); +for (int i = 0; i < files.count; i++) { + TraceLog(LOG_INFO, "File: %s", files.paths[i]); +} +UnloadDirectoryFiles(files); + +// raylib-cpp +std::vector files = raylib::GetDirectoryFiles("."); +TraceLog(LOG_INFO, "Count: %i", files.size()); +for (auto& file : files) { + TraceLog(LOG_INFO, "File: %s", file.c_str()); +} +``` + +### String Functions + +Many of the raylib functions have `std::string`-related overrides to allow calling them directly with `std::string`s and avoid having to use the `.c_str()` method. + +``` cpp +// raylib +const char* url = "https://raylib.com"; +OpenURL(url); + +// raylib-cpp +std::string url = "https://raylib.com"; +raylib::OpenURL(url); +``` + +### Exceptions + +When loading an asset fails, raylib will log a warning, but provide no other feedback for you to act upon. raylib-cpp will throw a [`RaylibException`](include/RaylibException.hpp) [runtime exception](https://en.cppreference.com/w/cpp/error/runtime_error), allowing to provide a safe method for catching failed loads. + +``` cpp +// raylib +Texture texture = LoadTexture("FileNotFound.png"); +if (texture.width == 0) { + TraceLog(LOG_ERROR, "Texture failed to load!"); +} + +// raylib-cpp +try { + raylib::Texture texture("FileNotFound.png"); +} +catch (raylib::RaylibException& error) { + TraceLog(LOG_ERROR, "Texture failed to load!"); +} +``` + +### RayMath + +The [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) methods are included. + +``` cpp +// raylib +Vector2 direction = {50, 50}; +Vector2 newDirection = Vector2Rotate(direction, 30); + +// raylib-cpp +raylib::Vector2 direction(50, 50); +raylib::Vector2 newDirection = direction.Rotate(30); +``` + +## Getting Started + +*raylib-cpp* is a header-only library. This means in order to use it, you must link your project to [raylib](https://www.raylib.com/), and then include [`raylib-cpp.hpp`](raylib-cpp/include/raylib-cpp.hpp). + +1. Set up a *raylib* project using the [build and install instructions](https://github.com/raysan5/raylib#build-and-installation) +2. Ensure `.cpp` files are compiled with C++ +3. Download *raylib-cpp* +4. Include [`include/raylib-cpp.hpp`](include/raylib-cpp.hpp) + ``` cpp + #include "path/to/raylib-cpp.hpp" + ``` + +### Starter Projects + +The [projects directory](projects) includes some starter templates... + +- [CMake template](projects/CMake) +- [Make template](projects/Make) +- [VSCode template](projects/VSCode) + +If there's a project template you would like to see added, feel free to [make an issue](https://github.com/RobLoach/raylib-cpp/issues) and we can add it in. + +### Applications + +- [Ian Pan's Raylib Games](https://github.com/ianpan870102/raylib-practices) + +## Development + +The following are some tools in order to build and contribute to *raylib-cpp*... + +### Compiling + +Since *raylib-cpp* is a header only library, the build process is the same as raylib's, except you will use C++ to compile instead of C. The following are some specific instructions on local development. + +#### Desktop + +*raylib-cpp* uses [CMake](https://cmake.org) as a primary target for development. To build it, and run the tests or examples, use... + +``` bash +git clone https://github.com/RobLoach/raylib-cpp.git +cd raylib-cpp +mkdir build +cd build +cmake .. +make +make test +./examples/core_basic_window +``` + +#### Web + +Use [emscripten](https://emscripten.org/) to build and test [core_basic_window_web.cpp](examples/core/core_basic_window_web.cpp). + +``` +mkdir build +cd build +emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" +emmake make +``` + +See [`core_basic_window_web.html`](examples/core/resources/core_basic_window_web.html) for an example HTML canvas you can you. + +### Documentation + +To build the document with [Doxygen](http://www.doxygen.nl/), use... + +``` +git submodule update --init +doxygen projects/Doxygen/Doxyfile +``` + +To publish the documentation to GitHub Pages, use... + +``` +npm run deploy +``` + +### Coding Standards + +This uses cpplint to adopt coding standards. + +``` +cpplint --recursive include +``` + +### Defines + +- `RAYLIB_CPP_NO_MATH` - When set, will skip adding the `raymath.h` integrations + +## License + +*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. Check [LICENSE](LICENSE) for further details. diff --git a/vendor/raylib-cpp/clib.json b/vendor/raylib-cpp/clib.json new file mode 100644 index 0000000..bbdd1cc --- /dev/null +++ b/vendor/raylib-cpp/clib.json @@ -0,0 +1,66 @@ +{ + "name": "raylib-cpp", + "version": "5.0.1", + "repo": "RobLoach/raylib-cpp", + "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", + "homepage": "https://github.com/robloach/raylib-cpp", + "bugs": { + "url": "https://github.com/robloach/raylib-cpp/issues" + }, + "directories": { + "lib": "include", + "doc": "docs", + "example": "examples", + "test": "tests" + }, + "keywords": [ + "raylib" + ], + "license": "Zlib", + "scripts": { + "test": "mkdir build && cd build && cmake .. && make && make test" + }, + "src": [ + "include/AudioDevice.hpp", + "include/AudioStream.hpp", + "include/AutomationEventList.hpp", + "include/BoundingBox.hpp", + "include/Camera2D.hpp", + "include/Camera3D.hpp", + "include/Color.hpp", + "include/Font.hpp", + "include/Functions.hpp", + "include/Gamepad.hpp", + "include/Image.hpp", + "include/Keyboard.hpp", + "include/Material.hpp", + "include/Matrix.hpp", + "include/Mesh.hpp", + "include/Model.hpp", + "include/ModelAnimation.hpp", + "include/Mouse.hpp", + "include/Music.hpp", + "include/physac.hpp", + "include/Ray.hpp", + "include/RayCollision.hpp", + "include/RaylibException.hpp", + "include/raylib-cpp-utils.hpp", + "include/raylib-cpp.hpp", + "include/raylib.hpp", + "include/raymath.hpp", + "include/Rectangle.hpp", + "include/RenderTexture.hpp", + "include/Shader.hpp", + "include/Sound.hpp", + "include/Text.hpp", + "include/Texture.hpp", + "include/TextureUnmanaged.hpp", + "include/Touch.hpp", + "include/Vector2.hpp", + "include/Vector3.hpp", + "include/Vector4.hpp", + "include/VrStereoConfig.hpp", + "include/Wave.hpp", + "include/Window.hpp" + ] +} diff --git a/vendor/raylib-cpp/examples/CMakeLists.txt b/vendor/raylib-cpp/examples/CMakeLists.txt new file mode 100644 index 0000000..b409356 --- /dev/null +++ b/vendor/raylib-cpp/examples/CMakeLists.txt @@ -0,0 +1,62 @@ +# Get the sources together +set(example_dirs audio core models shaders shapes text textures) +set(example_sources) +set(example_resources) + +# C++ +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# raylib +find_package(raylib QUIET) +if (NOT raylib_FOUND) + include(FetchContent) + FetchContent_Declare( + raylib + GIT_REPOSITORY https://github.com/raysan5/raylib.git + GIT_TAG ae50bfa2cc569c0f8d5bc4315d39db64005b1b08 + GIT_SHALLOW 1 + ) + FetchContent_GetProperties(raylib) + if (NOT raylib_POPULATED) # Have we downloaded raylib yet? + set(FETCHCONTENT_QUIET NO) + FetchContent_Populate(raylib) + set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + set(BUILD_GAMES OFF CACHE BOOL "" FORCE) + add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR}) + endif() +endif() + +# Find all examples +foreach(example_dir ${example_dirs}) + file(GLOB sources ${example_dir}/*.cpp) + list(APPEND example_sources ${sources}) + + # Any any resources + file(GLOB resources ${example_dir}/resources/*) + list(APPEND example_resources ${resources}) +endforeach() + +# Compile all examples +foreach(example_source ${example_sources}) + # Create the basename for the example + get_filename_component(example_name ${example_source} NAME) + string(REPLACE ".cpp" "${OUTPUT_EXT}" example_name ${example_name}) + + # Setup the example + add_executable(${example_name} ${example_source}) + + # Link raylib and raylib-cpp + target_link_libraries(${example_name} PUBLIC raylib_cpp raylib) + + string(REGEX MATCH ".*/.*/" resources_dir ${example_source}) + string(APPEND resources_dir "resources") +endforeach() + +# Multiple Files Example +add_executable("multiple" multiple/main.cpp multiple/Player.cpp) +target_link_libraries("multiple" PUBLIC raylib_cpp raylib) + +# Copy all the resources +file(COPY ${example_resources} DESTINATION "resources/") diff --git a/vendor/raylib-cpp/examples/audio/audio_music_stream.cpp b/vendor/raylib-cpp/examples/audio/audio_music_stream.cpp new file mode 100644 index 0000000..c23407e --- /dev/null +++ b/vendor/raylib-cpp/examples/audio/audio_music_stream.cpp @@ -0,0 +1,83 @@ +/******************************************************************************************* +* +* raylib [audio] example - Music playing (streaming) +* +* This example has been created using raylib 1.3 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [audio] example - music playing (streaming)"); + + raylib::AudioDevice audio; // Initialize audio device + + raylib::Music music("resources/target.ogg"); + + music.Play(); + + float timePlayed = 0.0f; + bool pause = false; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + music.Update(); // Update music buffer with new stream data + + // Restart music playing (stop and play) + if (IsKeyPressed(KEY_SPACE)) { + music.Stop(); + music.Play(); + } + + // Pause/Resume music playing + if (IsKeyPressed(KEY_P)) { + pause = !pause; + + if (pause) { + music.Pause(); + } else { + music.Resume(); + } + } + + // Get timePlayed scaled to bar dimensions (400 pixels) + timePlayed = music.GetTimePlayed() / music.GetTimeLength() * 400; + + if (timePlayed > 400) music.Stop(); + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY); + + DrawRectangle(200, 200, 400, 12, LIGHTGRAY); + DrawRectangle(200, 200, static_cast(timePlayed), 12, MAROON); + DrawRectangleLines(200, 200, 400, 12, GRAY); + + DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY); + DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/audio/audio_sound_loading.cpp b/vendor/raylib-cpp/examples/audio/audio_sound_loading.cpp new file mode 100644 index 0000000..fbc9703 --- /dev/null +++ b/vendor/raylib-cpp/examples/audio/audio_sound_loading.cpp @@ -0,0 +1,52 @@ +/******************************************************************************************* +* +* raylib [audio] example - Sound loading and playing +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [audio] example - sound loading and playing"); + + raylib::AudioDevice audiodevice; // Initialize audio device + + raylib::Sound fxWav("resources/sound.wav"); // Load WAV audio file + raylib::Sound fxOgg("resources/target.ogg"); // Load OGG audio file + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + if (IsKeyPressed(KEY_SPACE)) fxWav.Play(); // Play WAV sound + if (IsKeyPressed(KEY_ENTER)) fxOgg.Play(); // Play OGG sound + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + DrawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, LIGHTGRAY); + DrawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, LIGHTGRAY); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/audio/resources/LICENSE.md b/vendor/raylib-cpp/examples/audio/resources/LICENSE.md new file mode 100644 index 0000000..c94731c --- /dev/null +++ b/vendor/raylib-cpp/examples/audio/resources/LICENSE.md @@ -0,0 +1,10 @@ +| resource | author | licence | notes | +| :------------------- | :---------: | :------ | :---- | +| country.mp3 | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | +| target.ogg | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | +| target.flac | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game | +| coin.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | +| sound.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | +| spring.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | +| weird.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) | +| mini1111.xm | [tPORt](https://modarchive.org/index.php?request=view_by_moduleid&query=51891) | [Mod Archive Distribution license](https://modarchive.org/index.php?terms-upload) | - | diff --git a/vendor/raylib-cpp/examples/audio/resources/coin.wav b/vendor/raylib-cpp/examples/audio/resources/coin.wav new file mode 100644 index 0000000..6007509 Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/coin.wav differ diff --git a/vendor/raylib-cpp/examples/audio/resources/country.mp3 b/vendor/raylib-cpp/examples/audio/resources/country.mp3 new file mode 100644 index 0000000..91066cc Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/country.mp3 differ diff --git a/vendor/raylib-cpp/examples/audio/resources/mini1111.xm b/vendor/raylib-cpp/examples/audio/resources/mini1111.xm new file mode 100644 index 0000000..a185c1a Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/mini1111.xm differ diff --git a/vendor/raylib-cpp/examples/audio/resources/sound.wav b/vendor/raylib-cpp/examples/audio/resources/sound.wav new file mode 100644 index 0000000..b5d01c9 Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/sound.wav differ diff --git a/vendor/raylib-cpp/examples/audio/resources/spring.wav b/vendor/raylib-cpp/examples/audio/resources/spring.wav new file mode 100644 index 0000000..c7fbf1b Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/spring.wav differ diff --git a/vendor/raylib-cpp/examples/audio/resources/target.flac b/vendor/raylib-cpp/examples/audio/resources/target.flac new file mode 100644 index 0000000..5fad22c Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/target.flac differ diff --git a/vendor/raylib-cpp/examples/audio/resources/target.ogg b/vendor/raylib-cpp/examples/audio/resources/target.ogg new file mode 100644 index 0000000..2b73e1c Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/target.ogg differ diff --git a/vendor/raylib-cpp/examples/audio/resources/weird.wav b/vendor/raylib-cpp/examples/audio/resources/weird.wav new file mode 100644 index 0000000..101029c Binary files /dev/null and b/vendor/raylib-cpp/examples/audio/resources/weird.wav differ diff --git a/vendor/raylib-cpp/examples/core/core_basic_window.cpp b/vendor/raylib-cpp/examples/core/core_basic_window.cpp new file mode 100644 index 0000000..68a1709 --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_basic_window.cpp @@ -0,0 +1,54 @@ +/******************************************************************************************* +* +* raylib [core] example - Basic window +* +* Welcome to raylib! +* +* To test examples, just press F6 and execute raylib_compile_execute script +* Note that compiled executable is placed in the same folder as .c file +* +* You can find all basic examples on C:\raylib\raylib\examples folder or +* raylib official webpage: www.raylib.com +* +* Enjoy using raylib. :) +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + int screenWidth = 800; + int screenHeight = 450; + raylib::Color textColor = raylib::Color::LightGray(); + raylib::Window window(screenWidth, screenHeight, "raylib [core] example - basic window"); + + SetTargetFPS(60); + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + textColor.DrawText("Congrats! You created your first window!", 190, 200, 20); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/core_basic_window_web.cpp b/vendor/raylib-cpp/examples/core/core_basic_window_web.cpp new file mode 100644 index 0000000..7d43df6 --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_basic_window_web.cpp @@ -0,0 +1,78 @@ +/******************************************************************************************* +* +* raylib-cpp [core] example - Basic window (adapted for HTML5 platform) +* +* This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI +* As you will notice, code structure is slightly diferent to the other examples... +* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning +* +* This example has been created using raylib 1.3 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +#if defined(PLATFORM_WEB) + #include +#endif + +//---------------------------------------------------------------------------------- +// Global Variables Definition +//---------------------------------------------------------------------------------- +int screenWidth = 800; +int screenHeight = 450; + +//---------------------------------------------------------------------------------- +// Module Functions Declaration +//---------------------------------------------------------------------------------- +void UpdateDrawFrame(void); // Update and Draw one frame + +//---------------------------------------------------------------------------------- +// Main Enry Point +//---------------------------------------------------------------------------------- +int main() +{ + // Initialization + //-------------------------------------------------------------------------------------- + raylib::Window window(screenWidth, screenHeight, "raylib-cpp [core] example - basic window"); + +#if defined(PLATFORM_WEB) + emscripten_set_main_loop(UpdateDrawFrame, 0, 1); +#else + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) // Detect window close button or ESC key + { + UpdateDrawFrame(); + } +#endif + + return 0; +} + +//---------------------------------------------------------------------------------- +// Module Functions Definition +//---------------------------------------------------------------------------------- +void UpdateDrawFrame(void) +{ + // Update + //---------------------------------------------------------------------------------- + // TODO: Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + raylib::DrawText("Congrats! You created your first raylib-cpp window!", 190, 200, 20, LIGHTGRAY); + + EndDrawing(); + //---------------------------------------------------------------------------------- +} diff --git a/vendor/raylib-cpp/examples/core/core_drop_files.cpp b/vendor/raylib-cpp/examples/core/core_drop_files.cpp new file mode 100644 index 0000000..219b84b --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_drop_files.cpp @@ -0,0 +1,69 @@ +/******************************************************************************************* +* +* raylib [core] example - Windows drop files +* +* This example only works on platforms that support drag & drop (Windows, Linux, OSX, Html5?) +* +* This example has been created using raylib-cpp (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2020 Rob Loach (@RobLoach) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [core] example - drop files"); + + std::vector droppedFiles; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + if (IsFileDropped()) { + droppedFiles = raylib::LoadDroppedFiles(); + } + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + // Check if there are files to process. + if (droppedFiles.empty()) { + raylib::DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY); + } else { + raylib::DrawText("Dropped files:", 100, 40, 20, DARKGRAY); + + // Iterate through all the dropped files. + for (int i = 0; i < droppedFiles.size(); i++) { + if (i % 2 == 0) + DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f)); + else + DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f)); + + // Display the path to the dropped file. + raylib::DrawText(droppedFiles[i].c_str(), 120, 100 + 40 * i, 10, GRAY); + } + + raylib::DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY); + } + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/core_input_mouse.cpp b/vendor/raylib-cpp/examples/core/core_input_mouse.cpp new file mode 100644 index 0000000..833f621 --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_input_mouse.cpp @@ -0,0 +1,55 @@ +/******************************************************************************************* +* +* raylib [core] example - Mouse input +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [core] example - mouse input"); + + raylib::Vector2 ballPosition(-100.0f, -100.0f); + raylib::Color ballColor = raylib::Color::DarkBlue(); + raylib::Color textColor = raylib::Color::DarkGray(); + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //--------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + ballPosition = GetMousePosition(); + + if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) ballColor = MAROON; + else if (IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) ballColor = LIME; + else if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) ballColor = DARKBLUE; + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + ballPosition.DrawCircle(40, ballColor); + + textColor.DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/core_loading_thread.cpp b/vendor/raylib-cpp/examples/core/core_loading_thread.cpp new file mode 100644 index 0000000..1d01e76 --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_loading_thread.cpp @@ -0,0 +1,150 @@ +/******************************************************************************* +* +* raylib example - loading thread +* +* This example has been created using raylib-cpp (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license +* (View raylib.h for details) +* +* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5) +* Copyright (c) 2021 Paul Keir (University of the West of Scotland) +* +*******************************************************************************/ + +#include // C++11 standard library threads +#include // C++ atomic data types +#include // For: chrono::steady_clock::now() +#include // May be thrown by thread c'tor + +#include "raylib-cpp.hpp" + +// Using C++ std::atomic_bool (aka. std::atomic) for synchronization. +// n.b. A plain built-in type can't be used for inter-thread synchronization +std::atomic_bool dataLoaded{false}; +static void LoadDataThread(); // Loading data thread function declaration +static int dataProgress = 0; // Data progress accumulator + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, + "raylib [core] example - loading thread"); + + std::thread threadId; // Loading data thread id + + enum { STATE_WAITING, STATE_LOADING, STATE_FINISHED } state = STATE_WAITING; + int framesCounter = 0; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------- + switch (state) + { + case STATE_WAITING: + if (IsKeyPressed(KEY_ENTER)) + { + try { + threadId = std::thread(LoadDataThread); + TraceLog(LOG_INFO, + "Loading thread initialized successfully"); + } catch (std::system_error e) { + TraceLog(LOG_ERROR, "Error: %s", e.what()); + } + + state = STATE_LOADING; + } + break; + + case STATE_LOADING: + framesCounter++; + if (dataLoaded.load()) + { + framesCounter = 0; + state = STATE_FINISHED; + } + break; + + case STATE_FINISHED: + if (IsKeyPressed(KEY_ENTER)) + { + // Reset everything to launch again + dataLoaded = false; + dataProgress = 0; + state = STATE_WAITING; + } + break; + + default: + break; + } + //---------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------- + BeginDrawing(); + { + + window.ClearBackground(RAYWHITE); + + switch (state) + { + case STATE_WAITING: + raylib::DrawText("PRESS ENTER to START LOADING DATA", + 150, 170, 20, DARKGRAY); + break; + + case STATE_LOADING: + DrawRectangle(150, 200, dataProgress, 60, SKYBLUE); + if ((framesCounter/15)%2) + raylib::DrawText("LOADING DATA...", 240, 210, 40, DARKBLUE); + break; + + case STATE_FINISHED: + DrawRectangle(150, 200, 500, 60, LIME); + raylib::DrawText("DATA LOADED!", 250, 210, 40, GREEN); + break; + } + + DrawRectangleLines(150, 200, 500, 60, DARKGRAY); + } + + EndDrawing(); + //---------------------------------------------------------------------- + } + + if (threadId.joinable()) // The user might quit without creating a thread. + threadId.join(); // Good etiquette, but may take a second. + + return 0; +} + +// Loading data thread function definition +static void LoadDataThread() +{ + using namespace std::chrono; + int timeCounter = 0; // Time counted in ms + + auto prevTime = steady_clock::now(); + + // We simulate data loading with a time counter for 5 seconds + while (timeCounter < 5000) + { + auto currentTime = steady_clock::now() - prevTime; + timeCounter = duration_cast(currentTime).count(); + + // We accumulate time over a global variable to be used in + // main thread as a progress bar + dataProgress = timeCounter/10; + } + + // When data has finished loading, we set global variable + dataLoaded = true; +} diff --git a/vendor/raylib-cpp/examples/core/core_random_values.cpp b/vendor/raylib-cpp/examples/core/core_random_values.cpp new file mode 100644 index 0000000..1522b84 --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_random_values.cpp @@ -0,0 +1,57 @@ +/******************************************************************************************* +* +* raylib [core] example - Generate random values +* +* This example has been created using raylib 1.1 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [core] example - generate random values"); + + int framesCounter = 0; // Variable used to count frames + + int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included) + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + framesCounter++; + + // Every two seconds (120 frames) a new random value is generated + if (((framesCounter / 120) % 2) == 1) { + randValue = GetRandomValue(-8, 5); + framesCounter = 0; + } + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + raylib::DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON); + + raylib::DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/core_window_letterbox.cpp b/vendor/raylib-cpp/examples/core/core_window_letterbox.cpp new file mode 100644 index 0000000..aeb166f --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_window_letterbox.cpp @@ -0,0 +1,108 @@ +/******************************************************************************************* +* +* raylib [core] example - window scale letterbox (and virtual mouse) +* +* Example originally created with raylib 2.5, last time updated with raylib 4.0 +* +* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5) +* +* Example 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) 2019-2023 Anata (@anatagawa) and Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +#include "raymath.hpp" // Required for: Vector2Clamp() + +#define MAX(a, b) ((a)>(b)? (a) : (b)) +#define MIN(a, b) ((a)<(b)? (a) : (b)) + +//------------------------------------------------------------------------------------ +// Program main entry point +//------------------------------------------------------------------------------------ +int main(void) +{ + const int windowWidth = 800; + const int windowHeight = 450; + + // Enable config flags for resizable window and vertical synchro + raylib::Window window(windowWidth, windowHeight, + "raylib [core] example - window scale letterbox", + FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT); + window.SetMinSize(320, 240); + + int gameScreenWidth = 640; + int gameScreenHeight = 480; + + // Render texture initialization, used to hold the rendering result so we can easily resize it + raylib::RenderTexture2D target(gameScreenWidth, gameScreenHeight); + target.GetTexture().SetFilter(TEXTURE_FILTER_BILINEAR); // Texture scale filter to use + + raylib::Color colors[10] = { 0 }; + for (int i = 0; i < 10; i++) { + colors[i] = raylib::Color((unsigned char)GetRandomValue(100, 250), (unsigned char)GetRandomValue(50, 150), (unsigned char)GetRandomValue(10, 100), 255); + } + + window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + // Compute required framebuffer scaling + float scale = MIN((float)GetScreenWidth()/gameScreenWidth, (float)GetScreenHeight()/gameScreenHeight); + + if (IsKeyPressed(KEY_SPACE)) + { + // Recalculate random colors for the bars + for (int i = 0; i < 10; i++) colors[i] = (Color){ (unsigned char)GetRandomValue(100, 250), (unsigned char)GetRandomValue(50, 150), (unsigned char)GetRandomValue(10, 100), 255 }; + } + + // Update virtual mouse (clamped mouse value behind game screen) + raylib::Vector2 mouse = raylib::Mouse::GetPosition(); + raylib::Vector2 virtualMouse( + (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale, + (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale + ); + virtualMouse = virtualMouse.Clamp(raylib::Vector2::Zero(), raylib::Vector2(gameScreenWidth, gameScreenHeight)); + + // Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui) + //SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f); + //SetMouseScale(1/scale, 1/scale); + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + // Draw everything in the render texture, note this will not be rendered on screen, yet + target.BeginMode(); + ClearBackground(RAYWHITE); // Clear render texture background color + + for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]); + + DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE); + DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN); + DrawText(TextFormat("Virtual Mouse: [%i , %i]", (int)virtualMouse.x, (int)virtualMouse.y), 350, 55, 20, YELLOW); + target.EndMode(); + + BeginDrawing(); + ClearBackground(BLACK); // Clear screen background + + // Draw render texture to screen, properly scaled + target.GetTexture().Draw(raylib::Rectangle(0.0f, 0.0f, target.texture.width, -target.texture.height), + raylib::Rectangle( + (GetScreenWidth() - (gameScreenWidth*scale))*0.5f, + (GetScreenHeight() - (gameScreenHeight*scale))*0.5f, + gameScreenWidth*scale, gameScreenHeight*scale + ), + raylib::Vector2::Zero(), 0.0f, WHITE); + EndDrawing(); + //-------------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/core_world_screen.cpp b/vendor/raylib-cpp/examples/core/core_world_screen.cpp new file mode 100644 index 0000000..2b91a5c --- /dev/null +++ b/vendor/raylib-cpp/examples/core/core_world_screen.cpp @@ -0,0 +1,74 @@ +/******************************************************************************************* +* +* raylib [core] example - World to screen +* +* This example has been created using raylib 1.3 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [core] example - 3d camera free"); + + // Define the camera to look into our 3d world + raylib::Camera camera( + raylib::Vector3(10.0f, 10.0f, 10.0f), + raylib::Vector3(), + raylib::Vector3(0.0f, 1.0f, 0.0f), + 45.0f, + CAMERA_PERSPECTIVE); + + Vector3 cubePosition; + Vector2 cubeScreenPosition; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + camera.Update(CAMERA_THIRD_PERSON); // Update camera + + // Calculate cube screen space position (with a little offset to be in top) + cubeScreenPosition = GetWorldToScreen(Vector3{cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera); + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + camera.BeginMode(); + { + DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED); + DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON); + + DrawGrid(10, 1.0f); + } + camera.EndMode(); + + raylib::DrawText("Enemy: 100 / 100", + cubeScreenPosition.x - MeasureText("Enemy: 100/100", 20) / 2, + cubeScreenPosition.y, 20, + BLACK); + raylib::DrawText("Text is always on top of the cube", + (screenWidth - MeasureText("Text is always on top of the cube", 20)) / 2, + 25, 20, GRAY); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/core/resources/LICENSE b/vendor/raylib-cpp/examples/core/resources/LICENSE new file mode 100644 index 0000000..d7d797a --- /dev/null +++ b/vendor/raylib-cpp/examples/core/resources/LICENSE @@ -0,0 +1,4 @@ +| resource | author | licence | notes | +| :------------ | :---------: | :------ | :---- | +| ps3.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | +| xbox.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - | diff --git a/vendor/raylib-cpp/examples/core/resources/core_basic_window_web.html b/vendor/raylib-cpp/examples/core/resources/core_basic_window_web.html new file mode 100644 index 0000000..825aa9f --- /dev/null +++ b/vendor/raylib-cpp/examples/core/resources/core_basic_window_web.html @@ -0,0 +1,57 @@ + + + + raylib-cpp [core] example - basic window + + + + + + + + + + + + + + + + + diff --git a/vendor/raylib-cpp/examples/core/resources/distortion100.fs b/vendor/raylib-cpp/examples/core/resources/distortion100.fs new file mode 100644 index 0000000..112cbcb --- /dev/null +++ b/vendor/raylib-cpp/examples/core/resources/distortion100.fs @@ -0,0 +1,52 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables +uniform vec2 leftLensCenter; +uniform vec2 rightLensCenter; +uniform vec2 leftScreenCenter; +uniform vec2 rightScreenCenter; +uniform vec2 scale; +uniform vec2 scaleIn; +uniform vec4 hmdWarpParam; +uniform vec4 chromaAbParam; + +void main() +{ + // Compute lens distortion + vec2 lensCenter = fragTexCoord.x < 0.5? leftLensCenter : rightLensCenter; + vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter; + vec2 theta = (fragTexCoord - lensCenter)*scaleIn; + float rSq = theta.x*theta.x + theta.y*theta.y; + vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq); + vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq); + vec2 tcBlue = lensCenter + scale*thetaBlue; + + if (any(bvec2(clamp(tcBlue, screenCenter - vec2(0.25, 0.5), screenCenter + vec2(0.25, 0.5)) - tcBlue))) + { + // Set black fragment for everything outside the lens border + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + else + { + // Compute color chroma aberration + float blue = texture2D(texture0, tcBlue).b; + vec2 tcGreen = lensCenter + scale*theta1; + float green = texture2D(texture0, tcGreen).g; + + vec2 thetaRed = theta1*(chromaAbParam.x + chromaAbParam.y*rSq); + vec2 tcRed = lensCenter + scale*thetaRed; + + float red = texture2D(texture0, tcRed).r; + gl_FragColor = vec4(red, green, blue, 1.0); + } +} diff --git a/vendor/raylib-cpp/examples/core/resources/distortion330.fs b/vendor/raylib-cpp/examples/core/resources/distortion330.fs new file mode 100644 index 0000000..15d03cc --- /dev/null +++ b/vendor/raylib-cpp/examples/core/resources/distortion330.fs @@ -0,0 +1,53 @@ +#version 330 + +// Input vertex attributes (from vertex shader) +in vec2 fragTexCoord; +in vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Output fragment color +out vec4 finalColor; + +// NOTE: Add here your custom variables +uniform vec2 leftLensCenter = vec2(0.288, 0.5); +uniform vec2 rightLensCenter = vec2(0.712, 0.5); +uniform vec2 leftScreenCenter = vec2(0.25, 0.5); +uniform vec2 rightScreenCenter = vec2(0.75, 0.5); +uniform vec2 scale = vec2(0.25, 0.45); +uniform vec2 scaleIn = vec2(4, 2.2222); +uniform vec4 hmdWarpParam = vec4(1, 0.22, 0.24, 0); +uniform vec4 chromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); + +void main() +{ + // Compute lens distortion + vec2 lensCenter = fragTexCoord.x < 0.5? leftLensCenter : rightLensCenter; + vec2 screenCenter = fragTexCoord.x < 0.5? leftScreenCenter : rightScreenCenter; + vec2 theta = (fragTexCoord - lensCenter)*scaleIn; + float rSq = theta.x*theta.x + theta.y*theta.y; + vec2 theta1 = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq); + vec2 thetaBlue = theta1*(chromaAbParam.z + chromaAbParam.w*rSq); + vec2 tcBlue = lensCenter + scale*thetaBlue; + + if (any(bvec2(clamp(tcBlue, screenCenter - vec2(0.25, 0.5), screenCenter + vec2(0.25, 0.5)) - tcBlue))) + { + // Set black fragment for everything outside the lens border + finalColor = vec4(0.0, 0.0, 0.0, 1.0); + } + else + { + // Compute color chroma aberration + float blue = texture(texture0, tcBlue).b; + vec2 tcGreen = lensCenter + scale*theta1; + float green = texture(texture0, tcGreen).g; + + vec2 thetaRed = theta1*(chromaAbParam.x + chromaAbParam.y*rSq); + vec2 tcRed = lensCenter + scale*thetaRed; + + float red = texture(texture0, tcRed).r; + finalColor = vec4(red, green, blue, 1.0); + } +} diff --git a/vendor/raylib-cpp/examples/core/resources/ps3.png b/vendor/raylib-cpp/examples/core/resources/ps3.png new file mode 100644 index 0000000..59c0b35 Binary files /dev/null and b/vendor/raylib-cpp/examples/core/resources/ps3.png differ diff --git a/vendor/raylib-cpp/examples/core/resources/xbox.png b/vendor/raylib-cpp/examples/core/resources/xbox.png new file mode 100644 index 0000000..1a57058 Binary files /dev/null and b/vendor/raylib-cpp/examples/core/resources/xbox.png differ diff --git a/vendor/raylib-cpp/examples/models/models_billboard.cpp b/vendor/raylib-cpp/examples/models/models_billboard.cpp new file mode 100644 index 0000000..111d9af --- /dev/null +++ b/vendor/raylib-cpp/examples/models/models_billboard.cpp @@ -0,0 +1,63 @@ +/******************************************************************************************* +* +* raylib [models] example - Drawing billboards +* +* This example has been created using raylib 1.3 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [models] example - drawing billboards"); + + // Define the camera to look into our 3d world + raylib::Camera camera( + raylib::Vector3(5.0f, 4.0f, 5.0f), + raylib::Vector3(0.0f, 2.0f, 0.0f), + raylib::Vector3(0.0f, 1.0f, 0.0f), + 45.0f, + CAMERA_PERSPECTIVE); + + raylib::Texture2D bill("resources/billboard.png"); // Our texture billboard + raylib::Vector3 billPosition(0.0f, 2.0f, 0.0f); // Position where draw billboard + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + camera.Update(CAMERA_ORBITAL); // Update camera + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + camera.BeginMode(); + { + DrawGrid(10, 1.0f); // Draw a grid + bill.DrawBillboard(camera, billPosition, 2.0f); + } + camera.EndMode(); + + DrawFPS(10, 10); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/models/models_first_person_maze.cpp b/vendor/raylib-cpp/examples/models/models_first_person_maze.cpp new file mode 100644 index 0000000..4910aa7 --- /dev/null +++ b/vendor/raylib-cpp/examples/models/models_first_person_maze.cpp @@ -0,0 +1,118 @@ +/******************************************************************************************* +* +* raylib [models] example - first person maze +* +* This example has been created using raylib 2.5 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2019 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [models] example - first person maze"); + + // Define the camera to look into our 3d world + raylib::Camera camera({ 0.2f, 0.4f, 0.2f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f); + + raylib::Image imMap("resources/cubicmap.png"); // Load cubicmap image (RAM) + raylib::Texture cubicmap(imMap); // Convert image to texture to display (VRAM) + raylib::MeshUnmanaged mesh = raylib::MeshUnmanaged::Cubicmap(imMap, Vector3{ 1.0f, 1.0f, 1.0f }); // Use MeshUnmanaged, Mesh will be handled by Model + raylib::Model model(mesh); + + // NOTE: By default each cube is mapped to one part of texture atlas + raylib::Texture texture("resources/cubicmap_atlas.png"); // Load map texture + model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture + + // Get map image data to be used for collision detection + Color *mapPixels = imMap.LoadColors(); + + imMap.Unload(); // Unload image from RAM + + raylib::Vector3 mapPosition(-16.0f, 0.0f, -8.0f); // Set model position + raylib::Vector3 playerPosition(camera.position); // Set player position + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + raylib::Vector3 oldCamPos(camera.position); // Store old camera position + + camera.Update(CAMERA_FIRST_PERSON); // Update camera + + // Check player collision (we simplify to 2D collision detection) + raylib::Vector2 playerPos(camera.position.x, camera.position.z); + float playerRadius = 0.1f; // Collision radius (player is modelled as a cilinder for collision) + + int playerCellX = static_cast(playerPos.x - mapPosition.x + 0.5f); + int playerCellY = static_cast(playerPos.y - mapPosition.z + 0.5f); + + // Out-of-limits security check + if (playerCellX < 0) playerCellX = 0; + else if (playerCellX >= cubicmap.width) playerCellX = cubicmap.width - 1; + + if (playerCellY < 0) playerCellY = 0; + else if (playerCellY >= cubicmap.height) playerCellY = cubicmap.height - 1; + + // Check map collisions using image data and player position + // TODO: Improvement: Just check player surrounding cells for collision + for (int y = 0; y < cubicmap.height; y++) + { + for (int x = 0; x < cubicmap.width; x++) + { + if ((mapPixels[y*cubicmap.width + x].r == 255) && // Collision: white pixel, only check R channel + (playerPos.CheckCollisionCircle(playerRadius, + Rectangle{ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f }))) + { + // Collision detected, reset camera position + camera.position = oldCamPos; + } + } + } + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + camera.BeginMode(); + { + model.Draw(mapPosition); // Draw maze map + // playerPosition.DrawCube((Vector3){ 0.2f, 0.4f, 0.2f }, RED); // Draw player + } + camera.EndMode(); + + cubicmap.Draw(Vector2{ static_cast(GetScreenWidth() - cubicmap.width*4 - 20), 20 }, 0.0f, 4.0f, WHITE); + DrawRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); + + // Draw player position radar + DrawRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED); + + DrawFPS(10, 10); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + // De-Initialization + //-------------------------------------------------------------------------------------- + + UnloadImageColors(mapPixels); // Unload color array + + //---------------------------------------------------------------------------------- + + return 0; +} diff --git a/vendor/raylib-cpp/examples/models/resources/billboard.png b/vendor/raylib-cpp/examples/models/resources/billboard.png new file mode 100644 index 0000000..8c99118 Binary files /dev/null and b/vendor/raylib-cpp/examples/models/resources/billboard.png differ diff --git a/vendor/raylib-cpp/examples/models/resources/cubicmap.png b/vendor/raylib-cpp/examples/models/resources/cubicmap.png new file mode 100644 index 0000000..392dbf2 Binary files /dev/null and b/vendor/raylib-cpp/examples/models/resources/cubicmap.png differ diff --git a/vendor/raylib-cpp/examples/models/resources/cubicmap_atlas.png b/vendor/raylib-cpp/examples/models/resources/cubicmap_atlas.png new file mode 100644 index 0000000..9fc404a Binary files /dev/null and b/vendor/raylib-cpp/examples/models/resources/cubicmap_atlas.png differ diff --git a/vendor/raylib-cpp/examples/multiple/Player.cpp b/vendor/raylib-cpp/examples/multiple/Player.cpp new file mode 100644 index 0000000..f923d3a --- /dev/null +++ b/vendor/raylib-cpp/examples/multiple/Player.cpp @@ -0,0 +1,31 @@ +#include "Player.hpp" +#include "raylib-cpp.hpp" + +Player::Player() { + position = Rectangle{ + GetScreenWidth() / 2.0f - 50, + GetScreenHeight() / 2.0f - 50, + 100, + 100 + }; + speed = 3; +} + +void Player::Draw() { + position.Draw(RED); +} + +void Player::Update() { + if (IsKeyDown(KEY_UP)) { + position.y -= speed; + } + if (IsKeyDown(KEY_DOWN)) { + position.y += speed; + } + if (IsKeyDown(KEY_RIGHT)) { + position.x += speed; + } + if (IsKeyDown(KEY_LEFT)) { + position.x -= speed; + } +} diff --git a/vendor/raylib-cpp/examples/multiple/Player.hpp b/vendor/raylib-cpp/examples/multiple/Player.hpp new file mode 100644 index 0000000..af8c3c4 --- /dev/null +++ b/vendor/raylib-cpp/examples/multiple/Player.hpp @@ -0,0 +1,10 @@ +#include "raylib-cpp.hpp" + +class Player { + public: + Player(); + raylib::Rectangle position; + int speed; + void Draw(); + void Update(); +}; diff --git a/vendor/raylib-cpp/examples/multiple/README.md b/vendor/raylib-cpp/examples/multiple/README.md new file mode 100644 index 0000000..74ec0a6 --- /dev/null +++ b/vendor/raylib-cpp/examples/multiple/README.md @@ -0,0 +1,3 @@ +# Multiple Files Example + +This provides an example of including raylib-cpp.hpp in multiple files. diff --git a/vendor/raylib-cpp/examples/multiple/main.cpp b/vendor/raylib-cpp/examples/multiple/main.cpp new file mode 100644 index 0000000..118a04f --- /dev/null +++ b/vendor/raylib-cpp/examples/multiple/main.cpp @@ -0,0 +1,39 @@ +/******************************************************************************************* +* +* raylib-cpp [multiple] example - Includes raylib-cpp.hpp from multiple sources. +* +* Welcome to raylib! +* +* To test examples, just press F6 and execute raylib_compile_execute script +* Note that compiled executable is placed in the same folder as .c file +* +* You can find all basic examples on C:\raylib\raylib\examples folder or +* raylib official webpage: www.raylib.com +* +* Enjoy using raylib. :) +* +* This example has been created using raylib-cpp +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2021 Rob Loach (https://robloach.net) +* +********************************************************************************************/ + +#include "Player.hpp" +#include "raylib-cpp.hpp" + +int main() { + raylib::Window window(640, 480, "raylib-cpp [multiple] example"); + SetTargetFPS(60); + + Player player; + while (!window.ShouldClose()) { + window.BeginDrawing(); + { + window.ClearBackground(SKYBLUE); + player.Update(); + player.Draw(); + } + window.EndDrawing(); + } +} diff --git a/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl100/wave.fs b/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl100/wave.fs new file mode 100644 index 0000000..50c4e02 --- /dev/null +++ b/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl100/wave.fs @@ -0,0 +1,36 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +uniform float secondes; + +uniform vec2 size; + +uniform float freqX; +uniform float freqY; +uniform float ampX; +uniform float ampY; +uniform float speedX; +uniform float speedY; + +void main() { + float pixelWidth = 1.0 / size.x; + float pixelHeight = 1.0 / size.y; + float aspect = pixelHeight / pixelWidth; + float boxLeft = 0.0; + float boxTop = 0.0; + + vec2 p = fragTexCoord; + p.x += cos((fragTexCoord.y - boxTop) * freqX / ( pixelWidth * 750.0) + (secondes * speedX)) * ampX * pixelWidth; + p.y += sin((fragTexCoord.x - boxLeft) * freqY * aspect / ( pixelHeight * 750.0) + (secondes * speedY)) * ampY * pixelHeight; + + gl_FragColor = texture2D(texture0, p)*colDiffuse*fragColor; +} diff --git a/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl330/wave.fs b/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl330/wave.fs new file mode 100644 index 0000000..43efee2 --- /dev/null +++ b/vendor/raylib-cpp/examples/shaders/resources/shaders/glsl330/wave.fs @@ -0,0 +1,37 @@ +#version 330 + +// Input vertex attributes (from vertex shader) +in vec2 fragTexCoord; +in vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Output fragment color +out vec4 finalColor; + +uniform float secondes; + +uniform vec2 size; + +uniform float freqX; +uniform float freqY; +uniform float ampX; +uniform float ampY; +uniform float speedX; +uniform float speedY; + +void main() { + float pixelWidth = 1.0 / size.x; + float pixelHeight = 1.0 / size.y; + float aspect = pixelHeight / pixelWidth; + float boxLeft = 0.0; + float boxTop = 0.0; + + vec2 p = fragTexCoord; + p.x += cos((fragTexCoord.y - boxTop) * freqX / ( pixelWidth * 750.0) + (secondes * speedX)) * ampX * pixelWidth; + p.y += sin((fragTexCoord.x - boxLeft) * freqY * aspect / ( pixelHeight * 750.0) + (secondes * speedY)) * ampY * pixelHeight; + + finalColor = texture(texture0, p)*colDiffuse*fragColor; +} diff --git a/vendor/raylib-cpp/examples/shaders/resources/space.png b/vendor/raylib-cpp/examples/shaders/resources/space.png new file mode 100644 index 0000000..5d016e4 Binary files /dev/null and b/vendor/raylib-cpp/examples/shaders/resources/space.png differ diff --git a/vendor/raylib-cpp/examples/shaders/shaders_texture_waves.cpp b/vendor/raylib-cpp/examples/shaders/shaders_texture_waves.cpp new file mode 100644 index 0000000..4877806 --- /dev/null +++ b/vendor/raylib-cpp/examples/shaders/shaders_texture_waves.cpp @@ -0,0 +1,102 @@ +/******************************************************************************************* +* +* raylib [shaders] example - Texture Waves +* +* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support, +* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version. +* +* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example +* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders +* raylib comes with shaders ready for both versions, check raylib/shaders install folder +* +* This example has been created using raylib 2.5 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5) +* +* Copyright (c) 2019 Anata (@anatagawa) and Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +#if defined(PLATFORM_DESKTOP) + #define GLSL_VERSION 330 +#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB + #define GLSL_VERSION 100 +#endif + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib-cpp [shaders] example - texture waves"); + + // Load texture texture to apply shaders + raylib::Texture2D texture("resources/space.png"); + + // Load shader and setup location points and values + raylib::Shader shader(0, TextFormat("resources/shaders/glsl%i/wave.fs", GLSL_VERSION)); + + int secondsLoc = shader.GetLocation("secondes"); + int freqXLoc = shader.GetLocation("freqX"); + int freqYLoc = shader.GetLocation("freqY"); + int ampXLoc = shader.GetLocation("ampX"); + int ampYLoc = shader.GetLocation("ampY"); + int speedXLoc = shader.GetLocation("speedX"); + int speedYLoc = shader.GetLocation("speedY"); + + // Shader uniform values that can be updated at any time + float freqX = 25.0f; + float freqY = 25.0f; + float ampX = 5.0f; + float ampY = 5.0f; + float speedX = 8.0f; + float speedY = 8.0f; + + float screenSize[2] = { (float)window.GetWidth(), (float)window.GetHeight() }; + shader.SetValue(shader.GetLocation("size"), &screenSize, SHADER_UNIFORM_VEC2); + shader.SetValue(freqXLoc, &freqX, SHADER_UNIFORM_FLOAT); + shader.SetValue(freqYLoc, &freqY, SHADER_UNIFORM_FLOAT); + shader.SetValue(ampXLoc, &X, SHADER_UNIFORM_FLOAT); + shader.SetValue(ampYLoc, &Y, SHADER_UNIFORM_FLOAT); + shader.SetValue(speedXLoc, &speedX, SHADER_UNIFORM_FLOAT); + shader.SetValue(speedYLoc, &speedY, SHADER_UNIFORM_FLOAT); + + float seconds = 0.0f; + + window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second + // ------------------------------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + seconds += GetFrameTime(); + + shader.SetValue(secondsLoc, &seconds, SHADER_UNIFORM_FLOAT); + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + shader.BeginMode(); + + texture.Draw(0, 0, WHITE); + texture.Draw(texture.GetWidth(), 0, WHITE); + + EndShaderMode(); + + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/shapes/resources/shapes_logo_raylib.png b/vendor/raylib-cpp/examples/shapes/resources/shapes_logo_raylib.png new file mode 100644 index 0000000..16c635c Binary files /dev/null and b/vendor/raylib-cpp/examples/shapes/resources/shapes_logo_raylib.png differ diff --git a/vendor/raylib-cpp/examples/shapes/shapes_collision_area.cpp b/vendor/raylib-cpp/examples/shapes/shapes_collision_area.cpp new file mode 100644 index 0000000..8c758bf --- /dev/null +++ b/vendor/raylib-cpp/examples/shapes/shapes_collision_area.cpp @@ -0,0 +1,102 @@ +/******************************************************************************************* +* +* raylib [shapes] example - collision area +* +* This example has been created using raylib 2.5 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +#include // NOLINT + +int main(void) +{ + // Initialization + //--------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [shapes] example - collision area"); + + // Box A: Moving box + raylib::Rectangle boxA(10, GetScreenHeight()/2 - 50, 200, 100); + int boxASpeedX = 4; + + // Box B: Mouse moved box + raylib::Rectangle boxB(GetScreenWidth()/2 - 30, GetScreenHeight()/2 - 30, 60, 60); + + raylib::Rectangle boxCollision(0); // Collision rectangle + + int screenUpperLimit = 40; // Top menu limits + + bool pause = false; // Movement pause + bool collision = false; // Collision detection + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //---------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //----------------------------------------------------- + // Move box if not paused + if (!pause) boxA.x += boxASpeedX; + + // Bounce box on x screen limits + if (((boxA.x + boxA.width) >= GetScreenWidth()) || (boxA.x <= 0)) boxASpeedX *= -1; + + // Update player-controlled-box (box02) + boxB.x = GetMouseX() - boxB.width/2; + boxB.y = GetMouseY() - boxB.height/2; + + // Make sure Box B does not go out of move area limits + if ((boxB.x + boxB.width) >= GetScreenWidth()) boxB.x = GetScreenWidth() - boxB.width; + else if (boxB.x <= 0) boxB.x = 0; + + if ((boxB.y + boxB.height) >= GetScreenHeight()) boxB.y = GetScreenHeight() - boxB.height; + else if (boxB.y <= screenUpperLimit) boxB.y = screenUpperLimit; + + // Check boxes collision + collision = boxA.CheckCollision(boxB); + + // Get collision rectangle (only on collision) + if (collision) boxCollision = boxA.GetCollision(boxB); + + // Pause Box A movement + if (IsKeyPressed(KEY_SPACE)) pause = !pause; + //----------------------------------------------------- + + // Draw + //----------------------------------------------------- + BeginDrawing(); + + window.ClearBackground(RAYWHITE); + + DrawRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK); + + boxA.Draw(GOLD); + boxB.Draw(BLUE); + + if (collision) { + // Draw collision area + boxCollision.Draw(LIME); + + // Draw collision message + raylib::DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK); + + // Draw collision area + raylib::DrawText(TextFormat("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK); + } + + DrawFPS(10, 10); + + EndDrawing(); + //----------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/shapes/shapes_logo_raylib.cpp b/vendor/raylib-cpp/examples/shapes/shapes_logo_raylib.cpp new file mode 100644 index 0000000..82bd59a --- /dev/null +++ b/vendor/raylib-cpp/examples/shapes/shapes_logo_raylib.cpp @@ -0,0 +1,52 @@ +/******************************************************************************************* +* +* raylib [shapes] example - Draw raylib logo using basic shapes +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [shapes] example - raylib logo using shapes"); + raylib::Color foreground(0, 68, 130); + raylib::Color background = RAYWHITE; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(background); + + foreground.DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256); + background.DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224); + foreground.DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 24, 50); + foreground.DrawText("cpp", screenWidth/2 - 74, screenHeight/2 + 54, 50); + + DrawText("this is NOT a texture!", 350, 370, 10, GRAY); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/text/resources/KAISG.ttf b/vendor/raylib-cpp/examples/text/resources/KAISG.ttf new file mode 100644 index 0000000..04478b2 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/KAISG.ttf differ diff --git a/vendor/raylib-cpp/examples/text/resources/LICENSE b/vendor/raylib-cpp/examples/text/resources/LICENSE new file mode 100644 index 0000000..25b1540 --- /dev/null +++ b/vendor/raylib-cpp/examples/text/resources/LICENSE @@ -0,0 +1,16 @@ +All fonts used in examples are provided under a free and permissive license. +Check individual licenses for details: + + - [Alpha Beta] by Brian Kent (AEnigma) - https://www.dafont.com/es/alpha-beta.font + - [Setback] by Brian Kent (AEnigma) - https://www.dafont.com/es/setback.font + - [Jupiter Crash] by Brian Kent (AEnigma) - https://www.dafont.com/es/jupiter-crash.font + - [Alagard] by Hewett Tsoi - https://www.dafont.com/es/alagard.font + - [Romulus] by Hewett Tsoi - https://www.dafont.com/es/romulus.font + - [Mecha] by Captain Falcon - https://www.dafont.com/es/mecha-cf.font + - [PixelPlay] by Aleksander Shevchuk - https://www.dafont.com/es/pixelplay.font + - [PixAntiqua] by Gerhard Großmann - https://www.dafont.com/es/pixantiqua.font + - [Kaiserzeit Gotisch] by Dieter Steffmann - https://www.dafont.com/es/kaiserzeit-gotisch.font + - [Noto CJK] by Google Fonts - https://www.google.com/get/noto/help/cjk/ + - [Anonymous Pro] by Mark Simonson - https://fonts.google.com/specimen/Anonymous+Pro + - [DejaVu] by DejaVu Fonts - https://dejavu-fonts.github.io/ + - [Symbola] by George Douros - https://fontlibrary.org/en/font/symbola diff --git a/vendor/raylib-cpp/examples/text/resources/custom_alagard.png b/vendor/raylib-cpp/examples/text/resources/custom_alagard.png new file mode 100644 index 0000000..bbe688e Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/custom_alagard.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/custom_jupiter_crash.png b/vendor/raylib-cpp/examples/text/resources/custom_jupiter_crash.png new file mode 100644 index 0000000..c89572e Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/custom_jupiter_crash.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/custom_mecha.png b/vendor/raylib-cpp/examples/text/resources/custom_mecha.png new file mode 100644 index 0000000..5e20313 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/custom_mecha.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/alagard.png b/vendor/raylib-cpp/examples/text/resources/fonts/alagard.png new file mode 100644 index 0000000..c0c5427 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/alagard.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/alpha_beta.png b/vendor/raylib-cpp/examples/text/resources/fonts/alpha_beta.png new file mode 100644 index 0000000..8a0c273 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/alpha_beta.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/jupiter_crash.png b/vendor/raylib-cpp/examples/text/resources/fonts/jupiter_crash.png new file mode 100644 index 0000000..4972c02 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/jupiter_crash.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/mecha.png b/vendor/raylib-cpp/examples/text/resources/fonts/mecha.png new file mode 100644 index 0000000..9213fa2 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/mecha.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/pixantiqua.png b/vendor/raylib-cpp/examples/text/resources/fonts/pixantiqua.png new file mode 100644 index 0000000..17ad1ab Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/pixantiqua.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/pixelplay.png b/vendor/raylib-cpp/examples/text/resources/fonts/pixelplay.png new file mode 100644 index 0000000..fbf6430 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/pixelplay.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/romulus.png b/vendor/raylib-cpp/examples/text/resources/fonts/romulus.png new file mode 100644 index 0000000..648aa8b Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/romulus.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/fonts/setback.png b/vendor/raylib-cpp/examples/text/resources/fonts/setback.png new file mode 100644 index 0000000..1630a73 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/fonts/setback.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/pixantiqua.fnt b/vendor/raylib-cpp/examples/text/resources/pixantiqua.fnt new file mode 100644 index 0000000..fd9f9db --- /dev/null +++ b/vendor/raylib-cpp/examples/text/resources/pixantiqua.fnt @@ -0,0 +1,188 @@ +info face="PixAntiqua" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=2,2,2,2 spacing=2,2 outline=0 +common lineHeight=32 base=27 scaleW=512 scaleH=512 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4 +page id=0 file="pixantiqua.png" +chars count=184 +char id=32 x=9 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=33 x=391 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=34 x=240 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=35 x=468 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=36 x=152 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=37 x=176 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=38 x=303 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=39 x=495 y=266 width=8 height=36 xoffset=-3 yoffset=-2 xadvance=5 page=0 chnl=15 +char id=40 x=256 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=199 x=432 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=200 x=126 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=201 x=147 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=202 x=288 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=203 x=189 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=204 x=468 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=205 x=486 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=206 x=0 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=207 x=72 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=208 x=329 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=209 x=277 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=210 x=182 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=211 x=26 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=41 x=272 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=42 x=288 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=43 x=414 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=44 x=378 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=45 x=414 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=46 x=443 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=47 x=392 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=48 x=485 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=49 x=450 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=50 x=21 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=51 x=42 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=59 x=456 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=60 x=168 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=61 x=309 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=62 x=336 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=63 x=315 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=64 x=364 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=65 x=390 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=66 x=120 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=67 x=144 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=68 x=168 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=69 x=294 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=52 x=488 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=53 x=63 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=54 x=24 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=55 x=48 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=56 x=72 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=57 x=96 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=58 x=404 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=70 x=252 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=71 x=192 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=72 x=78 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=78 x=78 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=79 x=355 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=80 x=264 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=81 x=381 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=82 x=288 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=83 x=312 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=91 x=144 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=92 x=108 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=93 x=304 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=94 x=34 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 +char id=95 x=231 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=96 x=442 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=97 x=408 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=98 x=432 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=99 x=210 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=84 x=336 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=85 x=360 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=86 x=0 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=87 x=68 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 +char id=88 x=26 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=89 x=384 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=90 x=84 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=100 x=456 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=101 x=480 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=102 x=54 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=103 x=0 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=104 x=24 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=105 x=469 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=106 x=18 y=266 width=16 height=36 xoffset=-8 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=107 x=48 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=108 x=417 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=109 x=161 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 +char id=110 x=72 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=111 x=96 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=117 x=192 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=118 x=216 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=119 x=248 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 +char id=120 x=240 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=121 x=264 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=122 x=288 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=123 x=432 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=124 x=365 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=125 x=378 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=126 x=393 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=127 x=132 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 +char id=160 x=0 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=161 x=352 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=162 x=351 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=163 x=336 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=165 x=360 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=167 x=384 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=169 x=433 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=170 x=224 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=171 x=105 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=172 x=0 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 +char id=173 x=494 y=38 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=174 x=52 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=175 x=52 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=176 x=126 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=177 x=435 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=178 x=320 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=179 x=336 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=181 x=459 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=112 x=120 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=113 x=144 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=114 x=396 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=115 x=168 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=116 x=36 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=182 x=408 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=183 x=498 y=190 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=185 x=192 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=186 x=208 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=187 x=477 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=191 x=456 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=192 x=407 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=193 x=234 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=194 x=416 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=195 x=156 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=196 x=130 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=197 x=104 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=198 x=190 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 +char id=212 x=0 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=213 x=338 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=214 x=312 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=215 x=357 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=216 x=286 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=217 x=456 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=218 x=480 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=219 x=0 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=220 x=24 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=221 x=48 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=222 x=260 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=223 x=72 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=224 x=96 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=225 x=120 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=226 x=144 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=227 x=168 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=228 x=192 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=229 x=216 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=230 x=219 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 +char id=231 x=372 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=73 x=90 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 +char id=74 x=216 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=75 x=240 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=76 x=273 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=77 x=100 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 +char id=232 x=312 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=233 x=240 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=234 x=264 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=235 x=104 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=236 x=430 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=237 x=482 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=238 x=160 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 +char id=239 x=176 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 +char id=240 x=128 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=241 x=200 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=242 x=224 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=243 x=248 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=244 x=272 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=245 x=296 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=246 x=320 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=247 x=330 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=248 x=208 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 +char id=249 x=344 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=250 x=368 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=251 x=416 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=252 x=440 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=253 x=464 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 +char id=254 x=0 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 +char id=255 x=0 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 diff --git a/vendor/raylib-cpp/examples/text/resources/pixantiqua.png b/vendor/raylib-cpp/examples/text/resources/pixantiqua.png new file mode 100644 index 0000000..2aa2870 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/pixantiqua.png differ diff --git a/vendor/raylib-cpp/examples/text/resources/pixantiqua.ttf b/vendor/raylib-cpp/examples/text/resources/pixantiqua.ttf new file mode 100644 index 0000000..e012875 Binary files /dev/null and b/vendor/raylib-cpp/examples/text/resources/pixantiqua.ttf differ diff --git a/vendor/raylib-cpp/examples/text/text_font_filters.cpp b/vendor/raylib-cpp/examples/text/text_font_filters.cpp new file mode 100644 index 0000000..ce5679c --- /dev/null +++ b/vendor/raylib-cpp/examples/text/text_font_filters.cpp @@ -0,0 +1,114 @@ +/******************************************************************************************* +* +* raylib [text] example - Font filters +* +* After font loading, font texture atlas filter could be configured for a softer +* display of the font when scaling it to different sizes, that way, it's not required +* to generate multiple fonts at multiple sizes (as long as the scaling is not very different) +* +* This example has been created using raylib 1.3.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [text] example - font filters"); + + // TTF Font loading with custom generation parameters + raylib::Font font("resources/KAISG.ttf", 96); + + // Generate mipmap levels to use trilinear filtering + // NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR + font.GetTexture().GenMipmaps(); + + raylib::Text msg("Loaded Font", font.GetBaseSize(), BLACK, font); + + Vector2 fontPosition = { 40.0f, screenHeight/2.0f - 80.0f }; + Vector2 textSize = { 0.0f, 0.0f }; + + // Setup texture scaling filter + font.GetTexture().SetFilter(TEXTURE_FILTER_POINT); + int currentFontFilter = 0; // TEXTURE_FILTER_POINT + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + msg.fontSize += GetMouseWheelMove() * 4.0f; + + // Choose font texture filter method + if (IsKeyPressed(KEY_ONE)) + { + font.GetTexture().SetFilter(TEXTURE_FILTER_POINT); + currentFontFilter = 0; + } + else if (IsKeyPressed(KEY_TWO)) + { + font.GetTexture().SetFilter(TEXTURE_FILTER_BILINEAR); + currentFontFilter = 1; + } + else if (IsKeyPressed(KEY_THREE)) + { + // NOTE: Trilinear filter won't be noticed on 2D drawing + font.GetTexture().SetFilter(TEXTURE_FILTER_TRILINEAR); + currentFontFilter = 2; + } + + textSize = msg.MeasureEx(); + + if (IsKeyDown(KEY_LEFT)) fontPosition.x -= 10; + else if (IsKeyDown(KEY_RIGHT)) fontPosition.x += 10; + + // Load a dropped TTF file dynamically (at current fontSize) + for (const auto& file : raylib::LoadDroppedFiles()) { + if (raylib::IsFileExtension(file, ".ttf")) { + msg.font = font = raylib::Font(file, font.GetBaseSize()); + } + } + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + DrawText("Use mouse wheel to change font size", 20, 20, 10, GRAY); + DrawText("Use KEY_RIGHT and KEY_LEFT to move text", 20, 40, 10, GRAY); + DrawText("Use 1, 2, 3 to change texture filter", 20, 60, 10, GRAY); + DrawText("Drop a new TTF font for dynamic loading", 20, 80, 10, DARKGRAY); + + msg.Draw(fontPosition); + + // TODO: It seems texSize measurement is not accurate due to chars offsets... + //DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED); + + DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY); + DrawText(TextFormat("Font size: %02.02f", msg.GetFontSize()), 20, screenHeight - 50, 10, DARKGRAY); + DrawText(TextFormat("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY); + DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY); + + if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK); + else if (currentFontFilter == 1) DrawText("BILINEAR", 570, 400, 20, BLACK); + else if (currentFontFilter == 2) DrawText("TRILINEAR", 570, 400, 20, BLACK); + + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/text/text_font_loading.cpp b/vendor/raylib-cpp/examples/text/text_font_loading.cpp new file mode 100644 index 0000000..31f0dfd --- /dev/null +++ b/vendor/raylib-cpp/examples/text/text_font_loading.cpp @@ -0,0 +1,83 @@ +/******************************************************************************************* +* +* raylib [text] example - Font loading +* +* raylib can load fonts from multiple file formats: +* +* - TTF/OTF > Sprite font atlas is generated on loading, user can configure +* some of the generation parameters (size, characters to include) +* - BMFonts > Angel code font fileformat, sprite font image must be provided +* together with the .fnt file, font generation cna not be configured +* - XNA Spritefont > Sprite font image, following XNA Spritefont conventions, +* Characters in image must follow some spacing and order rules +* +* This example has been created using raylib 2.6 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2016-2019 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [text] example - font loading"); + + // Define characters to draw + // NOTE: raylib supports UTF-8 encoding, following list is actually codified as UTF8 internally + std::string msg = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI\nJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmn\nopqrstuvwxyz{|}~¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓ\nÔÕÖרÙÚÛÜÃÞßàáâãäåæçèéêëìíîïðñòóôõö÷\nøùúûüýþÿ"; + + // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) + + // BMFont (AngelCode) : Font data and image atlas have been generated using external program + raylib::Font fontBm("resources/pixantiqua.fnt"); + + // TTF font : Font data and atlas are generated directly from TTF + // NOTE: We define a font base size of 32 pixels tall and up-to 250 characters + raylib::Font fontTtf("resources/pixantiqua.ttf", 32, 0, 250); + + bool useTtf = false; + + window.SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + if (IsKeyDown(KEY_SPACE)) useTtf = true; + else useTtf = false; + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + window.BeginDrawing(); + { + + window.ClearBackground(RAYWHITE); + + raylib::DrawText("Hold SPACE to use TTF generated font", 20, 20, 20, LIGHTGRAY); + + if (!useTtf) + { + fontBm.DrawText(msg, Vector2{ 20.0f, 100.0f }, fontBm.baseSize, 2, MAROON); + raylib::DrawText("Using BMFont (Angelcode) imported", 20, GetScreenHeight() - 30, 20, GRAY); + } + else + { + fontTtf.DrawText(msg, Vector2{ 20.0f, 100.0f }, fontTtf.baseSize, 2, LIME); + raylib::DrawText("Using TTF font generated", 20, GetScreenHeight() - 30, 20, GRAY); + } + } + window.EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/text/text_font_spritefont.cpp b/vendor/raylib-cpp/examples/text/text_font_spritefont.cpp new file mode 100644 index 0000000..f7e2c33 --- /dev/null +++ b/vendor/raylib-cpp/examples/text/text_font_spritefont.cpp @@ -0,0 +1,68 @@ +/******************************************************************************************* +* +* raylib [text] example - Font loading and usage +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include + +#include "raylib-cpp.hpp" + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [text] example - sprite fonts usage"); + + std::string msg1 = "THIS IS A custom SPRITE FONT..."; + std::string msg2 = "...and this is ANOTHER CUSTOM font..."; + std::string msg3 = "...and a THIRD one! GREAT! :D"; + + // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) + raylib::Font font1("resources/custom_mecha.png"); // Font loading + raylib::Font font2("resources/custom_alagard.png"); // Font loading + raylib::Font font3("resources/custom_jupiter_crash.png"); // Font loading + + raylib::Vector2 fontPosition1(screenWidth/2 - MeasureTextEx(font1, msg1.c_str(), font1.baseSize, -3).x/2, + screenHeight/2 - font1.baseSize/2 - 80); + + raylib::Vector2 fontPosition2(screenWidth/2 - MeasureTextEx(font2, msg2.c_str(), font2.baseSize, -2).x/2, + screenHeight/2 - font2.baseSize/2 - 10); + + raylib::Vector2 fontPosition3(screenWidth/2 - MeasureTextEx(font3, msg3.c_str(), font3.baseSize, 2).x/2, + screenHeight/2 - font3.baseSize/2 + 50); + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // TODO: Update variables here... + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + font1.DrawText(msg1, fontPosition1, font1.baseSize, -3); + font2.DrawText(msg2, fontPosition2, font2.baseSize, -2); + font3.DrawText(msg3, fontPosition3, font3.baseSize, 2); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/text/text_raylib_fonts.cpp b/vendor/raylib-cpp/examples/text/text_raylib_fonts.cpp new file mode 100644 index 0000000..be354aa --- /dev/null +++ b/vendor/raylib-cpp/examples/text/text_raylib_fonts.cpp @@ -0,0 +1,99 @@ +/******************************************************************************************* +* +* raylib [text] example - raylib font loading and usage +* +* NOTE: raylib is distributed with some free to use fonts (even for commercial pourposes!) +* To view details and credits for those fonts, check raylib license file +* +* This example has been created using raylib 1.7 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2017 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include +#include + +#include "raylib-cpp.hpp" + +#define MAX_FONTS 8 + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + int screenWidth = 800; + int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [text] example - raylib fonts"); + raylib::Color textColor = DARKGRAY; + + // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) + std::array fonts = { + raylib::Font("resources/fonts/alagard.png"), + raylib::Font("resources/fonts/pixelplay.png"), + raylib::Font("resources/fonts/mecha.png"), + raylib::Font("resources/fonts/setback.png"), + raylib::Font("resources/fonts/romulus.png"), + raylib::Font("resources/fonts/pixantiqua.png"), + raylib::Font("resources/fonts/alpha_beta.png"), + raylib::Font("resources/fonts/jupiter_crash.png") + }; + + std::array messages = { + "ALAGARD FONT designed by Hewett Tsoi", + "PIXELPLAY FONT designed by Aleksander Shevchuk", + "MECHA FONT designed by Captain Falcon", + "SETBACK FONT designed by Brian Kent (AEnigma)", + "ROMULUS FONT designed by Hewett Tsoi", + "PIXANTIQUA FONT designed by Gerhard Grossmann", + "ALPHA_BETA FONT designed by Brian Kent (AEnigma)", + "JUPITER_CRASH FONT designed by Brian Kent (AEnigma)" + }; + + std::array spacings = { 2, 4, 8, 4, 3, 4, 4, 1 }; + + std::array positions; + + for (int i = 0; i < fonts.size(); i++) + { + auto size = fonts[i].MeasureText(messages[i], fonts[i].baseSize * 2, spacings[i]); + positions[i].x = screenWidth/2 - size.x/2; + positions[i].y = 60 + fonts[i].baseSize + 45*i; + } + + // Small Y position corrections + positions[3].y += 8; + positions[4].y += 2; + positions[7].y -= 8; + + std::array colors = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD, RED }; + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + textColor.DrawText("free fonts included with raylib", 250, 20, 20); + textColor.DrawLine(220, 50, 590, 50); + + for (int i = 0; i < fonts.size(); i++) + { + fonts[i].DrawText(messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]); + } + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/textures/resources/KAISG.ttf b/vendor/raylib-cpp/examples/textures/resources/KAISG.ttf new file mode 100644 index 0000000..04478b2 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/KAISG.ttf differ diff --git a/vendor/raylib-cpp/examples/textures/resources/LICENSE b/vendor/raylib-cpp/examples/textures/resources/LICENSE new file mode 100644 index 0000000..16cdfa3 --- /dev/null +++ b/vendor/raylib-cpp/examples/textures/resources/LICENSE @@ -0,0 +1,8 @@ +Art used in examples is provided under a free and permissive license. +Check individual licenses for details: + + - [Jupiter Crash] font by Brian Kent (AEnigma) - https://www.dafont.com/es/jupiter-crash.font + - [Kaiserzeit Gotisch] font by Dieter Steffmann - https://www.dafont.com/es/kaiserzeit-gotisch.font + - [Scarfy spritesheet](scarfy.png) by [Eiden Marsal](https://www.artstation.com/artist/marshall_z), licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode) + - [Fudesumi image](fudesumi.png) by [Eiden Marsal](https://www.artstation.com/artist/marshall_z), licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode) + - [Cyberpunk Street Environment](https://ansimuz.itch.io/cyberpunk-street-environment) by Luis Zuno ([@ansimuz](https://twitter.com/ansimuz)), licensed as [CC-BY-3.0](http://creativecommons.org/licenses/by/3.0/) diff --git a/vendor/raylib-cpp/examples/textures/resources/boom.wav b/vendor/raylib-cpp/examples/textures/resources/boom.wav new file mode 100644 index 0000000..fd18137 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/boom.wav differ diff --git a/vendor/raylib-cpp/examples/textures/resources/button.png b/vendor/raylib-cpp/examples/textures/resources/button.png new file mode 100644 index 0000000..99a383b Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/button.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/buttonfx.wav b/vendor/raylib-cpp/examples/textures/resources/buttonfx.wav new file mode 100644 index 0000000..b93b0ca Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/buttonfx.wav differ diff --git a/vendor/raylib-cpp/examples/textures/resources/cat.png b/vendor/raylib-cpp/examples/textures/resources/cat.png new file mode 100644 index 0000000..db56b9e Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/cat.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/custom_jupiter_crash.png b/vendor/raylib-cpp/examples/textures/resources/custom_jupiter_crash.png new file mode 100644 index 0000000..c89572e Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/custom_jupiter_crash.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_background.png b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_background.png new file mode 100644 index 0000000..838d08a Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_background.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_foreground.png b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_foreground.png new file mode 100644 index 0000000..528b4ae Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_foreground.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_midground.png b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_midground.png new file mode 100644 index 0000000..73f24fe Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/cyberpunk_street_midground.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/explosion.png b/vendor/raylib-cpp/examples/textures/resources/explosion.png new file mode 100644 index 0000000..6df1cf3 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/explosion.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/fudesumi.png b/vendor/raylib-cpp/examples/textures/resources/fudesumi.png new file mode 100644 index 0000000..c77c287 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/fudesumi.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/fudesumi.raw b/vendor/raylib-cpp/examples/textures/resources/fudesumi.raw new file mode 100644 index 0000000..dad6ff0 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/fudesumi.raw differ diff --git a/vendor/raylib-cpp/examples/textures/resources/ninepatch_button.png b/vendor/raylib-cpp/examples/textures/resources/ninepatch_button.png new file mode 100644 index 0000000..f10037a Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/ninepatch_button.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/parrots.png b/vendor/raylib-cpp/examples/textures/resources/parrots.png new file mode 100644 index 0000000..9a0e7f8 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/parrots.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/patterns.png b/vendor/raylib-cpp/examples/textures/resources/patterns.png new file mode 100644 index 0000000..58b3c37 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/patterns.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/raylib_logo.png b/vendor/raylib-cpp/examples/textures/resources/raylib_logo.png new file mode 100644 index 0000000..15bbaa2 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/raylib_logo.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/scarfy.png b/vendor/raylib-cpp/examples/textures/resources/scarfy.png new file mode 100644 index 0000000..be3b83d Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/scarfy.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/smoke.png b/vendor/raylib-cpp/examples/textures/resources/smoke.png new file mode 100644 index 0000000..7bad8c6 Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/smoke.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/spark_flame.png b/vendor/raylib-cpp/examples/textures/resources/spark_flame.png new file mode 100644 index 0000000..72cea2e Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/spark_flame.png differ diff --git a/vendor/raylib-cpp/examples/textures/resources/wabbit_alpha.png b/vendor/raylib-cpp/examples/textures/resources/wabbit_alpha.png new file mode 100644 index 0000000..db4081f Binary files /dev/null and b/vendor/raylib-cpp/examples/textures/resources/wabbit_alpha.png differ diff --git a/vendor/raylib-cpp/examples/textures/textures_bunnymark.cpp b/vendor/raylib-cpp/examples/textures/textures_bunnymark.cpp new file mode 100644 index 0000000..34975d6 --- /dev/null +++ b/vendor/raylib-cpp/examples/textures/textures_bunnymark.cpp @@ -0,0 +1,109 @@ +/******************************************************************************************* +* +* raylib [textures] example - Bunnymark +* +* This example has been created using raylib 1.6 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include + +#include "raylib-cpp.hpp" + +// This is the maximum amount of elements (quads) per batch +// NOTE: This value is defined in [rlgl] module and can be changed there +#define MAX_BATCH_ELEMENTS 8192 + +class Bunny { + public: + Bunny() { + position = GetMousePosition(); + speed.x = static_cast(GetRandomValue(-250, 250)) / 60.0f; + speed.y = static_cast(GetRandomValue(-250, 250)) / 60.0f; + color = raylib::Color( + GetRandomValue(50, 240), + GetRandomValue(80, 240), + GetRandomValue(100, 240)); + } + + void Update(const raylib::Texture2D& texBunny) { + position.x += speed.x; + position.y += speed.y; + + if (((position.x + texBunny.width/2) > GetScreenWidth()) || + ((position.x + texBunny.width/2) < 0)) speed.x *= -1; + if (((position.y + texBunny.height/2) > GetScreenHeight()) || + ((position.y + texBunny.height/2 - 40) < 0)) speed.y *= -1; + } + + Vector2 position; + Vector2 speed; + Color color; +}; + +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - bunnymark"); + + // Load bunny texture + raylib::Texture2D texBunny("resources/wabbit_alpha.png"); + + std::list bunnies; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) { + // Create more bunnies + for (int i = 0; i < 100; i++) { + bunnies.emplace_back(); + } + } + + // Update bunnies + + for (Bunny& bunny: bunnies) { + bunny.Update(texBunny); + } + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + for (Bunny& bunny : bunnies) { + // NOTE: When internal batch buffer limit is reached (MAX_BATCH_ELEMENTS), + // a draw call is launched and buffer starts being filled again; + // before issuing a draw call, updated vertex data from internal CPU buffer is send to GPU... + // Process of sending data is costly and it could happen that GPU data has not been completely + // processed for drawing while new data is tried to be sent (updating current in-use buffers) + // it could generates a stall and consequently a frame drop, limiting the number of drawn bunnies + texBunny.Draw(bunny.position, bunny.color); + } + + DrawRectangle(0, 0, screenWidth, 40, BLACK); + raylib::DrawText(TextFormat("bunnies: %i", bunnies.size()), 120, 10, 20, GREEN); + raylib::DrawText(TextFormat("batched draw calls: %i", 1 + bunnies.size()/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON); + + DrawFPS(10, 10); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/textures/textures_image_drawing.cpp b/vendor/raylib-cpp/examples/textures/textures_image_drawing.cpp new file mode 100644 index 0000000..b453833 --- /dev/null +++ b/vendor/raylib-cpp/examples/textures/textures_image_drawing.cpp @@ -0,0 +1,80 @@ +/******************************************************************************************* +* +* raylib [textures] example - Image loading and drawing on it +* +* NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM) +* +* This example has been created using raylib 1.4 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2016 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main(void) { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - image drawing"); + raylib::Color darkGray = DARKGRAY; + + // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) + raylib::Image cat("resources/cat.png"); // Load image in CPU memory (RAM) + cat.Crop(raylib::Rectangle(100, 10, 280, 380)) // Crop an image piece + .FlipHorizontal() // Flip cropped image horizontally + .Resize(150, 200); // Resize flipped-cropped image + + raylib::Image parrots("resources/parrots.png"); // Load image in CPU memory (RAM) + + // Draw one image over the other with a scaling of 1.5f + parrots + .Draw(cat, + raylib::Rectangle(0, 0, cat.GetWidth(), cat.GetHeight()), + raylib::Rectangle(30, 40, cat.GetWidth() * 1.5f, cat.GetHeight() * 1.5f)); + parrots.Crop(raylib::Rectangle(0, 50, parrots.GetWidth(), parrots.GetHeight() - 100)); // Crop resulting image + + // Load custom font for frawing on image + raylib::Font font("resources/custom_jupiter_crash.png"); + + // Draw over image using custom font + parrots.DrawText(font, "PARROTS & CAT", raylib::Vector2(300, 230), font.baseSize, -2); + + raylib::Texture2D texture(parrots); // Image converted to texture, uploaded to GPU memory (VRAM) + + SetTargetFPS(60); + //--------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(RAYWHITE); + + texture.Draw(screenWidth / 2 - texture.width / 2, + screenHeight / 2 - texture.height / 2 - 40); + darkGray.DrawRectangleLines(screenWidth / 2 - texture.width / 2, + screenHeight / 2 - texture.height / 2 - 40, + texture.width, texture.height); + + darkGray.DrawText("We are drawing only one texture from various images composed!", + 240, 350, 10); + darkGray.DrawText("Source images have been cropped, scaled, flipped and copied one over the other.", + 190, 370, 10); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/examples/textures/textures_image_loading.cpp b/vendor/raylib-cpp/examples/textures/textures_image_loading.cpp new file mode 100644 index 0000000..68b019e --- /dev/null +++ b/vendor/raylib-cpp/examples/textures/textures_image_loading.cpp @@ -0,0 +1,48 @@ +/******************************************************************************************* +* +* raylib [textures] example - Image loading and texture creation +* +* NOTE: Images are loaded in CPU memory (RAM); textures are loaded in GPU memory (VRAM) +* +* This example has been created using raylib 1.3 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +int main() { + // Initialization + //-------------------------------------------------------------------------------------- + int screenWidth = 800; + int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib [textures] example - image loading"); + raylib::Texture texture("resources/raylib_logo.png"); + raylib::Color textColor = raylib::Color::LightGray(); + + // Main game loop + while (!window.ShouldClose()) { // Detect window close button or ESC key + // Update + //---------------------------------------------------------------------------------- + // Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + { + window.ClearBackground(raylib::Color::RayWhite()); + + texture.Draw(screenWidth / 2 - texture.GetWidth() / 2, screenHeight / 2 - texture.GetHeight() / 2); + + textColor.DrawText("this IS a texture loaded from an image!", 300, 370, 10); + } + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + return 0; +} diff --git a/vendor/raylib-cpp/package.json b/vendor/raylib-cpp/package.json new file mode 100644 index 0000000..3f9b0d7 --- /dev/null +++ b/vendor/raylib-cpp/package.json @@ -0,0 +1,35 @@ +{ + "name": "raylib-cpp", + "version": "5.0.2", + "description": "raylib-cpp: C++ Object-Oriented Wrapper for raylib", + "main": "index.js", + "private": true, + "directories": { + "doc": "docs", + "example": "examples", + "test": "tests" + }, + "scripts": { + "prebuild": "cmake -S . -B build", + "build": "cmake --build build", + "test": "build/tests/raylib_cpp_test", + "pretest": "npm run build", + "deploy": "gh-pages -d docs", + "predeploy": "npm run docs", + "docs": "doxygen projects/Doxygen/Doxyfile", + "predocs": "git submodule update --init" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/RobLoach/raylib-cpp.git" + }, + "author": "Rob Loach (https://robloach.net)", + "license": "Zlib", + "bugs": { + "url": "https://github.com/RobLoach/raylib-cpp/issues" + }, + "homepage": "https://github.com/RobLoach/raylib-cpp#readme", + "devDependencies": { + "gh-pages": "^6.1.1" + } +} diff --git a/vendor/raylib-cpp/projects/CMake/.gitignore b/vendor/raylib-cpp/projects/CMake/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/vendor/raylib-cpp/projects/CMake/.gitignore @@ -0,0 +1 @@ +/build diff --git a/vendor/raylib-cpp/projects/CMake/CMakeLists.txt b/vendor/raylib-cpp/projects/CMake/CMakeLists.txt new file mode 100644 index 0000000..a02607b --- /dev/null +++ b/vendor/raylib-cpp/projects/CMake/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.14) +project(raylib_cpp_example) + +# raylib +find_package(raylib QUIET) +if (NOT raylib_FOUND) + include(FetchContent) + FetchContent_Declare( + raylib + GIT_REPOSITORY https://github.com/raysan5/raylib.git + GIT_TAG 5.0 + GIT_SHALLOW 1 + ) + FetchContent_MakeAvailable(raylib) +endif() + +# raylib-cpp +find_package(raylib_cpp QUIET) +if (NOT raylib_cpp_FOUND) + if (NOT DEFINED RAYLIB_CPP_VERSION) + set(RAYLIB_CPP_VERSION v5.0.2) + endif() + include(FetchContent) + FetchContent_Declare( + raylib_cpp + GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git + GIT_TAG ${RAYLIB_CPP_VERSION} + ) + FetchContent_MakeAvailable(raylib_cpp) +endif() + +# This is the main part: +set(SOURCES main.cpp) +add_executable(${PROJECT_NAME} ${SOURCES}) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PUBLIC raylib raylib_cpp) + +# Web Configurations +if (${PLATFORM} STREQUAL "Web") + # Tell Emscripten to build an example.html file. + set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".html") + + # Required linker flags for using Raylib with Emscripten + target_link_options(${PROJECT_NAME} PRIVATE -sEXPORTED_FUNCTIONS=['_main','_malloc'] -sEXPORTED_RUNTIME_METHODS=ccall -sUSE_GLFW=3) +endif() + +# That's it! You should have an example executable that you can run. Have fun! diff --git a/vendor/raylib-cpp/projects/CMake/README.md b/vendor/raylib-cpp/projects/CMake/README.md new file mode 100644 index 0000000..e3d99de --- /dev/null +++ b/vendor/raylib-cpp/projects/CMake/README.md @@ -0,0 +1,31 @@ +# raylib-cpp CMake Example Project + +Use this template to build a [raylib-cpp](https://github.com/RobLoach/raylib-cpp) project using [CMake](https://cmake.org). + +## Build + +To build this project, make sure to have CMake installed locally. + +### Desktop + +``` +mkdir build +cd build +cmake .. +make +``` + +### Web + +``` +mkdir build +cd build +emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release +emmake make +``` + +## Run + +``` +./raylib-cpp-example +``` diff --git a/vendor/raylib-cpp/projects/CMake/main.cpp b/vendor/raylib-cpp/projects/CMake/main.cpp new file mode 100644 index 0000000..e928af0 --- /dev/null +++ b/vendor/raylib-cpp/projects/CMake/main.cpp @@ -0,0 +1,78 @@ +/******************************************************************************************* +* +* raylib-cpp [core] example - Basic window (adapted for HTML5 platform) +* +* This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI +* As you will notice, code structure is slightly diferent to the other examples... +* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning +* +* This example has been created using raylib-cpp (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2015 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib-cpp.hpp" + +#if defined(PLATFORM_WEB) + #include +#endif + +//---------------------------------------------------------------------------------- +// Global Variables Definition +//---------------------------------------------------------------------------------- +int screenWidth = 800; +int screenHeight = 450; + +//---------------------------------------------------------------------------------- +// Module Functions Declaration +//---------------------------------------------------------------------------------- +void UpdateDrawFrame(void); // Update and Draw one frame + +//---------------------------------------------------------------------------------- +// Main Enry Point +//---------------------------------------------------------------------------------- +int main() +{ + // Initialization + //-------------------------------------------------------------------------------------- + raylib::Window window(screenWidth, screenHeight, "raylib-cpp [core] example - basic window"); + +#if defined(PLATFORM_WEB) + emscripten_set_main_loop(UpdateDrawFrame, 0, 1); +#else + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!window.ShouldClose()) // Detect window close button or ESC key + { + UpdateDrawFrame(); + } +#endif + + return 0; +} + +//---------------------------------------------------------------------------------- +// Module Functions Definition +//---------------------------------------------------------------------------------- +void UpdateDrawFrame(void) +{ + // Update + //---------------------------------------------------------------------------------- + // TODO: Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + DrawText("Congrats! You created your first raylib-cpp window!", 160, 200, 20, LIGHTGRAY); + + EndDrawing(); + //---------------------------------------------------------------------------------- +} diff --git a/vendor/raylib-cpp/projects/Doxygen/Doxyfile b/vendor/raylib-cpp/projects/Doxygen/Doxyfile new file mode 100644 index 0000000..01b882b --- /dev/null +++ b/vendor/raylib-cpp/projects/Doxygen/Doxyfile @@ -0,0 +1,2310 @@ +# Doxyfile 1.8.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "raylib-cpp" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "C++ object-oriented wrapper library for raylib." + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = projects/Doxygen/raylib-cpp_55x55.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +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 = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +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 +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: 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 +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = NO + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= NO + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = NO + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = vendor + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +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 +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: 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 +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = . + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = projects/Doxygen/doxygen-awesome-css/doxygen-awesome.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /