diff options
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r-- | engines/hdb/lua-script.cpp | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 37e4d6d486..626272eb07 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -452,17 +452,59 @@ static int cineDialog(lua_State *L) { } static int cineDrawPic(lua_State *L) { - warning("STUB: CINE DRAW PIC"); + const char *id = lua_tostring(L, 1); + const char *pic = lua_tostring(L, 2); + double x = lua_tonumber(L, 3); + double y = lua_tonumber(L, 3); + + g_hdb->_lua->checkParameters("cineDrawPic", 4); + + x += kCameraXOff; + y += kCameraYOff; + + lua_pop(L, 4); + g_hdb->_ai->cineDrawPic(id, pic, (int)x, (int)y); + return 0; } static int cineDrawMaskedPic(lua_State *L) { - warning("STUB: CINE DRAW MASKED PIC"); + const char *id = lua_tostring(L, 1); + const char *pic = lua_tostring(L, 2); + double x = lua_tonumber(L, 3); + double y = lua_tonumber(L, 3); + + g_hdb->_lua->checkParameters("cineDrawMaskedPic", 4); + + x += kCameraXOff; + y += kCameraYOff; + + lua_pop(L, 4); + g_hdb->_ai->cineDrawMaskedPic(id, pic, (int)x, (int)y); + return 0; } static int cineMovePic(lua_State *L) { - warning("STUB: CINE MOVE PIC"); + const char *id = lua_tostring(L, 1); + const char *pic = lua_tostring(L, 2); + double x1 = lua_tonumber(L, 3); + double y1 = lua_tonumber(L, 4); + double x2 = lua_tonumber(L, 5); + double y2 = lua_tonumber(L, 6); + double speed = lua_tonumber(L, 7); + + g_hdb->_lua->checkParameters("cineMovePic", 7); + + x1 += kCameraXOff; + y1 += kCameraYOff; + x2 += kCameraXOff; + y2 += kCameraYOff; + + lua_pop(L, 7); + + g_hdb->_ai->cineMovePic(id, pic, (int)x1, (int)y1, (int)x2, (int)y2, (int)speed); + return 0; } |