aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-06-28 18:03:18 +0530
committerEugene Sandulenko2019-09-03 17:17:03 +0200
commit9bd1d58b8233f0f34c921bb2b17c9af145d25433 (patch)
treeac8d5a0d2063b5a9d5394538975fa1cbd370f653 /engines/hdb/lua-script.cpp
parenta406218c2e92cdc192ac627e00e8428e3cba4be9 (diff)
downloadscummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.tar.gz
scummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.tar.bz2
scummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.zip
HDB: Add Lua cineTextOut() and cineCenterTextOut()
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 6ffd09274a..464b581145 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -392,12 +392,32 @@ static int cineEntityFace(lua_State *L) {
}
static int cineTextOut(lua_State *L) {
- warning("STUB: CINE TEXT OUT");
+ const char *string = lua_tostring(L, 1);
+ double x = lua_tonumber(L, 2);
+ double y = lua_tonumber(L, 3);
+ double timer = lua_tonumber(L, 4);
+
+ g_hdb->_lua->checkParameters("cineTextOut", 4);
+
+ x += kCameraXOff;
+ y += kCameraYOff;
+
+ lua_pop(L, 4);
+ g_hdb->_ai->cineTextOut(string, (int)x, (int)y, (int)timer);
return 0;
}
static int cineCenterTextOut(lua_State *L) {
- warning("STUB: CINE CENTER TEXT OUT");
+ const char *string = lua_tostring(L, 1);
+ double y = lua_tonumber(L, 2);
+ double timer = lua_tonumber(L, 3);
+
+ g_hdb->_lua->checkParameters("cineCenterTextOut", 3);
+
+ y += kCameraYOff;
+
+ lua_pop(L, 3);
+ g_hdb->_ai->cineCenterTextOut(string, (int)y, (int)timer);
return 0;
}