summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-31 21:22:50 +0100
committerAki <please@ignore.pl>2022-12-31 21:22:50 +0100
commit7c34183e2697356c603328b006415247d280455b (patch)
treedb13bebaf1170789ce3eaeaa8edcbd1af2526eeb
parentc1e82cd6a6b051b43b18cea258aed80e021f85bb (diff)
downloadkurator-7c34183e2697356c603328b006415247d280455b.zip
kurator-7c34183e2697356c603328b006415247d280455b.tar.gz
kurator-7c34183e2697356c603328b006415247d280455b.tar.bz2
Extracted HitPoints definition to own header
-rw-r--r--kurator/src/ForceBalance.cpp1
-rw-r--r--sim/include/kurator/sim/HitPoints.h17
-rw-r--r--sim/include/kurator/sim/components.h6
-rw-r--r--sim/src/BaseBattle.cpp1
-rw-r--r--sim/src/Builder.cpp3
-rw-r--r--sim/src/TurretControl.cpp1
6 files changed, 22 insertions, 7 deletions
diff --git a/kurator/src/ForceBalance.cpp b/kurator/src/ForceBalance.cpp
index 4d56357..4f86379 100644
--- a/kurator/src/ForceBalance.cpp
+++ b/kurator/src/ForceBalance.cpp
@@ -4,6 +4,7 @@
#include <raylib.h>
#include <kurator/sim/components.h>
+#include <kurator/sim/HitPoints.h>
#include "colors.h"
diff --git a/sim/include/kurator/sim/HitPoints.h b/sim/include/kurator/sim/HitPoints.h
new file mode 100644
index 0000000..20cffc2
--- /dev/null
+++ b/sim/include/kurator/sim/HitPoints.h
@@ -0,0 +1,17 @@
+#pragma once
+
+
+namespace kurator
+{
+namespace sim
+{
+
+
+struct HitPoints
+{
+ double health;
+};
+
+
+} // namespace sim
+} // namespace kurator
diff --git a/sim/include/kurator/sim/components.h b/sim/include/kurator/sim/components.h
index 34b0f93..f4f1799 100644
--- a/sim/include/kurator/sim/components.h
+++ b/sim/include/kurator/sim/components.h
@@ -33,11 +33,5 @@ struct AIState
};
-struct HitPoints
-{
- double health;
-};
-
-
} // namespace sim
} // namespace kurator
diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp
index aba2981..14a9ccd 100644
--- a/sim/src/BaseBattle.cpp
+++ b/sim/src/BaseBattle.cpp
@@ -10,6 +10,7 @@
#include <kurator/sim/components.h>
#include <kurator/sim/events.h>
#include <kurator/sim/FloatingMovement.h>
+#include <kurator/sim/HitPoints.h>
#include <kurator/sim/TurretControl.h>
#include <kurator/stats/events.h>
#include <kurator/universe.h>
diff --git a/sim/src/Builder.cpp b/sim/src/Builder.cpp
index 11e0f1e..053ae93 100644
--- a/sim/src/Builder.cpp
+++ b/sim/src/Builder.cpp
@@ -4,8 +4,9 @@
#include <kurator/sim/components.h>
#include <kurator/sim/FloatingMovement.h>
-#include <kurator/sim/TurretControl.h>
+#include <kurator/sim/HitPoints.h>
#include <kurator/sim/Point.h>
+#include <kurator/sim/TurretControl.h>
#include <kurator/universe/ShipType.h>
#include <kurator/universe/TurretType.h>
diff --git a/sim/src/TurretControl.cpp b/sim/src/TurretControl.cpp
index 57fae4a..56083f1 100644
--- a/sim/src/TurretControl.cpp
+++ b/sim/src/TurretControl.cpp
@@ -4,6 +4,7 @@
#include <entt/signal/dispatcher.hpp>
#include <kurator/sim/components.h>
+#include <kurator/sim/HitPoints.h>
#include <kurator/sim/events.h>
#include <kurator/universe/TurretType.h>