summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:12:01 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:12:01 +0100
commitf19edf28cf16a0776f54753d953901b91f54e278 (patch)
treee75d6cb4c8d77742f90ac60d316ab38dbda1892e /src
parent25a118cf7d49b86fae23c07297ebe87c4c169842 (diff)
Split traps.cc function declarations to separate file
Diffstat (limited to 'src')
-rw-r--r--src/cmd1.cc1
-rw-r--r--src/cmd2.cc1
-rw-r--r--src/externs.h10
-rw-r--r--src/generate.cc1
-rw-r--r--src/init1.cc1
-rw-r--r--src/melee2.cc1
-rw-r--r--src/object2.cc1
-rw-r--r--src/powers.cc1
-rw-r--r--src/q_eol.cc1
-rw-r--r--src/q_fireprof.cc1
-rw-r--r--src/q_haunted.cc1
-rw-r--r--src/skills.cc1
-rw-r--r--src/spells1.cc1
-rw-r--r--src/traps.cc2
-rw-r--r--src/traps.hpp12
-rw-r--r--src/wizard2.cc1
16 files changed, 26 insertions, 11 deletions
diff --git a/src/cmd1.cc b/src/cmd1.cc
index afaa259c..29b1a52f 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -18,6 +18,7 @@
#include "quark.h"
#include "skills.hpp"
#include "spells3.hpp"
+#include "traps.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
diff --git a/src/cmd2.cc b/src/cmd2.cc
index f71ff53e..f50856ca 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -16,6 +16,7 @@
#include "hooks.h"
#include "skills.hpp"
#include "spells3.hpp"
+#include "traps.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
diff --git a/src/externs.h b/src/externs.h
index 4ac0f6d6..7f5fb927 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -761,16 +761,6 @@ extern s16b m_bonus(int max, int level);
extern void object_gain_level(object_type *o_ptr);
extern s32b flag_cost(object_type * o_ptr, int plusses);
-/* traps.c */
-extern bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item);
-extern void player_activate_door_trap(s16b y, s16b x);
-extern void place_trap(int y, int x);
-extern void place_trap_leveled(int y, int x, int lev);
-extern void place_trap_object(object_type *o_ptr);
-extern void wiz_place_trap(int y, int x, int idx);
-extern void do_cmd_set_trap(void);
-extern bool_ mon_hit_trap(int);
-
/* spells1.c */
extern byte spell_color(int type);
extern s16b poly_r_idx(int r_idx);
diff --git a/src/generate.cc b/src/generate.cc
index 8121666b..ed518eaf 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -10,6 +10,7 @@
#include "cave.hpp"
#include "hooks.h"
#include "randart.hpp"
+#include "traps.hpp"
#include <cassert>
#include <memory>
diff --git a/src/init1.cc b/src/init1.cc
index abe50587..9af6d44c 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -3,6 +3,7 @@
#include "gods.hpp"
#include "skills.hpp"
#include "spells5.hpp"
+#include "traps.hpp"
#include <boost/algorithm/string/predicate.hpp>
diff --git a/src/melee2.cc b/src/melee2.cc
index 11bc5de0..8d24878a 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -19,6 +19,7 @@
#include "messages.h"
#include "quark.h"
#include "skills.hpp"
+#include "traps.hpp"
#include "xtra2.hpp"
#include <cassert>
diff --git a/src/object2.cc b/src/object2.cc
index 3055ad51..97bbc31f 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -16,6 +16,7 @@
#include "skills.hpp"
#include "spells3.hpp"
#include "spells5.hpp"
+#include "traps.hpp"
#include "xtra1.hpp"
#include <cassert>
diff --git a/src/powers.cc b/src/powers.cc
index e6a3cdce..a4420d7e 100644
--- a/src/powers.cc
+++ b/src/powers.cc
@@ -15,6 +15,7 @@
#include "quark.h"
#include "hooks.h"
#include "mimic.hpp"
+#include "traps.hpp"
#include "xtra2.hpp"
/*
diff --git a/src/q_eol.cc b/src/q_eol.cc
index 1e7b6f05..fab59960 100644
--- a/src/q_eol.cc
+++ b/src/q_eol.cc
@@ -2,6 +2,7 @@
#include "cave.hpp"
#include "hooks.h"
+#include "traps.hpp"
#include <cassert>
diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc
index ee5fc6bc..23cb8eba 100644
--- a/src/q_fireprof.cc
+++ b/src/q_fireprof.cc
@@ -1,6 +1,7 @@
#include "q_fireprof.h"
#include "quark.h"
#include "hooks.h"
+#include "traps.hpp"
#include <cassert>
diff --git a/src/q_haunted.cc b/src/q_haunted.cc
index ff3b69d6..a78c5e94 100644
--- a/src/q_haunted.cc
+++ b/src/q_haunted.cc
@@ -2,6 +2,7 @@
#include "cave.hpp"
#include "hooks.h"
+#include "traps.hpp"
#define cquest (quest[QUEST_HAUNTED])
diff --git a/src/skills.cc b/src/skills.cc
index 88549078..f1e121c7 100644
--- a/src/skills.cc
+++ b/src/skills.cc
@@ -15,6 +15,7 @@
#include "gods.hpp"
#include "help.hpp"
#include "hooks.h"
+#include "traps.hpp"
#include "util.hpp"
#include "xtra2.hpp"
diff --git a/src/spells1.cc b/src/spells1.cc
index bc276f10..8e998406 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -16,6 +16,7 @@
#include "spell_type.hpp"
#include "spells5.hpp"
#include "squeltch.hpp"
+#include "traps.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
diff --git a/src/traps.cc b/src/traps.cc
index 26e5f3bc..c9752e38 100644
--- a/src/traps.cc
+++ b/src/traps.cc
@@ -7,7 +7,7 @@
* included in all such copies.
*/
-#include "angband.h"
+#include "traps.hpp"
#include "cave.hpp"
#include "cmd1.hpp"
#include "cmd2.hpp"
diff --git a/src/traps.hpp b/src/traps.hpp
new file mode 100644
index 00000000..a066e1a6
--- /dev/null
+++ b/src/traps.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "angband.h"
+
+extern bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item);
+extern void player_activate_door_trap(s16b y, s16b x);
+extern void place_trap(int y, int x);
+extern void place_trap_leveled(int y, int x, int lev);
+extern void place_trap_object(object_type *o_ptr);
+extern void wiz_place_trap(int y, int x, int idx);
+extern void do_cmd_set_trap(void);
+extern bool_ mon_hit_trap(int);
diff --git a/src/wizard2.cc b/src/wizard2.cc
index b9457a29..c6d5edac 100644
--- a/src/wizard2.cc
+++ b/src/wizard2.cc
@@ -15,6 +15,7 @@
#include "hooks.h"
#include "randart.hpp"
#include "status.hpp"
+#include "traps.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"