aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/debugger.cpp
diff options
context:
space:
mode:
authorathrxx2012-01-16 16:18:26 +0100
committerathrxx2012-01-16 16:52:13 +0100
commit26a692ff5c04e157e93778ea49bd918e86dfdbbf (patch)
tree85796b5865e940aa0a0d0d28eb14a87b2c1e78ba /engines/kyra/debugger.cpp
parentc60394eb3f9dee1cfd6c23ed8e64231b666c650d (diff)
downloadscummvm-rg350-26a692ff5c04e157e93778ea49bd918e86dfdbbf.tar.gz
scummvm-rg350-26a692ff5c04e157e93778ea49bd918e86dfdbbf.tar.bz2
scummvm-rg350-26a692ff5c04e157e93778ea49bd918e86dfdbbf.zip
KYRA: (EOB) - change behavior of safe game file importing code
- The initial import of original save files will now use the next free available slots instead of moving the original files to the top of the save file list - add error check to loading routine for original saves - also limit debug console command to main menu, since it causes issues when used during the game or during character generation
Diffstat (limited to 'engines/kyra/debugger.cpp')
-rw-r--r--engines/kyra/debugger.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 2c9f9f2eea..c0a91ac098 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -486,6 +486,11 @@ void Debugger_EoB::initialize() {
}
bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
+ if (!_vm->_allowImport) {
+ DebugPrintf("This command may only be used from the main menu.\n");
+ return true;
+ }
+
if (argc == 3) {
int slot = atoi(argv[1]);
if (slot < -1 || slot > 989) {
@@ -493,16 +498,10 @@ bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
return true;
}
- ::GUI::MessageDialog dialog("Your current game (if any) will be lost if you continue. Make sure to save your game first.\n\n", "Continue", "Cancel");
- if (!dialog.runModal()) {
- DebugPrintf("Cancelled.\n");
- return true;
- }
-
DebugPrintf(_vm->importOriginalSaveFile(slot, argv[2]) ? "Success.\n" : "Failure.\n");
_vm->loadItemDefs();
} else {
- DebugPrintf("Syntax: import_savefile <dest slot> <source file>\n (Imports source save game file to dest slot.)\n import_savefile -1\n (Imports all original save game files found and pushs them to the top of the save game list.)\n\n");
+ DebugPrintf("Syntax: import_savefile <dest slot> <source file>\n (Imports source save game file to dest slot.)\n import_savefile -1\n (Imports all original save game files found and puts them into the first available slots.)\n\n");
}
return true;