diff options
author | Nipun Garg | 2019-06-21 06:39:48 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:53 +0200 |
commit | 223d024e307c7df461678c133f92b86cea3be8e5 (patch) | |
tree | badc73c41fa4aaba1620423e454b55a5c268ae59 /engines | |
parent | 7dda9ea0204d6152015fa0ff4dd009d3d555a117 (diff) | |
download | scummvm-rg350-223d024e307c7df461678c133f92b86cea3be8e5.tar.gz scummvm-rg350-223d024e307c7df461678c133f92b86cea3be8e5.tar.bz2 scummvm-rg350-223d024e307c7df461678c133f92b86cea3be8e5.zip |
HDB: Unstub cine functions for fore/background
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/lua-script.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index db66c235ce..9691763afa 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -288,17 +288,41 @@ static int cineSpawnEntity(lua_State *L) { } static int cineClearForeground(lua_State *L) { - warning("STUB: CINE CLEAR FOREGROUND"); + double x = lua_tonumber(L, 1); + double y = lua_tonumber(L, 1); + + g_hdb->_lua->checkParameters("cineClearForeground", 2); + + lua_pop(L, 2); + g_hdb->_ai->cineClearForeground((int)x, (int)y); return 0; } static int cineSetForeground(lua_State *L) { - warning("STUB: CINE SET FOREGROUND"); + double x = lua_tonumber(L, 1); + double y = lua_tonumber(L, 1); + const char *tileName = lua_tostring(L, 3); + + g_hdb->_lua->checkParameters("cineSetForeground", 3); + + lua_pop(L, 3); + int index = g_hdb->_drawMan->getTileIndex(tileName); + g_hdb->_drawMan->getTile(index); + g_hdb->_ai->cineSetForeground((int)x, (int)y, index); return 0; } static int cineSetBackground(lua_State *L) { - warning("STUB: CINE SET BACKGROUND"); + double x = lua_tonumber(L, 1); + double y = lua_tonumber(L, 1); + const char *tileName = lua_tostring(L, 3); + + g_hdb->_lua->checkParameters("cineSetBackground", 3); + + lua_pop(L, 3); + int index = g_hdb->_drawMan->getTileIndex(tileName); + g_hdb->_drawMan->getTile(index); + g_hdb->_ai->cineSetBackground((int)x, (int)y, index); return 0; } |