summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
commitfa763ba1bc7285247a5b1438d59633383a80cf6c (patch)
treef4b632fea66f43dc6c1415fdaa4feead0b6ff90d /crawl-ref/source/traps.h
parent4d88632cb99d368956dec86732f7d275ffb941e8 (diff)
downloadcrawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.tar.gz
crawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.zip
Split off portions of externs.h and enum.h into other files. The
crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.h')
-rw-r--r--crawl-ref/source/traps.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/crawl-ref/source/traps.h b/crawl-ref/source/traps.h
new file mode 100644
index 0000000000..4ca0c815d9
--- /dev/null
+++ b/crawl-ref/source/traps.h
@@ -0,0 +1,65 @@
+/*
+ * File: traps.h
+ * Summary: Traps related functions.
+ * Written by: Linley Henzell
+ *
+ * Modified for Crawl Reference by $Author: j-p-e-g $ on $Date: 2007-09-03 06:41:30 -0700 (Mon, 03 Sep 2007) $
+ *
+ * Change History (most recent first):
+ *
+ * <1> 9/11/07 MPC Split from misc.h
+ */
+
+#ifndef TRAPS_H
+#define TRAPS_H
+
+#include "enum.h"
+
+struct dist;
+struct bolt;
+class monsters;
+
+bool trap_item(object_class_type base_type, char sub_type,
+ char beam_x, char beam_y);
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr
+ * *********************************************************************** */
+void disarm_trap(struct dist &disa);
+void remove_net_from( monsters *mon );
+void free_self_from_net( bool damage_net = true );
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: acr - misc
+ * *********************************************************************** */
+void handle_traps(char trt, int i, bool trap_known);
+int get_trapping_net(int x, int y, bool trapped = true);
+void mark_net_trapping(int x, int y);
+void monster_caught_in_net(monsters *mon, bolt &pbolt);
+void player_caught_in_net(void);
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: misc - mstuff2
+ * *********************************************************************** */
+void itrap(struct bolt &pbolt, int trapped);
+
+// last updated 3jun2000 {dlb}
+/* ***********************************************************************
+ * called from: acr - misc - mstuff2 - spells3
+ * *********************************************************************** */
+int trap_at_xy(int which_x, int which_y);
+
+
+// last updated 3jun2000 {dlb}
+/* ***********************************************************************
+ * called from: acr - misc - mstuff2 - spells2 - spells3
+ * *********************************************************************** */
+dungeon_feature_type trap_category(trap_type type);
+
+int trap_at_xy(int x, int y);
+trap_type trap_type_at_xy(int x, int y);
+
+#endif