aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/debugger.cpp25
-rw-r--r--scumm/debugger.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index c882cc2bea..4c9e1328e5 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -54,6 +54,9 @@ void ScummDebugger::attach(Scumm *s)
DCmd_Register("exit", &ScummDebugger::Cmd_Exit);
DCmd_Register("quit", &ScummDebugger::Cmd_Exit);
DCmd_Register("room", &ScummDebugger::Cmd_Room);
+
+ DCmd_Register("loadgame", &ScummDebugger::Cmd_LoadGame);
+ DCmd_Register("savegame", &ScummDebugger::Cmd_SaveGame);
}
}
@@ -259,3 +262,25 @@ bool ScummDebugger::Cmd_Room(char _parameter[255][255]) {
return true;
}
+
+bool ScummDebugger::Cmd_LoadGame(char _parameter[255][255]) {
+ int slot = atoi(_parameter[1]);
+
+ _s->_saveLoadSlot = slot;
+ _s->_saveLoadFlag = 2;
+ _s->_saveLoadCompatible = false;
+
+ _detach_now = true;
+ return false;
+}
+
+bool ScummDebugger::Cmd_SaveGame(char _parameter[255][255]) {
+ int slot = atoi(_parameter[1]);
+
+ _s->_saveLoadSlot = slot;
+ _s->_saveLoadFlag = 1;
+ _s->_saveLoadCompatible = false;
+
+ _detach_now = true;
+ return false;
+}
diff --git a/scumm/debugger.h b/scumm/debugger.h
index 3bedf6b9cc..070a81323c 100644
--- a/scumm/debugger.h
+++ b/scumm/debugger.h
@@ -70,6 +70,8 @@ protected:
// Commands
bool Cmd_Exit(char _parameter[255][255]);
bool Cmd_Room(char _parameter[255][255]);
+ bool Cmd_LoadGame(char _parameter[255][255]);
+ bool Cmd_SaveGame(char _parameter[255][255]);
#ifdef USE_CONSOLE
static bool debuggerInputCallback(ConsoleDialog *console, const char *input, void *refCon);