OSDN Git Service

[Refactor] #1366 Removed type alias 'TOWN_IDX'
[hengbandforosx/hengbandosx.git] / src / floor / wild.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #define NO_TOWN 6
6 #define SECRET_TOWN 5
7
8 enum parse_error_type : int;
9
10 /* Wilderness Terrains */
11 enum wt_type {
12         TERRAIN_EDGE = 0, /* Edge of the World */
13     TERRAIN_TOWN = 1, /* Town */
14         TERRAIN_DEEP_WATER = 2, /* Deep water */
15     TERRAIN_SHALLOW_WATER = 3, /* Shallow water */
16     TERRAIN_SWAMP = 4, /* Swamp */
17     TERRAIN_DIRT = 5, /* Dirt */
18     TERRAIN_GRASS = 6, /* Grass */
19     TERRAIN_TREES = 7, /* Trees */
20     TERRAIN_DESERT = 8, /* Desert */
21     TERRAIN_SHALLOW_LAVA = 9, /* Shallow lava */
22     TERRAIN_DEEP_LAVA = 10, /* Deep lava */
23     TERRAIN_MOUNTAIN = 11, /* Mountain */       
24         MAX_WILDERNESS = 12, /* Maximum wilderness index */
25 };
26
27 /*
28  * A structure describing a wilderness area with a terrain or a town
29  */
30 typedef struct wilderness_type {
31         wt_type terrain;
32         int16_t town;
33         int road;
34         uint32_t seed;
35         DEPTH level;
36         byte entrance;
37 } wilderness_type;
38
39 extern wilderness_type **wilderness;
40
41 typedef struct player_type player_type;
42 void set_floor_and_wall(DUNGEON_IDX type);
43 void wilderness_gen(player_type *creature_ptr);
44 void wilderness_gen_small(player_type *creature_ptr);
45 errr init_wilderness(void);
46 void init_wilderness_terrains(void);
47 void seed_wilderness(void);
48 parse_error_type parse_line_wilderness(player_type *creature_ptr, char *buf, int xmin, int xmax, int *y, int *x);
49 bool change_wild_mode(player_type *creature_ptr, bool encount);