diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index fb79a8a06e..f1f4846b3c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -113,6 +113,7 @@ set(CUBOS_CORE_SOURCE "src/cubos/core/ecs/world.cpp" "src/cubos/core/ecs/command_buffer.cpp" "src/cubos/core/ecs/types.cpp" + "src/cubos/core/ecs/cubos.cpp" "src/cubos/core/geom/box.cpp" "src/cubos/core/geom/capsule.cpp" diff --git a/engine/include/cubos/engine/cubos.hpp b/core/include/cubos/core/ecs/cubos.hpp similarity index 99% rename from engine/include/cubos/engine/cubos.hpp rename to core/include/cubos/core/ecs/cubos.hpp index 5e52c1d4fb..a98a07ad63 100644 --- a/engine/include/cubos/engine/cubos.hpp +++ b/core/include/cubos/core/ecs/cubos.hpp @@ -12,9 +12,7 @@ #include #include -#include - -namespace cubos::engine +namespace cubos::core::ecs { /// @brief Resource which stores the time since the last iteration of the main loop started. /// diff --git a/engine/src/cubos/engine/cubos.cpp b/core/src/cubos/core/ecs/cubos.cpp similarity index 93% rename from engine/src/cubos/engine/cubos.cpp rename to core/src/cubos/core/ecs/cubos.cpp index 8d4838782a..bfeae295ad 100644 --- a/engine/src/cubos/engine/cubos.cpp +++ b/core/src/cubos/core/ecs/cubos.cpp @@ -1,12 +1,16 @@ #include #include +#include #include #include -#include - -using namespace cubos::engine; +using cubos::core::ecs::Arguments; +using cubos::core::ecs::Cubos; +using cubos::core::ecs::DeltaTime; +using cubos::core::ecs::ShouldQuit; +using cubos::core::ecs::SystemBuilder; +using cubos::core::ecs::TagBuilder; DeltaTime::DeltaTime(float value) : value(value) diff --git a/docs/pages/2_features/plugins.md b/docs/pages/2_features/plugins.md index f2245e34e7..21e225ca5e 100644 --- a/docs/pages/2_features/plugins.md +++ b/docs/pages/2_features/plugins.md @@ -19,11 +19,11 @@ An application which just prints `"Hello World!"` and which does absolutely nothing else - not even open a window - would look like this: ```cpp -#include +#include #include -using Cubos = cubos::engine::Cubos; +using cubos::engine::Cubos; void helloWorld() { @@ -56,11 +56,11 @@ If we were to put the hello world functionality on a plugin, the previous example would look like this: ```cpp -#include +#include #include -using Cubos = cubos::engine::Cubos; +using cubos::engine::Cubos; void helloWorld() { diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 595acf9ac7..432efc47bb 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -9,7 +9,6 @@ message("# Building engine tests: " ${BUILD_ENGINE_TESTS}) # Set engine source files set(CUBOS_ENGINE_SOURCE - "src/cubos/engine/cubos.cpp" "src/cubos/engine/prelude.cpp" "src/cubos/engine/settings/plugin.cpp" diff --git a/engine/include/cubos/engine/assets/plugin.hpp b/engine/include/cubos/engine/assets/plugin.hpp index ae3a7a959f..1072f6185a 100644 --- a/engine/include/cubos/engine/assets/plugin.hpp +++ b/engine/include/cubos/engine/assets/plugin.hpp @@ -8,7 +8,7 @@ #pragma once #include -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/collisions/plugin.hpp b/engine/include/cubos/engine/collisions/plugin.hpp index cfe101991d..4179d57054 100644 --- a/engine/include/cubos/engine/collisions/plugin.hpp +++ b/engine/include/cubos/engine/collisions/plugin.hpp @@ -13,7 +13,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/gizmos/gizmos.hpp b/engine/include/cubos/engine/gizmos/gizmos.hpp index 6035940ea8..cd632d6253 100644 --- a/engine/include/cubos/engine/gizmos/gizmos.hpp +++ b/engine/include/cubos/engine/gizmos/gizmos.hpp @@ -11,7 +11,7 @@ #include -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/gizmos/plugin.hpp b/engine/include/cubos/engine/gizmos/plugin.hpp index 1efdd6c3d5..ad101bd9c1 100644 --- a/engine/include/cubos/engine/gizmos/plugin.hpp +++ b/engine/include/cubos/engine/gizmos/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace cubos::engine diff --git a/engine/include/cubos/engine/imgui/plugin.hpp b/engine/include/cubos/engine/imgui/plugin.hpp index 6bcffe34ba..29ba59edfc 100644 --- a/engine/include/cubos/engine/imgui/plugin.hpp +++ b/engine/include/cubos/engine/imgui/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/input/plugin.hpp b/engine/include/cubos/engine/input/plugin.hpp index 9d32f86d1c..9ffba40ead 100644 --- a/engine/include/cubos/engine/input/plugin.hpp +++ b/engine/include/cubos/engine/input/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace cubos::engine diff --git a/engine/include/cubos/engine/physics/plugin.hpp b/engine/include/cubos/engine/physics/plugin.hpp index 0f46aff559..4fb09126c6 100644 --- a/engine/include/cubos/engine/physics/plugin.hpp +++ b/engine/include/cubos/engine/physics/plugin.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/engine/include/cubos/engine/physics/plugins/gravity.hpp b/engine/include/cubos/engine/physics/plugins/gravity.hpp index 30bb1a2f82..a8a963746d 100644 --- a/engine/include/cubos/engine/physics/plugins/gravity.hpp +++ b/engine/include/cubos/engine/physics/plugins/gravity.hpp @@ -4,7 +4,7 @@ #pragma once -#include +#include #include #include #include diff --git a/engine/include/cubos/engine/prelude.hpp b/engine/include/cubos/engine/prelude.hpp index bfb525faca..4e43097707 100644 --- a/engine/include/cubos/engine/prelude.hpp +++ b/engine/include/cubos/engine/prelude.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -8,6 +9,18 @@ namespace cubos::engine { + /// @copydoc cubos::core::ecs::Cubos + using Cubos = core::ecs::Cubos; + + /// @copydoc cubos::core::ecs::DeltaTime + using DeltaTime = core::ecs::DeltaTime; + + /// @copydoc cubos::core::ecs::ShouldQuit + using ShouldQuit = core::ecs::ShouldQuit; + + /// @copydoc cubos::core::ecs::Arguments + using Arguments = core::ecs::Arguments; + /// @copydoc cubos::core::ecs::Query template using Query = core::ecs::Query; diff --git a/engine/include/cubos/engine/scene/plugin.hpp b/engine/include/cubos/engine/scene/plugin.hpp index aa12c15e21..7e8dc7c994 100644 --- a/engine/include/cubos/engine/scene/plugin.hpp +++ b/engine/include/cubos/engine/scene/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace cubos::engine diff --git a/engine/include/cubos/engine/screenpicker/plugin.hpp b/engine/include/cubos/engine/screenpicker/plugin.hpp index 426d0af73e..216d00223c 100644 --- a/engine/include/cubos/engine/screenpicker/plugin.hpp +++ b/engine/include/cubos/engine/screenpicker/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/screenpicker/screenpicker.hpp b/engine/include/cubos/engine/screenpicker/screenpicker.hpp index a72f9b1417..4fb2da293a 100644 --- a/engine/include/cubos/engine/screenpicker/screenpicker.hpp +++ b/engine/include/cubos/engine/screenpicker/screenpicker.hpp @@ -6,7 +6,7 @@ #include -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/settings/plugin.hpp b/engine/include/cubos/engine/settings/plugin.hpp index 9a0805020f..c79d692900 100644 --- a/engine/include/cubos/engine/settings/plugin.hpp +++ b/engine/include/cubos/engine/settings/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include namespace cubos::engine diff --git a/engine/include/cubos/engine/splitscreen/plugin.hpp b/engine/include/cubos/engine/splitscreen/plugin.hpp index 5e0b7147f8..ace4f11e2a 100644 --- a/engine/include/cubos/engine/splitscreen/plugin.hpp +++ b/engine/include/cubos/engine/splitscreen/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/transform/plugin.hpp b/engine/include/cubos/engine/transform/plugin.hpp index 57103e671c..70880f7200 100644 --- a/engine/include/cubos/engine/transform/plugin.hpp +++ b/engine/include/cubos/engine/transform/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include #include #include #include diff --git a/engine/include/cubos/engine/utils/free_camera_controller/plugin.hpp b/engine/include/cubos/engine/utils/free_camera_controller/plugin.hpp index c841e30c95..5da1cff3b6 100644 --- a/engine/include/cubos/engine/utils/free_camera_controller/plugin.hpp +++ b/engine/include/cubos/engine/utils/free_camera_controller/plugin.hpp @@ -9,7 +9,7 @@ #include -#include +#include #include #include #include diff --git a/engine/include/cubos/engine/voxels/plugin.hpp b/engine/include/cubos/engine/voxels/plugin.hpp index 548a63dac8..a5c29c805c 100644 --- a/engine/include/cubos/engine/voxels/plugin.hpp +++ b/engine/include/cubos/engine/voxels/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/include/cubos/engine/window/plugin.hpp b/engine/include/cubos/engine/window/plugin.hpp index b7d683a06f..de60a26b14 100644 --- a/engine/include/cubos/engine/window/plugin.hpp +++ b/engine/include/cubos/engine/window/plugin.hpp @@ -9,7 +9,7 @@ #include -#include +#include namespace cubos::engine { diff --git a/engine/samples/events/main.cpp b/engine/samples/events/main.cpp index 219deaf843..049231d8cd 100644 --- a/engine/samples/events/main.cpp +++ b/engine/samples/events/main.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include using namespace cubos::engine; diff --git a/engine/samples/gizmos/main.cpp b/engine/samples/gizmos/main.cpp index 2362b81f32..23a0336b0e 100644 --- a/engine/samples/gizmos/main.cpp +++ b/engine/samples/gizmos/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/engine/samples/hello-cubos/main.cpp b/engine/samples/hello-cubos/main.cpp index c5c5a60787..70d033af32 100644 --- a/engine/samples/hello-cubos/main.cpp +++ b/engine/samples/hello-cubos/main.cpp @@ -3,7 +3,7 @@ /// [Include Components] /// [Include] -#include +#include using cubos::engine::Cubos; /// [Include] diff --git a/engine/samples/settings/main.cpp b/engine/samples/settings/main.cpp index d9813892eb..658b546613 100644 --- a/engine/samples/settings/main.cpp +++ b/engine/samples/settings/main.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include using namespace cubos::engine; diff --git a/engine/src/cubos/engine/collisions/broad_phase/plugin.hpp b/engine/src/cubos/engine/collisions/broad_phase/plugin.hpp index 42be4d8daa..049190f00d 100644 --- a/engine/src/cubos/engine/collisions/broad_phase/plugin.hpp +++ b/engine/src/cubos/engine/collisions/broad_phase/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace cubos::engine { diff --git a/engine/src/cubos/engine/screenpicker/plugin.cpp b/engine/src/cubos/engine/screenpicker/plugin.cpp index 514cbee036..f7adef3729 100644 --- a/engine/src/cubos/engine/screenpicker/plugin.cpp +++ b/engine/src/cubos/engine/screenpicker/plugin.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include diff --git a/tools/tesseratos/include/tesseratos/debug_camera/plugin.hpp b/tools/tesseratos/include/tesseratos/debug_camera/plugin.hpp index bb33b55aae..b9921d8ca4 100644 --- a/tools/tesseratos/include/tesseratos/debug_camera/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/debug_camera/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/entity_inspector/plugin.hpp b/tools/tesseratos/include/tesseratos/entity_inspector/plugin.hpp index ed8074ca02..138e6c9a0c 100644 --- a/tools/tesseratos/include/tesseratos/entity_inspector/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/entity_inspector/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/entity_selector/plugin.hpp b/tools/tesseratos/include/tesseratos/entity_selector/plugin.hpp index 266ecf4fd6..74e1c9d206 100644 --- a/tools/tesseratos/include/tesseratos/entity_selector/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/entity_selector/plugin.hpp @@ -9,7 +9,7 @@ #include -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/metrics_panel/plugin.hpp b/tools/tesseratos/include/tesseratos/metrics_panel/plugin.hpp index bbfa919325..b67e5d8c4f 100644 --- a/tools/tesseratos/include/tesseratos/metrics_panel/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/metrics_panel/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/plugin.hpp b/tools/tesseratos/include/tesseratos/plugin.hpp index 8a33baef0e..811640ff55 100644 --- a/tools/tesseratos/include/tesseratos/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include /// @brief @ref tesseratos module. namespace tesseratos diff --git a/tools/tesseratos/include/tesseratos/scene_editor/plugin.hpp b/tools/tesseratos/include/tesseratos/scene_editor/plugin.hpp index 1b25f6b988..cdaffd3230 100644 --- a/tools/tesseratos/include/tesseratos/scene_editor/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/scene_editor/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/settings_inspector/plugin.hpp b/tools/tesseratos/include/tesseratos/settings_inspector/plugin.hpp index b82a8514b4..55f5b617b7 100644 --- a/tools/tesseratos/include/tesseratos/settings_inspector/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/settings_inspector/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/toolbox/plugin.hpp b/tools/tesseratos/include/tesseratos/toolbox/plugin.hpp index 0f8bc271a7..c63364dcaf 100644 --- a/tools/tesseratos/include/tesseratos/toolbox/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/toolbox/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/transform_gizmo/plugin.hpp b/tools/tesseratos/include/tesseratos/transform_gizmo/plugin.hpp index 7aff7e1c8a..5c9432a0ee 100644 --- a/tools/tesseratos/include/tesseratos/transform_gizmo/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/transform_gizmo/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/voxel_palette_editor/plugin.hpp b/tools/tesseratos/include/tesseratos/voxel_palette_editor/plugin.hpp index 91581c7c9c..1175db081e 100644 --- a/tools/tesseratos/include/tesseratos/voxel_palette_editor/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/voxel_palette_editor/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos { diff --git a/tools/tesseratos/include/tesseratos/world_inspector/plugin.hpp b/tools/tesseratos/include/tesseratos/world_inspector/plugin.hpp index 2ae0e2708e..8dfe5eb07e 100644 --- a/tools/tesseratos/include/tesseratos/world_inspector/plugin.hpp +++ b/tools/tesseratos/include/tesseratos/world_inspector/plugin.hpp @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace tesseratos {