summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-15 22:19:32 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-15 22:19:32 +0200
commitaf9af56bb007050c969af310c4e816d260b9ce7f (patch)
treef630dbaffcae46fec4e83740e79d2bf3eef9cbc6 /src/app
parent2847aad51fb8165d3ad6fab3ddb1f0275a6f0815 (diff)
downloadcolobot-af9af56bb007050c969af310c4e816d260b9ce7f.tar.gz
colobot-af9af56bb007050c969af310c4e816d260b9ce7f.tar.bz2
colobot-af9af56bb007050c969af310c4e816d260b9ce7f.zip
Successful compilation & running
- temporarily mocked CSoundInterface and CPluginInterface - added CRobotMain to application - successfully compiles & runs, but doesn't display correctly at the moment
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp21
-rw-r--r--src/app/app.h4
2 files changed, 13 insertions, 12 deletions
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 <SDL/SDL.h>
@@ -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;