summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-transit.h
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-14 12:21:50 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-14 12:21:50 +0300
commit6bb806bdcaeb3cd2db10957fb4b7376319faab00 (patch)
tree635215cef631b0ab1ecac146267712f37f62ba38 /crawl-ref/source/mon-transit.h
parent54c2248f1dd169774698f95c33381a856a915503 (diff)
downloadcrawl-ref-6bb806bdcaeb3cd2db10957fb4b7376319faab00.tar.gz
crawl-ref-6bb806bdcaeb3cd2db10957fb4b7376319faab00.zip
Move mtransit to mon-transit.
Diffstat (limited to 'crawl-ref/source/mon-transit.h')
-rw-r--r--crawl-ref/source/mon-transit.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-transit.h b/crawl-ref/source/mon-transit.h
new file mode 100644
index 0000000000..8075f88a90
--- /dev/null
+++ b/crawl-ref/source/mon-transit.h
@@ -0,0 +1,46 @@
+/*
+ * File: mon-transit.h
+ * Summary: Tracking monsters in transit between levels.
+ * Written by: Darshan Shaligram
+ */
+
+#ifndef MON_TRANSIT_H
+#define MON_TRANSIT_H
+
+#include "monster.h"
+#include "travel.h"
+#include <map>
+#include <list>
+
+struct follower
+{
+ monsters mons;
+ FixedVector<item_def, NUM_MONSTER_SLOTS> items;
+
+ follower() : mons(), items() { }
+ follower(const monsters &m);
+ bool place(bool near_player = false);
+ void load_mons_items();
+ void restore_mons_items(monsters &m);
+};
+
+typedef std::list<follower> m_transit_list;
+typedef std::map<level_id, m_transit_list> monsters_in_transit;
+
+typedef std::list<item_def> i_transit_list;
+typedef std::map<level_id, i_transit_list> items_in_transit;
+
+extern monsters_in_transit the_lost_ones;
+extern items_in_transit transiting_items;
+
+m_transit_list *get_transit_list(const level_id &where);
+void add_monster_to_transit(const level_id &dest, const monsters &m);
+void add_item_to_transit(const level_id &dest, const item_def &i);
+
+// Places (some of the) monsters eligible to be placed on this level.
+void place_transiting_monsters();
+void place_followers();
+
+void place_transiting_items();
+
+#endif