diff options
author | Nipun Garg | 2019-06-28 18:03:18 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:03 +0200 |
commit | 9bd1d58b8233f0f34c921bb2b17c9af145d25433 (patch) | |
tree | ac8d5a0d2063b5a9d5394538975fa1cbd370f653 /engines/hdb | |
parent | a406218c2e92cdc192ac627e00e8428e3cba4be9 (diff) | |
download | scummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.tar.gz scummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.tar.bz2 scummvm-rg350-9bd1d58b8233f0f34c921bb2b17c9af145d25433.zip |
HDB: Add Lua cineTextOut() and cineCenterTextOut()
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/lua-script.cpp | 24 |
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; } |