From af9af56bb007050c969af310c4e816d260b9ce7f Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 15 Sep 2012 22:19:32 +0200 Subject: Successful compilation & running - temporarily mocked CSoundInterface and CPluginInterface - added CRobotMain to application - successfully compiles & runs, but doesn't display correctly at the moment --- src/app/app.cpp | 21 +++++++++++---------- src/app/app.h | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'src/app') diff --git a/src/app/app.cpp b/src/app/app.cpp index 6e336a2..ab3c33c 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -24,6 +24,7 @@ #include "common/iman.h" #include "common/image.h" #include "graphics/opengl/gldevice.h" +#include "object/robotmain.h" #include @@ -290,11 +291,8 @@ bool CApplication::Create() // Temporarily -- only in windowed mode m_deviceConfig.fullScreen = false; -/* // Create the sound instance. - m_sound = new CSound(m_iMan); - - // Create the robot application. - m_robotMain = new CRobotMain(m_iMan); */ + // Create the sound instance. + m_sound = new CSoundInterface(); std::string standardInfoMessage = @@ -370,6 +368,9 @@ bool CApplication::Create() return false; } + // Create the robot application. + m_robotMain = new CRobotMain(m_iMan, this); + GetLogger()->Info("CApplication created successfully\n"); return true; @@ -430,7 +431,7 @@ bool CApplication::CreateVideoSurface() void CApplication::Destroy() { - /*if (m_robotMain != nullptr) + if (m_robotMain != nullptr) { delete m_robotMain; m_robotMain = nullptr; @@ -440,7 +441,7 @@ void CApplication::Destroy() { delete m_sound; m_sound = nullptr; - }*/ + } if (m_engine != nullptr) { @@ -719,8 +720,8 @@ int CApplication::Run() passOn = m_engine->ProcessEvent(event); } - /*if (passOn && m_robotMain != nullptr) - m_robotMain->ProcessEvent(event); */ + if (passOn && m_robotMain != nullptr) + m_robotMain->EventProcess(event); } /* Update mouse position explicitly right before rendering @@ -1035,7 +1036,7 @@ void CApplication::StepSimulation() m_engine->FrameUpdate(); - //m_sound->FrameMove(m_relTime); + m_sound->FrameMove(m_relTime); Event frameEvent(EVENT_FRAME); diff --git a/src/app/app.h b/src/app/app.h index 4d567e0..1834a67 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -35,7 +35,7 @@ class CInstanceManager; class CEvent; class CRobotMain; -class CSound; +class CSoundInterface; /** * \struct JoystickDevice @@ -366,7 +366,7 @@ protected: //! Graphics device Gfx::CDevice* m_device; //! Sound subsystem - CSound* m_sound; + CSoundInterface* m_sound; //! Main class of the proper game engine CRobotMain* m_robotMain; -- cgit v1.2.3-1-g7c22