diff options
author | Adrian Frühwirth | 2018-03-01 20:15:47 +0100 |
---|---|---|
committer | Adrian Frühwirth | 2018-03-16 20:18:32 +0100 |
commit | ed44cbf287a9c75ca5925b1108a0c58a870191c1 (patch) | |
tree | 804707fcb6af74010853a6e0ee356818190a2d29 /engines/tucker/tucker.cpp | |
parent | 50003f2875c92111bc3a1024189298f675c467d2 (diff) | |
download | scummvm-rg350-ed44cbf287a9c75ca5925b1108a0c58a870191c1.tar.gz scummvm-rg350-ed44cbf287a9c75ca5925b1108a0c58a870191c1.tar.bz2 scummvm-rg350-ed44cbf287a9c75ca5925b1108a0c58a870191c1.zip |
TUCKER: Add savegame metadata and autosave support
Diffstat (limited to 'engines/tucker/tucker.cpp')
-rw-r--r-- | engines/tucker/tucker.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 309e0f2bed..56247a126d 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -351,6 +351,8 @@ void TuckerEngine::resetVariables() { _updateLocationFlag = false; _updateLocation70StringLen = 0; memset(_updateLocation70String, 0, sizeof(_updateLocation70String)); + + _lastSaveTime = _system->getMillis(); } void TuckerEngine::mainLoop() { @@ -616,7 +618,15 @@ void TuckerEngine::mainLoop() { handleCreditsSequence(); _quitGame = true; } + + if (shouldPerformAutoSave(_lastSaveTime)) { + writeAutosave(); + } } while (!_quitGame && _flagsTable[100] == 0); + + // auto save on quit + writeAutosave(); + if (_flagsTable[100] == 1) { handleCongratulationsSequence(); } |