olsner
09f47d6820
- g_Terrain and g_Camera totally eradicated as globals, is now m_Terrain of CWorld and m_Camera of CGameView - terrainMain.cpp is almost completely empty with functionality moved into the relevant core classes - Miscellaneous global functions moved into Core Classes (mostly GameView) This was SVN commit r865.
28 lines
445 B
C++
Executable File
28 lines
445 B
C++
Executable File
#include "precompiled.h"
|
|
|
|
#include "Game.h"
|
|
|
|
CGame *g_Game=NULL;
|
|
|
|
PSRETURN CGame::Initialize(CGameAttributes *pAttribs)
|
|
{
|
|
try
|
|
{
|
|
m_World.Initialize(pAttribs);
|
|
m_Simulation.Initialize(pAttribs);
|
|
m_GameView.Initialize(pAttribs);
|
|
}
|
|
catch (PSERROR_Game e)
|
|
{
|
|
return e.code;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
void CGame::Update(double deltaTime)
|
|
{
|
|
m_Simulation.Update(deltaTime);
|
|
|
|
// TODO Detect game over and bring up the summary screen or something
|
|
}
|