3 * @brief 部屋生成処理の定義ヘッダー / Header file for rooms.c, used only in generate.c
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke<br>
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.<br
15 #define ALLOW_CAVERNS_AND_LAKES
17 #define DUN_ROOMS_MAX 40 /*!< 部屋生成処理の最大試行数 / Number of rooms to attempt (was 50) */
20 /* 池型地形の生成ID / Room types for generate_lake() */
21 #define LAKE_T_LAVA 1 /*!< 池型地形ID: 溶岩 */
22 #define LAKE_T_WATER 2 /*!< 池型地形ID: 池 */
23 #define LAKE_T_CAVE 3 /*!< 池型地形ID: 空洞 */
24 #define LAKE_T_EARTH_VAULT 4 /*!< 池型地形ID: 地属性VAULT */
25 #define LAKE_T_AIR_VAULT 5 /*!< 池型地形ID: 風属性VAULT */
26 #define LAKE_T_WATER_VAULT 6 /*!< 池型地形ID: 水属性VAULT */
27 #define LAKE_T_FIRE_VAULT 7 /*!< 池型地形ID: 火属性VAULT */
30 /* 部屋型ID / Room types for room_build() */
31 #define ROOM_T_NORMAL 0 /*!<部屋型ID:基本長方形 / Simple (33x11) */
32 #define ROOM_T_OVERLAP 1 /*!<部屋型ID:長方形二つ重ね / Overlapping (33x11) */
33 #define ROOM_T_CROSS 2 /*!<部屋型ID:十字 / Crossed (33x11) */
34 #define ROOM_T_INNER_FEAT 3 /*!<部屋型ID:二重壁 / Large (33x11) */
35 #define ROOM_T_NEST 4 /*!<部屋型ID:モンスターNEST / Monster nest (33x11) */
36 #define ROOM_T_PIT 5 /*!<部屋型ID:モンスターPIT / Monster pit (33x11) */
37 #define ROOM_T_LESSER_VAULT 6 /*!<部屋型ID:小型VAULT / Lesser vault (33x22) */
38 #define ROOM_T_GREATER_VAULT 7 /*!<部屋型ID:大型VAULT / Greater vault (66x44) */
39 #define ROOM_T_FRACAVE 8 /*!<部屋型ID:フラクタル地形 / Fractal room (42x24) */
40 #define ROOM_T_RANDOM_VAULT 9 /*!<部屋型ID:ランダムVAULT / Random vault (44x22) */
41 #define ROOM_T_OVAL 10 /*!<部屋型ID:円形部屋 / Circular rooms (22x22) */
42 #define ROOM_T_CRYPT 11 /*!<部屋型ID:聖堂 / Crypts (22x22) */
43 #define ROOM_T_TRAP_PIT 12 /*!<部屋型ID:トラップつきモンスターPIT / Trapped monster pit */
44 #define ROOM_T_TRAP 13 /*!<部屋型ID:トラップ部屋 / Piranha/Armageddon trap room */
45 #define ROOM_T_GLASS 14 /*!<部屋型ID:ガラス部屋 / Glass room */
46 #define ROOM_T_ARCADE 15 /*!<部屋型ID:商店 / Arcade */
47 #define ROOM_T_FIXED 16 /*!<部屋型ID:固定部屋 / Fixed room */
49 #define ROOM_T_MAX 17 /*!<部屋型ID最大数 */
53 * Room type information
55 typedef struct room_info_type room_info_type;
59 /* Allocation information. */
60 s16b prob[ROOM_T_MAX];
62 /* Minimum level on which room can appear. */
67 #ifdef ALLOW_CAVERNS_AND_LAKES
68 extern void build_lake(floor_type *floor_ptr, int type);
69 extern void build_cavern(floor_type *floor_ptr);
70 #endif /* ALLOW_CAVERNS_AND_LAKES */
72 /* Maximum locked/jammed doors */
73 #define MAX_LJ_DOORS 8
76 * A structure type for doors
83 FEAT_IDX locked[MAX_LJ_DOORS];
85 FEAT_IDX jammed[MAX_LJ_DOORS];
89 door_type feat_door[MAX_DOOR_TYPES];
91 extern bool generate_rooms(player_type *player_ptr);
92 extern void build_maze_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault);
93 extern bool find_space(floor_type *floor_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width);
94 extern void build_small_room(player_type *player_ptr, POSITION x0, POSITION y0);
95 extern void add_outer_wall(floor_type *floor_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
96 extern POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4);
97 extern void generate_room_floor(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light);
98 extern void generate_fill_perm_bold(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
99 extern void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
100 extern bool generate_fracave(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
101 extern void fill_treasure(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
102 extern bool generate_lake(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
103 extern void build_recursive_room(floor_type *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power);
104 extern void build_room(floor_type *floor_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2);
105 extern void r_visit(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited);