2004-07-27 23:00:53 +02:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
|
|
|
#include "Game.h"
|
|
|
|
|
2004-07-31 17:57:18 +02:00
|
|
|
CGame *g_Game=NULL;
|
2004-07-27 23:00:53 +02:00
|
|
|
|
2004-07-31 17:57:18 +02:00
|
|
|
PSRETURN CGame::Initialize(CGameAttributes *pAttribs)
|
2004-07-27 23:00:53 +02:00
|
|
|
{
|
2004-07-31 17:57:18 +02:00
|
|
|
try
|
|
|
|
{
|
|
|
|
m_World.Initialize(pAttribs);
|
|
|
|
m_Simulation.Initialize(pAttribs);
|
|
|
|
m_GameView.Initialize(pAttribs);
|
|
|
|
}
|
|
|
|
catch (PSERROR_Game e)
|
|
|
|
{
|
|
|
|
return e.code;
|
|
|
|
}
|
|
|
|
return 0;
|
2004-07-27 23:00:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGame::Update(double deltaTime)
|
|
|
|
{
|
|
|
|
m_Simulation.Update(deltaTime);
|
|
|
|
|
|
|
|
// TODO Detect game over and bring up the summary screen or something
|
|
|
|
}
|