aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-24 02:46:26 +0530
committerEugene Sandulenko2019-09-03 17:16:58 +0200
commitd7cc3ab225873be825b01bb97be455244c5e020e (patch)
treeed7f515cf21f1dab360b1e6d56c0e303900ff895 /engines/hdb
parente46e8b45d897738f03a8455ba93ae9b78d46d8cc (diff)
downloadscummvm-rg350-d7cc3ab225873be825b01bb97be455244c5e020e.tar.gz
scummvm-rg350-d7cc3ab225873be825b01bb97be455244c5e020e.tar.bz2
scummvm-rg350-d7cc3ab225873be825b01bb97be455244c5e020e.zip
HDB: Add cineStop() Lua function
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai-cinematic.cpp3
-rw-r--r--engines/hdb/lua-script.cpp10
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index 9d55df22d6..a09eeb47db 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -415,7 +415,8 @@ void AI::cineStart(bool abortable, const char *abortFunc) {
void AI::cineStop(const char *funcNext) {
CineCommand *cmd = new CineCommand;
cmd->cmdType = C_STOPCINE;
- strcpy(cmd->title, funcNext);
+ if (funcNext)
+ strcpy(cmd->title, funcNext);
_cine.push_back(cmd);
}
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 9a67f4bf69..b2eeb4d83b 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -82,7 +82,15 @@ static int cineStart(lua_State *L) {
}
static int cineStop(lua_State *L) {
- warning("STUB: STOP CINE");
+ const char *funcNext = NULL;
+
+ int stackTop = lua_gettop(L);
+ if (stackTop) {
+ funcNext = lua_tostring(L, 1);
+ lua_pop(L, 1);
+ }
+
+ g_hdb->_ai->cineStop(funcNext);
return 0;
}