diff options
author | Aki <please@ignore.pl> | 2023-02-11 00:25:15 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-11 00:25:15 +0100 |
commit | d0629836f9aa002a872d59c7f9e465dca9f2cc02 (patch) | |
tree | 1c98f3c58e7199ae2de7a51b4e45560a53aed374 /engine | |
parent | d6687be6a89ebd55fa9f3438d742bbf9cf4c9afa (diff) | |
download | kurator-d0629836f9aa002a872d59c7f9e465dca9f2cc02.zip kurator-d0629836f9aa002a872d59c7f9e465dca9f2cc02.tar.gz kurator-d0629836f9aa002a872d59c7f9e465dca9f2cc02.tar.bz2 |
Added Context to streamline system update call interface
Diffstat (limited to 'engine')
-rw-r--r-- | engine/CMakeLists.txt | 1 | ||||
-rw-r--r-- | engine/include/kurator/engine/Context.h | 25 | ||||
-rw-r--r-- | engine/src/Context.cpp | 24 |
3 files changed, 50 insertions, 0 deletions
diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 7cb7f20..43c09a5 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -3,6 +3,7 @@ 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 new file mode 100644 index 0000000..c2c7cca --- /dev/null +++ b/engine/include/kurator/engine/Context.h @@ -0,0 +1,25 @@ +#pragma once + +#include <entt/entity/registry.hpp> +#include <entt/signal/dispatcher.hpp> + +#include "Clock.h" + + +namespace kurator +{ +namespace engine +{ + + +struct Context +{ + Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_); + entt::registry& registry; + entt::dispatcher& dispatcher; + Clock& clock; +}; + + +} // namespace engine +} // namespace kurator diff --git a/engine/src/Context.cpp b/engine/src/Context.cpp new file mode 100644 index 0000000..eeec938 --- /dev/null +++ b/engine/src/Context.cpp @@ -0,0 +1,24 @@ +#include <kurator/engine/Context.h> + +#include <entt/entity/registry.hpp> +#include <entt/signal/dispatcher.hpp> + +#include <kurator/engine/Clock.h> + + +namespace kurator +{ +namespace engine +{ + + +Context::Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_) : + registry {registry_}, + dispatcher {dispatcher_}, + clock {clock_} +{ +} + + +} // namespace engine +} // namespace kurator |