diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index f500078a1d2c..ab03cc84e0ae 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -57,7 +57,7 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription * _sound = nullptr; _platform = gd->desc.platform; - initVariables(); + initVariables(); } AvalancheEngine::~AvalancheEngine() { @@ -357,7 +357,7 @@ bool AvalancheEngine::saveGame(const int16 slot, const Common::String &desc) { f->writeSint16LE(t.tm_mday); f->writeSint16LE(t.tm_mon); f->writeSint16LE(t.tm_year); - + _totalTime += getTimeInSeconds() - _startTime; Common::Serializer sz(NULL, f); @@ -479,11 +479,11 @@ Common::String AvalancheEngine::expandDate(int d, int m, int y) { return day + ' ' + month + ' ' + intToStr(y + 1900); } - + uint32 AvalancheEngine::getTimeInSeconds() { - TimeDate time; - _system->getTimeAndDate(time); - return time.tm_hour * 3600 + time.tm_min * 60 + time.tm_sec; + TimeDate time; + _system->getTimeAndDate(time); + return time.tm_hour * 3600 + time.tm_min * 60 + time.tm_sec; } void AvalancheEngine::updateEvents() { diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index 909e8ff5809f..2734155b7dd3 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -268,7 +268,7 @@ class AvalancheEngine : public Engine { // or at the begginning of the game, and _ablteToAddTimer must be modified in addTimer(). bool _isLoaded; // Is it a loaded gamestate? bool _ableToAddTimer; - + void callVerb(VerbCode id); void loadRoom(byte num); void thinkAbout(byte object, bool type); // Hey!!! Get it and put it!!! diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index db987b6e7063..d703fdd2cc71 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -1529,7 +1529,7 @@ void AvalancheEngine::newGame() { _userMovesAvvy = false; _doingSpriteRun = false; _avvyInBed = true; - + _ableToAddTimer = true; // Set to false in _vm->loadGame(). _isLoaded = false; diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index 1b6bc78fb89b..6090dc967a9f 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -605,8 +605,8 @@ Common::String Parser::totalTime() { uint32 curTime = _vm->getTimeInSeconds() - _vm->_startTime; if (_vm->_isLoaded) - curTime += _vm->_totalTime; - + curTime += _vm->_totalTime; + h = (uint16)(curTime / 3600); s = (uint16)(curTime % 3600); m = s / 60; diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index a62a26369583..8a4ee7ed227c 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -208,7 +208,7 @@ void Timer::updateTimer() { } } } - + _vm->_roomCycles++; // Cycles since you've been in this room. }