6 * @brief ダンジョン生成処理のヘッダーファイル
12 #define SAFE_MAX_ATTEMPTS 5000 /*!< 生成処理基本試行回数 */
16 extern int dun_tun_rnd; /*!< ダンジョンの通路方向を掻き回す頻度(一回の試行ごとに%で判定している) */
17 extern int dun_tun_chg; /*!< ダンジョンの通路をクランクさせる頻度(一回の試行ごとに%で判定している) */
18 extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ばす頻度(一回の試行ごとに%で判定している) */
19 extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */
20 extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */
23 * Hack -- Dungeon allocation "places"
25 #define ALLOC_SET_CORR 1 /* Hallway */
26 #define ALLOC_SET_ROOM 2 /* Room */
27 #define ALLOC_SET_BOTH 3 /* Anywhere */
30 * Hack -- Dungeon allocation "types"
32 #define ALLOC_TYP_RUBBLE 1 /* Rubble */
33 #define ALLOC_TYP_TRAP 3 /* Trap */
34 #define ALLOC_TYP_GOLD 4 /* Gold */
35 #define ALLOC_TYP_OBJECT 5 /* Object */
36 #define ALLOC_TYP_INVIS 6 /* Invisible wall */
41 * The "size" of a "generation block" in grids
47 * Maximum numbers of rooms along each axis (currently 6x6)
49 #define MAX_ROOMS_ROW (MAX_HGT / BLOCK_HGT)
50 #define MAX_ROOMS_COL (MAX_WID / BLOCK_WID)
54 * Bounds on some arrays used in the "dun_data" structure.
55 * These bounds are checked, though usually this is a formality.
64 * Structure to hold all "dungeon generation" data
67 typedef struct dun_data dun_data;
71 /* Array of centers of rooms */
75 /* Array of possible door locations */
79 /* Array of wall piercing locations */
83 /* Array of tunnel grids */
87 /* Number of blocks along each axis */
91 /* Array of which blocks are used */
92 bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
94 /* Various type of dungeon floors */
101 extern dun_data *dun;
103 extern bool place_quest_monsters(player_type *creature_ptr);
104 extern void wipe_generate_random_floor_flags(floor_type *floor_ptr);
105 extern void clear_cave(player_type *player_ptr);
106 extern void generate_floor(player_type *player_ptr);
108 extern bool build_tunnel(player_type *player_ptr, POSITION row1, POSITION col1, POSITION row2, POSITION col2);
109 extern bool build_tunnel2(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int type, int cutoff);