Moved all time() calls in AGOS to a single new method AGOSEngine::getTime(); also replaced an evil function-static variable by a member variable (lastMinute)
svn-id: r29908
This commit is contained in:
parent
15a94b7c0c
commit
f44a196087
10 changed files with 49 additions and 57 deletions
|
@ -299,7 +299,7 @@ void AGOSEngine_PuzzlePack::opp_iconifyWindow() {
|
|||
// 30
|
||||
getNextWord();
|
||||
if (_clockStopped != 0)
|
||||
_gameTime += time(NULL) - _clockStopped;
|
||||
_gameTime += getTime() - _clockStopped;
|
||||
_clockStopped = 0;
|
||||
_system->setFeatureState(OSystem::kFeatureIconifyWindow, true);
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ void AGOSEngine_PuzzlePack::opp_sync() {
|
|||
void AGOSEngine_PuzzlePack::opp_saveUserGame() {
|
||||
// 132: save game
|
||||
if (_clockStopped != 0)
|
||||
_gameTime += time(NULL) - _clockStopped;
|
||||
_gameTime += getTime() - _clockStopped;
|
||||
_clockStopped = 0;
|
||||
|
||||
if (getGameId() == GID_DIMP) {
|
||||
|
@ -452,7 +452,7 @@ void AGOSEngine_PuzzlePack::opp_setPathValues() {
|
|||
void AGOSEngine_PuzzlePack::opp_restartClock() {
|
||||
// 194: resume clock
|
||||
if (_clockStopped != 0)
|
||||
_gameTime += time(NULL) - _clockStopped;
|
||||
_gameTime += getTime() - _clockStopped;
|
||||
_clockStopped = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue