diff options
author | Nipun Garg | 2019-07-09 13:26:46 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:16 +0200 |
commit | 9b43fbfa9fdfa6483f1ba1574689f49525d7ddc9 (patch) | |
tree | a98dcab45710b750a56727398e39675750d5b954 /engines | |
parent | b503e2ba711476982af2ba455505b17c0bb236c9 (diff) | |
download | scummvm-rg350-9b43fbfa9fdfa6483f1ba1574689f49525d7ddc9.tar.gz scummvm-rg350-9b43fbfa9fdfa6483f1ba1574689f49525d7ddc9.tar.bz2 scummvm-rg350-9b43fbfa9fdfa6483f1ba1574689f49525d7ddc9.zip |
HDB: Save/Load _timePlayed
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/saveload.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/hdb/saveload.cpp b/engines/hdb/saveload.cpp index 1ae78febfc..394b8042b9 100644 --- a/engines/hdb/saveload.cpp +++ b/engines/hdb/saveload.cpp @@ -36,7 +36,6 @@ Common::Error HDBGame::saveGameState(int slot) { if (!(out = _saveFileMan->openForSaving(saveFileName))) error("Unable to open save file"); - warning("STUB: Save MetaData"); Graphics::saveThumbnail(*out); // Actual Save Data @@ -63,7 +62,6 @@ Common::Error HDBGame::loadGameState(int slot) { return Common::kReadingFailed; } - warning("STUB: Load MetaData"); Graphics::skipThumbnail(*in); // Actual Save Data @@ -76,7 +74,8 @@ Common::Error HDBGame::loadGameState(int slot) { void HDBGame::saveGame(Common::OutSaveFile *out) { - // Save Map Name + // Save Map Name and Time + out->writeUint32LE(_timeSeconds + (_timePlayed / 1000)); out->write(_inMapName, 32); // Save Map Object Data @@ -100,12 +99,12 @@ void HDBGame::saveGame(Common::OutSaveFile *out) { } void HDBGame::loadGame(Common::InSaveFile *in) { - // Load Map Name + // Load Map Name and Time + _timeSeconds = in->readUint32LE();; + _timePlayed = 0; in->read(_inMapName, 32); g_hdb->_sound->stopMusic(); - _timeSeconds = 0; - _timePlayed = 0; // Load Map Object Data _map->loadSaveFile(in); |