diff options
author | Eugene Sandulenko | 2019-07-05 15:47:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:12 +0200 |
commit | 73be5db12ecb4d83afa8c4a4248a9f857a470de3 (patch) | |
tree | e18f6a9535a536ab80d4a3d9efa15fd4d8b541bf /engines/hdb | |
parent | 6feed893deb1262e6e0c74ed1aece2306aa62241 (diff) | |
download | scummvm-rg350-73be5db12ecb4d83afa8c4a4248a9f857a470de3.tar.gz scummvm-rg350-73be5db12ecb4d83afa8c4a4248a9f857a470de3.tar.bz2 scummvm-rg350-73be5db12ecb4d83afa8c4a4248a9f857a470de3.zip |
HDB: Attempt to implement hot patches
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/hdb.cpp | 7 | ||||
-rw-r--r-- | engines/hdb/lua-script.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index b9ae6c100f..054ae22c09 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -163,6 +163,13 @@ bool HDBGame::restartMap() { _lua->init(); _lua->loadLua(_currentLuaName); + // Cheat/workarounds + if (!strcmp(_currentLuaName, "MAP00.LUA")) { + Common::String patch("KillTrigger( \"mannyquest\" )"); + + _lua->executeChunk(patch, "MAP00 patch"); + } + _sound->markSoundCacheFreeable(); _map->restartSystem(); diff --git a/engines/hdb/lua-script.h b/engines/hdb/lua-script.h index 92574d268e..4f2ffd2d09 100644 --- a/engines/hdb/lua-script.h +++ b/engines/hdb/lua-script.h @@ -56,6 +56,7 @@ public: bool executeMPC(Common::SeekableReadStream *stream, const char *name, const char *scriptName, int32 length); bool executeFile(const Common::String &filename); + bool executeChunk(Common::String &chunk, const Common::String &chunkName) const; void checkParameters(const char *func, int params); const char *getStringOffStack(); @@ -71,7 +72,6 @@ private: bool _systemInit; bool registerExtensions(); - bool executeChunk(Common::String &chunk, const Common::String &chunkName) const; void stripComments(char *chunk); void addPatches(Common::String &chunk, const char *scriptName); }; |