From 1014b3342b9a61a5477b06b566271b5216edbbe3 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sun, 24 Mar 2013 17:54:01 +0100 Subject: Split library quest from plots.c --- src/CMakeLists.txt | 2 +- src/bldg.c | 1 + src/plots.c | 3 --- src/plots.h | 5 ----- src/q_library.c | 4 +++- src/q_library.h | 15 +++++++++++++++ src/tables.c | 1 + 7 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 src/q_library.h 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" -- cgit v1.2.3