summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kurator/src/Battle.h6
-rw-r--r--kurator/src/Campaign.cpp4
-rw-r--r--kurator/src/EventLog.h14
-rw-r--r--kurator/src/Summary.cpp4
-rw-r--r--kurator/src/Summary.h7
-rw-r--r--stats/include/kurator/stats/EventLog.h17
6 files changed, 28 insertions, 24 deletions
diff --git a/kurator/src/Battle.h b/kurator/src/Battle.h
index fd772de..500318a 100644
--- a/kurator/src/Battle.h
+++ b/kurator/src/Battle.h
@@ -6,9 +6,9 @@
#include <kurator/campaign/Scenario.h>
#include <kurator/sim/Battle.h>
#include <kurator/sim/events.h>
+#include <kurator/stats/EventLog.h>
#include <kurator/stats/events.h>
-#include "EventLog.h"
#include "ForceBalance.h"
#include "Scene.h"
#include "Session.h"
@@ -21,7 +21,7 @@ namespace kurator
class Battle : public Scene
{
public:
- using Callback = std::function<void(const EventLog&)>;
+ using Callback = std::function<void(const stats::EventLog&)>;
explicit Battle(std::shared_ptr<Session> _session);
Battle(std::shared_ptr<Session> _session, campaign::Scenario scenario, Callback _report={});
virtual ~Battle();
@@ -34,7 +34,7 @@ private:
std::shared_ptr<Session> session;
std::unique_ptr<sim::Battle> battle;
ForceBalance balance;
- EventLog log;
+ stats::EventLog log;
float time_factor;
Callback report;
};
diff --git a/kurator/src/Campaign.cpp b/kurator/src/Campaign.cpp
index 9d88518..75daaac 100644
--- a/kurator/src/Campaign.cpp
+++ b/kurator/src/Campaign.cpp
@@ -11,10 +11,10 @@
#include <kurator/campaign/Scenario.h>
#include <kurator/campaign/scenarios.h>
#include <kurator/campaign/ShipConfig.h>
+#include <kurator/stats/EventLog.h>
#include <kurator/stats/events.h>
#include "Battle.h"
-#include "EventLog.h"
#include "Session.h"
@@ -68,7 +68,7 @@ Campaign::update(const float)
scenario.ships.push_back(std::move(ship));
}
}
- auto destroy = [&](const EventLog& log) { log.for_each(Reporter{ships}); };
+ auto destroy = [&](const stats::EventLog& log) { log.for_each(Reporter{ships}); };
session->push(std::make_shared<Battle>(session, std::move(scenario), destroy));
level++;
}
diff --git a/kurator/src/EventLog.h b/kurator/src/EventLog.h
deleted file mode 100644
index c676814..0000000
--- a/kurator/src/EventLog.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#include <kurator/stats/BaseLog.h>
-#include <kurator/stats/events.h>
-
-
-namespace kurator
-{
-
-
-using EventLog = stats::BaseLog<stats::ShipLeft>;
-
-
-} // namespace kurator
diff --git a/kurator/src/Summary.cpp b/kurator/src/Summary.cpp
index 2ea7c34..6a52d93 100644
--- a/kurator/src/Summary.cpp
+++ b/kurator/src/Summary.cpp
@@ -6,9 +6,9 @@
#include <raylib.h>
#include <imgui.h>
+#include <kurator/stats/EventLog.h>
#include <kurator/stats/events.h>
-#include "EventLog.h"
#include "Session.h"
@@ -24,7 +24,7 @@ struct Dumper
};
-Summary::Summary(std::shared_ptr<Session> _session, EventLog _events) :
+Summary::Summary(std::shared_ptr<Session> _session, stats::EventLog _events) :
session {std::move(_session)},
events {std::move(_events)}
{
diff --git a/kurator/src/Summary.h b/kurator/src/Summary.h
index e4e32f9..4467d0d 100644
--- a/kurator/src/Summary.h
+++ b/kurator/src/Summary.h
@@ -2,7 +2,8 @@
#include <memory>
-#include "EventLog.h"
+#include <kurator/stats/EventLog.h>
+
#include "Session.h"
#include "Scene.h"
@@ -14,12 +15,12 @@ namespace kurator
class Summary : public Scene
{
public:
- Summary(std::shared_ptr<Session> _session, EventLog _events);
+ Summary(std::shared_ptr<Session> _session, stats::EventLog _events);
void update(float dt) override;
void draw() const override;
private:
std::shared_ptr<Session> session;
- EventLog events;
+ stats::EventLog events;
};
diff --git a/stats/include/kurator/stats/EventLog.h b/stats/include/kurator/stats/EventLog.h
new file mode 100644
index 0000000..353a0cd
--- /dev/null
+++ b/stats/include/kurator/stats/EventLog.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "BaseLog.h"
+#include "events.h"
+
+
+namespace kurator
+{
+namespace stats
+{
+
+
+using EventLog = BaseLog<ShipLeft>;
+
+
+} // namespace stats
+} // namespace kurator