diff options
author | Nipun Garg | 2019-07-13 03:23:54 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:18 +0200 |
commit | b052946c61a7810e81a12a5b7c1273e57823d3b1 (patch) | |
tree | 011281165567a2651940b16a35b041debc7262e4 | |
parent | 792333b6ccca0175bbb1bf8d2ecae359613e47c7 (diff) | |
download | scummvm-rg350-b052946c61a7810e81a12a5b7c1273e57823d3b1.tar.gz scummvm-rg350-b052946c61a7810e81a12a5b7c1273e57823d3b1.tar.bz2 scummvm-rg350-b052946c61a7810e81a12a5b7c1273e57823d3b1.zip |
HDB: Add mode-select to the level-select
Add +100 to the level num to access the level in
Action Mode
-rw-r--r-- | engines/hdb/hdb.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index ebeb4ae4f4..d0b4b51e94 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -757,10 +757,22 @@ Common::Error HDBGame::run() { if (ConfMan.hasKey("boot_param")) { char mapname[10]; - int level = ConfMan.getInt("boot_param"); + int level = 0; - if (level > 30 || level < 0) + int arg = ConfMan.getInt("boot_param"); + + if (arg < 0 || arg > 130 || (30 < arg && arg < 100)) { + setActionMode(0); level = 1; + } else if (100 <= arg && arg <= 130) { + setActionMode(1); + level = arg - 100; + } else if (0 <= arg && arg <= 30) { + setActionMode(0); + level = arg; + } + + debug("Starting level %d in %s", level, getActionMode() ? "Action Mode" : "Puzzle Mode"); snprintf(mapname, 10, "MAP%02d", level); _ai->clearPersistent(); |