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. */
66 extern void build_lake(player_type *player_ptr, int type);
67 extern void build_cavern(player_type *player_ptr);
69 /* Maximum locked/jammed doors */
70 #define MAX_LJ_DOORS 8
73 * A structure type for doors
80 FEAT_IDX locked[MAX_LJ_DOORS];
82 FEAT_IDX jammed[MAX_LJ_DOORS];
86 door_type feat_door[MAX_DOOR_TYPES];
88 extern bool generate_rooms(player_type *player_ptr);
89 extern void build_maze_vault(player_type *player_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault);
90 extern bool find_space(player_type *player_ptr, POSITION *y, POSITION *x, POSITION height, POSITION width);
91 extern void build_small_room(player_type *player_ptr, POSITION x0, POSITION y0);
92 extern void add_outer_wall(player_type *player_ptr, POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
93 extern POSITION dist2(POSITION x1, POSITION y1, POSITION x2, POSITION y2, POSITION h1, POSITION h2, POSITION h3, POSITION h4);
94 extern void generate_room_floor(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light);
95 extern void generate_fill_perm_bold(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
96 extern void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
97 extern bool generate_fracave(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
98 extern void fill_treasure(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
99 extern bool generate_lake(player_type *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
100 extern void build_recursive_room(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power);
101 extern void build_room(player_type *player_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2);
102 extern void r_visit(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited);