summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim.h18
-rw-r--r--sim/include/kurator/sim/Battle.h7
-rw-r--r--sim/include/kurator/sim/State.h29
3 files changed, 49 insertions, 5 deletions
diff --git a/sim/include/kurator/sim.h b/sim/include/kurator/sim.h
new file mode 100644
index 0000000..3c4364c
--- /dev/null
+++ b/sim/include/kurator/sim.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <kurator/campaign/Scenario.h>
+
+#include "sim/State.h"
+
+
+namespace kurator
+{
+namespace sim
+{
+
+
+void load_scenario(State& ctx, const campaign::Scenario& scenario);
+
+
+} // namespace sim
+} // namespace kurator
diff --git a/sim/include/kurator/sim/Battle.h b/sim/include/kurator/sim/Battle.h
index 6874b39..1692c0c 100644
--- a/sim/include/kurator/sim/Battle.h
+++ b/sim/include/kurator/sim/Battle.h
@@ -2,9 +2,6 @@
#include <memory>
-#include <entt/entity/registry.hpp>
-#include <entt/signal/dispatcher.hpp>
-
#include <kurator/engine/Context.h>
#include <kurator/campaign/Scenario.h>
@@ -19,8 +16,8 @@ class Battle
{
public:
virtual ~Battle() = default;
- virtual entt::registry& registry() = 0;
- virtual entt::dispatcher& dispatcher() = 0;
+ virtual engine::Context context() = 0;
+ virtual engine::ConstContext const_context() const = 0;
virtual void update(engine::Context& ctx) = 0;
};
diff --git a/sim/include/kurator/sim/State.h b/sim/include/kurator/sim/State.h
new file mode 100644
index 0000000..8449ad2
--- /dev/null
+++ b/sim/include/kurator/sim/State.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <entt/entity/registry.hpp>
+#include <entt/signal/dispatcher.hpp>
+
+#include <kurator/engine/Camera.h>
+#include <kurator/engine/Clock.h>
+#include <kurator/engine/Context.h>
+
+
+namespace kurator
+{
+namespace sim
+{
+
+
+struct State
+{
+ entt::registry registry;
+ entt::dispatcher dispatcher;
+ engine::Clock clock;
+ engine::Camera camera; // does not fit in here really
+ operator engine::Context();
+ operator engine::ConstContext() const;
+};
+
+
+} // namespace sim
+} // namespace kurator