summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/birth.c2
-rw-r--r--src/cave.c1
-rw-r--r--src/plots.c3
-rw-r--r--src/plots.h5
-rw-r--r--src/q_rand.c2
-rw-r--r--src/q_rand.h15
-rw-r--r--src/tables.c1
8 files changed, 21 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0213a49a..fcddce9d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -15,7 +15,7 @@ SET(SRCS
q_nirna.c q_eol.c q_god.c q_dragons.c q_poison.c
q_spider.c q_wolves.c q_shroom.c q_nazgul.c q_wight.c
q_troll.c q_hobbit.c q_thief.c q_ultrae.c q_ultrag.c
- q_one.c q_main.c
+ q_one.c q_main.c q_rand.c
object1.c object2.c randart.c squeltch.cc traps.c
monster1.c monster2.c monster3.c
xtra1.c xtra2.c skills.c powers.c gods.c
diff --git a/src/birth.c b/src/birth.c
index 85939b8e..844c3be8 100644
--- a/src/birth.c
+++ b/src/birth.c
@@ -11,8 +11,8 @@
*/
#include "angband.h"
-
#include "messages.h"
+#include "q_rand.h"
/*
* How often the autoroller will update the display and pause
diff --git a/src/cave.c b/src/cave.c
index ab1ce56e..9f26196a 100644
--- a/src/cave.c
+++ b/src/cave.c
@@ -4,6 +4,7 @@
#include "angband.h"
+#include "q_rand.h"
/*
diff --git a/src/plots.c b/src/plots.c
index c8fb2506..09200bb7 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -349,6 +349,3 @@ bool_ quest_null_hook(int q)
/* Do nothing */
return (FALSE);
}
-
-/************************** Random Quests *************************/
-#include "q_rand.c"
diff --git a/src/plots.h b/src/plots.h
index 1269df2d..b7a0dec5 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -3,8 +3,3 @@
/* Purpose: extern plots declarations */
extern bool_ quest_null_hook(int q);
-
-/******* Random Quests ********/
-extern bool_ is_randhero(int level);
-extern bool_ quest_random_init_hook(int q_idx);
-extern bool_ quest_random_describe(FILE *fff);
diff --git a/src/q_rand.c b/src/q_rand.c
index 0cc69a6d..998379e2 100644
--- a/src/q_rand.c
+++ b/src/q_rand.c
@@ -1,3 +1,5 @@
+#include "q_rand.h"
+
static int randquest_hero[] = { 20, 13, 15, 16, 9, 17, 18, 8, -1 };
bool_ is_randhero(int level)
diff --git a/src/q_rand.h b/src/q_rand.h
new file mode 100644
index 00000000..ea88b56c
--- /dev/null
+++ b/src/q_rand.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ is_randhero(int level);
+bool_ quest_random_init_hook(int q_idx);
+bool_ quest_random_describe(FILE *fff);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/tables.c b/src/tables.c
index d6fb29a9..33330e80 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -37,6 +37,7 @@
#include "q_ultrag.h"
#include "q_one.h"
#include "q_main.h"
+#include "q_rand.h"