diff options
-rw-r--r-- | engines/hdb/lua-script.cpp | 20 | ||||
-rw-r--r-- | engines/hdb/lua-script.h | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 4986cd56d9..9a67f4bf69 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -285,7 +285,25 @@ static int cineMovePic(lua_State *L) { } static int cineMoveMaskedPic(lua_State *L) { - warning("STUB: CINE MOVE MASKED 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("cineMoveMaskedPic", 7); + + x1 += kCameraXOff; + y1 += kCameraYOff; + x2 += kCameraXOff; + y2 += kCameraYOff; + + lua_pop(L, 7); + + g_hdb->_ai->cineMoveMaskedPic(id, pic, (int)x1, (int)y1, (int)x2, (int)y2, (int)speed); + return 0; } diff --git a/engines/hdb/lua-script.h b/engines/hdb/lua-script.h index 32830b3c11..32eb419996 100644 --- a/engines/hdb/lua-script.h +++ b/engines/hdb/lua-script.h @@ -32,6 +32,11 @@ struct lua_State; namespace HDB { +enum { + kCameraXOff = (32 * 3 + 24), // 3.75 Tiles Extra + kCameraYOff = (32 * 2 + 16) // 2.50 Tiles Extra +}; + class LuaScript { public: LuaScript(); |