summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.h
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-05-26 18:12:04 +0200
committerRobert Vollmert <rvollmert@gmx.net>2010-07-28 19:21:47 +0200
commit000de2017e1c676cc8266efb2b5827bcb0a22790 (patch)
tree9e5fff03ed152dd1c928ddca13644ecd3fd92663 /crawl-ref/source/directn.h
parent0d0c82d5f7445506631bf78a800d22ea554c7fe7 (diff)
downloadcrawl-ref-000de2017e1c676cc8266efb2b5827bcb0a22790.tar.gz
crawl-ref-000de2017e1c676cc8266efb2b5827bcb0a22790.zip
Convert several functions to use monster_info
This patch converts several parts of the Crawl code to use monster_info instead of accessing monsters directly. This change is very intrusive and rewrites parts of the code. Thus, bugs are quite likely being introduced. The new code is however easier to understand and maintain and thus hopefully should be a net gain once any problems are solved. The code is probably somewhat slower, but this should be undetectable in practice. Major semantic changes: - Rakshasas/Maras fakes are fully described as if they were the unequipped base form, instead of having special cases - MR is no longer reported with perfect information, but only based on what the player sees - Flight is now always perfectly reported (it already was, except possibly for randarts giving +Lev) - Mimics may be handled a bit different (the idea is that known mimics are always monsters and unknown mimics are always items) - Wounded status in messages is now colored (started as a bug, but seems a feature to me) Possible regressions: - Name generation is totally rewritten, might have regressed - In general, all the monster UI code has been refactored, possibly with regression - Special cases like mimics, rakshasas, Maras, ghosts, pan lords, named monsters, divine minions, draconians and the arena mode are likely to be the most at risk of having regressed Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref/source/directn.h')
-rw-r--r--crawl-ref/source/directn.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/directn.h b/crawl-ref/source/directn.h
index 46fcfd04da..38d9f39622 100644
--- a/crawl-ref/source/directn.h
+++ b/crawl-ref/source/directn.h
@@ -188,7 +188,7 @@ private:
std::string target_silence_description() const;
std::vector<std::string> target_cell_description_suffixes() const;
std::vector<std::string> monster_description_suffixes(
- const monsters* mon) const;
+ const monster_info& mi) const;
void describe_cell() const;
@@ -281,7 +281,7 @@ void get_square_desc(const coord_def &c, describe_info &inf,
bool examine_mons = false, bool show_floor = false);
void describe_floor();
-std::string get_monster_equipment_desc(const monsters *mon,
+std::string get_monster_equipment_desc(const monster_info& mi,
bool full_desc = true,
description_level_type mondtype = DESC_CAP_A,
bool print_attitude = false);