summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/envmap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/envmap.cc')
-rw-r--r--crawl-ref/source/envmap.cc22
1 files changed, 2 insertions, 20 deletions
diff --git a/crawl-ref/source/envmap.cc b/crawl-ref/source/envmap.cc
index fb0f948183..a6d699e31f 100644
--- a/crawl-ref/source/envmap.cc
+++ b/crawl-ref/source/envmap.cc
@@ -27,9 +27,6 @@
#define MAP_DETECTED_ITEM 0x10
#define MAP_GRID_KNOWN 0xFF
-#define MC_ITEM 0x01
-#define MC_MONS 0x02
-
unsigned map_cell::glyph() const
{
if (!object)
@@ -47,21 +44,6 @@ bool map_cell::seen() const
return (object && (flags & MAP_SEEN_FLAG));
}
-static int _get_viewobj_flags(show_type object)
-{
- // Check for monster glyphs.
- if (object.cls == SH_MONSTER)
- return (MC_MONS);
-
- // Check for item glyphs.
- if (object.cls == SH_ITEM)
- return (MC_ITEM);
-
- // We don't care to look further; we could check for
- // clouds here as well.
- return (0);
-}
-
unsigned get_envmap_char(int x, int y)
{
return env.map[x][y].glyph();
@@ -141,12 +123,12 @@ bool is_bloodcovered(const coord_def& p)
bool is_envmap_item(int x, int y)
{
- return (_get_viewobj_flags(env.map[x][y].object) & MC_ITEM);
+ return (env.map[x][y].object.cls == SH_ITEM);
}
bool is_envmap_mons(int x, int y)
{
- return (_get_viewobj_flags(env.map[x][y].object) & MC_MONS);
+ return (env.map[x][y].object.cls == SH_MONSTER);
}
int get_envmap_col(const coord_def& p)