diff options
author | Nipun Garg | 2019-07-01 09:07:43 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:06 +0200 |
commit | 84216491421b6c98451c5f7884c509e836b32530 (patch) | |
tree | 903697d0b07d1c9be6d6ecf79ac54dd2d92a6673 | |
parent | aadc58ca474d2e99a9246f3e0fc581a2fa034812 (diff) | |
download | scummvm-rg350-84216491421b6c98451c5f7884c509e836b32530.tar.gz scummvm-rg350-84216491421b6c98451c5f7884c509e836b32530.tar.bz2 scummvm-rg350-84216491421b6c98451c5f7884c509e836b32530.zip |
HDB: Add Lua functions for textOut
-rw-r--r-- | engines/hdb/lua-script.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index f9d0aa7039..69e43fabe6 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -903,12 +903,27 @@ static int purgeGlobals(lua_State *L) { } static int textOut(lua_State *L) { - warning("STUB: 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("textOut", 4); + + lua_pop(L, 4); + g_hdb->_window->textOut(string, (int)x, (int)y, (int)timer); return 0; } static int centerTextOut(lua_State *L) { - warning("STUB: 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("centerTextOut", 3); + + lua_pop(L, 3); + g_hdb->_window->centerTextOut(string, (int)y, (int)timer); return 0; } |