summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd1.cc2
-rw-r--r--src/dungeon.cc2
-rw-r--r--src/externs.h13
-rw-r--r--src/melee1.cc2
-rw-r--r--src/melee1.hpp7
-rw-r--r--src/melee2.cc4
-rw-r--r--src/melee2.hpp12
-rw-r--r--src/monster3.cc1
-rw-r--r--src/spells1.cc1
-rw-r--r--src/spells2.cc1
-rw-r--r--src/xtra2.cc1
11 files changed, 32 insertions, 14 deletions
diff --git a/src/cmd1.cc b/src/cmd1.cc
index e5fa0a7f..e9c8c66a 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -16,6 +16,8 @@
#include "gods.hpp"
#include "hooks.h"
#include "lua_bind.hpp"
+#include "melee1.hpp"
+#include "melee2.hpp"
#include "mimic.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
diff --git a/src/dungeon.cc b/src/dungeon.cc
index d3fef917..799761aa 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -32,6 +32,8 @@
#include "loadsave.h"
#include "loadsave.hpp"
#include "lua_bind.hpp"
+#include "melee1.hpp"
+#include "melee2.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
#include "modules.hpp"
diff --git a/src/externs.h b/src/externs.h
index 333ae848..23294e51 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -463,19 +463,6 @@ extern tval_desc2 tvals[];
/* birth.c */
extern bool_ no_begin_screen;
-/* melee1.c */
-/* melee2.c */
-extern int monst_spell_monst_spell;
-extern bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note);
-extern void mon_handle_fear(monster_type *m_ptr, int dam, bool_ *fear);
-extern int check_hit2(int power, int level, int ac);
-extern int get_attack_power(int effect);
-extern bool_ carried_make_attack_normal(int r_idx);
-extern bool_ make_attack_normal(int m_idx, byte divis);
-extern void process_monsters(void);
-extern void curse_equipment(int chance, int heavy_chance);
-extern void curse_equipment_dg(int chance, int heavy_chance);
-
/*
* Hack -- conditional (or "bizarre") externs
*/
diff --git a/src/melee1.cc b/src/melee1.cc
index 131711e7..d56eb263 100644
--- a/src/melee1.cc
+++ b/src/melee1.cc
@@ -6,6 +6,8 @@
* included in all such copies.
*/
+#include "melee1.hpp"
+
#include "angband.h"
#include "cave.hpp"
#include "cmd5.hpp"
diff --git a/src/melee1.hpp b/src/melee1.hpp
new file mode 100644
index 00000000..e84c8f03
--- /dev/null
+++ b/src/melee1.hpp
@@ -0,0 +1,7 @@
+#pragma once
+
+#include "h-basic.h"
+
+extern int get_attack_power(int effect);
+extern bool_ carried_make_attack_normal(int r_idx);
+extern bool_ make_attack_normal(int m_idx, byte divis);
diff --git a/src/melee2.cc b/src/melee2.cc
index dd349f39..638b7151 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -11,12 +11,14 @@
* to improve the general quality of the AI (version 0.1.1).
*/
-#include "angband.h"
+#include "melee2.hpp"
+#include "angband.h"
#include "cave.hpp"
#include "cmd1.hpp"
#include "files.hpp"
#include "hooks.h"
+#include "melee1.hpp"
#include "messages.h"
#include "monster2.hpp"
#include "monster3.hpp"
diff --git a/src/melee2.hpp b/src/melee2.hpp
new file mode 100644
index 00000000..22f3b1a9
--- /dev/null
+++ b/src/melee2.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "h-basic.h"
+#include "types_fwd.h"
+
+extern int monst_spell_monst_spell;
+extern bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note);
+extern void mon_handle_fear(monster_type *m_ptr, int dam, bool_ *fear);
+extern int check_hit2(int power, int level, int ac);
+extern void process_monsters(void);
+extern void curse_equipment(int chance, int heavy_chance);
+extern void curse_equipment_dg(int chance, int heavy_chance);
diff --git a/src/monster3.cc b/src/monster3.cc
index d860eb3c..b17a0815 100644
--- a/src/monster3.cc
+++ b/src/monster3.cc
@@ -11,6 +11,7 @@
#include "angband.h"
#include "cmd2.hpp"
#include "gods.hpp"
+#include "melee2.hpp"
#include "monster2.hpp"
#include "object2.hpp"
#include "skills.hpp"
diff --git a/src/spells1.cc b/src/spells1.cc
index cbfe58f9..cd31b8d1 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -14,6 +14,7 @@
#include "cmd5.hpp"
#include "files.hpp"
#include "gods.hpp"
+#include "melee2.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
#include "object1.hpp"
diff --git a/src/spells2.cc b/src/spells2.cc
index 10cce3ba..bd460df6 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -14,6 +14,7 @@
#include "cmd7.hpp"
#include "files.hpp"
#include "hooks.h"
+#include "melee2.hpp"
#include "monster2.hpp"
#include "monster3.hpp"
#include "notes.hpp"
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 79f01617..149079a6 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -14,6 +14,7 @@
#include "files.hpp"
#include "gods.hpp"
#include "hooks.h"
+#include "melee2.hpp"
#include "mimic.hpp"
#include "monster1.hpp"
#include "monster2.hpp"