summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-28 02:54:03 +0100
committerAki <please@ignore.pl>2022-12-28 02:54:03 +0100
commit9b25ae2beac1e979774c319601389c9ffbd60a1d (patch)
tree6fe4ca51e7bf6574ac1ae1c660caa59d9825937b
parent8a1f5354f55dce448aac10f79141329950275086 (diff)
downloadkurator-9b25ae2beac1e979774c319601389c9ffbd60a1d.zip
kurator-9b25ae2beac1e979774c319601389c9ffbd60a1d.tar.gz
kurator-9b25ae2beac1e979774c319601389c9ffbd60a1d.tar.bz2
Added Campaign scene stub
-rw-r--r--kurator/CMakeLists.txt1
-rw-r--r--kurator/src/Campaign.cpp33
-rw-r--r--kurator/src/Campaign.h24
-rw-r--r--kurator/src/SceneBuilder.cpp10
-rw-r--r--kurator/src/SceneBuilder.h1
5 files changed, 69 insertions, 0 deletions
diff --git a/kurator/CMakeLists.txt b/kurator/CMakeLists.txt
index 7dc50ef..989ab6f 100644
--- a/kurator/CMakeLists.txt
+++ b/kurator/CMakeLists.txt
@@ -3,6 +3,7 @@ add_executable(
${PROJECT_NAME}
src/args.cpp
src/Battle.cpp
+ src/Campaign.cpp
src/colors.cpp
src/ForceBalance.cpp
src/main.cpp
diff --git a/kurator/src/Campaign.cpp b/kurator/src/Campaign.cpp
new file mode 100644
index 0000000..c109f63
--- /dev/null
+++ b/kurator/src/Campaign.cpp
@@ -0,0 +1,33 @@
+#include "Campaign.h"
+
+#include <memory>
+#include <utility>
+
+#include <raylib.h>
+
+#include "Session.h"
+
+namespace kurator
+{
+
+
+Campaign::Campaign(std::shared_ptr<Session> _session) :
+ session {std::move(_session)}
+{
+}
+
+
+void
+Campaign::update(const float)
+{
+}
+
+
+void
+Campaign::draw() const
+{
+ ClearBackground(BLACK);
+}
+
+
+} // namespace kurator
diff --git a/kurator/src/Campaign.h b/kurator/src/Campaign.h
new file mode 100644
index 0000000..80d1506
--- /dev/null
+++ b/kurator/src/Campaign.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <memory>
+
+#include "Scene.h"
+#include "Session.h"
+
+
+namespace kurator
+{
+
+
+class Campaign : public Scene
+{
+public:
+ Campaign(std::shared_ptr<Session> _session);
+ void update(float dt) override;
+ void draw() const override;
+private:
+ std::shared_ptr<Session> session;
+};
+
+
+} // namespace kurator
diff --git a/kurator/src/SceneBuilder.cpp b/kurator/src/SceneBuilder.cpp
index 108b9e4..b9f13ab 100644
--- a/kurator/src/SceneBuilder.cpp
+++ b/kurator/src/SceneBuilder.cpp
@@ -5,6 +5,7 @@
#include <utility>
#include "Battle.h"
+#include "Campaign.h"
#include "ScenarioEditor.h"
#include "Scene.h"
#include "Title.h"
@@ -25,6 +26,8 @@ SceneBuilder::build(std::string_view name) const
{
if (name == "Battle")
return battle();
+ if (name == "Campaign")
+ return campaign();
if (name == "ScenarioEditor")
return scenario_editor();
return title();
@@ -39,6 +42,13 @@ SceneBuilder::battle() const
std::shared_ptr<Scene>
+SceneBuilder::campaign() const
+{
+ return std::make_shared<Campaign>(session);
+}
+
+
+std::shared_ptr<Scene>
SceneBuilder::scenario_editor() const
{
return std::make_shared<ScenarioEditor>(session);
diff --git a/kurator/src/SceneBuilder.h b/kurator/src/SceneBuilder.h
index ea39a94..631a6e9 100644
--- a/kurator/src/SceneBuilder.h
+++ b/kurator/src/SceneBuilder.h
@@ -17,6 +17,7 @@ public:
explicit SceneBuilder(std::shared_ptr<Session> _session);
std::shared_ptr<Scene> build(std::string_view name) const;
std::shared_ptr<Scene> battle() const;
+ std::shared_ptr<Scene> campaign() const;
std::shared_ptr<Scene> scenario_editor() const;
std::shared_ptr<Scene> title() const;
private: