summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.h
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 22:16:50 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 22:16:50 +0000
commit7ee1dfa39e789e7b631ff2883ee32b70b104a429 (patch)
tree384b9658812feaacf8951d6a12040e6d01f2f9b5 /crawl-ref/source/output.h
parentdefa394ffdf8aac28836530ed7b31455a8059345 (diff)
downloadcrawl-ref-7ee1dfa39e789e7b631ff2883ee32b70b104a429.tar.gz
crawl-ref-7ee1dfa39e789e7b631ff2883ee32b70b104a429.zip
Apply patch 1952761 by jarpian (wasp): targetting with the monster list.
I've updated the patch to the current mlist code, but there are still a couple of bugs that will need to be ironed out. For example, monsters are picked by comparing their attitude and type, which is not sufficient in the case of (non-collapsed) zombies, as well as mimics or ghosts. Also if the number of monsters in the visible list is greater than its rows (because some appear in the same row) then monsters outside of the visible list can be targetted. I guess this is an unintended feature. :) I'm certain there'll be more bugs, though. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6129 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.h')
-rw-r--r--crawl-ref/source/output.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/crawl-ref/source/output.h b/crawl-ref/source/output.h
index c8f1aa9312..073879a2a7 100644
--- a/crawl-ref/source/output.h
+++ b/crawl-ref/source/output.h
@@ -53,7 +53,7 @@ void print_stats_level(void);
void draw_border(void);
std::string mpr_monster_list(bool past = false);
void redraw_skill(const std::string &your_name, const std::string &class_name);
-void update_monster_pane(void);
+void update_monster_pane();
const char *equip_slot_to_name(int equip);
@@ -65,4 +65,27 @@ void print_overview_screen(void);
std::string dump_overview_screen(bool full_id);
+#ifndef USE_TILE
+// Monster info used by the pane; precomputes some data
+// to help with sorting and rendering.
+class monster_pane_info
+{
+ public:
+ static bool less_than(const monster_pane_info& m1,
+ const monster_pane_info& m2, bool zombified = true);
+
+ monster_pane_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_pane_info(std::vector<monster_pane_info>& mons);
+#endif
+
#endif