diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2010-01-17 16:29:09 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2010-01-17 17:03:26 +1000 |
commit | 7cab36931b74bf99d3c6ee704a7ebf3b54d7a976 (patch) | |
tree | 663b3b75010fa4a3f27dce96095f4e6119d7e0ad /crawl-ref/source/l_dgn.cc | |
parent | a660d9f8bb8aefeb80345f535d48ea26af865518 (diff) | |
download | crawl-ref-7cab36931b74bf99d3c6ee704a7ebf3b54d7a976.tar.gz crawl-ref-7cab36931b74bf99d3c6ee704a7ebf3b54d7a976.zip |
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.
Diffstat (limited to 'crawl-ref/source/l_dgn.cc')
-rw-r--r-- | crawl-ref/source/l_dgn.cc | 8 |
1 files changed, 2 insertions, 6 deletions
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<feature_property_type>(luaL_checkint(ls, 3)); else if (lua_isstring(ls, 3)) - prop = static_cast<feature_property_type>(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<feature_property_type>(luaL_checkint(ls, 3)); else if (lua_isstring(ls, 3)) - prop = static_cast<feature_property_type>(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); } |