From 7cab36931b74bf99d3c6ee704a7ebf3b54d7a976 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 17 Jan 2010 16:29:09 +1000 Subject: Convert fprop instances in mapdef.* to unsigned long. (greensnark) fprop lists, and fprop_spec, now use unsigned long instead of int. This matches env.pgrid, and means that there won't be size issues in future when we end up with more feature properties. --- crawl-ref/source/l_dgn.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/l_dgn.cc') diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc index ff439d5d64..739069e4e4 100644 --- a/crawl-ref/source/l_dgn.cc +++ b/crawl-ref/source/l_dgn.cc @@ -916,7 +916,7 @@ static int dgn_fprop_changed(lua_State *ls) if (lua_isnumber(ls, 3)) prop = static_cast(luaL_checkint(ls, 3)); else if (lua_isstring(ls, 3)) - prop = static_cast(str_to_fprop(lua_tostring(ls, 3))); + prop = str_to_fprop(lua_tostring(ls, 3)); coord_def pos = coord_def(luaL_checkint(ls, 1), luaL_checkint(ls, 2)); @@ -948,18 +948,14 @@ static int dgn_fprop_at (lua_State *ls) if (lua_isnumber(ls, 3)) prop = static_cast(luaL_checkint(ls, 3)); else if (lua_isstring(ls, 3)) - prop = static_cast(str_to_fprop(lua_tostring(ls, 3))); + prop = str_to_fprop(lua_tostring(ls, 3)); coord_def pos = coord_def(luaL_checkint(ls, 1), luaL_checkint(ls, 2)); if (in_bounds(pos) && prop != FPROP_NONE) - { lua_pushboolean(ls, testbits(env.pgrid(pos), prop)); - } else - { lua_pushboolean(ls, false); - } return (1); } -- cgit v1.2.3-54-g00ecf