diff options
author | Aki <please@ignore.pl> | 2023-02-14 00:51:49 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-14 00:51:49 +0100 |
commit | dc0cc293b7b8efed67a0a550237dce38f33ff37d (patch) | |
tree | 83a6cf40ecd76b49f590dd669626b439cf34d64e /engine | |
parent | 632c367ae6885657e6c99b96b8bf7a96b61a2bb9 (diff) | |
download | kurator-dc0cc293b7b8efed67a0a550237dce38f33ff37d.zip kurator-dc0cc293b7b8efed67a0a550237dce38f33ff37d.tar.gz kurator-dc0cc293b7b8efed67a0a550237dce38f33ff37d.tar.bz2 |
Replaced Context+Battle combo with State and arbitrary Systems
Diffstat (limited to 'engine')
-rw-r--r-- | engine/CMakeLists.txt | 1 | ||||
-rw-r--r-- | engine/include/kurator/engine/Context.h | 46 | ||||
-rw-r--r-- | engine/src/Context.cpp | 45 |
3 files changed, 0 insertions, 92 deletions
diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 43c09a5..7cb7f20 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -3,7 +3,6 @@ add_library( ${PROJECT_NAME} STATIC src/Camera.cpp src/Clock.cpp - src/Context.cpp src/Point.cpp ) target_include_directories( diff --git a/engine/include/kurator/engine/Context.h b/engine/include/kurator/engine/Context.h deleted file mode 100644 index 093285e..0000000 --- a/engine/include/kurator/engine/Context.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <entt/entity/registry.hpp> -#include <entt/signal/dispatcher.hpp> - -#include "Camera.h" -#include "Clock.h" - - -namespace kurator -{ -namespace engine -{ - - -struct Context; -struct ConstContext; - - -struct Context -{ - Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_, Camera& camera_); - entt::registry& registry; - entt::dispatcher& dispatcher; - Clock& clock; - Camera& camera; - operator ConstContext() const; -}; - - -struct ConstContext -{ - ConstContext( - const entt::registry& registry_, - const entt::dispatcher& dispatcher_, - const Clock& clock_, - const Camera& camera_); - const entt::registry& registry; - const entt::dispatcher& dispatcher; - const Clock& clock; - const Camera& camera; -}; - - -} // namespace engine -} // namespace kurator diff --git a/engine/src/Context.cpp b/engine/src/Context.cpp deleted file mode 100644 index 8c81c89..0000000 --- a/engine/src/Context.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include <kurator/engine/Context.h> - -#include <entt/entity/registry.hpp> -#include <entt/signal/dispatcher.hpp> - -#include <kurator/engine/Camera.h> -#include <kurator/engine/Clock.h> - - -namespace kurator -{ -namespace engine -{ - - -Context::Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_, Camera& camera_) : - registry {registry_}, - dispatcher {dispatcher_}, - clock {clock_}, - camera {camera_} -{ -} - - -Context::operator ConstContext() const -{ - return ConstContext{registry, dispatcher, clock, camera}; -} - - -ConstContext::ConstContext( - const entt::registry& registry_, - const entt::dispatcher& dispatcher_, - const Clock& clock_, - const Camera& camera_) : - registry {registry_}, - dispatcher {dispatcher_}, - clock {clock_}, - camera {camera_} -{ -} - - -} // namespace engine -} // namespace kurator |