From 29e18d3d2918f7b1668c2bfb7d708c60aceea4bf Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 11 Feb 2023 00:43:16 +0100 Subject: Removed dt argument from Scene update --- kurator/src/Battle.cpp | 2 +- kurator/src/Battle.h | 2 +- kurator/src/Campaign.cpp | 2 +- kurator/src/Campaign.h | 2 +- kurator/src/Pause.cpp | 2 +- kurator/src/Pause.h | 2 +- kurator/src/ScenarioEditor.cpp | 2 +- kurator/src/ScenarioEditor.h | 2 +- kurator/src/Scene.h | 2 +- kurator/src/Session.cpp | 2 +- kurator/src/Summary.cpp | 2 +- kurator/src/Summary.h | 2 +- kurator/src/Title.cpp | 2 +- kurator/src/Title.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/kurator/src/Battle.cpp b/kurator/src/Battle.cpp index 8ea3e11..da4cbde 100644 --- a/kurator/src/Battle.cpp +++ b/kurator/src/Battle.cpp @@ -91,7 +91,7 @@ static void animate_lines(engine::Context& ctx); void -Battle::update(const float) +Battle::update() { if (IsKeyPressed(KEY_ESCAPE)) return session->set(std::make_shared(session, session->current())); diff --git a/kurator/src/Battle.h b/kurator/src/Battle.h index b928855..592366f 100644 --- a/kurator/src/Battle.h +++ b/kurator/src/Battle.h @@ -28,7 +28,7 @@ public: explicit Battle(std::shared_ptr _session); Battle(std::shared_ptr _session, campaign::Scenario scenario, Callback _report={}); virtual ~Battle(); - void update(float dt) override; + void update() override; void draw() const override; void on_end(const sim::End& end); void on_hit(const sim::Hit& hit); diff --git a/kurator/src/Campaign.cpp b/kurator/src/Campaign.cpp index 7067bba..61f88e1 100644 --- a/kurator/src/Campaign.cpp +++ b/kurator/src/Campaign.cpp @@ -50,7 +50,7 @@ Campaign::Campaign(std::shared_ptr _session) : void -Campaign::update(const float) +Campaign::update() { if (ships.empty()) return session->pop(); diff --git a/kurator/src/Campaign.h b/kurator/src/Campaign.h index f7beed5..f181edb 100644 --- a/kurator/src/Campaign.h +++ b/kurator/src/Campaign.h @@ -16,7 +16,7 @@ class Campaign : public Scene { public: Campaign(std::shared_ptr _session); - void update(float dt) override; + void update() override; void draw() const override; private: std::shared_ptr session; diff --git a/kurator/src/Pause.cpp b/kurator/src/Pause.cpp index 9b28ef3..8d08b80 100644 --- a/kurator/src/Pause.cpp +++ b/kurator/src/Pause.cpp @@ -23,7 +23,7 @@ Pause::Pause(std::shared_ptr _session, std::shared_ptr _scene) : void -Pause::update(float) +Pause::update() { frame.update(); ImGui::SetNextWindowSize({GetScreenWidth()/3.0f, 0.0f}, ImGuiCond_Once); diff --git a/kurator/src/Pause.h b/kurator/src/Pause.h index 6e0cf9e..f738f59 100644 --- a/kurator/src/Pause.h +++ b/kurator/src/Pause.h @@ -15,7 +15,7 @@ class Pause : public Scene { public: Pause(std::shared_ptr _session, std::shared_ptr _scene); - void update(float dt) override; + void update() override; void draw() const override; void restore() const; private: diff --git a/kurator/src/ScenarioEditor.cpp b/kurator/src/ScenarioEditor.cpp index b9d3ada..e1703c6 100644 --- a/kurator/src/ScenarioEditor.cpp +++ b/kurator/src/ScenarioEditor.cpp @@ -36,7 +36,7 @@ ScenarioEditor::ScenarioEditor(std::shared_ptr _session) : void -ScenarioEditor::update(float) +ScenarioEditor::update() { frame.update(); if (ImGui::Begin("Scenario Editor")) { diff --git a/kurator/src/ScenarioEditor.h b/kurator/src/ScenarioEditor.h index 9222a64..fe82fa8 100644 --- a/kurator/src/ScenarioEditor.h +++ b/kurator/src/ScenarioEditor.h @@ -27,7 +27,7 @@ class ScenarioEditor : public Scene { public: explicit ScenarioEditor(std::shared_ptr _session); - void update(float dt) override; + void update() override; void draw() const override; void start_battle(); private: diff --git a/kurator/src/Scene.h b/kurator/src/Scene.h index 594ad17..a4fcc75 100644 --- a/kurator/src/Scene.h +++ b/kurator/src/Scene.h @@ -9,7 +9,7 @@ class Scene { public: virtual ~Scene() = default; - virtual void update(float dt) = 0; + virtual void update() = 0; virtual void draw() const = 0; }; diff --git a/kurator/src/Session.cpp b/kurator/src/Session.cpp index 4333a53..5bf405a 100644 --- a/kurator/src/Session.cpp +++ b/kurator/src/Session.cpp @@ -51,7 +51,7 @@ Session::run() while (!window.should_close() && !scenes.empty()) { auto scene = current(); rlImGuiBegin(); - scene->update(GetFrameTime()); + scene->update(); if (!scenes.empty()) scene = current(); BeginDrawing(); diff --git a/kurator/src/Summary.cpp b/kurator/src/Summary.cpp index 6a52d93..ab013d6 100644 --- a/kurator/src/Summary.cpp +++ b/kurator/src/Summary.cpp @@ -32,7 +32,7 @@ Summary::Summary(std::shared_ptr _session, stats::EventLog _events) : void -Summary::update(const float) +Summary::update() { if (IsKeyPressed(KEY_SPACE)) session->pop(); diff --git a/kurator/src/Summary.h b/kurator/src/Summary.h index 4467d0d..809b034 100644 --- a/kurator/src/Summary.h +++ b/kurator/src/Summary.h @@ -16,7 +16,7 @@ class Summary : public Scene { public: Summary(std::shared_ptr _session, stats::EventLog _events); - void update(float dt) override; + void update() override; void draw() const override; private: std::shared_ptr session; diff --git a/kurator/src/Title.cpp b/kurator/src/Title.cpp index e5d2e2f..e6c23b2 100644 --- a/kurator/src/Title.cpp +++ b/kurator/src/Title.cpp @@ -22,7 +22,7 @@ Title::Title(std::shared_ptr _session) : void -Title::update(const float) +Title::update() { ImGui::SetNextWindowSize({GetScreenWidth()/3.0f, 0.0f}, ImGuiCond_Once); ImGui::SetNextWindowPos({GetScreenWidth()/2.0f, GetScreenHeight()/2.0f}, ImGuiCond_Once, {0.5f, 0.4f}); diff --git a/kurator/src/Title.h b/kurator/src/Title.h index c29dc99..5190f0f 100644 --- a/kurator/src/Title.h +++ b/kurator/src/Title.h @@ -14,7 +14,7 @@ class Title : public Scene { public: explicit Title(std::shared_ptr _session); - void update(float dt) override; + void update() override; void draw() const override; private: std::shared_ptr session; -- cgit v1.1