summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd1.cc41
-rw-r--r--src/cmd1.hpp23
-rw-r--r--src/cmd2.cc1
-rw-r--r--src/cmd6.cc1
-rw-r--r--src/cmd7.cc1
-rw-r--r--src/dungeon.cc1
-rw-r--r--src/externs.h22
-rw-r--r--src/melee2.cc1
-rw-r--r--src/powers.cc1
-rw-r--r--src/spells1.cc1
-rw-r--r--src/spells2.cc1
-rw-r--r--src/traps.cc1
12 files changed, 34 insertions, 61 deletions
diff --git a/src/cmd1.cc b/src/cmd1.cc
index bd351d0d..e914e620 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -6,6 +6,8 @@
* included in all such copies.
*/
+#include "cmd1.hpp"
+
#include "angband.h"
#include "cave.hpp"
#include "gods.hpp"
@@ -4288,45 +4290,6 @@ void run_step(int dir)
/*
- * Take care of the various things that can happen when you step
- * into a space. (Objects, traps, and stores.)
- */
-void step_effects(int y, int x, int do_pickup)
-{
- /* Handle "objects" */
- py_pickup_floor(do_pickup);
-
- /* Handle "store doors" */
- if (cave[y][x].feat == FEAT_SHOP)
- {
- /* Disturb */
- disturb(0);
-
- /* Hack -- Enter store */
- command_new = KTRL('V');
- }
-
- /* Discover/set off traps */
- else if (cave[y][x].t_idx != 0)
- {
- /* Disturb */
- disturb(0);
-
- if (!(cave[y][x].info & CAVE_TRDT))
- {
- /* Message */
- msg_print("You found a trap!");
-
- /* Pick a trap */
- pick_trap(y, x);
- }
-
- /* Hit the trap */
- hit_trap();
- }
-}
-
-/*
* Issue a pet command
*/
void do_cmd_pet(void)
diff --git a/src/cmd1.hpp b/src/cmd1.hpp
new file mode 100644
index 00000000..5ff58a75
--- /dev/null
+++ b/src/cmd1.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "angband.h"
+
+extern void attack_special(monster_type *m_ptr, s32b special, int dam);
+extern bool_ test_hit_fire(int chance, int ac, int vis);
+extern bool_ test_hit_norm(int chance, int ac, int vis);
+extern s16b critical_shot(int weight, int plus, int dam, int skill);
+extern s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit);
+extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, s32b *special);
+extern void search(void);
+extern void carry(int pickup);
+extern void py_attack(int y, int x, int max_blow);
+extern bool_ player_can_enter(byte feature);
+extern void move_player(int dir, int do_pickup, bool_ disarm);
+extern void move_player_aux(int dir, int do_pickup, int run, bool_ disarm);
+extern void run_step(int dir);
+extern void do_cmd_pet(void);
+extern bool_ do_cmd_integrate_body(void);
+extern bool_ do_cmd_leave_body(bool_ drop_body);
+extern bool_ execute_inscription(byte i, byte y, byte x);
+extern void do_cmd_engrave(void);
+extern void do_spin(void);
diff --git a/src/cmd2.cc b/src/cmd2.cc
index f6371789..b947fb84 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -9,6 +9,7 @@
#include "angband.h"
#include "bldg.hpp"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "gods.hpp"
#include "hooks.h"
#include "skills.hpp"
diff --git a/src/cmd6.cc b/src/cmd6.cc
index 834ac972..5c20c128 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -8,6 +8,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "corrupt.hpp"
#include "hooks.h"
#include "lua_bind.hpp"
diff --git a/src/cmd7.cc b/src/cmd7.cc
index e13373cc..3dcb9cab 100644
--- a/src/cmd7.cc
+++ b/src/cmd7.cc
@@ -8,6 +8,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "hooks.h"
#include "mimic.hpp"
#include "quark.h"
diff --git a/src/dungeon.cc b/src/dungeon.cc
index 6d021053..cfe84cbc 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -9,6 +9,7 @@
#include "angband.h"
#include "birth.hpp"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "corrupt.hpp"
#include "gods.hpp"
#include "help.hpp"
diff --git a/src/externs.h b/src/externs.h
index 6e40b77b..a69f4603 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -462,28 +462,6 @@ extern const char *get_version_string();
/* birth.c */
extern bool_ no_begin_screen;
-/* cmd1.c */
-extern void attack_special(monster_type *m_ptr, s32b special, int dam);
-extern bool_ test_hit_fire(int chance, int ac, int vis);
-extern bool_ test_hit_norm(int chance, int ac, int vis);
-extern s16b critical_shot(int weight, int plus, int dam, int skill);
-extern s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit);
-extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, s32b *special);
-extern void search(void);
-extern void carry(int pickup);
-extern void py_attack(int y, int x, int max_blow);
-extern bool_ player_can_enter(byte feature);
-extern void move_player(int dir, int do_pickup, bool_ disarm);
-extern void move_player_aux(int dir, int do_pickup, int run, bool_ disarm);
-extern void run_step(int dir);
-extern void step_effects(int y, int x, int do_pickup);
-extern void do_cmd_pet(void);
-extern bool_ do_cmd_integrate_body(void);
-extern bool_ do_cmd_leave_body(bool_ drop_body);
-extern bool_ execute_inscription(byte i, byte y, byte x);
-extern void do_cmd_engrave(void);
-extern void do_spin(void);
-
/* cmd2.c */
extern byte show_monster_inven(int m_idx, int *monst_list);
extern int breakage_chance(object_type *o_ptr);
diff --git a/src/melee2.cc b/src/melee2.cc
index bf294b9e..11bc5de0 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -14,6 +14,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "hooks.h"
#include "messages.h"
#include "quark.h"
diff --git a/src/powers.cc b/src/powers.cc
index 2d4eda34..b20491fe 100644
--- a/src/powers.cc
+++ b/src/powers.cc
@@ -8,6 +8,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "quark.h"
#include "hooks.h"
#include "mimic.hpp"
diff --git a/src/spells1.cc b/src/spells1.cc
index 90c728c0..b5138e92 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -8,6 +8,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "gods.hpp"
#include "skills.hpp"
#include "spell_type.hpp"
diff --git a/src/spells2.cc b/src/spells2.cc
index c03123ff..be2bd7a9 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -8,6 +8,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "hooks.h"
#include "notes.hpp"
#include "skills.hpp"
diff --git a/src/traps.cc b/src/traps.cc
index ba78a3ce..533467f5 100644
--- a/src/traps.cc
+++ b/src/traps.cc
@@ -9,6 +9,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "cmd1.hpp"
#include "gods.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"