From e585e01b625fcdbc00709c1bbade1b542b1f6139 Mon Sep 17 00:00:00 2001 From: max-001 Date: Wed, 20 Nov 2024 11:42:23 +0100 Subject: Added Doxygen comments/explanation for GameObjects and Scenes --- src/crepe/api/Scene.h | 14 ++++++++++ src/crepe/api/SceneManager.h | 10 +++++++ src/doc/feature/gameobject.dox | 18 +++++++++++++ src/doc/feature/scene.dox | 60 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 src/doc/feature/gameobject.dox create mode 100644 src/doc/feature/scene.dox diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index 0e516b6..6647135 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -7,19 +7,33 @@ namespace crepe { class SceneManager; class ComponentManager; +/** + * \brief Represents a Scene + * + * This class represents a Scene. The Scene class is only used as an interface for the game + * programmer. + */ class Scene { protected: + /** + * \param mgr Reference to the ComponentManager + * \param name Name of the scene + */ Scene(ComponentManager & mgr, const std::string & name); + //! SceneManager instances Scene friend class SceneManager; public: virtual ~Scene() = default; public: + //! Load the scene virtual void load_scene() = 0; + //! The scene name const std::string name; protected: + //! Reference to the ComponentManager ComponentManager & component_manager; }; diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index e854794..16d6004 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -10,8 +10,15 @@ namespace crepe { class ComponentManager; +/** + * \brief Manages scenes + * + * This class manages scenes. It can add new scenes and load them. It also manages the current scene + * and the next scene. + */ class SceneManager { public: + //! \param mgr Reference to the ComponentManager SceneManager(ComponentManager & mgr); public: @@ -35,8 +42,11 @@ public: void load_next_scene(); private: + //! Vector of scenes std::vector> scenes; + //! Next scene to load std::string next_scene; + //! Reference to the ComponentManager ComponentManager & component_manager; }; diff --git a/src/doc/feature/gameobject.dox b/src/doc/feature/gameobject.dox new file mode 100644 index 0000000..603c98d --- /dev/null +++ b/src/doc/feature/gameobject.dox @@ -0,0 +1,18 @@ +// vim:ft=doxygen +namespace crepe { +/** + +\defgroup feature_gameobject GameObjects +\ingroup feature +\brief GameObject to create a Scene + +GameObjects are the fundamental building blocks of a Scene. They represent entities +in the game world and can have various components attached to them to define their +behavior and properties. GameObjects can be created, and modified within the +Scene, allowing for a flexible and dynamic game environment. + +\see Component +\see Scene + +*/ +} diff --git a/src/doc/feature/scene.dox b/src/doc/feature/scene.dox new file mode 100644 index 0000000..50f5ebd --- /dev/null +++ b/src/doc/feature/scene.dox @@ -0,0 +1,60 @@ +// vim:ft=doxygen +namespace crepe { +/** + +\defgroup feature_scene Scenes +\ingroup feature +\brief User-defined scenes + +Scenes can be used to implement game environments, and allow arbitrary game objects to be organized +as part of the game structure. Scenes are implemented as derivative classes of Scene, which are +added to the game using the SceneManager. Scenes describe the start of a Scene and cannot modify +GameObject during runtime of a Scene (use Scripting for this purpose). + +\see SceneManager +\see GameObject +\see Script +\see Scene + +\par Example + +This example demonstrates how to define and add scenes to a scene manager in the `crepe` framework. +Two concrete scene classes, `ConcreteScene1` and `ConcreteScene2`, are derived from the base `Scene` class. +Each scene class overrides the `load_scene` method to create and initialize game objects specific to the scene. +Finally, the scenes are added to the scene manager. + +```cpp +using namespace crepe; + +class ConcreteScene1 : public Scene { +public: + using Scene::Scene; + + void load_scene() { + auto & mgr = this->component_manager; + GameObject object1 = mgr.new_object("scene_1", "tag_scene_1", Vector2{0, 0}, 0, 1); + GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", Vector2{1, 0}, 0, 1); + GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1); + } +}; + +class ConcreteScene2 : public Scene { +public: + using Scene::Scene; + + void load_scene() { + auto & mgr = this->component_manager; + GameObject object1 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 0}, 0, 1); + GameObject object2 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 1}, 0, 1); + GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 2}, 0, 1); + GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 3}, 0, 1); + } +}; + +// Add the scenes to the scene manager +scene_mgr.add_scene("scene1"); +scene_mgr.add_scene("scene2"); +``` + +*/ +} -- cgit v1.2.3 From 801be9bd006a5f9f24a76067113bf1fd756aabbd Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 08:47:36 +0100 Subject: Replaced Scene's name variable with get_name() method --- src/crepe/api/Scene.cpp | 4 +--- src/crepe/api/Scene.h | 9 ++++++--- src/crepe/api/SceneManager.cpp | 2 +- src/crepe/api/SceneManager.h | 2 +- src/crepe/api/SceneManager.hpp | 6 +++--- src/example/scene_manager.cpp | 8 ++++++-- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/crepe/api/Scene.cpp b/src/crepe/api/Scene.cpp index 88aa82d..849945e 100644 --- a/src/crepe/api/Scene.cpp +++ b/src/crepe/api/Scene.cpp @@ -2,6 +2,4 @@ using namespace crepe; -Scene::Scene(ComponentManager & mgr, const std::string & name) - : component_manager(mgr), - name(name) {} +Scene::Scene(ComponentManager & mgr) : component_manager(mgr) {} diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index 6647135..45595c7 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -19,7 +19,7 @@ protected: * \param mgr Reference to the ComponentManager * \param name Name of the scene */ - Scene(ComponentManager & mgr, const std::string & name); + Scene(ComponentManager & mgr); //! SceneManager instances Scene friend class SceneManager; @@ -29,8 +29,11 @@ public: public: //! Load the scene virtual void load_scene() = 0; - //! The scene name - const std::string name; + /** + * \brief Get the scene's name + * \return The scene's name + */ + virtual std::string get_name() = 0; protected: //! Reference to the ComponentManager diff --git a/src/crepe/api/SceneManager.cpp b/src/crepe/api/SceneManager.cpp index 7fb5cb0..1f783ad 100644 --- a/src/crepe/api/SceneManager.cpp +++ b/src/crepe/api/SceneManager.cpp @@ -18,7 +18,7 @@ void SceneManager::load_next_scene() { auto it = find_if(this->scenes.begin(), this->scenes.end(), [&next_scene = this->next_scene](unique_ptr & scene) { - return scene->name == next_scene; + return scene.get()->get_name() == next_scene; }); // next scene not found diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index 16d6004..ebf77e7 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -29,7 +29,7 @@ public: * \param name Name of new scene */ template - void add_scene(const std::string & name); + void add_scene(); /** * \brief Set the next scene * diff --git a/src/crepe/api/SceneManager.hpp b/src/crepe/api/SceneManager.hpp index 714f690..94e5946 100644 --- a/src/crepe/api/SceneManager.hpp +++ b/src/crepe/api/SceneManager.hpp @@ -5,16 +5,16 @@ namespace crepe { template -void SceneManager::add_scene(const std::string & name) { +void SceneManager::add_scene() { using namespace std; static_assert(is_base_of::value, "T must be derived from Scene"); - Scene * scene = new T(this->component_manager, name); + Scene * scene = new T(this->component_manager); this->scenes.emplace_back(unique_ptr(scene)); // The first scene added, is the one that will be loaded at the beginning if (next_scene.empty()) { - next_scene = name; + next_scene = scene->get_name(); } } diff --git a/src/example/scene_manager.cpp b/src/example/scene_manager.cpp index accec7d..ac7f439 100644 --- a/src/example/scene_manager.cpp +++ b/src/example/scene_manager.cpp @@ -20,6 +20,8 @@ public: GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", Vector2{1, 0}, 0, 1); GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1); } + + string get_name() { return "scene1"; } }; class ConcreteScene2 : public Scene { @@ -33,6 +35,8 @@ public: GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 2}, 0, 1); GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 3}, 0, 1); } + + string get_name() { return "scene2"; } }; int main() { @@ -40,8 +44,8 @@ int main() { SceneManager scene_mgr{component_mgr}; // Add the scenes to the scene manager - scene_mgr.add_scene("scene1"); - scene_mgr.add_scene("scene2"); + scene_mgr.add_scene(); + scene_mgr.add_scene(); // There is no need to call set_next_scene() at the beginnen, because the first scene will be // automatically set as the next scene -- cgit v1.2.3 From a3512cfa329d50fb72d22a39d4c134d39763815f Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 08:49:23 +0100 Subject: Added TODO --- src/crepe/api/Scene.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index 45595c7..74cfac3 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -15,9 +15,9 @@ class ComponentManager; */ class Scene { protected: + //TODO: Use Loek's custom reference class to set ComponentManger via SceneManager instead of via constructor /** * \param mgr Reference to the ComponentManager - * \param name Name of the scene */ Scene(ComponentManager & mgr); //! SceneManager instances Scene -- cgit v1.2.3 From 915341574d9be4ca86dff2b9981c6686477aad53 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 08:51:35 +0100 Subject: Changed comment --- src/crepe/api/SceneManager.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index ebf77e7..a20d6a0 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include "Scene.h" @@ -42,7 +41,7 @@ public: void load_next_scene(); private: - //! Vector of scenes + //! Vector of concrete scenes (added by add_scene()) std::vector> scenes; //! Next scene to load std::string next_scene; -- cgit v1.2.3 From 8b5fd6188862bf9bdfc06a5419c8525d2dfd5f7f Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 08:53:48 +0100 Subject: Deleted comma --- src/doc/feature/gameobject.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/feature/gameobject.dox b/src/doc/feature/gameobject.dox index 603c98d..c561874 100644 --- a/src/doc/feature/gameobject.dox +++ b/src/doc/feature/gameobject.dox @@ -8,7 +8,7 @@ namespace crepe { GameObjects are the fundamental building blocks of a Scene. They represent entities in the game world and can have various components attached to them to define their -behavior and properties. GameObjects can be created, and modified within the +behavior and properties. GameObjects can be created and modified within the Scene, allowing for a flexible and dynamic game environment. \see Component -- cgit v1.2.3 From d3d207b9a2445a9219274466bae2254e1c3db268 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:06:52 +0100 Subject: Added SceneManger to LoopManager --- src/crepe/api/LoopManager.h | 13 +++++++++++++ src/crepe/api/LoopManager.hpp | 5 +++++ src/crepe/api/SceneManager.h | 1 - src/example/scene_manager.cpp | 20 +++++++++++--------- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index f6904be..25b833a 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -4,6 +4,7 @@ #include "../ComponentManager.h" #include "../system/System.h" +#include "api/SceneManager.h" namespace crepe { @@ -12,6 +13,14 @@ public: void start(); LoopManager(); + /** + * \brief Add a new concrete scene to the scene manager + * + * \tparam T Type of concrete scene + */ + template + void add_scene(); + private: /** * \brief Setup function for one-time initialization. @@ -53,12 +62,14 @@ private: * This function updates physics and game logic based on LoopTimer's fixed_delta_time. */ void fixed_update(); + /** * \brief Set game running variable * * \param running running (false = game shutdown, true = game running) */ void set_running(bool running); + /** * \brief Function for executing render-related systems. * @@ -71,6 +82,8 @@ private: private: //! Component manager instance ComponentManager component_manager{}; + //! Scene manager instance + SceneManager scene_manager{component_manager}; private: /** diff --git a/src/crepe/api/LoopManager.hpp b/src/crepe/api/LoopManager.hpp index 0b14fdb..9cf470b 100644 --- a/src/crepe/api/LoopManager.hpp +++ b/src/crepe/api/LoopManager.hpp @@ -10,6 +10,11 @@ namespace crepe { +template +void LoopManager::add_scene() { + this->scene_manager.add_scene(); +} + template T & LoopManager::get_system() { using namespace std; diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index a20d6a0..45ba668 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -25,7 +25,6 @@ public: * \brief Add a new concrete scene to the scene manager * * \tparam T Type of concrete scene - * \param name Name of new scene */ template void add_scene(); diff --git a/src/example/scene_manager.cpp b/src/example/scene_manager.cpp index ac7f439..7277afa 100644 --- a/src/example/scene_manager.cpp +++ b/src/example/scene_manager.cpp @@ -1,3 +1,6 @@ +#define private public + +#include "api/LoopManager.h" #include #include @@ -40,22 +43,21 @@ public: }; int main() { - ComponentManager component_mgr{}; - SceneManager scene_mgr{component_mgr}; + LoopManager loop_mgr; // Add the scenes to the scene manager - scene_mgr.add_scene(); - scene_mgr.add_scene(); + loop_mgr.add_scene(); + loop_mgr.add_scene(); // There is no need to call set_next_scene() at the beginnen, because the first scene will be // automatically set as the next scene // Load scene1 (the first scene added) - scene_mgr.load_next_scene(); + loop_mgr.scene_manager.load_next_scene(); // Get the Metadata components of each GameObject of Scene1 vector> metadata - = component_mgr.get_components_by_type(); + = loop_mgr.component_manager.get_components_by_type(); cout << "Metadata components of Scene1:" << endl; // Print the Metadata @@ -65,12 +67,12 @@ int main() { } // Set scene2 as the next scene - scene_mgr.set_next_scene("scene2"); + loop_mgr.scene_manager.set_next_scene("scene2"); // Load scene2 - scene_mgr.load_next_scene(); + loop_mgr.scene_manager.load_next_scene(); // Get the Metadata components of each GameObject of Scene2 - metadata = component_mgr.get_components_by_type(); + metadata = loop_mgr.component_manager.get_components_by_type(); cout << "Metadata components of Scene2:" << endl; // Print the Metadata -- cgit v1.2.3 From 2f7f7ef167924be7db75aae2cd3f16ec50323980 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:16:08 +0100 Subject: Added Doxygen --- src/crepe/api/LoopManager.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 25b833a..13e6dac 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -8,6 +8,11 @@ namespace crepe { +/** + * \brief Main game loop manager + * + * This class is responsible for managing the game loop, including initialization and updating. + */ class LoopManager { public: void start(); -- cgit v1.2.3 From ba93a8deaf7ba4e68c25d74c58637450cbe0e056 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:30:23 +0100 Subject: Added const --- src/crepe/api/Scene.h | 2 +- src/example/scene_manager.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index 74cfac3..869bf6f 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -33,7 +33,7 @@ public: * \brief Get the scene's name * \return The scene's name */ - virtual std::string get_name() = 0; + virtual std::string get_name() const = 0; protected: //! Reference to the ComponentManager diff --git a/src/example/scene_manager.cpp b/src/example/scene_manager.cpp index 7277afa..2ab45f9 100644 --- a/src/example/scene_manager.cpp +++ b/src/example/scene_manager.cpp @@ -1,6 +1,6 @@ #define private public -#include "api/LoopManager.h" +#include #include #include @@ -24,7 +24,7 @@ public: GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1); } - string get_name() { return "scene1"; } + string get_name() const { return "scene1"; } }; class ConcreteScene2 : public Scene { @@ -39,7 +39,7 @@ public: GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 3}, 0, 1); } - string get_name() { return "scene2"; } + string get_name() const { return "scene2"; } }; int main() { -- cgit v1.2.3 From ba3b97467ffa9df03d74e87bd567e3dfc521df05 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:42:50 +0100 Subject: Improved example --- src/doc/feature/scene.dox | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/src/doc/feature/scene.dox b/src/doc/feature/scene.dox index 50f5ebd..5f34446 100644 --- a/src/doc/feature/scene.dox +++ b/src/doc/feature/scene.dox @@ -9,7 +9,7 @@ namespace crepe { Scenes can be used to implement game environments, and allow arbitrary game objects to be organized as part of the game structure. Scenes are implemented as derivative classes of Scene, which are added to the game using the SceneManager. Scenes describe the start of a Scene and cannot modify -GameObject during runtime of a Scene (use Scripting for this purpose). +GameObjects during runtime of a Scene (use \ref feature_script "Scripting" for this purpose). \see SceneManager \see GameObject @@ -18,42 +18,49 @@ GameObject during runtime of a Scene (use Scripting for this purpose). \par Example -This example demonstrates how to define and add scenes to a scene manager in the `crepe` framework. -Two concrete scene classes, `ConcreteScene1` and `ConcreteScene2`, are derived from the base `Scene` class. -Each scene class overrides the `load_scene` method to create and initialize game objects specific to the scene. -Finally, the scenes are added to the scene manager. +This example demonstrates how to define and add scenes to the loop/scene manager in the `crepe` framework. +Each concrete scene should be derived from Scene. In the example below, the concrete scene is named MyScene. +A concrete scene should, at least, implement (override) two methods, namely load_scene() and get_name(). The +scene is build (using GameObjects) in the load_scene() method. GameObjects should be made using the +component_manager::new_object(). In the example below, two GameObjects (named object1 and object2) are added +to MyScene. object1 and object2 do not have any non-default Components attached to them, however, if needed, +this should also be done in load_scene(). Each concrete scene must have a unique name. This unique name is +used to load a new concrete scene (via a Script). The unique name is set using the get_name() method. In the +example below, MyScene's unique name is my_scene. +After setting up one or more concrete scene(s), the concrete scene(s) should be added to the loop/scene manager. +This is done in your main(). Firstly, the LoopManager should be instantiated. Than, all the concrete scene(s) +should be added to the loop/scene manger via loop_mgr::add_scene<>(). The templated argument should define the +concrete scene to be added. ```cpp +#include +#include +#include +#include + using namespace crepe; -class ConcreteScene1 : public Scene { +class MyScene : public Scene { public: using Scene::Scene; void load_scene() { auto & mgr = this->component_manager; - GameObject object1 = mgr.new_object("scene_1", "tag_scene_1", Vector2{0, 0}, 0, 1); - GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", Vector2{1, 0}, 0, 1); - GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1); + GameObject object1 = mgr.new_object("object1", "tag_my_scene", Vector2{0, 0}, 0, 1); + GameObject object2 = mgr.new_object("object2", "tag_my_scene", Vector2{1, 0}, 0, 1); } -}; - -class ConcreteScene2 : public Scene { -public: - using Scene::Scene; - void load_scene() { - auto & mgr = this->component_manager; - GameObject object1 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 0}, 0, 1); - GameObject object2 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 1}, 0, 1); - GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 2}, 0, 1); - GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 3}, 0, 1); - } + string get_name() const { return "my_scene"; } }; -// Add the scenes to the scene manager -scene_mgr.add_scene("scene1"); -scene_mgr.add_scene("scene2"); +int main() { + LoopManager loop_mgr; + + // Add the scenes to the loop manager + loop_mgr.add_scene(); + + loop_mgr.start(); +} ``` */ -- cgit v1.2.3 From 1bc04b371f2cc8740f2ee039f75101922da671d6 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:56:36 +0100 Subject: Adjusted test according to changes in Scene and SceneManager --- src/test/SceneManagerTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/SceneManagerTest.cpp b/src/test/SceneManagerTest.cpp index 69e1171..dab2ce9 100644 --- a/src/test/SceneManagerTest.cpp +++ b/src/test/SceneManagerTest.cpp @@ -20,6 +20,8 @@ public: GameObject object2 = mgr.new_object("scene_1", "tag_scene_1", Vector2{1, 0}, 0, 1); GameObject object3 = mgr.new_object("scene_1", "tag_scene_1", Vector2{2, 0}, 0, 1); } + + string get_name() const { return "scene1";} }; class ConcreteScene2 : public Scene { @@ -33,6 +35,8 @@ public: GameObject object3 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 2}, 0, 1); GameObject object4 = mgr.new_object("scene_2", "tag_scene_2", Vector2{0, 3}, 0, 1); } + + string get_name() const { return "scene2";} }; class SceneManagerTest : public ::testing::Test { @@ -42,8 +46,8 @@ public: }; TEST_F(SceneManagerTest, loadScene) { - scene_mgr.add_scene("scene1"); - scene_mgr.add_scene("scene2"); + scene_mgr.add_scene(); + scene_mgr.add_scene(); scene_mgr.load_next_scene(); -- cgit v1.2.3