diff options
author | Filippos Karapetis | 2010-06-15 08:39:03 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-15 08:39:03 +0000 |
commit | ba3c43498b12b4c5855030bea7ab9e613c55d4ac (patch) | |
tree | 0749ff0b848a4761a3ddae38955a63bff6363a84 /engines/sci/engine/savegame.cpp | |
parent | 0ad3bedf9880b51e40459df4e33547bf234eeb4f (diff) | |
download | scummvm-rg350-ba3c43498b12b4c5855030bea7ab9e613c55d4ac.tar.gz scummvm-rg350-ba3c43498b12b4c5855030bea7ab9e613c55d4ac.tar.bz2 scummvm-rg350-ba3c43498b12b4c5855030bea7ab9e613c55d4ac.zip |
- Swapped the return value of gamestate_save (false = failed, true = succeeded)
- Removed some duplicate code inside Console::cmdSaveGame()
svn-id: r49688
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 155c5fad86..d2bd955793 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -860,7 +860,7 @@ static void reconstruct_sounds(EngineState *s) { #pragma mark - -int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename, const char *version) { +bool gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename, const char *version) { TimeDate curTime; g_system->getTimeAndDate(curTime); @@ -877,7 +877,7 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename if (s->executionStackBase) { warning("Cannot save from below kernel function"); - return 1; + return false; } Common::Serializer ser(0, fh); @@ -885,7 +885,7 @@ int gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savename Graphics::saveThumbnail(*fh); s->saveLoadWithSerializer(ser); // FIXME: Error handling? - return 0; + return true; } void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { |