aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-cinematic.cpp11
-rw-r--r--engines/hdb/ai.h1
-rw-r--r--engines/hdb/lua-script.cpp9
3 files changed, 20 insertions, 1 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index e2ed00bfb1..f0ff15adf8 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -449,6 +449,10 @@ void AI::processCines() {
g_hdb->_map->addFGTileAnimation((int)_cine[i]->x, (int)_cine[i]->y);
complete = true;
break;
+ case C_FUNCTION:
+ g_hdb->_lua->callFunction(_cine[i]->title, 0);
+ complete = true;
+ break;
default:
warning("STUB: AI::PROCESSCINES incomplete for %d", _cine[i]->cmdType);
break;
@@ -872,4 +876,11 @@ void AI::cineSetForeground(int x, int y, int index) {
_cine.push_back(cmd);
}
+void AI::cineFunction(const char *func) {
+ CineCommand *cmd = new CineCommand;
+ cmd->title = func;
+ cmd->cmdType = C_FUNCTION;
+ _cine.push_back(cmd);
+}
+
} // End of Namespace
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index c63dfdded1..3d20a1ed74 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -1005,6 +1005,7 @@ public:
void cineClearForeground(int x, int y);
void cineSetBackground(int x, int y, int index);
void cineSetForeground(int x, int y, int index);
+ void cineFunction(const char *func);
// Waypoint & Movement Functions
void lookAtXY(int x, int y);
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 01a3c7feb1..06eb67b2e4 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -602,7 +602,14 @@ static int cineSetBackground(lua_State *L) {
}
static int cineFunction(lua_State *L) {
- warning("STUB: CINE FUNCTION");
+ const char *func = lua_tostring(L, 1);
+
+ g_hdb->_lua->checkParameters("cineFunction", 1);
+
+ lua_pop(L, 1);
+
+ g_hdb->_ai->cineFunction(func);
+
return 0;
}