From 66317766f122ab2e2095e8dbf4c32ddf27ad2c35 Mon Sep 17 00:00:00 2001 From: xawotihs Date: Mon, 9 Dec 2013 00:16:00 +0100 Subject: [PATCH] Remove obsolete code in Qt console. --- JGE/src/Qtconsole.cpp | 55 ++----------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/JGE/src/Qtconsole.cpp b/JGE/src/Qtconsole.cpp index 57e4d76d4..333c9c400 100644 --- a/JGE/src/Qtconsole.cpp +++ b/JGE/src/Qtconsole.cpp @@ -5,6 +5,7 @@ #include "../include/JRenderer.h" #include "../include/JGameLauncher.h" +#include "corewrapper.h" #include "TestSuiteAI.h" #include "GameOptions.h" #include "MTGDeck.h" @@ -12,69 +13,17 @@ #include #include -class WagicWrapper -{ -public: - WagicWrapper(); - virtual ~WagicWrapper(); - -private: - JGE* m_engine; - JApp* m_app; - JGameLauncher* m_launcher; -}; - bool JGEToggleFullscreen() { return true; } -WagicWrapper::WagicWrapper() -{ - m_launcher = new JGameLauncher(); - u32 flags = m_launcher->GetInitFlags(); - if ((flags&JINIT_FLAG_ENABLE3D)!=0) - { - JRenderer::Set3DFlag(true); - } - - JGECreateDefaultBindings(); - - m_engine = JGE::GetInstance(); - m_app = m_launcher->GetGameApp(); - m_app->Create(); - m_engine->SetApp(m_app); - JRenderer::GetInstance()->Enable2D(); -} - -WagicWrapper::~WagicWrapper() -{ - if(m_launcher) - { - delete m_launcher; - m_launcher = NULL; - } - - if(m_engine) - m_engine->SetApp(NULL); - - if (m_app) - { - m_app->Destroy(); - delete m_app; - m_app = NULL; - } - - JGE::Destroy(); - m_engine = NULL; -} - int main(int argc, char* argv[]) { QCoreApplication a(argc, argv); int result = 0; - WagicWrapper* wagicCore = new WagicWrapper(); + WagicCore* wagicCore = new WagicCore(); MTGCollection()->loadFolder("sets/primitives/"); MTGCollection()->loadFolder("sets/", "_cards.dat"); options.reloadProfile();