diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-27 15:18:53 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-27 15:18:53 +0100 |
commit | eda188d2d5045e9fb02c416261d72a3c31b9cf57 (patch) | |
tree | 0c331fb2f546e2512f06e62c3630e2248c499d15 /crawl-ref/source/mon-info.h | |
parent | 588ba77a56ffc7262ee41f4f744129371c5bdc75 (diff) | |
download | crawl-ref-eda188d2d5045e9fb02c416261d72a3c31b9cf57.tar.gz crawl-ref-eda188d2d5045e9fb02c416261d72a3c31b9cf57.zip |
Move monster_pane_info out into mon-info.cc and rename.
I plan to use monster_info to get monster data out to
the player safely via Lua.
Diffstat (limited to 'crawl-ref/source/mon-info.h')
-rw-r--r-- | crawl-ref/source/mon-info.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-info.h b/crawl-ref/source/mon-info.h new file mode 100644 index 0000000000..92ef03b482 --- /dev/null +++ b/crawl-ref/source/mon-info.h @@ -0,0 +1,28 @@ +#ifndef MON_INFO_H +#define MON_INFO_H + +// Monster info used by the pane; precomputes some data +// to help with sorting and rendering. +class monster_info +{ + public: + static bool less_than(const monster_info& m1, + const monster_info& m2, bool zombified = true); + + static bool less_than_wrapper(const monster_info& m1, + const monster_info& m2); + + monster_info(const monsters* m); + + void to_string(int count, std::string& desc, int& desc_color) const; + + const monsters* m_mon; + mon_attitude_type m_attitude; + int m_difficulty; + int m_brands; + bool m_fullname; +}; + +void get_monster_info(std::vector<monster_info>& mons); + +#endif |