aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dm.cpp
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-18 17:50:56 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitbcb067698efe6e18be02a23eb48499ed8e0e714f (patch)
tree6a056d32fecbf7ce1fad0f27f45c1f81e083e295 /engines/dm/dm.cpp
parent4442b0b302f107013e88120c69d8cf41aaec0ecc (diff)
downloadscummvm-rg350-bcb067698efe6e18be02a23eb48499ed8e0e714f.tar.gz
scummvm-rg350-bcb067698efe6e18be02a23eb48499ed8e0e714f.tar.bz2
scummvm-rg350-bcb067698efe6e18be02a23eb48499ed8e0e714f.zip
DM: Add support for loading from launcher
Diffstat (limited to 'engines/dm/dm.cpp')
-rw-r--r--engines/dm/dm.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index e22a41dee6..655fb09c4f 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -25,6 +25,7 @@
* maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
*/
+#include "common/config-manager.h"
#include "common/scummsys.h"
#include "common/system.h"
@@ -262,11 +263,17 @@ void DMEngine::f463_initializeGame() {
_textMan->f54_textInitialize();
_objectMan->loadObjectNames();
_eventMan->initMouse();
+
+ int16 saveSlot = 1;
do {
- f441_processEntrance();
- if (_engineShouldQuit)
- return;
- } while (f435_loadgame(1) != k1_LoadgameSuccess);
+ if (ConfMan.hasKey("save_slot")) {
+ saveSlot = ConfMan.getInt("save_slot");
+ } else {
+ f441_processEntrance();
+ if (_engineShouldQuit)
+ return;
+ }
+ } while (f435_loadgame(saveSlot) != k1_LoadgameSuccess);
_displayMan->f466_loadIntoBitmap(k11_MenuSpellAreLinesIndice, _menuMan->_gK73_bitmapSpellAreaLines); // @ F0396_MENUS_LoadSpellAreaLinesBitmap