From 3acf44b1bb41df3db3ccce88aaa1298b4f87d350 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 23 Feb 2015 09:11:59 +0100 Subject: Move modules.cc declarations to separate header --- src/birth.cc | 1 + src/dungeon.cc | 1 + src/externs.h | 10 +--------- src/init2.cc | 5 ++--- src/loadsave.cc | 2 +- src/modules.hpp | 11 +++++++++++ src/squelch/rule.cc | 5 +++-- src/tables.cc | 1 + 8 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 src/modules.hpp (limited to 'src') diff --git a/src/birth.cc b/src/birth.cc index c95d0188..73cc9a37 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -13,6 +13,7 @@ #include "angband.h" #include "corrupt.hpp" #include "messages.h" +#include "modules.hpp" #include "hooks.h" #include "mimic.hpp" #include "q_rand.h" diff --git a/src/dungeon.cc b/src/dungeon.cc index 6a95361a..bb9c05ed 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -13,6 +13,7 @@ #include "angband.h" #include "corrupt.hpp" +#include "modules.hpp" #include "quest.h" #include "quark.h" #include "hooks.h" diff --git a/src/externs.h b/src/externs.h index 50eb2d39..edcc30d6 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1576,16 +1576,8 @@ extern void init_lua_init(void); /* status.c */ extern void status_main(); -/* modules.c */ +/* modules.cc */ extern cptr force_module; -extern bool_ select_module(void); -extern bool_ module_savefile_loadable(cptr savefile_mod); -extern void tome_intro(); -extern void theme_intro(); -extern s16b *theme_race_status(int r_idx); -extern void init_hooks_module(); -extern int find_module(cptr name); - /* lua_bind.c */ diff --git a/src/init2.cc b/src/init2.cc index a1e9831f..92d13d4b 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -3,15 +3,14 @@ /* Purpose: Initialisation (part 2) -BEN- */ #include "angband.h" - +#include "modules.hpp" #include "messages.h" #include "quark.h" #include "hooks.h" #include "tome/make_array.hpp" #include "spells3.hpp" -#include - +#include #include /* diff --git a/src/loadsave.cc b/src/loadsave.cc index e916e367..31782940 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -5,8 +5,8 @@ this way makes maintenance easier and lets us share code. */ #include "angband.h" - #include "messages.h" +#include "modules.hpp" #include "quark.h" #include "hooks.h" diff --git a/src/modules.hpp b/src/modules.hpp new file mode 100644 index 00000000..5ea515e3 --- /dev/null +++ b/src/modules.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "angband.h" + +extern bool_ select_module(void); +extern bool_ module_savefile_loadable(cptr savefile_mod); +extern void tome_intro(); +extern void theme_intro(); +extern s16b *theme_race_status(int r_idx); +extern void init_hooks_module(); +extern int find_module(cptr name); diff --git a/src/squelch/rule.cc b/src/squelch/rule.cc index def034fd..060ae257 100644 --- a/src/squelch/rule.cc +++ b/src/squelch/rule.cc @@ -4,8 +4,9 @@ #include "tome/squelch/cursor.hpp" #include "tome/squelch/condition.hpp" #include "tome/squelch/tree_printer.hpp" -#include "angband.h" -#include "quark.h" +#include "../angband.h" +#include "../modules.hpp" +#include "../quark.h" namespace squelch { diff --git a/src/tables.cc b/src/tables.cc index 00da471d..9d449310 100644 --- a/src/tables.cc +++ b/src/tables.cc @@ -11,6 +11,7 @@ */ #include "angband.h" +#include "modules.hpp" #include "q_library.h" #include "q_fireprof.h" #include "q_bounty.h" -- cgit v1.2.3