summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-03-24 19:13:16 +0100
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:41 +0200
commit4ce0078105404cc577cf74662fbc5d67b964f364 (patch)
treea6602da2c87162d62d85f4eddc74f223ac662cac /src
parent2e797029ff1940b4c327b916900f4fb6004c7e69 (diff)
Split Troll 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_troll.c3
-rw-r--r--src/q_troll.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 83e75b6b..ef6f04b6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,7 @@ SET(SRCS
q_narsil.c q_evil.c q_betwen.c q_haunted.c q_invas.c
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
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 e0ad0e3e..8fecd439 100644
--- a/src/plots.c
+++ b/src/plots.c
@@ -372,4 +372,3 @@ bool_ quest_null_hook(int q)
/**************************** Bree plot ***************************/
#include "q_thief.c"
#include "q_hobbit.c"
-#include "q_troll.c"
diff --git a/src/plots.h b/src/plots.h
index 259bfaf3..d3710037 100644
--- a/src/plots.h
+++ b/src/plots.h
@@ -20,4 +20,3 @@ extern bool_ quest_ultra_evil_init_hook(int q_idx);
/******* Plot Bree *********/
extern bool_ quest_thieves_init_hook(int q_idx);
extern bool_ quest_hobbit_init_hook(int q_idx);
-extern bool_ quest_troll_init_hook(int q_idx);
diff --git a/src/q_troll.c b/src/q_troll.c
index c314d2a7..b3875418 100644
--- a/src/q_troll.c
+++ b/src/q_troll.c
@@ -1,4 +1,5 @@
-#undef cquest
+#include "q_troll.h"
+
#define cquest (quest[QUEST_TROLL])
bool_ quest_troll_gen_hook(char *fmt)
diff --git a/src/q_troll.h b/src/q_troll.h
new file mode 100644
index 00000000..759baa86
--- /dev/null
+++ b/src/q_troll.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "angband.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bool_ quest_troll_init_hook(int q_idx);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/src/tables.c b/src/tables.c
index 756a3216..6c721685 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -30,6 +30,7 @@
#include "q_shroom.h"
#include "q_nazgul.h"
#include "q_wight.h"
+#include "q_troll.h"