aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-04 18:41:30 +0000
committerJohannes Schickel2008-04-04 18:41:30 +0000
commitb890b33a31657153d2efd99a8ad44953eaf7de47 (patch)
tree10bf0304fbe59fd60310e9299245baa36f6c1d0a /engines/kyra
parent35a422f00e39bb240957b8bebe69f99b461a9718 (diff)
downloadscummvm-rg350-b890b33a31657153d2efd99a8ad44953eaf7de47.tar.gz
scummvm-rg350-b890b33a31657153d2efd99a8ad44953eaf7de47.tar.bz2
scummvm-rg350-b890b33a31657153d2efd99a8ad44953eaf7de47.zip
Remove temporary savefile after it was loaded.
svn-id: r31390
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/gui_v2.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 30c74e6900..e87c149a21 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -1309,7 +1309,10 @@ int GUI_v2::optionsButton(Button *button) {
if (!_loadedSave && _reloadTemporarySave) {
_vm->_unkSceneScreenFlag1 = true;
- _vm->loadGame("TEMP.SAV");
+ Common::String save = _vm->getSavegameFilename(0);
+ save += ".TMP";
+ _vm->loadGame(save.c_str());
+ _vm->_saveFileMan->removeSavefile(save.c_str());
_vm->_unkSceneScreenFlag1 = false;
}
@@ -1506,7 +1509,9 @@ int GUI_v2::gameOptions(Button *caller) {
if (_vm->_lang != lang) {
_reloadTemporarySave = true;
- _vm->saveGame("TEMP.SAV", "Temporary Kyrandia 2 Savegame");
+ Common::String save = _vm->getSavegameFilename(0);
+ save += ".TMP";
+ _vm->saveGame(save.c_str(), "Temporary Kyrandia 2 Savegame");
_vm->loadCCodeBuffer("C_CODE.XXX");
if (_vm->_flags.isTalkie)
_vm->loadOptionsBuffer("OPTIONS.XXX");