summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-03-07 16:55:40 +0100
committerBardur Arantsson <bardur@scientician.net>2015-03-07 16:55:40 +0100
commit5a1497b285b2aaad6c8945b9014c5ccd899af695 (patch)
treea33053c11db972f3b017851945a812c62fd25ce7 /src
parent7bdfa1a20c8921e53baecdd12b48870417f8b426 (diff)
Split dungeon.cc declarations into separate header files
Diffstat (limited to 'src')
-rw-r--r--src/dungeon.cc9
-rw-r--r--src/dungeon.h14
-rw-r--r--src/dungeon.hpp3
-rw-r--r--src/externs.h4
-rw-r--r--src/main-win.c1
-rw-r--r--src/main.c1
-rw-r--r--src/object1.cc1
7 files changed, 26 insertions, 7 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc
index ebd36f29..12524b1b 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -6,6 +6,9 @@
* included in all such copies.
*/
+#include "dungeon.hpp"
+#include "dungeon.h"
+
#include "angband.h"
#include "birth.hpp"
#include "cave.hpp"
@@ -865,7 +868,7 @@ static void check_music()
/*
* Generate the feature effect
*/
-void apply_effect(int y, int x)
+static void apply_effect(int y, int x)
{
cave_type *c_ptr = &cave[y][x];
@@ -910,7 +913,7 @@ void apply_effect(int y, int x)
/* XXX XXX XXX */
-bool_ is_recall = FALSE;
+static bool_ is_recall = FALSE;
/*
@@ -4194,7 +4197,7 @@ static void process_command(void)
* must come first just in case somebody manages to corrupt
* the savefiles by clever use of menu commands or something.
*/
-void process_player(void)
+static void process_player(void)
{
int i, j;
diff --git a/src/dungeon.h b/src/dungeon.h
new file mode 100644
index 00000000..1ce166d1
--- /dev/null
+++ b/src/dungeon.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "h-basic.h"
+
+// C linkage required for these functions since main-* code uses them.
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void play_game(bool_ new_game);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/dungeon.hpp b/src/dungeon.hpp
new file mode 100644
index 00000000..37d54d39
--- /dev/null
+++ b/src/dungeon.hpp
@@ -0,0 +1,3 @@
+#pragma once
+
+extern void sense_inventory();
diff --git a/src/externs.h b/src/externs.h
index d79aa13f..75c7ca6e 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -462,10 +462,6 @@ extern const char *get_version_string();
/* birth.c */
extern bool_ no_begin_screen;
-/* dungeon.c */
-extern void play_game(bool_ new_game);
-extern void sense_inventory();
-
/* init1.c */
extern int color_char_to_attr(char c);
extern byte conv_color[16];
diff --git a/src/main-win.c b/src/main-win.c
index 9dd8e3a9..0caecbd5 100644
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -68,6 +68,7 @@
#include "angband.h"
+#include "dungeon.h"
#include "files.h"
#include "util.h"
diff --git a/src/main.c b/src/main.c
index 897c7826..f93bcb87 100644
--- a/src/main.c
+++ b/src/main.c
@@ -9,6 +9,7 @@
*/
#include "angband.h"
+#include "dungeon.h"
#include "files.h"
#include "util.h"
diff --git a/src/object1.cc b/src/object1.cc
index bf2a682f..36081a57 100644
--- a/src/object1.cc
+++ b/src/object1.cc
@@ -10,6 +10,7 @@
#include "cave.hpp"
#include "cmd2.hpp"
#include "cmd6.hpp"
+#include "dungeon.hpp"
#include "files.hpp"
#include "hooks.h"
#include "lua_bind.hpp"