diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-06 10:24:01 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-06 11:33:08 +0100 |
commit | cb3cd93f1feae4eac10ac05ab1034d372933c0fe (patch) | |
tree | 80edd42023d2e395ca2efc8106b77c5018f2a695 | |
parent | 8022157bc51f20d7f636c09cbd96ecc8f8958aeb (diff) | |
download | crawl-ref-cb3cd93f1feae4eac10ac05ab1034d372933c0fe.tar.gz crawl-ref-cb3cd93f1feae4eac10ac05ab1034d372933c0fe.zip |
Get rid of _get_viewobj_flags.
-rw-r--r-- | crawl-ref/source/envmap.cc | 22 |
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) |