diff options
author | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
commit | 9b453277059fd015703873172d0dc87b4a29cb55 (patch) | |
tree | 3df0415c5b8160f9d97dae12f0c7adb55c4a23db /kurator | |
parent | b5a71a9c776386805a12a722be23bf8d7b7e25fe (diff) | |
download | kurator-9b453277059fd015703873172d0dc87b4a29cb55.zip kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.gz kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.bz2 |
Created engine module right now containing only Point
This might be a bit too generic of a name, but the intent is to get the
main shared abstracts for gameplay loop and/or simulation outside of
the game executable implementation to redirect dependencies.
Diffstat (limited to 'kurator')
-rw-r--r-- | kurator/src/Battle.cpp | 1 | ||||
-rw-r--r-- | kurator/src/Camera.h | 4 | ||||
-rw-r--r-- | kurator/src/PopupEmitter.cpp | 4 | ||||
-rw-r--r-- | kurator/src/components.h | 10 |
4 files changed, 9 insertions, 10 deletions
diff --git a/kurator/src/Battle.cpp b/kurator/src/Battle.cpp index d6df0b1..d300011 100644 --- a/kurator/src/Battle.cpp +++ b/kurator/src/Battle.cpp @@ -14,7 +14,6 @@ #include <kurator/sim/Battle.h> #include <kurator/sim/components.h> #include <kurator/sim/events.h> -#include <kurator/sim/Point.h> #include <kurator/stats/events.h> #include <kurator/universe/ShipType.h> #include <kurator/universe/UniqueIdentifier.h> diff --git a/kurator/src/Camera.h b/kurator/src/Camera.h index b6ca7d1..6056c7a 100644 --- a/kurator/src/Camera.h +++ b/kurator/src/Camera.h @@ -1,6 +1,6 @@ #pragma once -#include <kurator/sim/Point.h> +#include <kurator/engine/Point.h> namespace kurator @@ -9,7 +9,7 @@ namespace kurator struct Camera { - sim::Point offset = {}; + engine::Point offset = {}; double scale = 1.0; }; diff --git a/kurator/src/PopupEmitter.cpp b/kurator/src/PopupEmitter.cpp index c382ef1..0605da2 100644 --- a/kurator/src/PopupEmitter.cpp +++ b/kurator/src/PopupEmitter.cpp @@ -5,8 +5,8 @@ #include <entt/entity/registry.hpp> #include <raylib.h> +#include <kurator/engine/Point.h> #include <kurator/sim/components.h> -#include <kurator/sim/Point.h> #include "components.h" @@ -26,7 +26,7 @@ PopupEmitter::emit(entt::registry& registry, const sim::Transform& transform, co registry.emplace<sim::Transform>(popup, transform.position, 0.0); registry.emplace<CenteredText>(popup, std::string{}, 0, size, RED); registry.emplace<UIOffset>(popup, 0, 0); - registry.emplace<PopMove>(popup, sim::Point{0, -20}, 0.9998); + registry.emplace<PopMove>(popup, engine::Point{0, -20}, 0.9998); } total += damage; auto& text = registry.get<CenteredText>(popup); diff --git a/kurator/src/components.h b/kurator/src/components.h index bcd34e6..ff52bfe 100644 --- a/kurator/src/components.h +++ b/kurator/src/components.h @@ -4,7 +4,7 @@ #include <raylib.h> -#include <kurator/sim/Point.h> +#include <kurator/engine/Point.h> namespace kurator @@ -27,14 +27,14 @@ struct CenteredText }; -struct UIOffset : public sim::Point +struct UIOffset : public engine::Point { }; struct PopMove { - sim::Point speed; + engine::Point speed; double damp; }; @@ -50,8 +50,8 @@ struct Marker struct Line { Color color; - sim::Point start; - sim::Point end; + engine::Point start; + engine::Point end; double hlength; double duration; double position = 0.0; |