diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:27:01 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:27:01 +0200 |
commit | 080ad535e6fc6666b919b1a21b6986aaf9b678eb (patch) | |
tree | f4d96cb68769ddd06087977ad7d26c3fd31ff4e8 | |
parent | de356f60b91fab37b1456992dc66ada8bd8e4dd7 (diff) |
initial nitpicking
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | asset/tiled/images/tilemap/license (renamed from asset/tiled/images/tilemap/tileset.txt) | 0 | ||||
-rw-r--r-- | code-style-example/style.cpp | 15 | ||||
-rw-r--r-- | code-style-example/style.h | 58 | ||||
-rw-r--r-- | contributing.md | 18 | ||||
m--------- | lib/sdl_image (renamed from lib/sdl_image/src) | 0 | ||||
-rw-r--r-- | lib/sdl_image/CMakeLists.txt | 51 | ||||
-rw-r--r-- | mwe/resource-manager/Audio_asset.cpp (renamed from resource-manager/Audio_asset.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/Audio_asset.h (renamed from resource-manager/Audio_asset.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/CMakeLists.txt (renamed from resource-manager/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/Image_asset.cpp (renamed from resource-manager/Image_asset.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/Image_asset.h (renamed from resource-manager/Image_asset.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/TextureMap.cpp (renamed from resource-manager/TextureMap.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/TextureMap.h (renamed from resource-manager/TextureMap.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/Untitled.jpeg (renamed from resource-manager/Untitled.jpeg) | bin | 6756 -> 6756 bytes | |||
-rw-r--r-- | mwe/resource-manager/cmake/modules/FindTMXLITE.cmake (renamed from resource-manager/cmake/modules/FindTMXLITE.cmake) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/constants.cpp (renamed from resource-manager/constants.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/constants.h (renamed from resource-manager/constants.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/img.png (renamed from resource-manager/img.png) | bin | 92742 -> 92742 bytes | |||
-rw-r--r-- | mwe/resource-manager/main.cpp (renamed from resource-manager/main.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/map_asset.cpp (renamed from resource-manager/map_asset.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/map_asset.h (renamed from resource-manager/map_asset.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/map_layer.cpp (renamed from resource-manager/map_layer.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/map_layer.h (renamed from resource-manager/map_layer.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource.h (renamed from resource-manager/resource.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_converter.cpp (renamed from resource-manager/resource_converter.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_converter.h (renamed from resource-manager/resource_converter.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_fabricator.cpp (renamed from resource-manager/resource_fabricator.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_fabricator.h (renamed from resource-manager/resource_fabricator.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_manager.cpp (renamed from resource-manager/resource_manager.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/resource_manager.h (renamed from resource-manager/resource_manager.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/spritesheet.cpp (renamed from resource-manager/spritesheet.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/spritesheet.h (renamed from resource-manager/spritesheet.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/spritesheet_test.png (renamed from resource-manager/spritesheet_test.png) | bin | 616 -> 616 bytes | |||
-rw-r--r-- | mwe/resource-manager/stb_image.h (renamed from resource-manager/stb_image.h) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/test.cpp (renamed from resource-manager/test.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/tiledMap.cpp (renamed from resource-manager/tiledMap.cpp) | 0 | ||||
-rw-r--r-- | mwe/resource-manager/tiledMap.h (renamed from resource-manager/tiledMap.h) | 0 | ||||
-rw-r--r-- | readme.md | 2 | ||||
-rwxr-xr-x | src/build.sh | 9 | ||||
-rw-r--r-- | src/crepe/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/crepe/Component.h | 6 | ||||
-rw-r--r-- | src/crepe/GameObject.hpp | 15 | ||||
-rw-r--r-- | src/crepe/Particle.h | 7 | ||||
-rw-r--r-- | src/crepe/Position.h | 11 | ||||
-rw-r--r-- | src/crepe/api/BehaviorScript.cpp | 7 | ||||
-rw-r--r-- | src/crepe/api/BehaviorScript.h | 2 | ||||
-rw-r--r-- | src/crepe/api/GameObject.hpp | 2 | ||||
-rw-r--r-- | src/crepe/crepe/CMakeFiles/CMakeDirectoryInformation.cmake | 16 | ||||
-rw-r--r-- | src/crepe/crepe/CMakeFiles/progress.marks | 1 | ||||
-rw-r--r-- | src/crepe/crepe/Makefile | 140 | ||||
-rw-r--r-- | src/crepe/crepe/cmake_install.cmake | 44 | ||||
-rw-r--r-- | src/crepe/util/log.h | 2 | ||||
-rw-r--r-- | src/example/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/example/components_internal.cpp | 6 | ||||
-rw-r--r-- | src/example/physics.cpp (renamed from src/example/Physics.cpp) | 0 |
56 files changed, 41 insertions, 380 deletions
diff --git a/.gitmodules b/.gitmodules index ece7fda..481519b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,6 +11,6 @@ url = https://github.com/libsdl-org/SDL shallow = true [submodule "lib/sdl_image/src"] - path = lib/sdl_image/src + path = lib/sdl_image url = https://github.com/libsdl-org/SDL_image - branch = SDL2 + shallow = true diff --git a/asset/tiled/images/tilemap/tileset.txt b/asset/tiled/images/tilemap/license index 1676dad..1676dad 100644 --- a/asset/tiled/images/tilemap/tileset.txt +++ b/asset/tiled/images/tilemap/license diff --git a/code-style-example/style.cpp b/code-style-example/style.cpp deleted file mode 100644 index a42fca8..0000000 --- a/code-style-example/style.cpp +++ /dev/null @@ -1,15 +0,0 @@ - - -#include "style.h" - -MyClass::MyClass(int t_value) : m_value(t_value) {} - -MyClass::MyClass() { m_value = 0; } - -MyClass::~MyClass() {} - -const int MyClass::get_value() const { return m_value; } - -void MyClass::set_value(const int t_value) { m_value = t_value; } - -void MyClass::increment() { m_value += 1; } diff --git a/code-style-example/style.h b/code-style-example/style.h deleted file mode 100644 index 2a4022b..0000000 --- a/code-style-example/style.h +++ /dev/null @@ -1,58 +0,0 @@ -/*! @file MyClass.h */ - -#ifndef MYPROJECT_MYCLASS_HPP -#define MYPROJECT_MYCLASS_HPP - -/** - * @brief example class - */ -class MyClass { - -public: - /** - * @brief example constructor - * - * @param[integer] t_value example first argument - */ - MyClass(int t_value); - - /** - * @brief constructor example - * - */ - MyClass(); - - /** - * @brief deconstuctor example - * - */ - ~MyClass(); - - /** - * @brief setter example with correct const implementation - * - * @param[const integer] t_value first argument - */ - void set_value(const int t_value); - - /** - * @brief getter example with correct const implementation - * - * @return const integer - */ - const int get_value() const; - - /** - * @brief increment member m_value - * - */ - void increment(); - -private: - /** - * @m_value basic member example - */ - int m_value; -}; - -#endif diff --git a/contributing.md b/contributing.md index 379494d..59adefb 100644 --- a/contributing.md +++ b/contributing.md @@ -26,6 +26,11 @@ decisions - Formatting nitty-gritty is handled by clang-format/clang-tidy (run `make format` in the root folder of this repository to format all sources files) +- Header includes are split into paragraphs separated by a blank line. The + order is: + 1. system headers (using `<`brackets`>`) + 2. relative headers NOT in the same folder as the current file + 3. relative headers in the same folder as the current file - When using libraries of which the header include order is important, make sure to separate the include statements using a blank line (clang-format may sort include statements, but does not sort across empty lines). @@ -33,7 +38,7 @@ user-facing APIs under `crepe::api` (the folder structure should also reflect this). - `using namespace` may not be used in header files, only in source files. -- Do not (indirectly) include private dependency headers in API header files, +- Do not (indirectly) include private *dependency* headers in API header files, as these are no longer accessible when the engine is installed - Getter and setter functions are appropriately prefixed with `get_` and `set_`. @@ -60,6 +65,12 @@ declaration instead of using the constructor. - Header files declare either a single class or symbols within a single namespace. +- Only use member initializer lists for non-trivial types. +- C++-style structs should define default values for all non-trivial fields. +- Declare incomplete classes instead of including the relevant header where + possible (i.e. if you only need a reference or pointer type). +- Template functions are only declared in a `.h` header, and defined in a + matching `.hpp` header. ## CMakeLists specific @@ -68,11 +79,6 @@ resolving merge conflicts when multiple sources were added by different people to the same CMakeLists.txt easier. -## Doxygen style - -- [a C-style doxygen example](https://www.cs.cmu.edu/~410/doc/doxygen.html) - - # Documentation - All documentation is written in U.S. English diff --git a/lib/sdl_image/src b/lib/sdl_image -Subproject c6c7278b86b5de1232b10de8f612ed05cf2d11f +Subproject c6c7278b86b5de1232b10de8f612ed05cf2d11f diff --git a/lib/sdl_image/CMakeLists.txt b/lib/sdl_image/CMakeLists.txt deleted file mode 100644 index d1bee81..0000000 --- a/lib/sdl_image/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -cmake_minimum_required(VERSION 3.28) - -set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 20) - -#add_compile_definitions(WITH_SDL2) -#add_subdirectory(../sdl2 sdl2) - -include_directories(src/include/SDL3_image) - -project(sdl_image C CXX) - -add_library(sdl_image SHARED - src/src/IMG.c - src/src/IMG_WIC.c - src/src/IMG_avif.c - src/src/IMG_bmp.c - src/src/IMG_gif.c - src/src/IMG_jpg.c - src/src/IMG_jxl.c - src/src/IMG_lbm.c - src/src/IMG_pcx.c - src/src/IMG_png.c - src/src/IMG_pnm.c - src/src/IMG_qoi.c - src/src/IMG_stb.c - src/src/IMG_svg.c - src/src/IMG_tga.c - src/src/IMG_tif.c - src/src/IMG_webp.c - src/src/IMG_xcf.c - src/src/IMG_xpm.c - src/src/IMG_xv.c - - - - - - - - - - - - -) -target_include_directories(sdl_image PRIVATE src/include/) -target_include_directories(sdl_image SYSTEM INTERFACE src/include/) - -target_link_libraries(sdl_image PRIVATE SDL2) - diff --git a/resource-manager/Audio_asset.cpp b/mwe/resource-manager/Audio_asset.cpp index 056034f..056034f 100644 --- a/resource-manager/Audio_asset.cpp +++ b/mwe/resource-manager/Audio_asset.cpp diff --git a/resource-manager/Audio_asset.h b/mwe/resource-manager/Audio_asset.h index d25c52f..d25c52f 100644 --- a/resource-manager/Audio_asset.h +++ b/mwe/resource-manager/Audio_asset.h diff --git a/resource-manager/CMakeLists.txt b/mwe/resource-manager/CMakeLists.txt index bbee3dc..bbee3dc 100644 --- a/resource-manager/CMakeLists.txt +++ b/mwe/resource-manager/CMakeLists.txt diff --git a/resource-manager/Image_asset.cpp b/mwe/resource-manager/Image_asset.cpp index 0b3afad..0b3afad 100644 --- a/resource-manager/Image_asset.cpp +++ b/mwe/resource-manager/Image_asset.cpp diff --git a/resource-manager/Image_asset.h b/mwe/resource-manager/Image_asset.h index 97daca1..97daca1 100644 --- a/resource-manager/Image_asset.h +++ b/mwe/resource-manager/Image_asset.h diff --git a/resource-manager/TextureMap.cpp b/mwe/resource-manager/TextureMap.cpp index 847bab9..847bab9 100644 --- a/resource-manager/TextureMap.cpp +++ b/mwe/resource-manager/TextureMap.cpp diff --git a/resource-manager/TextureMap.h b/mwe/resource-manager/TextureMap.h index dc8b8d3..dc8b8d3 100644 --- a/resource-manager/TextureMap.h +++ b/mwe/resource-manager/TextureMap.h diff --git a/resource-manager/Untitled.jpeg b/mwe/resource-manager/Untitled.jpeg Binary files differindex aa4d289..aa4d289 100644 --- a/resource-manager/Untitled.jpeg +++ b/mwe/resource-manager/Untitled.jpeg diff --git a/resource-manager/cmake/modules/FindTMXLITE.cmake b/mwe/resource-manager/cmake/modules/FindTMXLITE.cmake index 6ca7154..6ca7154 100644 --- a/resource-manager/cmake/modules/FindTMXLITE.cmake +++ b/mwe/resource-manager/cmake/modules/FindTMXLITE.cmake diff --git a/resource-manager/constants.cpp b/mwe/resource-manager/constants.cpp index f9fbf5b..f9fbf5b 100644 --- a/resource-manager/constants.cpp +++ b/mwe/resource-manager/constants.cpp diff --git a/resource-manager/constants.h b/mwe/resource-manager/constants.h index 620ddf3..620ddf3 100644 --- a/resource-manager/constants.h +++ b/mwe/resource-manager/constants.h diff --git a/resource-manager/img.png b/mwe/resource-manager/img.png Binary files differindex 43b1eca..43b1eca 100644 --- a/resource-manager/img.png +++ b/mwe/resource-manager/img.png diff --git a/resource-manager/main.cpp b/mwe/resource-manager/main.cpp index 0148555..0148555 100644 --- a/resource-manager/main.cpp +++ b/mwe/resource-manager/main.cpp diff --git a/resource-manager/map_asset.cpp b/mwe/resource-manager/map_asset.cpp index bbabe2b..bbabe2b 100644 --- a/resource-manager/map_asset.cpp +++ b/mwe/resource-manager/map_asset.cpp diff --git a/resource-manager/map_asset.h b/mwe/resource-manager/map_asset.h index 082d84d..082d84d 100644 --- a/resource-manager/map_asset.h +++ b/mwe/resource-manager/map_asset.h diff --git a/resource-manager/map_layer.cpp b/mwe/resource-manager/map_layer.cpp index 791972d..791972d 100644 --- a/resource-manager/map_layer.cpp +++ b/mwe/resource-manager/map_layer.cpp diff --git a/resource-manager/map_layer.h b/mwe/resource-manager/map_layer.h index e633290..e633290 100644 --- a/resource-manager/map_layer.h +++ b/mwe/resource-manager/map_layer.h diff --git a/resource-manager/resource.h b/mwe/resource-manager/resource.h index 4f112e3..4f112e3 100644 --- a/resource-manager/resource.h +++ b/mwe/resource-manager/resource.h diff --git a/resource-manager/resource_converter.cpp b/mwe/resource-manager/resource_converter.cpp index 63b7491..63b7491 100644 --- a/resource-manager/resource_converter.cpp +++ b/mwe/resource-manager/resource_converter.cpp diff --git a/resource-manager/resource_converter.h b/mwe/resource-manager/resource_converter.h index d771163..d771163 100644 --- a/resource-manager/resource_converter.h +++ b/mwe/resource-manager/resource_converter.h diff --git a/resource-manager/resource_fabricator.cpp b/mwe/resource-manager/resource_fabricator.cpp index 0633a40..0633a40 100644 --- a/resource-manager/resource_fabricator.cpp +++ b/mwe/resource-manager/resource_fabricator.cpp diff --git a/resource-manager/resource_fabricator.h b/mwe/resource-manager/resource_fabricator.h index cb6929f..cb6929f 100644 --- a/resource-manager/resource_fabricator.h +++ b/mwe/resource-manager/resource_fabricator.h diff --git a/resource-manager/resource_manager.cpp b/mwe/resource-manager/resource_manager.cpp index aee0ce2..aee0ce2 100644 --- a/resource-manager/resource_manager.cpp +++ b/mwe/resource-manager/resource_manager.cpp diff --git a/resource-manager/resource_manager.h b/mwe/resource-manager/resource_manager.h index c155559..c155559 100644 --- a/resource-manager/resource_manager.h +++ b/mwe/resource-manager/resource_manager.h diff --git a/resource-manager/spritesheet.cpp b/mwe/resource-manager/spritesheet.cpp index 5ea4b65..5ea4b65 100644 --- a/resource-manager/spritesheet.cpp +++ b/mwe/resource-manager/spritesheet.cpp diff --git a/resource-manager/spritesheet.h b/mwe/resource-manager/spritesheet.h index 9b222e7..9b222e7 100644 --- a/resource-manager/spritesheet.h +++ b/mwe/resource-manager/spritesheet.h diff --git a/resource-manager/spritesheet_test.png b/mwe/resource-manager/spritesheet_test.png Binary files differindex d68a72a..d68a72a 100644 --- a/resource-manager/spritesheet_test.png +++ b/mwe/resource-manager/spritesheet_test.png diff --git a/resource-manager/stb_image.h b/mwe/resource-manager/stb_image.h index a632d54..a632d54 100644 --- a/resource-manager/stb_image.h +++ b/mwe/resource-manager/stb_image.h diff --git a/resource-manager/test.cpp b/mwe/resource-manager/test.cpp index e69de29..e69de29 100644 --- a/resource-manager/test.cpp +++ b/mwe/resource-manager/test.cpp diff --git a/resource-manager/tiledMap.cpp b/mwe/resource-manager/tiledMap.cpp index 659c1fa..659c1fa 100644 --- a/resource-manager/tiledMap.cpp +++ b/mwe/resource-manager/tiledMap.cpp diff --git a/resource-manager/tiledMap.h b/mwe/resource-manager/tiledMap.h index be5b6a6..be5b6a6 100644 --- a/resource-manager/tiledMap.h +++ b/mwe/resource-manager/tiledMap.h @@ -33,6 +33,8 @@ libraries from source: $ cd lib/sdl2 or $ cd lib/soloud/contrib + or + $ cd lib/sdl_image ``` 3. Configure the build, run the build and install: ``` diff --git a/src/build.sh b/src/build.sh deleted file mode 100755 index 05d086c..0000000 --- a/src/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# creates the build dir and runs CMake with Ninja -cmake -B build -G Ninja - -ninja -C build - -ninja -C build/ rendering -ninja -C build/ asset_manager diff --git a/src/crepe/CMakeLists.txt b/src/crepe/CMakeLists.txt index 1b4b1c2..fcd169c 100644 --- a/src/crepe/CMakeLists.txt +++ b/src/crepe/CMakeLists.txt @@ -1,4 +1,3 @@ - target_sources(crepe PUBLIC Asset.cpp Sound.cpp diff --git a/src/crepe/Component.h b/src/crepe/Component.h index 9483dad..ccf95cb 100644 --- a/src/crepe/Component.h +++ b/src/crepe/Component.h @@ -3,14 +3,18 @@ namespace crepe { +class ComponentManager; + class Component { protected: + friend class crepe::ComponentManager; Component(uint32_t id); +public: + virtual ~Component() = default; public: uint32_t gameObjectId; bool active; - virtual ~Component() = default; }; } // namespace crepe diff --git a/src/crepe/GameObject.hpp b/src/crepe/GameObject.hpp deleted file mode 100644 index 8cd1abe..0000000 --- a/src/crepe/GameObject.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "GameObject.h" - -#include "ComponentManager.h" - -namespace crepe { - -template <typename T, typename... Args> -T & GameObject::add_component(Args &&... args) { - auto & mgr = ComponentManager::get_instance(); - return mgr.add_component<T>(id, std::forward<Args>(args)...); -} - -} // namespace crepe diff --git a/src/crepe/Particle.h b/src/crepe/Particle.h index c408ed9..006986a 100644 --- a/src/crepe/Particle.h +++ b/src/crepe/Particle.h @@ -1,11 +1,8 @@ #pragma once -namespace crepe { +#include "Position.h" -struct Position { - float x; - float y; - }; +namespace crepe { class Particle { public: diff --git a/src/crepe/Position.h b/src/crepe/Position.h new file mode 100644 index 0000000..5eb985e --- /dev/null +++ b/src/crepe/Position.h @@ -0,0 +1,11 @@ +#pragma once + +namespace crepe { + +struct Position { + float x = 0.0; + float y = 0.0; + }; + +} + diff --git a/src/crepe/api/BehaviorScript.cpp b/src/crepe/api/BehaviorScript.cpp index 74788ec..e69de29 100644 --- a/src/crepe/api/BehaviorScript.cpp +++ b/src/crepe/api/BehaviorScript.cpp @@ -1,7 +0,0 @@ -#include "../util/log.h" - -#include "BehaviorScript.h" - -using namespace crepe::api; - -BehaviorScript::BehaviorScript() : Component(gameObjectId) { dbg_trace(); } diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h index 25d3cc5..cb37a78 100644 --- a/src/crepe/api/BehaviorScript.h +++ b/src/crepe/api/BehaviorScript.h @@ -17,7 +17,7 @@ class Script; class BehaviorScript : public Component { protected: friend class crepe::ComponentManager; - BehaviorScript(); + using Component::Component; public: virtual ~BehaviorScript() = default; diff --git a/src/crepe/api/GameObject.hpp b/src/crepe/api/GameObject.hpp index 8295ea3..3c7e867 100644 --- a/src/crepe/api/GameObject.hpp +++ b/src/crepe/api/GameObject.hpp @@ -9,7 +9,7 @@ namespace crepe::api { template <typename T, typename... Args> T & GameObject::add_component(Args &&... args) { auto & mgr = ComponentManager::get_instance(); - return mgr.add_component<T>(id, std::forward<Args>(args)...); + return mgr.add_component<T>(this->id, std::forward<Args>(args)...); } } // namespace crepe::api diff --git a/src/crepe/crepe/CMakeFiles/CMakeDirectoryInformation.cmake b/src/crepe/crepe/CMakeFiles/CMakeDirectoryInformation.cmake deleted file mode 100644 index 8d03506..0000000 --- a/src/crepe/crepe/CMakeFiles/CMakeDirectoryInformation.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.28 - -# Relative path conversion top directories. -set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/jaro/crepe/src") -set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/jaro/crepe/src/crepe") - -# Force unix paths in dependencies. -set(CMAKE_FORCE_UNIX_PATHS 1) - - -# The C and CXX include file regular expressions for this directory. -set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") -set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") -set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) -set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/src/crepe/crepe/CMakeFiles/progress.marks b/src/crepe/crepe/CMakeFiles/progress.marks deleted file mode 100644 index 573541a..0000000 --- a/src/crepe/crepe/CMakeFiles/progress.marks +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/src/crepe/crepe/Makefile b/src/crepe/crepe/Makefile deleted file mode 100644 index 094215a..0000000 --- a/src/crepe/crepe/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.28 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/jaro/crepe/src - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/jaro/crepe/src/crepe - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." - /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/jaro/crepe/src/crepe && $(CMAKE_COMMAND) -E cmake_progress_start /home/jaro/crepe/src/crepe/CMakeFiles /home/jaro/crepe/src/crepe/crepe//CMakeFiles/progress.marks - cd /home/jaro/crepe/src/crepe && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 crepe/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/jaro/crepe/src/crepe/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/jaro/crepe/src/crepe && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 crepe/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/jaro/crepe/src/crepe && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 crepe/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/jaro/crepe/src/crepe && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 crepe/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/jaro/crepe/src/crepe && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/jaro/crepe/src/crepe && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/src/crepe/crepe/cmake_install.cmake b/src/crepe/crepe/cmake_install.cmake deleted file mode 100644 index cd57803..0000000 --- a/src/crepe/crepe/cmake_install.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Install script for directory: /home/jaro/crepe/src/crepe - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Debug") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Install shared libraries without execute permission? -if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - set(CMAKE_INSTALL_SO_NO_EXE "1") -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - -# Set default install directory permissions. -if(NOT DEFINED CMAKE_OBJDUMP) - set(CMAKE_OBJDUMP "/usr/bin/objdump") -endif() - diff --git a/src/crepe/util/log.h b/src/crepe/util/log.h index e2776c9..3e36f0a 100644 --- a/src/crepe/util/log.h +++ b/src/crepe/util/log.h @@ -9,7 +9,7 @@ #define _crepe_logf_here(fmt, ...) \ crepe::util::logf(util::log_level::DEBUG, "%s%s (%s:%d)%s" fmt "\n", \ crepe::util::color::FG_WHITE, __PRETTY_FUNCTION__, \ - __FILE__, __LINE__, crepe::util::color::RESET, \ + __FILE_NAME__, __LINE__, crepe::util::color::RESET, \ __VA_ARGS__) // very illegal global function-style macros diff --git a/src/example/CMakeLists.txt b/src/example/CMakeLists.txt index 4295d19..587a7bd 100644 --- a/src/example/CMakeLists.txt +++ b/src/example/CMakeLists.txt @@ -17,9 +17,9 @@ function(add_example target_name) endfunction() add_example(audio_internal) -add_example(components_internal) +# add_example(components_internal) add_example(script) add_example(rendering) add_example(asset_manager) add_example(particle) -add_example(Physics) +add_example(physics) diff --git a/src/example/components_internal.cpp b/src/example/components_internal.cpp index ae6c765..3c68974 100644 --- a/src/example/components_internal.cpp +++ b/src/example/components_internal.cpp @@ -9,7 +9,6 @@ #include <crepe/Component.h> #include <crepe/ComponentManager.h> -#include <crepe/api/Collider.h> #include <crepe/api/GameObject.h> #include <crepe/api/Rigidbody.h> #include <crepe/api/Sprite.h> @@ -36,14 +35,13 @@ int main() { game_object[i]->add_component<Sprite>("test"); game_object[i]->add_component<Rigidbody>(0, 0, i); - game_object[i]->add_component<Collider>(i); } auto stop_adding = chrono::high_resolution_clock::now(); auto sprites = mgr.get_components_by_type<Sprite>(); - for (auto & sprite : sprites) { - assert(sprite.path == "test"); + for (auto sprite : sprites) { + assert(true); } auto stop_looping = chrono::high_resolution_clock::now(); diff --git a/src/example/Physics.cpp b/src/example/physics.cpp index ee75c5c..ee75c5c 100644 --- a/src/example/Physics.cpp +++ b/src/example/physics.cpp |