diff options
author | Piotr Dziwiński <piotr.dziwinski@nsn.com> | 2013-02-16 22:37:43 +0100 |
---|---|---|
committer | Piotr Dziwiński <piotr.dziwinski@nsn.com> | 2013-02-17 12:11:56 +0100 |
commit | 001d37b257b126dd6ef1dced70f94ff3d2806d28 (patch) | |
tree | 1025979c635c899f196d606f7d74170e33ef4f3a /src/app/app.cpp | |
parent | 45040318b026f8864d244e39f1703685ad688470 (diff) | |
download | colobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.tar.gz colobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.tar.bz2 colobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.zip |
CInstanceManager refactoring
* removed classes managed by CInstanceManager
except for CObject, CPyro, CBrain and CPhysics
because of dependencies
* refactored instance searching to use existing singleton instances of
CApplication, CEngine and CRobotMain and calling their getter
functions
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r-- | src/app/app.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 9886b24..ae5ac88 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -46,7 +46,7 @@ #endif -template<> CApplication* CSingleton<CApplication>::mInstance = nullptr; +template<> CApplication* CSingleton<CApplication>::m_instance = nullptr; //! Static buffer for putenv locale static char S_LANGUAGE[50] = { 0 }; @@ -94,7 +94,7 @@ CApplication::CApplication() { m_private = new ApplicationPrivate(); m_iMan = new CInstanceManager(); - m_eventQueue = new CEventQueue(m_iMan); + m_eventQueue = new CEventQueue(); m_profile = new CProfile(); m_engine = nullptr; @@ -187,6 +187,16 @@ CApplication::~CApplication() } } +CEventQueue* CApplication::GetEventQueue() +{ + return m_eventQueue; +} + +CSoundInterface* CApplication::GetSound() +{ + return m_sound; +} + ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[]) { bool waitDataDir = false; @@ -410,7 +420,7 @@ bool CApplication::Create() } // Create the 3D engine - m_engine = new Gfx::CEngine(m_iMan, this); + m_engine = new Gfx::CEngine(this); m_engine->SetDevice(m_device); @@ -425,7 +435,7 @@ bool CApplication::Create() m_modelManager = new Gfx::CModelManager(m_engine); // Create the robot application. - m_robotMain = new CRobotMain(m_iMan, this); + m_robotMain = new CRobotMain(this); m_robotMain->ChangePhase(PHASE_WELCOME1); |