From 84216491421b6c98451c5f7884c509e836b32530 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Mon, 1 Jul 2019 09:07:43 +0530 Subject: HDB: Add Lua functions for textOut --- engines/hdb/lua-script.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'engines') 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; } -- cgit v1.2.3