summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-03-24 18:48:47 +0100
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:40 +0200
commit0c07f2b07c4730762effd27955d7d13aa49dba74 (patch)
tree4199f328e8a5f84ad1f91c127ea803c6966ec2ae
parent1837ed317dc2ed3a741588f6fcb5e3bda58d3887 (diff)
Split Eöl & God quests from plots.c
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/plots.c1
-rw-r--r--src/plots.h5
-rw-r--r--src/q_eol.c3
-rw-r--r--src/q_eol.h13
-rw-r--r--src/q_god.c5
-rw-r--r--src/q_god.h14
-rw-r--r--src/tables.c2
8 files changed, 34 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 69b57480..1bf537b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -12,7 +12,7 @@ SET(SRCS
melee1.c melee2.c messages.c modules.c
q_god.c q_library.c q_fireprof.c q_bounty.c q_thrain.c
q_narsil.c q_evil.c q_betwen.c q_haunted.c q_invas.c
- q_nirna.c
+ q_nirna.c q_eol.c q_god.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/plots.c b/src/plots.c
index 2662d7d7..683fca7d 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -384,4 +384,3 @@ bool_ quest_null_hook(int q)
/************************** Gondolin plot *************************/
#include "q_dragons.c"
-#include "q_eol.c"
diff --git a/src/plots.h b/src/plots.h
index f8ac52a8..6fb521db 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -32,8 +32,3 @@ extern bool_ quest_poison_init_hook(int q_idx);
/******* Plot Gondolin *********/
extern bool_ quest_dragons_init_hook(int q_idx);
-extern bool_ quest_eol_init_hook(int q_idx);
-
-/******* Plot God Quest **************/
-extern bool_ quest_god_describe(FILE *);
-extern bool_ quest_god_init_hook(int q);
diff --git a/src/q_eol.c b/src/q_eol.c
index 5b1cf78e..3d9b13c8 100644
--- a/src/q_eol.c
+++ b/src/q_eol.c
@@ -1,4 +1,5 @@
-#undef cquest
+#include "q_eol.h"
+
#define cquest (quest[QUEST_EOL])
bool_ quest_eol_gen_hook(char *fmt)
diff --git a/src/q_eol.h b/src/q_eol.h
new file mode 100644
index 00000000..c3abbf1e
--- /dev/null
+++ b/src/q_eol.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ quest_eol_init_hook(int q_idx);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/q_god.c b/src/q_god.c
index 82f90a25..50f54762 100644
--- a/src/q_god.c
+++ b/src/q_god.c
@@ -1,9 +1,8 @@
-#include "angband.h"
+#include "q_god.h"
+#include "quark.h"
#include <assert.h>
-#include "quark.h"
-
#define cquest (quest[QUEST_GOD])
#define cquest_quests_given (cquest.data[0])
#define cquest_relics_found (cquest.data[1])
diff --git a/src/q_god.h b/src/q_god.h
new file mode 100644
index 00000000..2f3ce104
--- /dev/null
+++ b/src/q_god.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ quest_god_describe(FILE *);
+bool_ quest_god_init_hook(int q);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/tables.c b/src/tables.c
index 5f0f050f..f8f22870 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -21,6 +21,8 @@
#include "q_haunted.h"
#include "q_invas.h"
#include "q_nirna.h"
+#include "q_eol.h"
+#include "q_god.h"