From ef6f8df29a69e5462fce11589b9a6778f02f22b5 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 7 Mar 2015 16:55:40 +0100 Subject: Split levels.cc declarations to separate header file --- src/cmd2.cc | 1 + src/cmd4.cc | 1 + src/dungeon.cc | 1 + src/externs.h | 12 ------------ src/files.cc | 1 + src/gen_evol.cc | 1 + src/gen_maze.cc | 2 ++ src/generate.cc | 1 + src/levels.cc | 8 +++----- src/levels.hpp | 13 +++++++++++++ src/loadsave.cc | 1 + src/monster2.cc | 1 + src/xtra1.cc | 1 + 13 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 src/levels.hpp diff --git a/src/cmd2.cc b/src/cmd2.cc index d29e2bad..2dfd9dfe 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -14,6 +14,7 @@ #include "cmd1.hpp" #include "gods.hpp" #include "hooks.h" +#include "levels.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "skills.hpp" diff --git a/src/cmd4.cc b/src/cmd4.cc index 034d5b96..cc86fd4b 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -10,6 +10,7 @@ #include "angband.h" #include "corrupt.hpp" #include "hooks.h" +#include "levels.hpp" #include "messages.h" #include "monster2.hpp" #include "notes.hpp" diff --git a/src/dungeon.cc b/src/dungeon.cc index 0f549f08..5ffcd7e0 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -20,6 +20,7 @@ #include "gods.hpp" #include "help.hpp" #include "hooks.h" +#include "levels.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "modules.hpp" diff --git a/src/externs.h b/src/externs.h index 49e09484..d78eb05e 100644 --- a/src/externs.h +++ b/src/externs.h @@ -679,18 +679,6 @@ extern s32b flag_cost(object_type * o_ptr, int plusses); /* main.c */ extern bool_ private_check_user_directory(cptr dirpath); -/* levels.c */ -extern bool_ get_dungeon_generator(char *buf); -extern bool_ get_level_desc(char *buf); -extern void get_level_flags(void); -extern bool_ get_dungeon_name(char *buf); -extern bool_ get_dungeon_special(char *buf); -extern bool_ get_command(const char *file, char comm, char *param); -extern int get_branch(void); -extern int get_fbranch(void); -extern int get_flevel(void); -extern bool_ get_dungeon_save(char *buf); - /* wizard1.c */ extern void do_cmd_spoilers(); diff --git a/src/files.cc b/src/files.cc index 9765810a..0bdb0d4e 100644 --- a/src/files.cc +++ b/src/files.cc @@ -12,6 +12,7 @@ #include "cmd3.hpp" #include "hiscore.h" #include "hooks.h" +#include "levels.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/gen_evol.cc b/src/gen_evol.cc index 802a4a87..c866a4d1 100644 --- a/src/gen_evol.cc +++ b/src/gen_evol.cc @@ -12,6 +12,7 @@ #include "angband.h" #include "cave.hpp" +#include "levels.hpp" /* * Generate a game of life level :) and make it evolve diff --git a/src/gen_maze.cc b/src/gen_maze.cc index 9fca14ec..a7da6eaa 100644 --- a/src/gen_maze.cc +++ b/src/gen_maze.cc @@ -13,6 +13,8 @@ #include "angband.h" #include "cave.hpp" +#include "levels.hpp" + #include /* diff --git a/src/generate.cc b/src/generate.cc index 7780c7b4..84e7cb87 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -9,6 +9,7 @@ #include "angband.h" #include "cave.hpp" #include "hooks.h" +#include "levels.hpp" #include "monster2.hpp" #include "randart.hpp" #include "spells1.hpp" diff --git a/src/levels.cc b/src/levels.cc index 54c697d0..d22f5e70 100644 --- a/src/levels.cc +++ b/src/levels.cc @@ -1,7 +1,3 @@ -/* File: levels.c */ - -/* Purpose: Levels functions */ - /* * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke * @@ -10,6 +6,8 @@ * included in all such copies. */ +#include "levels.hpp" + #include "angband.h" #include "util.hpp" #include "util.h" @@ -19,7 +17,7 @@ * Return the parameter of the given command in the given file */ static int start_line = 0; -bool_ get_command(const char *file, char comm, char *param) +static bool_ get_command(const char *file, char comm, char *param) { char buf[1024]; int i = -1; diff --git a/src/levels.hpp b/src/levels.hpp new file mode 100644 index 00000000..187092b1 --- /dev/null +++ b/src/levels.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "h-basic.h" + +extern bool_ get_dungeon_generator(char *buf); +extern bool_ get_level_desc(char *buf); +extern void get_level_flags(void); +extern bool_ get_dungeon_name(char *buf); +extern bool_ get_dungeon_special(char *buf); +extern int get_branch(void); +extern int get_fbranch(void); +extern int get_flevel(void); +extern bool_ get_dungeon_save(char *buf); diff --git a/src/loadsave.cc b/src/loadsave.cc index 970cf13a..3f02bd1f 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -1,5 +1,6 @@ #include "angband.h" #include "birth.hpp" +#include "levels.hpp" #include "messages.h" #include "modules.hpp" #include "monster2.hpp" diff --git a/src/monster2.cc b/src/monster2.cc index e844b4a8..1fb01d89 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -10,6 +10,7 @@ #include "angband.h" #include "cave.hpp" #include "hooks.h" +#include "levels.hpp" #include "mimic.hpp" #include "monster3.hpp" #include "randart.hpp" diff --git a/src/xtra1.cc b/src/xtra1.cc index 1f68d156..c38c87d6 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -14,6 +14,7 @@ #include "cmd7.hpp" #include "gods.hpp" #include "hooks.h" +#include "levels.hpp" #include "messages.h" #include "mimic.hpp" #include "monster1.hpp" -- cgit v1.2.3