diff options
author | James Brown | 2002-12-28 05:17:46 +0000 |
---|---|---|
committer | James Brown | 2002-12-28 05:17:46 +0000 |
commit | 77b905d0c223ff5067b20a37dfd7158d10185b45 (patch) | |
tree | 676e06e66463cd80e04aed01066505760ac0be16 /scumm/debugger.cpp | |
parent | cdec05af03d2e194939b892254109e1053ce077f (diff) | |
download | scummvm-rg350-77b905d0c223ff5067b20a37dfd7158d10185b45.tar.gz scummvm-rg350-77b905d0c223ff5067b20a37dfd7158d10185b45.tar.bz2 scummvm-rg350-77b905d0c223ff5067b20a37dfd7158d10185b45.zip |
Add Save/Load game commands to Debugger
svn-id: r6219
Diffstat (limited to 'scumm/debugger.cpp')
-rw-r--r-- | scumm/debugger.cpp | 25 |
1 files changed, 25 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; +} |