From e66011756340e03fe941723f762119ed78ec2402 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 11 Feb 2023 16:50:09 +0100 Subject: Added ConstContext for drawing systems This whole ongoing refactoring process is meant to better understand relationships between Battle, Simulation and Systems. --- engine/include/kurator/engine/Context.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'engine/include') diff --git a/engine/include/kurator/engine/Context.h b/engine/include/kurator/engine/Context.h index c2c7cca..093285e 100644 --- a/engine/include/kurator/engine/Context.h +++ b/engine/include/kurator/engine/Context.h @@ -3,6 +3,7 @@ #include #include +#include "Camera.h" #include "Clock.h" @@ -12,12 +13,32 @@ namespace engine { +struct Context; +struct ConstContext; + + struct Context { - Context(entt::registry& registry_, entt::dispatcher& dispatcher_, Clock& clock_); + 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; }; -- cgit v1.1