diff options
author | Nipun Garg | 2019-06-02 19:10:30 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:42 +0200 |
commit | 88661fb9b9bbfaafba00b47dad370944f6994797 (patch) | |
tree | 2a0f2e664722dcb84f82bd5ea1981043efb5c28b /engines | |
parent | 4800001cdccdc3408a073655105fde6001cf5d63 (diff) | |
download | scummvm-rg350-88661fb9b9bbfaafba00b47dad370944f6994797.tar.gz scummvm-rg350-88661fb9b9bbfaafba00b47dad370944f6994797.tar.bz2 scummvm-rg350-88661fb9b9bbfaafba00b47dad370944f6994797.zip |
HDB: Toogle the control flow of HDBGame::init()
The previous flow only allowed one subsystem to
be initialized.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/hdb.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index df8574e8e1..c5b65ee719 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -61,14 +61,21 @@ bool HDBGame::init() { */ // Init fileMan - if (fileMan->openMPC("hyperdemo.mpc")) { - gameShutdown = false; - _systemInit = true; - return true; + if (!fileMan->openMPC("hyperdemo.mpc")) { + error("FileMan::openMPC: Cannot find the hyperspace.mpc data file."); + return false; } - error("FileMan::openMPC: Cannot find the hyperspace.mpc data file."); - return false; + // Init Lua + if (!lua->init()) { + error("LuaScript::int: Cannot initialize LuaScript."); + return false; + } + + gameShutdown = false; + _systemInit = true; + + return true; } void HDBGame::start() { |