diff options
author | Eugene Sandulenko | 2019-07-03 17:31:10 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:10 +0200 |
commit | 347dd30f784f7739da2a5ea29117851a7665e1ec (patch) | |
tree | 0f0a40167cad516b188357d48e1bfe72c28d9b83 /engines/hdb/lua-script.cpp | |
parent | e97d425b8a70d4dac28291cb4262a37981db823a (diff) | |
download | scummvm-rg350-347dd30f784f7739da2a5ea29117851a7665e1ec.tar.gz scummvm-rg350-347dd30f784f7739da2a5ea29117851a7665e1ec.tar.bz2 scummvm-rg350-347dd30f784f7739da2a5ea29117851a7665e1ec.zip |
HDB: Implement loadLua()
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r-- | engines/hdb/lua-script.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index eaf46abe85..5c273e2a3e 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -72,8 +72,16 @@ bool LuaScript::init() { return true; } -bool LuaScript::loadLua(char *name) { - warning("STUB: loadLua(%s)", name); +bool LuaScript::loadLua(const char *name) { + Common::SeekableReadStream *luaStream = g_hdb->_fileMan->findFirstData(name, TYPE_BINARY); + int32 luaLength = g_hdb->_fileMan->getLength(name, TYPE_BINARY); + if (luaStream == NULL) { + warning("The %s MPC entry can't be found", name); + + return false; + } + + initScript(luaStream, name, luaLength); return true; } |