aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-08 07:25:18 +0000
committerFilippos Karapetis2009-10-08 07:25:18 +0000
commitce75c9270a836f991e54578767f2e4e4678f6c09 (patch)
treec3ee59627a533b7f3da870a05393efcaf4c83e81 /engines
parent0988e273eca17749037e501c20715b99b2dfb89a (diff)
downloadscummvm-rg350-ce75c9270a836f991e54578767f2e4e4678f6c09.tar.gz
scummvm-rg350-ce75c9270a836f991e54578767f2e4e4678f6c09.tar.bz2
scummvm-rg350-ce75c9270a836f991e54578767f2e4e4678f6c09.zip
Removed the unused game_time variable, and fixed the incorrect calculation of start_game_time when restoring a game
svn-id: r44770
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/savegame.cpp5
-rw-r--r--engines/sci/engine/state.cpp2
-rw-r--r--engines/sci/engine/state.h2
3 files changed, 1 insertions, 8 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 46b2fa94c2..1af29c6fa9 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -521,9 +521,6 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename
}
}
*/
- // Calculate the time spent with this game
- s->game_time = (g_system->getMillis() - s->game_start_time) / 1000;
-
Common::Serializer ser(0, fh);
sync_SavegameMetadata(ser, meta);
s->saveLoadWithSerializer(ser); // FIXME: Error handling?
@@ -774,7 +771,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// Time state:
retval->last_wait_time = g_system->getMillis();
- retval->game_start_time = g_system->getMillis() - retval->game_time * 1000;
+ retval->game_start_time = g_system->getMillis();
// static parser information:
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 96a99e1ea0..b686ff1aab 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -49,8 +49,6 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
status_bar_foreground = 0;
status_bar_background = 0;
- game_time = 0;
-
port = 0;
memset(ega_colors, 0, sizeof(ega_colors));
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index fd7ba3cbc2..a99a417642 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -200,8 +200,6 @@ public:
int status_bar_foreground, status_bar_background;
- long game_time; /**< Counted at 60 ticks per second, reset during start time */
-
GfxPort *port; /**< The currently active port */
gfx_color_t ega_colors[16]; /**< The 16 EGA colors- for SCI0(1) */