Changeset View
Changeset View
Standalone View
Standalone View
source/ps/Game.cpp
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | |||||
void CGame::StartGame(JS::MutableHandleValue attribs, const std::string& savedState) | void CGame::StartGame(JS::MutableHandleValue attribs, const std::string& savedState) | ||||
{ | { | ||||
if (m_ReplayLogger) | if (m_ReplayLogger) | ||||
m_ReplayLogger->StartGame(attribs); | m_ReplayLogger->StartGame(attribs); | ||||
RegisterInit(attribs, savedState); | RegisterInit(attribs, savedState); | ||||
} | } | ||||
int CGame::SimTime() | |||||
{ | |||||
return GetTurnManager()->GetCurrentTurn() * GetTurnManager()->GetCurrentTurnLength(); | |||||
} | |||||
// TODO: doInterpolate is optional because Atlas interpolates explicitly, | // TODO: doInterpolate is optional because Atlas interpolates explicitly, | ||||
// so that it has more control over the update rate. The game might want to | // so that it has more control over the update rate. The game might want to | ||||
// do the same, and then doInterpolate should be redundant and removed. | // do the same, and then doInterpolate should be redundant and removed. | ||||
void CGame::Update(const double deltaRealTime, bool doInterpolate) | void CGame::Update(const double deltaRealTime, bool doInterpolate) | ||||
{ | { | ||||
if (m_Paused || !m_TurnManager) | if (m_Paused || !m_TurnManager) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator