diff --git a/editor/scene_manager.cpp b/editor/editor_application.cpp similarity index 89% rename from editor/scene_manager.cpp rename to editor/editor_application.cpp index 7bfb4f0..93af83c 100644 --- a/editor/scene_manager.cpp +++ b/editor/editor_application.cpp @@ -19,7 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#include "scene_manager.hpp" +#include "editor_application.hpp" #include #include @@ -35,22 +35,22 @@ //Public access members //------------------------- -SceneManager::SceneManager() { +EditorApplication::EditorApplication() { // } -SceneManager::~SceneManager() { +EditorApplication::~EditorApplication() { UnloadScene(); } -void SceneManager::Init() { +void EditorApplication::Init() { if (SDL_Init(SDL_INIT_VIDEO)) throw(std::runtime_error("Failed to initialize SDL")); BaseScene::SetScreen(800, 600); } -void SceneManager::Proc() { +void EditorApplication::Proc() { LoadScene(SceneList::FIRST); //prepare the time system @@ -88,7 +88,7 @@ void SceneManager::Proc() { UnloadScene(); } -void SceneManager::Quit() { +void EditorApplication::Quit() { UnloadScene(); SDL_Quit(); } @@ -97,7 +97,7 @@ void SceneManager::Quit() { //Private access members //------------------------- -void SceneManager::LoadScene(SceneList sceneIndex) { +void EditorApplication::LoadScene(SceneList sceneIndex) { UnloadScene(); switch(sceneIndex) { @@ -112,7 +112,7 @@ void SceneManager::LoadScene(SceneList sceneIndex) { } } -void SceneManager::UnloadScene() { +void EditorApplication::UnloadScene() { delete activeScene; activeScene = nullptr; } diff --git a/editor/scene_manager.hpp b/editor/editor_application.hpp similarity index 83% rename from editor/scene_manager.hpp rename to editor/editor_application.hpp index 2d59678..f41d53f 100644 --- a/editor/scene_manager.hpp +++ b/editor/editor_application.hpp @@ -19,24 +19,26 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#ifndef SCENEMANAGER_HPP_ -#define SCENEMANAGER_HPP_ +#ifndef EDITORAPPLICATION_HPP_ +#define EDITORAPPLICATION_HPP_ #include "scene_list.hpp" #include "base_scene.hpp" #include "SDL/SDL.h" -class SceneManager { +class EditorApplication { public: /* Public access members */ - SceneManager(); - ~SceneManager(); + EditorApplication(); + ~EditorApplication(); void Init(); void Proc(); void Quit(); + EditorApplication(EditorApplication const&) = delete; + EditorApplication(EditorApplication const&&) = delete; private: /* Private access members */ void LoadScene(SceneList sceneIndex); diff --git a/editor/main.cpp b/editor/main.cpp index 7a76519..1517d1e 100644 --- a/editor/main.cpp +++ b/editor/main.cpp @@ -19,7 +19,7 @@ * 3. This notice may not be removed or altered from any source * distribution. */ -#include "scene_manager.hpp" +#include "editor_application.hpp" #include #include @@ -31,7 +31,7 @@ int main(int, char**) { cout << "Beginning program" << endl; #endif try { - SceneManager app; + EditorApplication app; app.Init(); app.Proc(); app.Quit();