diff options
author | Eugene Sandulenko | 2019-07-03 19:22:35 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:10 +0200 |
commit | 37b09c6e3d39347ab7f6ec1ca639c8220e4c736c (patch) | |
tree | 7c0c4ee8ca7958abc1aa98ff9e772c8f039d918f /engines/hdb/hdb.cpp | |
parent | ffe05e989b04f0d11e034e84a47cbbfe8d1597c6 (diff) | |
download | scummvm-rg350-37b09c6e3d39347ab7f6ec1ca639c8220e4c736c.tar.gz scummvm-rg350-37b09c6e3d39347ab7f6ec1ca639c8220e4c736c.tar.bz2 scummvm-rg350-37b09c6e3d39347ab7f6ec1ca639c8220e4c736c.zip |
HDB: Implement boot params.
To switch levels, run ./scummvm -b <levelnum> hdb-win
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r-- | engines/hdb/hdb.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 1f2f58bda2..3f2ca97419 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -503,7 +503,19 @@ Common::Error HDBGame::run() { tile->load(tileStream); #endif - startMap("MAP00"); + if (ConfMan.hasKey("boot_param")) { + char mapname[10]; + int level = ConfMan.getInt("boot_param"); + + if (level > 30 || level < 0) + level = 1; + + snprintf(mapname, 10, "MAP%02d", level); + + startMap(mapname); + } else { + startMap("MAP00"); + } //_window->openDialog("Sgt. Filibuster", 0, "You address me as 'sarge' or 'sergeant' or get your snappin' teeth kicked in! Got me?", 0, NULL); |