Changed the name of the editor's main class

This commit is contained in:
Kayne Ruse
2013-06-24 09:26:25 +10:00
parent 09c88c7232
commit c1d03d1cef
3 changed files with 17 additions and 15 deletions
@@ -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 <stdexcept>
#include <chrono>
@@ -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;
}
@@ -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);
+2 -2
View File
@@ -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 <stdexcept>
#include <iostream>
@@ -31,7 +31,7 @@ int main(int, char**) {
cout << "Beginning program" << endl;
#endif
try {
SceneManager app;
EditorApplication app;
app.Init();
app.Proc();
app.Quit();