diff options
| -rw-r--r-- | engines/dm/dm.cpp | 12 | ||||
| -rw-r--r-- | engines/dm/loadsave.cpp | 3 | 
2 files changed, 13 insertions, 2 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 08bfb5869d..dc0655bf8f 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -60,6 +60,8 @@  #include <advancedDetector.h>  #include "sounds.h"  #include <graphics/surface.h> +#include <common/translation.h> +#include <gui/saveload.h>  namespace DM {  void warning(bool repeat, const char* s, ...) { @@ -178,7 +180,7 @@ DMEngine::DMEngine(OSystem *syst, const ADGameDescription *desc) : Engine(syst),  	_g527_platform = 0;  	_g526_dungeonId = 0; -	_g298_newGame = false; +	_g298_newGame = 0;  	_g523_restartGameRequest = false;  	_g321_stopWaitingForPlayerInput = true;  	_g301_gameTimeTicking = false; @@ -269,13 +271,19 @@ void DMEngine::f463_initializeGame() {  	int16 saveSlot = 1;  	do { +		// if loading from the launcher  		if (ConfMan.hasKey("save_slot")) {  			saveSlot = ConfMan.getInt("save_slot"); -		} else { +		} else { // else show the entrance  			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; +		}  	} while (f435_loadgame(saveSlot) != k1_LoadgameSuccess);  	_displayMan->f466_loadIntoBitmap(k11_MenuSpellAreLinesIndice, _menuMan->_gK73_bitmapSpellAreaLines); // @ F0396_MENUS_LoadSpellAreaLinesBitmap diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index 3bef55fcc9..c5082d273c 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -45,6 +45,9 @@ namespace DM {  #define C10_DUNGEON_DM 10  LoadgameResponse DMEngine::f435_loadgame(int16 slot) { +	if (slot == -1) +		return kM1_LoadgameFailure; +  	bool L1366_B_FadePalette = true;  	Common::String fileName;  	Common::SaveFileManager *saveFileManager = nullptr;  | 
