diff options
author | Nipun Garg | 2019-06-24 02:14:08 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:58 +0200 |
commit | a2af042430112a22963c6fdace53d2dc11ef6f94 (patch) | |
tree | 3df88dd90c7b465d49744fc18a4f7d124664eb79 | |
parent | e896fa8470bd1d35c7b3e1b29dd810c4afe1b641 (diff) | |
download | scummvm-rg350-a2af042430112a22963c6fdace53d2dc11ef6f94.tar.gz scummvm-rg350-a2af042430112a22963c6fdace53d2dc11ef6f94.tar.bz2 scummvm-rg350-a2af042430112a22963c6fdace53d2dc11ef6f94.zip |
HDB: Add cineMoveMaskedPic() Lua function
-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(); |