diff options
author | Eugene Sandulenko | 2019-07-01 12:12:05 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:06 +0200 |
commit | f9c560fd9a5630e25280150dbeca049a9ffaec24 (patch) | |
tree | c1c8b34bf2edcbf6e35cef02b41205bb8432205a /engines/hdb/lua-script.cpp | |
parent | 2cd3bbe2304117a8c0a4cb27f365814c2c9f6f58 (diff) | |
download | scummvm-rg350-f9c560fd9a5630e25280150dbeca049a9ffaec24.tar.gz scummvm-rg350-f9c560fd9a5630e25280150dbeca049a9ffaec24.tar.bz2 scummvm-rg350-f9c560fd9a5630e25280150dbeca049a9ffaec24.zip |
HDB: Fix warnings, const'ness
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r-- | engines/hdb/lua-script.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 40582a54f7..72214b0233 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -651,7 +651,7 @@ static int dialog(lua_State *L) { lua_pop(L, 4); if (string) - g_hdb->_window->openDialog(title, (int)tileIndex, string, (int)more, more); + g_hdb->_window->openDialog(title, (int)tileIndex, string, more ? 1 : 0, more); return 0; } @@ -718,9 +718,9 @@ static int spawnEntity(lua_State *L) { double dir = lua_tonumber(L, 2); double x = lua_tonumber(L, 3); double y = lua_tonumber(L, 4); - char *funcInit = (char *)lua_tostring(L, 5); - char *funcAction = (char *)lua_tostring(L, 6); - char *funcUse = (char *)lua_tostring(L, 7); + const char *funcInit = lua_tostring(L, 5); + const char *funcAction = lua_tostring(L, 6); + const char *funcUse = lua_tostring(L, 7); double dir2 = lua_tonumber(L, 8); double level = lua_tonumber(L, 9); double value1 = lua_tonumber(L, 10); @@ -741,9 +741,9 @@ static int spawnEntity(lua_State *L) { static int addInvItem(lua_State *L) { double type = lua_tonumber(L, 1); double amount = lua_tonumber(L, 2); - char *funcInit = (char *)lua_tostring(L, 3); - char *funcAction = (char *)lua_tostring(L, 4); - char *funcUse = (char *)lua_tostring(L, 5); + const char *funcInit = lua_tostring(L, 3); + const char *funcAction = lua_tostring(L, 4); + const char *funcUse = lua_tostring(L, 5); int t = (int)type; @@ -838,7 +838,7 @@ static int removeInvItem(lua_State *L) { } static int killTrigger(lua_State *L) { - char *id = (char *)lua_tostring(L, 1); + const char *id = lua_tostring(L, 1); g_hdb->_lua->checkParameters("killTrigger", 1); |