aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-07-01 09:05:34 +0530
committerEugene Sandulenko2019-09-03 17:17:06 +0200
commita5ba855dd2718f971ef71402588fe11441564e44 (patch)
treea32443593b06cf89b438a6aac1f132aab728da0f /engines/hdb/lua-script.cpp
parenta07cbc0dd1c9ca5518389376e0ec4711af403336 (diff)
downloadscummvm-rg350-a5ba855dd2718f971ef71402588fe11441564e44.tar.gz
scummvm-rg350-a5ba855dd2718f971ef71402588fe11441564e44.tar.bz2
scummvm-rg350-a5ba855dd2718f971ef71402588fe11441564e44.zip
HDB: Add lua function for clearForeground()
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 348f74959f..ea77a04499 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -592,7 +592,16 @@ static int entityFace(lua_State *L) {
}
static int clearForeground(lua_State *L) {
- warning("STUB: CLEAR FOREGROUND");
+ double x = lua_tonumber(L, 1);
+ double y = lua_tonumber(L, 2);
+
+ g_hdb->_lua->checkParameters("clearForegnd", 2);
+
+ lua_pop(L, 2);
+
+ g_hdb->_map->setMapFGTileIndex((int)x, (int)y, -1);
+ g_hdb->_map->removeFGTileAnimation((int)x, (int)y);
+
return 0;
}