OSDN Git Service

Merge branch 'Feature/Fix/No-Fuel' into develop/3.0.0.1Alpha
[hengband/hengband.git] / src / system / dungeon-data-definition.h
1 #pragma once
2
3 #include "floor/floor-base-definitions.h"
4 #include "system/angband.h"
5
6 /*
7  * Bounds on some arrays used in the "dun_data_type" structure.
8  * These bounds are checked, though usually this is a formality.
9  */
10 #define CENT_MAX 100
11 #define DOOR_MAX 200
12 #define WALL_MAX 500
13 #define TUNN_MAX 900
14
15 /*
16  * The "size" of a "generation block" in grids
17  */
18 #define BLOCK_HGT 11
19 #define BLOCK_WID 11
20
21 /*
22  * Maximum numbers of rooms along each axis (currently 6x6)
23  */
24 #define MAX_ROOMS_ROW (MAX_HGT / BLOCK_HGT)
25 #define MAX_ROOMS_COL (MAX_WID / BLOCK_WID)
26
27 /*
28  * Simple structure to hold a map location
29  */
30 typedef struct coord {
31     POSITION y;
32     POSITION x;
33 } coord;
34
35 /*
36  * Structure to hold all "dungeon generation" data
37  */
38 typedef struct dun_data_type {
39     /* Array of centers of rooms */
40     int cent_n;
41     coord cent[CENT_MAX];
42
43     /* Array of possible door locations */
44     int door_n;
45     coord door[DOOR_MAX];
46
47     /* Array of wall piercing locations */
48     int wall_n;
49     coord wall[WALL_MAX];
50
51     /* Array of tunnel grids */
52     int tunn_n;
53     coord tunn[TUNN_MAX];
54
55     /* Number of blocks along each axis */
56     int row_rooms;
57     int col_rooms;
58
59     /* Array of which blocks are used */
60     bool room_map[MAX_ROOMS_ROW][MAX_ROOMS_COL];
61
62     /* Various type of dungeon floors */
63     bool destroyed;
64     bool empty_level;
65     bool cavern;
66     int laketype;
67     int tunnel_fail_count;
68
69     POSITION tunnel_y;
70     POSITION tunnel_x;
71
72     int alloc_object_num;
73     int alloc_monster_num;
74
75     concptr *why;
76 } dun_data_type;