diff options
| author | Bendegúz Nagy | 2016-08-18 21:12:36 +0200 |
|---|---|---|
| committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
| commit | 5cb1d02972bd13130e6b177dea6e35045ae54055 (patch) | |
| tree | 0c02803fef31dc2d1d6b31f47af8b4136a618e62 | |
| parent | cefc231968412af089b6957173f9162b9852e94e (diff) | |
| download | scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.tar.gz scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.tar.bz2 scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.zip | |
DM: Fix double load when loading from launcher
| -rw-r--r-- | engines/dm/TODOs/todo.txt | 3 | ||||
| -rw-r--r-- | engines/dm/dm.cpp | 13 | ||||
| -rw-r--r-- | engines/dm/loadsave.cpp | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt index 1699a8b931..94c510592f 100644 --- a/engines/dm/TODOs/todo.txt +++ b/engines/dm/TODOs/todo.txt @@ -17,4 +17,5 @@ Code stuff todo: Complete stub methods(blitShrink, blitmask, scroller, etc.) Save file f433_processCommand140_saveGame fails silently, add error checking -
\ No newline at end of file + Add loading from dungeon + Fix incorrect thumbnail
\ No newline at end of file diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index dc0655bf8f..634ddb51c3 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -269,7 +269,7 @@ void DMEngine::f463_initializeGame() { _objectMan->loadObjectNames(); _eventMan->initMouse(); - int16 saveSlot = 1; + int16 saveSlot = -1; do { // if loading from the launcher if (ConfMan.hasKey("save_slot")) { @@ -278,11 +278,12 @@ void DMEngine::f463_initializeGame() { f441_processEntrance(); if (_engineShouldQuit) return; - } - if (_g298_newGame == k0_modeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - saveSlot = dialog->runModalWithCurrentTarget(); - delete dialog; + + if (_g298_newGame == k0_modeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); + saveSlot = dialog->runModalWithCurrentTarget(); + delete dialog; + } } } while (f435_loadgame(saveSlot) != k1_LoadgameSuccess); diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index 4d24daf162..90ac9d9ea5 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -47,7 +47,7 @@ namespace DM { #define C10_DUNGEON_DM 10 LoadgameResponse DMEngine::f435_loadgame(int16 slot) { - if (slot == -1) + if (slot == -1 && _g298_newGame == k0_modeLoadSavedGame) return kM1_LoadgameFailure; bool L1366_B_FadePalette = true; |
