Angband
option.h
Go to the documentation of this file.
1 
18 #ifndef INCLUDED_OPTIONS_H
19 #define INCLUDED_OPTIONS_H
20 
21 #include "z-file.h"
22 
23 #define PLAYER_NAME_LEN 32
24 
28 enum
29 {
35 
37 };
38 
42 enum
43 {
44  #define OP(a, b, c, d) OPT_##a,
45  #include "list-options.h"
46  #undef OP
47  OPT_MAX
48 };
49 
50 #define OPT(p, opt_name) p->opts.opt[OPT_##opt_name]
51 
55 #define OPT_PAGE_MAX OP_SCORE
56 #define OPT_PAGE_PER 21
57 #define OPT_PAGE_BIRTH 1
58 
63  bool opt[OPT_MAX];
70 };
71 
73 
77 void options_init_cheat(void);
78 const char *option_name(int opt);
79 const char *option_desc(int opt);
80 int option_type(int opt);
81 bool option_set(const char *opt, int val);
82 void options_init_cheat(void);
83 void options_init_defaults(struct player_options *opts);
84 void init_options(void);
85 
86 #endif /* !INCLUDED_OPTIONS_H */
uint16_t u16b
Definition: h-basic.h:169
Definition: option.h:30
Definition: option.h:31
#define OPT_PAGE_PER
Definition: option.h:56
Low-level file (and directory) handling.
const char * option_name(int opt)
Given an option index, return its name.
Definition: option.c:41
byte delay_factor
Delay factor (0 to 9)
Definition: option.h:67
uint8_t byte
Definition: h-basic.h:167
void options_init_cheat(void)
Functions.
Definition: option.c:96
void init_options(void)
Initialise options package.
Definition: option.c:127
Definition: option.h:36
#define OPT_PAGE_MAX
Information for "do_cmd_options()".
Definition: option.h:55
const char * option_desc(int opt)
Given an option index, return its description.
Definition: option.c:50
Definition: option.h:32
int option_type(int opt)
Determine the type of option (score, birth etc)
Definition: option.c:59
Definition: option.h:33
byte name_suffix
Numeric suffix for player name.
Definition: option.h:69
u16b lazymove_delay
Delay in cs before moving to allow another key.
Definition: option.h:66
void options_init_defaults(struct player_options *opts)
Set player default options.
Definition: option.c:110
bool opt[OPT_MAX]
Options.
Definition: option.h:63
The option data structures.
Definition: option.h:62
byte hitpoint_warn
Hitpoint warning (0 to 9)
Definition: option.h:65
Definition: option.h:34
bool option_set(const char *opt, int val)
Set an option, return true if successful.
Definition: option.c:74
int option_page[OPT_PAGE_MAX][OPT_PAGE_PER]
Option screen interface.
Definition: option.c:25