#include "AppHdr.h"#include "initfile.h"#include "options.h"#include <stdio.h>#include <stdlib.h>#include <string>#include <ctype.h>#include "chardump.h"#include "clua.h"#include "colour.h"#include "dlua.h"#include "delay.h"#include "directn.h"#include "errors.h"#include "kills.h"#include "files.h"#include "defines.h"#include "invent.h"#include "item_use.h"#include "libutil.h"#include "macro.h"#include "message.h"#include "mon-util.h"#include "jobs.h"#include "player.h"#include "religion.h"#include "species.h"#include "spl-util.h"#include "stash.h"#include "state.h"#include "stuff.h"#include "syscalls.h"#include "tags.h"#include "travel.h"#include "items.h"#include "view.h"#include "viewchar.h"

Classes | |
| struct | es_command |
Defines | |
| #define | IS_VAR_CHAR(c) (isaalpha(c) || c == '_' || c == '-') |
| #define | BOOL_OPTION_NAMED(_opt_str, _opt_var) |
| #define | BOOL_OPTION(_opt) BOOL_OPTION_NAMED(#_opt, _opt) |
| #define | COLOUR_OPTION_NAMED(_opt_str, _opt_var) |
| #define | COLOUR_OPTION(_opt) COLOUR_OPTION_NAMED(#_opt, _opt) |
| #define | CURSES_OPTION_NAMED(_opt_str, _opt_var) |
| #define | CURSES_OPTION(_opt) CURSES_OPTION_NAMED(#_opt, _opt) |
| #define | INT_OPTION_NAMED(_opt_str, _opt_var, _min_val, _max_val) |
| #define | INT_OPTION(_opt, _min_val, _max_val) INT_OPTION_NAMED(#_opt, _opt, _min_val, _max_val) |
| #define | ERR(...) do { fprintf(stderr, __VA_ARGS__); return; } while(0) |
Enumerations | |
| enum | commandline_option_type { CLO_SCORES, CLO_NAME, CLO_RACE, CLO_CLASS, CLO_PLAIN, CLO_DIR, CLO_RC, CLO_RCDIR, CLO_TSCORES, CLO_VSCORES, CLO_SCOREFILE, CLO_MORGUE, CLO_MACRO, CLO_MAPSTAT, CLO_ARENA, CLO_DUMP_MAPS, CLO_TEST, CLO_SCRIPT, CLO_BUILDDB, CLO_HELP, CLO_VERSION, CLO_SEED, CLO_SAVE_VERSION, CLO_SPRINT, CLO_EXTRA_OPT_FIRST, CLO_EXTRA_OPT_LAST, CLO_SPRINT_MAP, CLO_EDIT_SAVE, CLO_PRINT_CHARSET, CLO_ZOTDEF, CLO_NOPS } |
| enum | es_command_type { ES_LS, ES_RM, ES_GET, ES_PUT, ES_REPACK, NUM_ES } |
Functions | |
| template<class A, class B> | |
| void | append_vector (A &dest, const B &src) |
| int | str_to_channel (const std::string &str) |
| std::string | channel_to_str (int channel) |
| int | str_to_summon_type (const std::string &str) |
| std::string | gametype_to_str (game_type type) |
| std::string | read_init_file (bool runscript) |
| newgame_def | read_startup_prefs () |
| void | write_newgame_options_file (const newgame_def &prefs) |
| void | save_player_name () |
| void | read_options (FILE *f, bool runscript) |
| void | read_options (const std::string &s, bool runscript, bool clear_aliases) |
| void | get_system_environment (void) |
| std::string | find_executable_path () |
| bool | parse_args (int argc, char **argv, bool rc_only) |
Variables | |
| system_environment | SysEnv |
| game_options | Options |
| #define BOOL_OPTION | ( | _opt | ) | BOOL_OPTION_NAMED(#_opt, _opt) |
| #define BOOL_OPTION_NAMED | ( | _opt_str, | |||
| _opt_var | ) |
Value:
if (key == _opt_str) do { \ this->_opt_var = _read_bool(field, this->_opt_var); \ } while (false)
| #define COLOUR_OPTION | ( | _opt | ) | COLOUR_OPTION_NAMED(#_opt, _opt) |
| #define COLOUR_OPTION_NAMED | ( | _opt_str, | |||
| _opt_var | ) |
Value:
if (key == _opt_str) do { \ const int col = str_to_colour(field); \ if (col != -1) { \ this->_opt_var = col; \ } else { \ /*fprintf(stderr, "Bad %s -- %s\n", key, field.c_str());*/ \ report_error ( \ make_stringf("Bad %s -- %s\n", \ key.c_str(), field.c_str())); \ } \ } while (false)
| #define CURSES_OPTION | ( | _opt | ) | CURSES_OPTION_NAMED(#_opt, _opt) |
| #define CURSES_OPTION_NAMED | ( | _opt_str, | |||
| _opt_var | ) |
Value:
if (key == _opt_str) do { \ this->_opt_var = curses_attribute(field); \ } while (false)
| #define ERR | ( | ... | ) | do { fprintf(stderr, __VA_ARGS__); return; } while(0) |
| #define INT_OPTION | ( | _opt, | |||
| _min_val, | |||||
| _max_val | ) | INT_OPTION_NAMED(#_opt, _opt, _min_val, _max_val) |
| #define INT_OPTION_NAMED | ( | _opt_str, | |||
| _opt_var, | |||||
| _min_val, | |||||
| _max_val | ) |
Value:
if (key == _opt_str) do { \ const int min_val = (_min_val); \ const int max_val = (_max_val); \ int val = atoi(field.c_str()); \ if (val < min_val) { \ report_error ( \ make_stringf("Bad %s: %d < %d", _opt_str, val, min_val)); \ val = min_val; \ } else if (val > max_val) { \ report_error ( \ make_stringf("Bad %s: %d > %d", _opt_str, val, max_val)); \ val = max_val; \ } \ this->_opt_var = val; \ } while (false)
| #define IS_VAR_CHAR | ( | c | ) | (isaalpha(c) || c == '_' || c == '-') |
| enum es_command_type |
| void append_vector | ( | A & | dest, | |
| const B & | src | |||
| ) | [inline] |
| std::string channel_to_str | ( | int | channel | ) |
| std::string find_executable_path | ( | ) |
| std::string gametype_to_str | ( | game_type | type | ) |
| void get_system_environment | ( | void | ) |
| bool parse_args | ( | int | argc, | |
| char ** | argv, | |||
| bool | rc_only | |||
| ) |

| std::string read_init_file | ( | bool | runscript | ) |

| void read_options | ( | const std::string & | s, | |
| bool | runscript, | |||
| bool | clear_aliases | |||
| ) |

| void read_options | ( | FILE * | f, | |
| bool | runscript | |||
| ) |

| newgame_def read_startup_prefs | ( | ) |

| void save_player_name | ( | void | ) |

| int str_to_channel | ( | const std::string & | str | ) |
| int str_to_summon_type | ( | const std::string & | str | ) |

| void write_newgame_options_file | ( | const newgame_def & | prefs | ) |

1.5.6