aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/supernova.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/supernova/supernova.cpp')
-rw-r--r--engines/supernova/supernova.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index ad5d8af501..9526481fdf 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -148,6 +148,8 @@ Common::Error SupernovaEngine::run() {
CursorMan.replaceCursorPalette(initVGAPalette, 0, 16);
CursorMan.showMouse(true);
+ setTotalPlayTime(0);
+
int saveSlot = ConfMan.getInt("save_slot");
if (saveSlot >= 0) {
if (loadGameState(saveSlot).getCode() != Common::kNoError)
@@ -837,6 +839,7 @@ bool SupernovaEngine::loadGame(int slot) {
int descriptionSize = savefile->readSint16LE();
savefile->skip(descriptionSize);
savefile->skip(6);
+ setTotalPlayTime(savefile->readUint32LE() * 1000);
Graphics::skipThumbnail(*savefile);
_gm->deserialize(savefile);
@@ -866,6 +869,7 @@ bool SupernovaEngine::saveGame(int slot, const Common::String &description) {
savefile->write(description.c_str(), description.size() + 1);
savefile->writeUint32LE(saveDate);
savefile->writeUint16LE(saveTime);
+ savefile->writeUint32LE(getTotalPlayTime() / 1000);
Graphics::saveThumbnail(*savefile);
_gm->serialize(savefile);