summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dungeon.cc1
-rw-r--r--src/externs.h13
-rw-r--r--src/gen_evol.cc1
-rw-r--r--src/gen_maze.cc1
-rw-r--r--src/generate.cc27
-rw-r--r--src/generate.hpp12
-rw-r--r--src/init2.cc1
-rw-r--r--src/q_eol.cc1
-rw-r--r--src/q_rand.cc1
-rw-r--r--src/q_thrain.cc1
10 files changed, 23 insertions, 36 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc
index a744894b..fdc773a7 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -17,6 +17,7 @@
#include "cmd6.hpp"
#include "cmd7.hpp"
#include "corrupt.hpp"
+#include "generate.hpp"
#include "gen_evol.hpp"
#include "gods.hpp"
#include "help.hpp"
diff --git a/src/externs.h b/src/externs.h
index 9a8460ed..82a69da3 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -494,19 +494,6 @@ extern void race_legends(void);
extern void show_highclass(int building);
extern errr get_xtra_line(const char * file_name, monster_type *m_ptr, char * output);
-/* generate.c */
-extern bool_ new_player_spot(int branch);
-extern void add_level_generator(cptr name, bool_ (*generator)(), bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs);
-extern bool_ level_generate_dungeon();
-extern bool_ generate_fracave(int y0, int x0,int xsize,int ysize,int cutoff,bool_ light,bool_ room);
-extern void generate_hmap(int y0, int x0,int xsiz,int ysiz,int grd,int roug,int cutoff);
-extern bool_ room_alloc(int x,int y,bool_ crowded,int by0,int bx0,int *xx,int *yy);
-extern void generate_grid_mana(void);
-extern byte calc_dungeon_type(void);
-extern void generate_cave(void);
-extern void build_rectangle(int y1, int x1, int y2, int x2, int feat, int info);
-
-
/* wild.c */
extern int generate_area(int y, int x, bool_ border, bool_ corner, bool_ refresh);
extern void wilderness_gen(int refresh);
diff --git a/src/gen_evol.cc b/src/gen_evol.cc
index 0dc86910..309b8695 100644
--- a/src/gen_evol.cc
+++ b/src/gen_evol.cc
@@ -10,6 +10,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "levels.hpp"
/*
diff --git a/src/gen_maze.cc b/src/gen_maze.cc
index 387fecd8..fd9ff153 100644
--- a/src/gen_maze.cc
+++ b/src/gen_maze.cc
@@ -11,6 +11,7 @@
#include "angband.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "levels.hpp"
#include <memory>
diff --git a/src/generate.cc b/src/generate.cc
index 84e7cb87..5ac6ed77 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -6632,7 +6632,7 @@ static bool_ room_build(int y, int x, int typ)
/*
* Set level boundaries
*/
-void set_bounders(bool_ empty_level)
+static void set_bounders(bool_ empty_level)
{
int y, x;
@@ -7169,7 +7169,7 @@ bool_ level_generate_dungeon()
/*
* Bring the imprinted pets from the old level
*/
-void replace_all_friends()
+static void replace_all_friends()
{
int i;
@@ -7204,7 +7204,7 @@ void replace_all_friends()
/*
* Save the imprinted pets from the old level
*/
-void save_all_friends()
+static void save_all_friends()
{
if (p_ptr->old_wild_mode) return;
@@ -7216,25 +7216,6 @@ void save_all_friends()
/*
- * Return the dungeon type of the current level(it can only return the
- * principal dungeons)
- */
-byte calc_dungeon_type()
-{
- int i;
-
- for (i = 0; i < max_d_idx; i++)
- {
- if ((dun_level >= d_info[i].mindepth) &&
- (dun_level <= d_info[i].maxdepth) &&
- (d_info[i].flags1 & DF1_PRINCIPAL))
- return (i);
- }
- return (0);
-}
-
-
-/*
* Build probability tables for walls and floors and set feat_wall_outer
* and feat_wall_inner according to the current information in d_info.txt
*
@@ -8197,7 +8178,7 @@ static void finalise_special_level(void)
/*
* Give some magical energy to the each grid of the level
*/
-void generate_grid_mana()
+static void generate_grid_mana()
{
int y, x, mana, mult;
bool_ xtra_magic = FALSE;
diff --git a/src/generate.hpp b/src/generate.hpp
new file mode 100644
index 00000000..54ac3b7d
--- /dev/null
+++ b/src/generate.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "angband.h"
+
+extern bool_ new_player_spot(int branch);
+extern void add_level_generator(cptr name, bool_ (*generator)(), bool_ stairs, bool_ monsters, bool_ objects, bool_ miscs);
+extern bool_ level_generate_dungeon();
+extern bool_ generate_fracave(int y0, int x0,int xsize,int ysize,int cutoff,bool_ light,bool_ room);
+extern void generate_hmap(int y0, int x0,int xsiz,int ysiz,int grd,int roug,int cutoff);
+extern bool_ room_alloc(int x,int y,bool_ crowded,int by0,int bx0,int *xx,int *yy);
+extern void generate_cave(void);
+extern void build_rectangle(int y1, int x1, int y2, int x2, int feat, int info);
diff --git a/src/init2.cc b/src/init2.cc
index d840f4ef..393f679c 100644
--- a/src/init2.cc
+++ b/src/init2.cc
@@ -1,5 +1,6 @@
#include "angband.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "gen_evol.hpp"
#include "gen_maze.hpp"
#include "hooks.h"
diff --git a/src/q_eol.cc b/src/q_eol.cc
index b718a4af..08475a0c 100644
--- a/src/q_eol.cc
+++ b/src/q_eol.cc
@@ -1,6 +1,7 @@
#include "q_eol.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "hooks.h"
#include "monster2.hpp"
#include "traps.hpp"
diff --git a/src/q_rand.cc b/src/q_rand.cc
index 4acd220b..874c7e7a 100644
--- a/src/q_rand.cc
+++ b/src/q_rand.cc
@@ -1,6 +1,7 @@
#include "q_rand.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "hooks.h"
#include "messages.h"
#include "monster2.hpp"
diff --git a/src/q_thrain.cc b/src/q_thrain.cc
index 14405172..d6ad13ed 100644
--- a/src/q_thrain.cc
+++ b/src/q_thrain.cc
@@ -1,6 +1,7 @@
#include "q_thrain.h"
#include "cave.hpp"
+#include "generate.hpp"
#include "hooks.h"
#include "quark.h"
#include "randart.hpp"