変愚蛮怒のメインリポジトリです
Revision | 644d8170b983d08faab4819171b6988e851d4bfe (tree) |
---|---|
Time | 2019-04-20 16:24:26 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #37353 generate.h を floor-generate.hへ統合。
@@ -296,7 +296,6 @@ | ||
296 | 296 | <ClInclude Include="..\..\src\floor.h" /> |
297 | 297 | <ClInclude Include="..\..\src\gameoption.h" /> |
298 | 298 | <ClInclude Include="..\..\src\gamevalue.h" /> |
299 | - <ClInclude Include="..\..\src\generate.h" /> | |
300 | 299 | <ClInclude Include="..\..\src\geometry.h" /> |
301 | 300 | <ClInclude Include="..\..\src\grid.h" /> |
302 | 301 | <ClInclude Include="..\..\src\h-basic.h" /> |
@@ -317,7 +317,6 @@ | ||
317 | 317 | <ClInclude Include="..\..\src\externs.h" /> |
318 | 318 | <ClInclude Include="..\..\src\gameoption.h" /> |
319 | 319 | <ClInclude Include="..\..\src\gamevalue.h" /> |
320 | - <ClInclude Include="..\..\src\generate.h" /> | |
321 | 320 | <ClInclude Include="..\..\src\h-basic.h" /> |
322 | 321 | <ClInclude Include="..\..\src\h-config.h" /> |
323 | 322 | <ClInclude Include="..\..\src\h-define.h" /> |
@@ -97,7 +97,7 @@ | ||
97 | 97 | */ |
98 | 98 | |
99 | 99 | #include "angband.h" |
100 | -#include "generate.h" | |
100 | +#include "floor-generate.h" | |
101 | 101 | #include "grid.h" |
102 | 102 | #include "rooms.h" |
103 | 103 | #include "floor.h" |
@@ -1,3 +1,110 @@ | ||
1 | 1 | #pragma once |
2 | + | |
3 | +/*! | |
4 | + * @file generate.h | |
5 | + * @brief ダンジョン生成処理のヘッダーファイル | |
6 | + * @date 2014/08/08 | |
7 | + * @author | |
8 | + * 不明(変愚蛮怒スタッフ?) | |
9 | + */ | |
10 | + | |
11 | +#define ALLOW_CAVERNS_AND_LAKES | |
12 | + | |
13 | +#define SAFE_MAX_ATTEMPTS 5000 /*!< 生成処理基本試行回数 */ | |
14 | + | |
15 | + | |
16 | + | |
17 | +extern int dun_tun_rnd; /*!< ダンジョンの通路方向を掻き回す頻度(一回の試行ごとに%で判定している) */ | |
18 | +extern int dun_tun_chg; /*!< ダンジョンの通路をクランクさせる頻度(一回の試行ごとに%で判定している) */ | |
19 | +extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ばす頻度(一回の試行ごとに%で判定している) */ | |
20 | +extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */ | |
21 | +extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */ | |
22 | + | |
23 | +/* | |
24 | + * Hack -- Dungeon allocation "places" | |
25 | + */ | |
26 | +#define ALLOC_SET_CORR 1 /* Hallway */ | |
27 | +#define ALLOC_SET_ROOM 2 /* Room */ | |
28 | +#define ALLOC_SET_BOTH 3 /* Anywhere */ | |
29 | + | |
30 | + /* | |
31 | + * Hack -- Dungeon allocation "types" | |
32 | + */ | |
33 | +#define ALLOC_TYP_RUBBLE 1 /* Rubble */ | |
34 | +#define ALLOC_TYP_TRAP 3 /* Trap */ | |
35 | +#define ALLOC_TYP_GOLD 4 /* Gold */ | |
36 | +#define ALLOC_TYP_OBJECT 5 /* Object */ | |
37 | +#define ALLOC_TYP_INVIS 6 /* Invisible wall */ | |
38 | + | |
39 | + | |
40 | + | |
41 | + /* | |
42 | + * The "size" of a "generation block" in grids | |
43 | + */ | |
44 | +#define BLOCK_HGT 11 | |
45 | +#define BLOCK_WID 11 | |
46 | + | |
47 | + /* | |
48 | + * Maximum numbers of rooms along each axis (currently 6x6) | |
49 | + */ | |
50 | +#define MAX_ROOMS_ROW (MAX_HGT / BLOCK_HGT) | |
51 | +#define MAX_ROOMS_COL (MAX_WID / BLOCK_WID) | |
52 | + | |
53 | + | |
54 | + /* | |
55 | + * Bounds on some arrays used in the "dun_data" structure. | |
56 | + * These bounds are checked, though usually this is a formality. | |
57 | + */ | |
58 | +#define CENT_MAX 100 | |
59 | +#define DOOR_MAX 200 | |
60 | +#define WALL_MAX 500 | |
61 | +#define TUNN_MAX 900 | |
62 | + | |
63 | + | |
64 | + /* | |
65 | + * Structure to hold all "dungeon generation" data | |
66 | + */ | |
67 | + | |
68 | +typedef struct dun_data dun_data; | |
69 | + | |
70 | +struct dun_data | |
71 | +{ | |
72 | + /* Array of centers of rooms */ | |
73 | + int cent_n; | |
74 | + coord cent[CENT_MAX]; | |
75 | + | |
76 | + /* Array of possible door locations */ | |
77 | + int door_n; | |
78 | + coord door[DOOR_MAX]; | |
79 | + | |
80 | + /* Array of wall piercing locations */ | |
81 | + int wall_n; | |
82 | + coord wall[WALL_MAX]; | |
83 | + | |
84 | + /* Array of tunnel grids */ | |
85 | + int tunn_n; | |
86 | + coord tunn[TUNN_MAX]; | |
87 | + | |
88 | + /* Number of blocks along each axis */ | |
89 | + int row_rooms; | |
90 | + int col_rooms; | |
91 | + | |
92 | + /* Array of which blocks are used */ | |
93 | + bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL]; | |
94 | + | |
95 | + /* Various type of dungeon floors */ | |
96 | + bool destroyed; | |
97 | + bool empty_level; | |
98 | + bool cavern; | |
99 | + int laketype; | |
100 | +}; | |
101 | + | |
102 | +extern dun_data *dun; | |
103 | + | |
104 | +extern bool place_quest_monsters(void); | |
105 | +extern void wipe_generate_random_floor_flags(void); | |
106 | +extern void clear_cave(void); | |
107 | +extern void generate_random_floor(void); | |
108 | + | |
2 | 109 | extern bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2); |
3 | 110 | extern bool build_tunnel2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff); |
@@ -13,7 +13,7 @@ | ||
13 | 13 | #include "angband.h" |
14 | 14 | #include "floor.h" |
15 | 15 | #include "floor-events.h" |
16 | -#include "generate.h" | |
16 | +#include "floor-generate.h" | |
17 | 17 | #include "grid.h" |
18 | 18 | #include "monster.h" |
19 | 19 | #include "quest.h" |
@@ -16,7 +16,7 @@ | ||
16 | 16 | */ |
17 | 17 | |
18 | 18 | #include "angband.h" |
19 | -#include "generate.h" | |
19 | +#include "floor-generate.h" | |
20 | 20 | #include "floor.h" |
21 | 21 | #include "floor-streams.h" |
22 | 22 | #include "grid.h" |
@@ -1,105 +0,0 @@ | ||
1 | -/*! | |
2 | - * @file generate.h | |
3 | - * @brief ダンジョン生成処理のヘッダーファイル | |
4 | - * @date 2014/08/08 | |
5 | - * @author | |
6 | - * 不明(変愚蛮怒スタッフ?) | |
7 | - */ | |
8 | - | |
9 | -#define ALLOW_CAVERNS_AND_LAKES | |
10 | - | |
11 | -#define SAFE_MAX_ATTEMPTS 5000 /*!< 生成処理基本試行回数 */ | |
12 | - | |
13 | - | |
14 | - | |
15 | -extern int dun_tun_rnd; /*!< ダンジョンの通路方向を掻き回す頻度(一回の試行ごとに%で判定している) */ | |
16 | -extern int dun_tun_chg; /*!< ダンジョンの通路をクランクさせる頻度(一回の試行ごとに%で判定している) */ | |
17 | -extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ばす頻度(一回の試行ごとに%で判定している) */ | |
18 | -extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */ | |
19 | -extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */ | |
20 | - | |
21 | -/* | |
22 | - * Hack -- Dungeon allocation "places" | |
23 | - */ | |
24 | -#define ALLOC_SET_CORR 1 /* Hallway */ | |
25 | -#define ALLOC_SET_ROOM 2 /* Room */ | |
26 | -#define ALLOC_SET_BOTH 3 /* Anywhere */ | |
27 | - | |
28 | -/* | |
29 | - * Hack -- Dungeon allocation "types" | |
30 | - */ | |
31 | -#define ALLOC_TYP_RUBBLE 1 /* Rubble */ | |
32 | -#define ALLOC_TYP_TRAP 3 /* Trap */ | |
33 | -#define ALLOC_TYP_GOLD 4 /* Gold */ | |
34 | -#define ALLOC_TYP_OBJECT 5 /* Object */ | |
35 | -#define ALLOC_TYP_INVIS 6 /* Invisible wall */ | |
36 | - | |
37 | - | |
38 | - | |
39 | -/* | |
40 | - * The "size" of a "generation block" in grids | |
41 | - */ | |
42 | -#define BLOCK_HGT 11 | |
43 | -#define BLOCK_WID 11 | |
44 | - | |
45 | -/* | |
46 | - * Maximum numbers of rooms along each axis (currently 6x6) | |
47 | - */ | |
48 | -#define MAX_ROOMS_ROW (MAX_HGT / BLOCK_HGT) | |
49 | -#define MAX_ROOMS_COL (MAX_WID / BLOCK_WID) | |
50 | - | |
51 | - | |
52 | -/* | |
53 | - * Bounds on some arrays used in the "dun_data" structure. | |
54 | - * These bounds are checked, though usually this is a formality. | |
55 | - */ | |
56 | -#define CENT_MAX 100 | |
57 | -#define DOOR_MAX 200 | |
58 | -#define WALL_MAX 500 | |
59 | -#define TUNN_MAX 900 | |
60 | - | |
61 | - | |
62 | -/* | |
63 | - * Structure to hold all "dungeon generation" data | |
64 | - */ | |
65 | - | |
66 | -typedef struct dun_data dun_data; | |
67 | - | |
68 | -struct dun_data | |
69 | -{ | |
70 | - /* Array of centers of rooms */ | |
71 | - int cent_n; | |
72 | - coord cent[CENT_MAX]; | |
73 | - | |
74 | - /* Array of possible door locations */ | |
75 | - int door_n; | |
76 | - coord door[DOOR_MAX]; | |
77 | - | |
78 | - /* Array of wall piercing locations */ | |
79 | - int wall_n; | |
80 | - coord wall[WALL_MAX]; | |
81 | - | |
82 | - /* Array of tunnel grids */ | |
83 | - int tunn_n; | |
84 | - coord tunn[TUNN_MAX]; | |
85 | - | |
86 | - /* Number of blocks along each axis */ | |
87 | - int row_rooms; | |
88 | - int col_rooms; | |
89 | - | |
90 | - /* Array of which blocks are used */ | |
91 | - bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL]; | |
92 | - | |
93 | - /* Various type of dungeon floors */ | |
94 | - bool destroyed; | |
95 | - bool empty_level; | |
96 | - bool cavern; | |
97 | - int laketype; | |
98 | -}; | |
99 | - | |
100 | -extern dun_data *dun; | |
101 | - | |
102 | -extern bool place_quest_monsters(void); | |
103 | -extern void wipe_generate_random_floor_flags(void); | |
104 | -extern void clear_cave(void); | |
105 | -extern void generate_random_floor(void); |
@@ -22,7 +22,7 @@ | ||
22 | 22 | #include "world.h" |
23 | 23 | #include "object-flavor.h" |
24 | 24 | #include "object-hook.h" |
25 | -#include "generate.h" | |
25 | +#include "floor-generate.h" | |
26 | 26 | #include "grid.h" |
27 | 27 | #include "trap.h" |
28 | 28 | #include "rooms.h" |
@@ -41,7 +41,7 @@ | ||
41 | 41 | */ |
42 | 42 | |
43 | 43 | #include "angband.h" |
44 | -#include "generate.h" | |
44 | +#include "floor-generate.h" | |
45 | 45 | #include "trap.h" |
46 | 46 | #include "mutation.h" |
47 | 47 | #include "monster.h" |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "angband.h" |
2 | 2 | #include "grid.h" |
3 | -#include "generate.h" | |
3 | +#include "floor-generate.h" | |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "rooms-city.h" |
6 | 6 | #include "store.h" |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "angband.h" |
2 | 2 | #include "grid.h" |
3 | -#include "generate.h" | |
3 | +#include "floor-generate.h" | |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "rooms-normal.h" |
6 | 6 | #include "floor.h" |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "angband.h" |
2 | 2 | #include "grid.h" |
3 | -#include "generate.h" | |
3 | +#include "floor-generate.h" | |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "rooms-pitnest.h" |
6 | 6 | #include "monster.h" |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "angband.h" |
2 | 2 | #include "grid.h" |
3 | -#include "generate.h" | |
3 | +#include "floor-generate.h" | |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "monster.h" |
6 | 6 | #include "monsterrace-hook.h" |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "angband.h" |
2 | 2 | #include "grid.h" |
3 | -#include "generate.h" | |
3 | +#include "floor-generate.h" | |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "floor.h" |
6 | 6 |
@@ -1,5 +1,5 @@ | ||
1 | 1 | #include "angband.h" |
2 | -#include "generate.h" | |
2 | +#include "floor-generate.h" | |
3 | 3 | #include "grid.h" |
4 | 4 | #include "rooms.h" |
5 | 5 | #include "store.h" |
@@ -38,7 +38,7 @@ | ||
38 | 38 | |
39 | 39 | #include "angband.h" |
40 | 40 | #include "floor.h" |
41 | -#include "generate.h" | |
41 | +#include "floor-generate.h" | |
42 | 42 | #include "grid.h" |
43 | 43 | #include "rooms.h" |
44 | 44 |