summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-03-24 19:26:38 +0100
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:41 +0200
commit410376a132361a76e79c2c079e2e0ab6650fec71 (patch)
treecdc48afc6f65dfac58d6b9c1f88133952f03f844 /src
parent5478165ad9d479ca9a5135e42ba139cae15aa5e6 (diff)
Split "The One" quest from plots.c
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/plots.c1
-rw-r--r--src/plots.h1
-rw-r--r--src/q_one.c3
-rw-r--r--src/q_one.h13
-rw-r--r--src/tables.c1
6 files changed, 17 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 42468279..3e08f7ec 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -15,6 +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
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 f8a87df4..ff6610d0 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -365,5 +365,4 @@ bool_ quest_null_hook(int q)
/**************************** Main plot ***************************/
#include "q_main.c"
-#include "q_one.c"
diff --git a/src/plots.h b/src/plots.h
index 75a6101c..8143f455 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -11,6 +11,5 @@ extern bool_ quest_random_describe(FILE *fff);
/******* Plot main ********/
extern bool_ quest_necro_init_hook(int q_idx);
-extern bool_ quest_one_init_hook(int q_idx);
extern bool_ quest_sauron_init_hook(int q_idx);
extern bool_ quest_morgoth_init_hook(int q_idx);
diff --git a/src/q_one.c b/src/q_one.c
index 4bfeaf3e..f9c71a91 100644
--- a/src/q_one.c
+++ b/src/q_one.c
@@ -1,4 +1,5 @@
-#undef cquest
+#include "q_one.h"
+
#define cquest (quest[QUEST_ONE])
bool_ quest_one_move_hook(char *fmt)
diff --git a/src/q_one.h b/src/q_one.h
new file mode 100644
index 00000000..3b0313a7
--- /dev/null
+++ b/src/q_one.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ quest_one_init_hook(int q_idx);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/tables.c b/src/tables.c
index 68c973c2..937ba05d 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -35,6 +35,7 @@
#include "q_thief.h"
#include "q_ultrae.h"
#include "q_ultrag.h"
+#include "q_one.h"