summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/bldg.c1
-rw-r--r--src/plots.c3
-rw-r--r--src/plots.h5
-rw-r--r--src/q_library.c4
-rw-r--r--src/q_library.h15
-rw-r--r--src/tables.c1
7 files changed, 21 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7f84a2d0..a7ae81ef 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,7 @@ SET(SRCS
z-rand.c z-util.c z-form.c z-virt.c z-term.c
variable.c tables.c plots.c util.c cave.c dungeon.c
melee1.c melee2.c messages.c modules.c
- q_god.c
+ q_god.c q_library.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/bldg.c b/src/bldg.c
index 6b785d2a..920f297f 100644
--- a/src/bldg.c
+++ b/src/bldg.c
@@ -14,6 +14,7 @@
*/
#include "angband.h"
+#include "q_library.h"
/* hack as in leave_store in store.c */
static bool_ leave_bldg = FALSE;
diff --git a/src/plots.c b/src/plots.c
index afc59350..6399c436 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -396,8 +396,5 @@ bool_ quest_null_hook(int q)
/*************************** Bounty Quest *************************/
#include "q_bounty.c"
-/************************** Library Quest *************************/
-#include "q_library.c"
-
/************************* Fireproofing Quest *********************/
#include "q_fireprof.c"
diff --git a/src/plots.h b/src/plots.h
index 91115856..a0b96189 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -53,11 +53,6 @@ extern bool_ quest_bounty_drop_item();
extern bool_ quest_bounty_get_item();
extern bool_ quest_bounty_describe(FILE *fff);
-/******* Plot Library Quest *******/
-extern bool_ quest_library_init_hook(int q);
-extern bool_ quest_library_describe(FILE *fff);
-extern void quest_library_building(bool_ *paid, bool_ *recreate);
-
/******* Plot Fireproof Quest *********/
extern void quest_fireproof_building(bool_ *paid, bool_ *recreate);
extern bool_ quest_fireproof_init_hook(int q);
diff --git a/src/q_library.c b/src/q_library.c
index bbbcae4c..6e412719 100644
--- a/src/q_library.c
+++ b/src/q_library.c
@@ -1,4 +1,6 @@
-#undef cquest
+#include "q_library.h"
+#include "quark.h"
+
#define cquest (quest[QUEST_LIBRARY])
#define print_hook(fmt,...) do { fprintf(hook_file, fmt, ##__VA_ARGS__); } while (0)
diff --git a/src/q_library.h b/src/q_library.h
new file mode 100644
index 00000000..24504282
--- /dev/null
+++ b/src/q_library.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ quest_library_init_hook(int q);
+bool_ quest_library_describe(FILE *fff);
+void quest_library_building(bool_ *paid, bool_ *recreate);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/tables.c b/src/tables.c
index 1d5f1c49..bffc0fb2 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -11,6 +11,7 @@
*/
#include "angband.h"
+#include "q_library.h"