Angband
init.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDED_INIT_H
13 #define INCLUDED_INIT_H
14 
15 #include "h-basic.h"
16 #include "z-bitflag.h"
17 #include "z-file.h"
18 #include "z-rand.h"
19 #include "parser.h"
20 
27 {
28  /* Array bounds, set on parsing edit files */
44  /* Maxima of things on a given level, read from constants.txt */
47  /* Monster generation constants, read from constants.txt */
56  /* Monster gameplay constants, read from constants.txt */
64  /* Dungeon generation constants, read from constants.txt */
74  /* World shape constants, read from constants.txt */
75  u16b max_depth; /* Maximum dungeon level */
76  u16b day_length; /* Number of turns from dawn to dawn */
81  u16b feeling_total; /* Total number of feeling squares per level */
82  u16b feeling_need; /* Squares needed to see to get first feeling */
83  u16b move_energy; /* Energy the player or monster needs to move */
84 
85  /* Carrying capacity constants, read from constants.txt */
91  /* Store parameters, read from constants.txt */
97  /* Object creation constants, read from constants.txt */
98  u16b max_obj_depth; /* Maximum depth used in object allocation */
99  u16b great_obj; /* 1/chance of inflating the requested object level */
100  u16b great_ego; /* 1/chance of inflating the requested ego item level */
101  u16b fuel_torch; /* Maximum amount of fuel in a torch */
102  u16b fuel_lamp; /* Maximum amount of fuel in a lantern */
103  u16b default_lamp; /* Default amount of fuel in a lantern */
104 
105  /* Player constants, read from constants.txt */
106  u16b max_sight; /* Maximum visual range */
107  u16b max_range; /* Maximum missile and spell range */
108  u16b start_gold; /* Amount of gold the player starts with */
109 };
110 
111 struct init_module {
112  const char *name;
115 };
116 
118 
119 extern const char *ANGBAND_SYS;
120 
121 extern char *ANGBAND_DIR_APEX;
122 extern char *ANGBAND_DIR_EDIT;
123 extern char *ANGBAND_DIR_FILE;
124 extern char *ANGBAND_DIR_HELP;
125 extern char *ANGBAND_DIR_INFO;
126 extern char *ANGBAND_DIR_SAVE;
127 extern char *ANGBAND_DIR_PREF;
128 extern char *ANGBAND_DIR_USER;
129 extern char *ANGBAND_DIR_XTRA;
130 
131 extern char *ANGBAND_DIR_XTRA_FONT;
132 extern char *ANGBAND_DIR_XTRA_GRAF;
133 extern char *ANGBAND_DIR_XTRA_SOUND;
134 extern char *ANGBAND_DIR_XTRA_ICON;
135 
136 extern struct parser *init_parse_artifact(void);
137 extern struct parser *init_parse_class(void);
138 extern struct parser *init_parse_ego(void);
139 extern struct parser *init_parse_feat(void);
140 extern struct parser *init_parse_history(void);
141 extern struct parser *init_parse_object(void);
142 extern struct parser *init_parse_object_base(void);
143 extern struct parser *init_parse_pain(void);
144 extern struct parser *init_parse_p_race(void);
145 extern struct parser *init_parse_pit(void);
146 extern struct parser *init_parse_monster(void);
147 extern struct parser *init_parse_v(void);
148 extern struct parser *init_parse_constants(void);
149 extern struct parser *init_parse_flavor(void);
150 extern struct parser *init_parse_names(void);
151 extern struct parser *init_parse_hints(void);
152 extern struct parser *init_parse_trap(void);
153 extern struct parser *init_parse_quest(void);
154 
155 extern void init_file_paths(const char *config, const char *lib, const char *data);
156 extern void init_game_constants(void);
157 extern void init_arrays(void);
158 extern void create_needed_dirs(void);
159 extern bool init_angband(void);
160 extern void cleanup_angband(void);
161 
162 #endif /* INCLUDED_INIT_H */