Angband
Data Structures | Macros | Functions | Variables
init.c File Reference

Various game initialistion routines. More...

#include "angband.h"
#include "buildid.h"
#include "cave.h"
#include "cmds.h"
#include "game-event.h"
#include "cmd-core.h"
#include "generate.h"
#include "hint.h"
#include "init.h"
#include "mon-init.h"
#include "mon-list.h"
#include "mon-lore.h"
#include "mon-msg.h"
#include "mon-util.h"
#include "monster.h"
#include "obj-ignore.h"
#include "obj-list.h"
#include "obj-make.h"
#include "obj-randart.h"
#include "obj-slays.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "object.h"
#include "option.h"
#include "parser.h"
#include "player.h"
#include "player-history.h"
#include "player-quest.h"
#include "player-spell.h"
#include "player-timed.h"
#include "project.h"
#include "randname.h"
#include "store.h"
#include "trap.h"
#include "list-equip-slots.h"
#include "list-stats.h"
#include "list-object-flags.h"
#include "list-object-modifiers.h"
#include "list-kind-flags.h"
#include "list-elements.h"
#include "list-mon-race-flags.h"
#include "list-effects.h"
#include "list-trap-flags.h"
#include "list-terrain-flags.h"
#include "list-player-flags.h"

Data Structures

struct  kb_parsedata
 Parsing functions for object_base.txt. More...
struct  name
 Parsing functions for names.txt (random name fragments) More...
struct  names_parse

Macros

#define EQUIP(a, b, c, d, e, f)   #a,
#define STAT(a, b, c, d, e, f, g, h)   #c,
#define OF(a, b, c, d, e)   #a,
#define STAT(a, b, c, d, e, f, g, h)   #a,
#define OBJ_MOD(a, b, c, d)   #a,
#define KF(a, b)   #a,
#define ELEM(a, b, c, d, e, f, g, col)   #a,
#define RF(a, b, c)   #a,
#define ELEM(a, b, c, d, e, f, g, col)   b,
#define RF(a, b, c)   b,
#define EFFECT(x, a, b, d)   #x,
#define TRF(a, b)   #a,
#define TF(a, b)   #a,
#define PF(a, b, c)   #a,

Functions

errr grab_effect_data (struct parser *p, struct effect *effect)
static bool grab_element_flag (struct element_info *info, const char *flag_name)
static struct history_chartfindchart (struct history_chart *hs, unsigned int idx)
static struct activationfindact (const char *act_name)
static enum parser_error write_dummy_object_record (struct artifact *art, const char *name)
void init_file_paths (const char *configpath, const char *libpath, const char *datapath)
 Find the default paths to all of our important sub-directories.
void create_needed_dirs (void)
 Create any missing directories.
static enum parser_error parse_constants_level_max (struct parser *p)
 Parsing functions for constants.txt.
static enum parser_error parse_constants_mon_gen (struct parser *p)
static enum parser_error parse_constants_mon_play (struct parser *p)
static enum parser_error parse_constants_dun_gen (struct parser *p)
static enum parser_error parse_constants_world (struct parser *p)
static enum parser_error parse_constants_carry_cap (struct parser *p)
static enum parser_error parse_constants_store (struct parser *p)
static enum parser_error parse_constants_obj_make (struct parser *p)
static enum parser_error parse_constants_player (struct parser *p)
struct parserinit_parse_constants (void)
static errr run_parse_constants (struct parser *p)
static errr finish_parse_constants (struct parser *p)
static void cleanup_constants (void)
void init_game_constants (void)
 Initialise game constants.
static void cleanup_game_constants (void)
 Free the game constants.
static enum parser_error parse_object_base_defaults (struct parser *p)
static enum parser_error parse_object_base_name (struct parser *p)
static enum parser_error parse_object_base_graphics (struct parser *p)
static enum parser_error parse_object_base_break (struct parser *p)
static enum parser_error parse_object_base_flags (struct parser *p)
struct parserinit_parse_object_base (void)
static errr run_parse_object_base (struct parser *p)
static errr finish_parse_object_base (struct parser *p)
static void cleanup_object_base (void)
static enum parser_error parse_object_name (struct parser *p)
 Parsing functions for object.txt.
static enum parser_error parse_object_graphics (struct parser *p)
static enum parser_error parse_object_type (struct parser *p)
static enum parser_error parse_object_properties (struct parser *p)
static enum parser_error parse_object_alloc (struct parser *p)
static enum parser_error parse_object_combat (struct parser *p)
static enum parser_error parse_object_charges (struct parser *p)
static enum parser_error parse_object_pile (struct parser *p)
static enum parser_error parse_object_flags (struct parser *p)
static enum parser_error parse_object_power (struct parser *p)
static enum parser_error parse_object_effect (struct parser *p)
static enum parser_error parse_object_param (struct parser *p)
static enum parser_error parse_object_dice (struct parser *p)
static enum parser_error parse_object_expr (struct parser *p)
static enum parser_error parse_object_msg (struct parser *p)
static enum parser_error parse_object_time (struct parser *p)
static enum parser_error parse_object_desc (struct parser *p)
static enum parser_error parse_object_pval (struct parser *p)
static enum parser_error parse_object_values (struct parser *p)
struct parserinit_parse_object (void)
static errr run_parse_object (struct parser *p)
static errr finish_parse_object (struct parser *p)
static void cleanup_object (void)
static enum parser_error parse_act_name (struct parser *p)
 Parsing functions for activation.txt.
static enum parser_error parse_act_aim (struct parser *p)
static enum parser_error parse_act_power (struct parser *p)
static enum parser_error parse_act_effect (struct parser *p)
static enum parser_error parse_act_dice (struct parser *p)
static enum parser_error parse_act_expr (struct parser *p)
static enum parser_error parse_act_msg (struct parser *p)
static enum parser_error parse_act_desc (struct parser *p)
struct parserinit_parse_act (void)
static errr run_parse_act (struct parser *p)
static errr finish_parse_act (struct parser *p)
static void cleanup_act (void)
static enum parser_error parse_artifact_name (struct parser *p)
 Parsing functions for artifact.txt.
static enum parser_error parse_artifact_base_object (struct parser *p)
static enum parser_error parse_artifact_graphics (struct parser *p)
static enum parser_error parse_artifact_info (struct parser *p)
static enum parser_error parse_artifact_alloc (struct parser *p)
static enum parser_error parse_artifact_power (struct parser *p)
static enum parser_error parse_artifact_flags (struct parser *p)
static enum parser_error parse_artifact_act (struct parser *p)
static enum parser_error parse_artifact_time (struct parser *p)
static enum parser_error parse_artifact_msg (struct parser *p)
static enum parser_error parse_artifact_values (struct parser *p)
static enum parser_error parse_artifact_desc (struct parser *p)
struct parserinit_parse_artifact (void)
static errr run_parse_artifact (struct parser *p)
static errr finish_parse_artifact (struct parser *p)
static void cleanup_artifact (void)
static enum parser_error parse_names_section (struct parser *p)
static enum parser_error parse_names_word (struct parser *p)
struct parserinit_parse_names (void)
static errr run_parse_names (struct parser *p)
static errr finish_parse_names (struct parser *p)
static void cleanup_names (void)
static enum parser_error parse_trap_name (struct parser *p)
 Parsing functions for trap.txt.
static enum parser_error parse_trap_graphics (struct parser *p)
static enum parser_error parse_trap_appear (struct parser *p)
static enum parser_error parse_trap_flags (struct parser *p)
static enum parser_error parse_trap_effect (struct parser *p)
static enum parser_error parse_trap_dice (struct parser *p)
static enum parser_error parse_trap_expr (struct parser *p)
static enum parser_error parse_trap_desc (struct parser *p)
struct parserinit_parse_trap (void)
static errr run_parse_trap (struct parser *p)
static errr finish_parse_trap (struct parser *p)
static void cleanup_trap (void)
static enum parser_error parse_feat_name (struct parser *p)
 Parsing functions for terrain.txt.
static enum parser_error parse_feat_graphics (struct parser *p)
static enum parser_error parse_feat_mimic (struct parser *p)
static enum parser_error parse_feat_priority (struct parser *p)
static enum parser_error parse_feat_flags (struct parser *p)
static enum parser_error parse_feat_info (struct parser *p)
struct parserinit_parse_feat (void)
static errr run_parse_feat (struct parser *p)
static errr finish_parse_feat (struct parser *p)
static void cleanup_feat (void)
static enum parser_error parse_ego_name (struct parser *p)
 Parsing functions for ego-item.txt.
static enum parser_error parse_ego_info (struct parser *p)
static enum parser_error parse_ego_alloc (struct parser *p)
static enum parser_error parse_ego_type (struct parser *p)
static enum parser_error parse_ego_item (struct parser *p)
static enum parser_error parse_ego_combat (struct parser *p)
static enum parser_error parse_ego_min (struct parser *p)
static enum parser_error parse_ego_effect (struct parser *p)
static enum parser_error parse_ego_dice (struct parser *p)
static enum parser_error parse_ego_time (struct parser *p)
static enum parser_error parse_ego_flags (struct parser *p)
static enum parser_error parse_ego_values (struct parser *p)
static enum parser_error parse_ego_min_val (struct parser *p)
static enum parser_error parse_ego_desc (struct parser *p)
struct parserinit_parse_ego (void)
static errr run_parse_ego (struct parser *p)
static errr finish_parse_ego (struct parser *p)
static void cleanup_ego (void)
static enum parser_error parse_body_body (struct parser *p)
 Parsing functions for body.txt.
static enum parser_error parse_body_slot (struct parser *p)
struct parserinit_parse_body (void)
static errr run_parse_body (struct parser *p)
static errr finish_parse_body (struct parser *p)
static void cleanup_body (void)
static enum parser_error parse_p_race_name (struct parser *p)
 Parsing functions for prace.txt.
static enum parser_error parse_p_race_stats (struct parser *p)
static enum parser_error parse_p_race_skill_disarm (struct parser *p)
static enum parser_error parse_p_race_skill_device (struct parser *p)
static enum parser_error parse_p_race_skill_save (struct parser *p)
static enum parser_error parse_p_race_skill_stealth (struct parser *p)
static enum parser_error parse_p_race_skill_search (struct parser *p)
static enum parser_error parse_p_race_skill_search_freq (struct parser *p)
static enum parser_error parse_p_race_skill_melee (struct parser *p)
static enum parser_error parse_p_race_skill_shoot (struct parser *p)
static enum parser_error parse_p_race_skill_throw (struct parser *p)
static enum parser_error parse_p_race_skill_dig (struct parser *p)
static enum parser_error parse_p_race_info (struct parser *p)
static enum parser_error parse_p_race_history (struct parser *p)
static enum parser_error parse_p_race_height (struct parser *p)
static enum parser_error parse_p_race_weight (struct parser *p)
static enum parser_error parse_p_race_obj_flags (struct parser *p)
static enum parser_error parse_p_race_play_flags (struct parser *p)
static enum parser_error parse_p_race_values (struct parser *p)
struct parserinit_parse_p_race (void)
static errr run_parse_p_race (struct parser *p)
static errr finish_parse_p_race (struct parser *p)
static void cleanup_p_race (void)
static enum parser_error parse_class_name (struct parser *p)
 Parsing functions for class.txt.
static enum parser_error parse_class_stats (struct parser *p)
static enum parser_error parse_class_skill_disarm (struct parser *p)
static enum parser_error parse_class_skill_device (struct parser *p)
static enum parser_error parse_class_skill_save (struct parser *p)
static enum parser_error parse_class_skill_stealth (struct parser *p)
static enum parser_error parse_class_skill_search (struct parser *p)
static enum parser_error parse_class_skill_search_freq (struct parser *p)
static enum parser_error parse_class_skill_melee (struct parser *p)
static enum parser_error parse_class_skill_shoot (struct parser *p)
static enum parser_error parse_class_skill_throw (struct parser *p)
static enum parser_error parse_class_skill_dig (struct parser *p)
static enum parser_error parse_class_info (struct parser *p)
static enum parser_error parse_class_attack (struct parser *p)
static enum parser_error parse_class_title (struct parser *p)
static enum parser_error parse_class_equip (struct parser *p)
static enum parser_error parse_class_flags (struct parser *p)
static enum parser_error parse_class_magic (struct parser *p)
static enum parser_error parse_class_book (struct parser *p)
static enum parser_error parse_class_spell (struct parser *p)
static enum parser_error parse_class_effect (struct parser *p)
static enum parser_error parse_class_param (struct parser *p)
static enum parser_error parse_class_dice (struct parser *p)
static enum parser_error parse_class_expr (struct parser *p)
static enum parser_error parse_class_desc (struct parser *p)
struct parserinit_parse_class (void)
static errr run_parse_class (struct parser *p)
static errr finish_parse_class (struct parser *p)
static void cleanup_class (void)
static enum parser_error parse_history_chart (struct parser *p)
 Parsing functions for history.txt.
static enum parser_error parse_history_phrase (struct parser *p)
struct parserinit_parse_history (void)
static errr run_parse_history (struct parser *p)
static errr finish_parse_history (struct parser *p)
static void cleanup_history (void)
static enum parser_error parse_flavor_flavor (struct parser *p)
static enum parser_error parse_flavor_kind (struct parser *p)
struct parserinit_parse_flavor (void)
static errr run_parse_flavor (struct parser *p)
static errr finish_parse_flavor (struct parser *p)
static void cleanup_flavor (void)
static enum parser_error parse_hint (struct parser *p)
 Initialise hints.
struct parserinit_parse_hints (void)
static errr run_parse_hints (struct parser *p)
static errr finish_parse_hints (struct parser *p)
static void cleanup_hints (void)
static enum parser_error parse_pain_type (struct parser *p)
 Initialise monster pain messages.
static enum parser_error parse_pain_message (struct parser *p)
struct parserinit_parse_pain (void)
static errr run_parse_pain (struct parser *p)
static errr finish_parse_pain (struct parser *p)
static void cleanup_pain (void)
static enum parser_error parse_pit_name (struct parser *p)
 Initialize monster pits.
static enum parser_error parse_pit_room (struct parser *p)
static enum parser_error parse_pit_alloc (struct parser *p)
static enum parser_error parse_pit_obj_rarity (struct parser *p)
static enum parser_error parse_pit_mon_base (struct parser *p)
static enum parser_error parse_pit_mon_ban (struct parser *p)
static enum parser_error parse_pit_color (struct parser *p)
static enum parser_error parse_pit_flags_req (struct parser *p)
static enum parser_error parse_pit_flags_ban (struct parser *p)
static enum parser_error parse_pit_spell_req (struct parser *p)
static enum parser_error parse_pit_spell_ban (struct parser *p)
struct parserinit_parse_pit (void)
static errr run_parse_pit (struct parser *p)
static errr finish_parse_pit (struct parser *p)
static void cleanup_pits (void)
void init_arrays (void)
 Initialise just the internal arrays.
static void cleanup_arrays (void)
 Free all the internal arrays.
bool init_angband (void)
 Initialise Angband's data stores and allocate memory for structures, etc, so that the game can get started.
void cleanup_angband (void)
 Free all the stuff initialised in init_angband()

Variables

struct angband_constantsz_info
 Structure (not array) of game constants.
const char * ANGBAND_SYS = "xxx"
char * ANGBAND_DIR_APEX
char * ANGBAND_DIR_EDIT
char * ANGBAND_DIR_FILE
char * ANGBAND_DIR_HELP
char * ANGBAND_DIR_INFO
char * ANGBAND_DIR_SAVE
char * ANGBAND_DIR_PREF
char * ANGBAND_DIR_USER
char * ANGBAND_DIR_XTRA
char * ANGBAND_DIR_XTRA_FONT
char * ANGBAND_DIR_XTRA_GRAF
char * ANGBAND_DIR_XTRA_SOUND
char * ANGBAND_DIR_XTRA_ICON
static struct history_charthistories
static const char * slots []
static const char * obj_flags []
static const char * obj_mods []
static const char * kind_flags []
static const char * elements []
static const char * slays []
static const char * brand_names []
static const char * slay_names []
static const char * effect_list []
static const char * trap_flags []
static const char * terrain_flags []
static const char * player_info_flags []
static struct file_parser constants_parser
static struct file_parser object_base_parser
static struct file_parser object_parser
static struct file_parser act_parser
static struct file_parser artifact_parser
static struct file_parser names_parser
struct file_parser trap_parser
static struct file_parser feat_parser
static struct file_parser ego_parser
static struct file_parser body_parser
static struct file_parser p_race_parser
static struct file_parser class_parser
static struct file_parser history_parser
static wchar_t flavor_glyph
 Parsing functions for flavor.txt.
static unsigned int flavor_tval
static struct file_parser flavor_parser
static struct file_parser hints_parser
static struct file_parser pain_parser
static struct file_parser pit_parser
struct {
   const char *   name
   struct file_parser *   parser
pl []
 A list of all the above parsers, plus those found in src/mon-init.c.
static struct init_module arrays_module
struct init_module z_quark_module
struct init_module generate_module
 The generate module, which initialises template rooms and vaults Should it clean up?
struct init_module obj_make_module
struct init_module ignore_module
struct init_module mon_make_module
struct init_module player_module
struct init_module store_module
struct init_module messages_module
struct init_module options_module
struct init_module monmsg_module
static struct init_modulemodules []

Detailed Description

Various game initialistion routines.

Copyright (c) 1997 Ben Harrison

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

This file is used to initialize various variables and arrays for the Angband game.

Several of the arrays for Angband are built from "template" files in the "lib/edit" directory.

Macro Definition Documentation

#define EFFECT (   x,
  a,
  b,
 
)    #x,
#define ELEM (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  col 
)    #a,
#define ELEM (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  col 
)    b,
#define EQUIP (   a,
  b,
  c,
  d,
  e,
 
)    #a,
#define KF (   a,
 
)    #a,
#define OBJ_MOD (   a,
  b,
  c,
 
)    #a,
#define OF (   a,
  b,
  c,
  d,
 
)    #a,
#define PF (   a,
  b,
 
)    #a,
#define RF (   a,
  b,
 
)    #a,
#define RF (   a,
  b,
 
)    b,
#define STAT (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)    #c,
#define STAT (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)    #a,
#define TF (   a,
 
)    #a,
#define TRF (   a,
 
)    #a,

Function Documentation

static void cleanup_act ( void  )
static
void cleanup_angband ( void  )
static void cleanup_arrays ( void  )
static

Free all the internal arrays.

References cleanup_parser(), i, N_ELEMENTS, and pl.

static void cleanup_artifact ( void  )
static
static void cleanup_body ( void  )
static
static void cleanup_class ( void  )
static
static void cleanup_constants ( void  )
static

References mem_free().

static void cleanup_ego ( void  )
static
static void cleanup_feat ( void  )
static
static void cleanup_flavor ( void  )
static
static void cleanup_game_constants ( void  )
static

Free the game constants.

References cleanup_parser().

Referenced by cleanup_angband().

static void cleanup_hints ( void  )
static
static void cleanup_history ( void  )
static
static void cleanup_names ( void  )
static
static void cleanup_object ( void  )
static
static void cleanup_object_base ( void  )
static

References kb_info, mem_free(), string_free(), and TV_MAX.

static void cleanup_p_race ( void  )
static
static void cleanup_pain ( void  )
static
static void cleanup_pits ( void  )
static
static void cleanup_trap ( void  )
static
void create_needed_dirs ( void  )

Create any missing directories.

We create only those dirs which may be empty (user/, save/, apex/, info/, help/). The others are assumed to contain required files and therefore must exist at startup (edit/, pref/, file/, xtra/).

ToDo: Only create the directories when actually writing files.

References ANGBAND_DIR_APEX, ANGBAND_DIR_HELP, ANGBAND_DIR_INFO, ANGBAND_DIR_SAVE, ANGBAND_DIR_USER, dir_create(), path_build(), and quit_fmt().

Referenced by main().

static struct activation* findact ( const char *  act_name)
staticread
static struct history_chart* findchart ( struct history_chart hs,
unsigned int  idx 
)
staticread
static errr finish_parse_act ( struct parser p)
static
static errr finish_parse_artifact ( struct parser p)
static
static errr finish_parse_body ( struct parser p)
static
static errr finish_parse_class ( struct parser p)
static
static errr finish_parse_constants ( struct parser p)
static

References parser_destroy(), and parser_priv().

static errr finish_parse_ego ( struct parser p)
static
static errr finish_parse_feat ( struct parser p)
static
static errr finish_parse_flavor ( struct parser p)
static
static errr finish_parse_hints ( struct parser p)
static
static errr finish_parse_history ( struct parser p)
static
static errr finish_parse_names ( struct parser p)
static
static errr finish_parse_object ( struct parser p)
static
static errr finish_parse_object_base ( struct parser p)
static
static errr finish_parse_p_race ( struct parser p)
static
static errr finish_parse_pain ( struct parser p)
static
static errr finish_parse_pit ( struct parser p)
static
static errr finish_parse_trap ( struct parser p)
static
errr grab_effect_data ( struct parser p,
struct effect effect 
)
static bool grab_element_flag ( struct element_info info,
const char *  flag_name 
)
static
bool init_angband ( void  )

Initialise Angband's data stores and allocate memory for structures, etc, so that the game can get started.

The only input/output in this file should be via event_signal_string(). We cannot rely on any particular UI as this part should be UI-agnostic. We also cannot rely on anything else having being initialised into any particlar state. Which is why you'd be calling this function in the first place.

Old comment, not sure if still accurate: Note that the "graf-xxx.prf" file must be loaded separately, if needed, in the first (?) pass through "TERM_XTRA_REACT".

References EVENT_ENTER_INIT, EVENT_INITSTATUS, event_signal(), event_signal_message(), i, init_module::init, init_game_constants(), monster_list_init(), object_list_init(), Rand_init(), and TRUE.

Referenced by main(), and setup_tests().

void init_arrays ( void  )

Initialise just the internal arrays.

This should be callable by the test suite, without relying on input, or anything to do with a user or savefiles.

Assumption: Paths are set up correctly before calling this function.

References EVENT_INITSTATUS, event_signal_message(), format(), i, N_ELEMENTS, pl, quit_fmt(), and run_parser().

Referenced by read_edit_files().

void init_file_paths ( const char *  configpath,
const char *  libpath,
const char *  datapath 
)

Find the default paths to all of our important sub-directories.

All of the sub-directories should, by default, be located inside the main directory, whose location is very system dependant and is set by the ANGBAND_PATH environment variable, if it exists. (On multi- user systems such as Linux this is not the default - see config.h for more info.)

This function takes a writable buffers, initially containing the "path" to the "config", "lib" and "data" directories, for example, "/etc/angband/", "/usr/share/angband" and "/var/games/angband" - or a system dependant string, for example, ":lib:". The buffer must be large enough to contain at least 32 more characters.

Various command line options may allow some of the important directories to be changed to user-specified directories, most importantly, the "apex" and "user" and "save" directories, but this is done after this function, see "main.c".

In general, the initial path should end in the appropriate "PATH_SEP" string. All of the "sub-directory" paths (created below or supplied by the user) will NOT end in the "PATH_SEP" string, see the special "path_build()" function in "util.c" for more information.

Hack – first we free all the strings, since this is known to succeed even if the strings have not been allocated yet, as long as the variables start out as "NULL". This allows this function to be called multiple times, for example, to try several base "path" values until a good one is found.

References ANGBAND_DIR_APEX, ANGBAND_DIR_EDIT, ANGBAND_DIR_FILE, ANGBAND_DIR_HELP, ANGBAND_DIR_INFO, ANGBAND_DIR_PREF, ANGBAND_DIR_SAVE, ANGBAND_DIR_USER, ANGBAND_DIR_XTRA, ANGBAND_DIR_XTRA_FONT, ANGBAND_DIR_XTRA_GRAF, ANGBAND_DIR_XTRA_ICON, ANGBAND_DIR_XTRA_SOUND, ANGBAND_SYS, buf, format(), path_build(), PATH_SEP, string_free(), string_make(), and VERSION_NAME.

Referenced by init_stuff(), and set_file_paths().

void init_game_constants ( void  )

Initialise game constants.

Assumption: Paths are set up correctly before calling this function.

References EVENT_INITSTATUS, event_signal_message(), quit_fmt(), and run_parser().

Referenced by init_angband(), and read_edit_files().

struct parser* init_parse_act ( void  )
read
struct parser* init_parse_artifact ( void  )
read
struct parser* init_parse_body ( void  )
read
struct parser* init_parse_class ( void  )
read
struct parser* init_parse_constants ( void  )
read
struct parser* init_parse_ego ( void  )
read
struct parser* init_parse_feat ( void  )
read
struct parser* init_parse_flavor ( void  )
read
struct parser* init_parse_hints ( void  )
read
struct parser* init_parse_history ( void  )
read
struct parser* init_parse_names ( void  )
read
struct parser* init_parse_object ( void  )
read
struct parser* init_parse_object_base ( void  )
read
struct parser* init_parse_p_race ( void  )
read
struct parser* init_parse_pain ( void  )
read
struct parser* init_parse_pit ( void  )
read
struct parser* init_parse_trap ( void  )
read
static enum parser_error parse_act_aim ( struct parser p)
static
static enum parser_error parse_act_desc ( struct parser p)
static
static enum parser_error parse_act_dice ( struct parser p)
static
static enum parser_error parse_act_effect ( struct parser p)
static
static enum parser_error parse_act_expr ( struct parser p)
static
static enum parser_error parse_act_msg ( struct parser p)
static
static enum parser_error parse_act_name ( struct parser p)
static

Parsing functions for activation.txt.

References h, mem_zalloc(), activation::name, activation::next, parser_getstr(), parser_priv(), parser_setpriv(), and string_make().

Referenced by init_parse_act().

static enum parser_error parse_act_power ( struct parser p)
static
static enum parser_error parse_artifact_act ( struct parser p)
static
static enum parser_error parse_artifact_alloc ( struct parser p)
static
static enum parser_error parse_artifact_base_object ( struct parser p)
static
static enum parser_error parse_artifact_desc ( struct parser p)
static
static enum parser_error parse_artifact_flags ( struct parser p)
static
static enum parser_error parse_artifact_graphics ( struct parser p)
static
static enum parser_error parse_artifact_info ( struct parser p)
static
static enum parser_error parse_artifact_msg ( struct parser p)
static
static enum parser_error parse_artifact_name ( struct parser p)
static
static enum parser_error parse_artifact_power ( struct parser p)
static
static enum parser_error parse_artifact_time ( struct parser p)
static
static enum parser_error parse_artifact_values ( struct parser p)
static
static enum parser_error parse_body_body ( struct parser p)
static
static enum parser_error parse_body_slot ( struct parser p)
static
static enum parser_error parse_class_attack ( struct parser p)
static
static enum parser_error parse_class_book ( struct parser p)
static
static enum parser_error parse_class_desc ( struct parser p)
static
static enum parser_error parse_class_dice ( struct parser p)
static
static enum parser_error parse_class_effect ( struct parser p)
static
static enum parser_error parse_class_equip ( struct parser p)
static
static enum parser_error parse_class_expr ( struct parser p)
static
static enum parser_error parse_class_flags ( struct parser p)
static
static enum parser_error parse_class_info ( struct parser p)
static
static enum parser_error parse_class_magic ( struct parser p)
static
static enum parser_error parse_class_name ( struct parser p)
static
static enum parser_error parse_class_param ( struct parser p)
static
static enum parser_error parse_class_skill_device ( struct parser p)
static
static enum parser_error parse_class_skill_dig ( struct parser p)
static
static enum parser_error parse_class_skill_disarm ( struct parser p)
static
static enum parser_error parse_class_skill_melee ( struct parser p)
static
static enum parser_error parse_class_skill_save ( struct parser p)
static
static enum parser_error parse_class_skill_search ( struct parser p)
static
static enum parser_error parse_class_skill_search_freq ( struct parser p)
static
static enum parser_error parse_class_skill_shoot ( struct parser p)
static
static enum parser_error parse_class_skill_stealth ( struct parser p)
static
static enum parser_error parse_class_skill_throw ( struct parser p)
static
static enum parser_error parse_class_spell ( struct parser p)
static
static enum parser_error parse_class_stats ( struct parser p)
static
static enum parser_error parse_class_title ( struct parser p)
static
static enum parser_error parse_constants_carry_cap ( struct parser p)
static
static enum parser_error parse_constants_dun_gen ( struct parser p)
static
static enum parser_error parse_constants_level_max ( struct parser p)
static

Parsing functions for constants.txt.

References angband_constants::level_monster_max, parser_getint(), parser_getsym(), parser_priv(), streq, and value.

Referenced by init_parse_constants().

static enum parser_error parse_constants_mon_gen ( struct parser p)
static
static enum parser_error parse_constants_mon_play ( struct parser p)
static
static enum parser_error parse_constants_obj_make ( struct parser p)
static
static enum parser_error parse_constants_player ( struct parser p)
static
static enum parser_error parse_constants_store ( struct parser p)
static
static enum parser_error parse_constants_world ( struct parser p)
static
static enum parser_error parse_ego_alloc ( struct parser p)
static
static enum parser_error parse_ego_combat ( struct parser p)
static
static enum parser_error parse_ego_desc ( struct parser p)
static
static enum parser_error parse_ego_dice ( struct parser p)
static
static enum parser_error parse_ego_effect ( struct parser p)
static
static enum parser_error parse_ego_flags ( struct parser p)
static
static enum parser_error parse_ego_info ( struct parser p)
static
static enum parser_error parse_ego_item ( struct parser p)
static
static enum parser_error parse_ego_min ( struct parser p)
static
static enum parser_error parse_ego_min_val ( struct parser p)
static
static enum parser_error parse_ego_name ( struct parser p)
static
static enum parser_error parse_ego_time ( struct parser p)
static
static enum parser_error parse_ego_type ( struct parser p)
static
static enum parser_error parse_ego_values ( struct parser p)
static
static enum parser_error parse_feat_flags ( struct parser p)
static
static enum parser_error parse_feat_graphics ( struct parser p)
static
static enum parser_error parse_feat_info ( struct parser p)
static
static enum parser_error parse_feat_mimic ( struct parser p)
static
static enum parser_error parse_feat_name ( struct parser p)
static
static enum parser_error parse_feat_priority ( struct parser p)
static
static enum parser_error parse_flavor_flavor ( struct parser p)
static
static enum parser_error parse_flavor_kind ( struct parser p)
static
static enum parser_error parse_hint ( struct parser p)
static

Initialise hints.

References h, mem_zalloc(), parser_getstr(), parser_priv(), parser_setpriv(), and string_make().

Referenced by init_parse_hints().

static enum parser_error parse_history_chart ( struct parser p)
static
static enum parser_error parse_history_phrase ( struct parser p)
static
static enum parser_error parse_names_section ( struct parser p)
static
static enum parser_error parse_names_word ( struct parser p)
static
static enum parser_error parse_object_alloc ( struct parser p)
static
static enum parser_error parse_object_base_break ( struct parser p)
static
static enum parser_error parse_object_base_defaults ( struct parser p)
static
static enum parser_error parse_object_base_flags ( struct parser p)
static
static enum parser_error parse_object_base_graphics ( struct parser p)
static
static enum parser_error parse_object_base_name ( struct parser p)
static
static enum parser_error parse_object_charges ( struct parser p)
static
static enum parser_error parse_object_combat ( struct parser p)
static
static enum parser_error parse_object_desc ( struct parser p)
static
static enum parser_error parse_object_dice ( struct parser p)
static
static enum parser_error parse_object_effect ( struct parser p)
static
static enum parser_error parse_object_expr ( struct parser p)
static
static enum parser_error parse_object_flags ( struct parser p)
static
static enum parser_error parse_object_graphics ( struct parser p)
static
static enum parser_error parse_object_msg ( struct parser p)
static
static enum parser_error parse_object_name ( struct parser p)
static
static enum parser_error parse_object_param ( struct parser p)
static
static enum parser_error parse_object_pile ( struct parser p)
static
static enum parser_error parse_object_power ( struct parser p)
static
static enum parser_error parse_object_properties ( struct parser p)
static
static enum parser_error parse_object_pval ( struct parser p)
static
static enum parser_error parse_object_time ( struct parser p)
static
static enum parser_error parse_object_type ( struct parser p)
static
static enum parser_error parse_object_values ( struct parser p)
static
static enum parser_error parse_p_race_height ( struct parser p)
static
static enum parser_error parse_p_race_history ( struct parser p)
static
static enum parser_error parse_p_race_info ( struct parser p)
static
static enum parser_error parse_p_race_name ( struct parser p)
static
static enum parser_error parse_p_race_obj_flags ( struct parser p)
static
static enum parser_error parse_p_race_play_flags ( struct parser p)
static
static enum parser_error parse_p_race_skill_device ( struct parser p)
static
static enum parser_error parse_p_race_skill_dig ( struct parser p)
static
static enum parser_error parse_p_race_skill_disarm ( struct parser p)
static
static enum parser_error parse_p_race_skill_melee ( struct parser p)
static
static enum parser_error parse_p_race_skill_save ( struct parser p)
static
static enum parser_error parse_p_race_skill_search ( struct parser p)
static
static enum parser_error parse_p_race_skill_search_freq ( struct parser p)
static
static enum parser_error parse_p_race_skill_shoot ( struct parser p)
static
static enum parser_error parse_p_race_skill_stealth ( struct parser p)
static
static enum parser_error parse_p_race_skill_throw ( struct parser p)
static
static enum parser_error parse_p_race_stats ( struct parser p)
static
static enum parser_error parse_p_race_values ( struct parser p)
static
static enum parser_error parse_p_race_weight ( struct parser p)
static
static enum parser_error parse_pain_message ( struct parser p)
static
static enum parser_error parse_pain_type ( struct parser p)
static

Initialise monster pain messages.

References h, mem_zalloc(), monster_pain::next, monster_pain::pain_idx, parser_getuint(), parser_priv(), and parser_setpriv().

Referenced by init_parse_pain().

static enum parser_error parse_pit_alloc ( struct parser p)
static
static enum parser_error parse_pit_color ( struct parser p)
static
static enum parser_error parse_pit_flags_ban ( struct parser p)
static
static enum parser_error parse_pit_flags_req ( struct parser p)
static
static enum parser_error parse_pit_mon_ban ( struct parser p)
static
static enum parser_error parse_pit_mon_base ( struct parser p)
static
static enum parser_error parse_pit_name ( struct parser p)
static
static enum parser_error parse_pit_obj_rarity ( struct parser p)
static
static enum parser_error parse_pit_room ( struct parser p)
static
static enum parser_error parse_pit_spell_ban ( struct parser p)
static
static enum parser_error parse_pit_spell_req ( struct parser p)
static
static enum parser_error parse_trap_appear ( struct parser p)
static
static enum parser_error parse_trap_desc ( struct parser p)
static
static enum parser_error parse_trap_dice ( struct parser p)
static
static enum parser_error parse_trap_effect ( struct parser p)
static
static enum parser_error parse_trap_expr ( struct parser p)
static
static enum parser_error parse_trap_flags ( struct parser p)
static
static enum parser_error parse_trap_graphics ( struct parser p)
static
static enum parser_error parse_trap_name ( struct parser p)
static
static errr run_parse_act ( struct parser p)
static

References parse_file().

static errr run_parse_artifact ( struct parser p)
static

References parse_file().

static errr run_parse_body ( struct parser p)
static

References parse_file().

static errr run_parse_class ( struct parser p)
static

References parse_file().

static errr run_parse_constants ( struct parser p)
static

References parse_file().

static errr run_parse_ego ( struct parser p)
static

References parse_file().

static errr run_parse_feat ( struct parser p)
static

References parse_file().

static errr run_parse_flavor ( struct parser p)
static

References parse_file().

static errr run_parse_hints ( struct parser p)
static

References parse_file().

static errr run_parse_history ( struct parser p)
static

References parse_file().

static errr run_parse_names ( struct parser p)
static

References parse_file().

static errr run_parse_object ( struct parser p)
static

References parse_file().

static errr run_parse_object_base ( struct parser p)
static

References parse_file().

static errr run_parse_p_race ( struct parser p)
static

References parse_file().

static errr run_parse_pain ( struct parser p)
static

References parse_file().

static errr run_parse_pit ( struct parser p)
static

References parse_file().

static errr run_parse_trap ( struct parser p)
static

References parse_file().

static enum parser_error write_dummy_object_record ( struct artifact art,
const char *  name 
)
static

Variable Documentation

struct file_parser act_parser
static
Initial value:
char* ANGBAND_DIR_APEX
char* ANGBAND_DIR_EDIT
char* ANGBAND_DIR_FILE
char* ANGBAND_DIR_HELP
char* ANGBAND_DIR_INFO
char* ANGBAND_DIR_PREF
char* ANGBAND_DIR_SAVE
char* ANGBAND_DIR_USER
char* ANGBAND_DIR_XTRA

Referenced by cleanup_angband(), and init_file_paths().

char* ANGBAND_DIR_XTRA_FONT

Referenced by cleanup_angband(), and init_file_paths().

char* ANGBAND_DIR_XTRA_GRAF
char* ANGBAND_DIR_XTRA_ICON

Referenced by cleanup_angband(), and init_file_paths().

char* ANGBAND_DIR_XTRA_SOUND

Referenced by cleanup_angband(), and init_file_paths().

const char* ANGBAND_SYS = "xxx"
struct init_module arrays_module
static
Initial value:
{
.name = "arrays",
.init = init_arrays,
.cleanup = cleanup_arrays
}
struct file_parser artifact_parser
static
struct file_parser body_parser
static
const char* brand_names[]
static
struct file_parser class_parser
static
struct file_parser constants_parser
static
const char* effect_list[]
static

Referenced by grab_effect_data().

struct file_parser ego_parser
static
Initial value:
const char* elements[]
static
struct file_parser feat_parser
static
wchar_t flavor_glyph
static

Parsing functions for flavor.txt.

Referenced by parse_flavor_flavor(), and parse_flavor_kind().

struct file_parser flavor_parser
static
unsigned int flavor_tval
static
struct init_module generate_module

The generate module, which initialises template rooms and vaults Should it clean up?

struct file_parser hints_parser
static
struct history_chart* histories
static

Referenced by cleanup_history().

struct file_parser history_parser
static
struct init_module ignore_module
const char* kind_flags[]
static
Initial value:
{
#define KF(a, b)
NULL
}

Referenced by parse_ego_flags(), parse_object_base_flags(), and parse_object_flags().

struct init_module messages_module
struct init_module* modules[]
static
struct init_module mon_make_module
struct init_module monmsg_module
const char* name
struct file_parser names_parser
static
const char* obj_flags[]
static
struct init_module obj_make_module
const char* obj_mods[]
static
Initial value:
{
#define STAT(a, b, c, d, e, f, g, h)
#define OBJ_MOD(a, b, c, d)
NULL
}

Referenced by parse_artifact_values(), parse_ego_min_val(), parse_ego_values(), and parse_object_values().

struct file_parser object_base_parser
static
struct file_parser object_parser
static
struct init_module options_module
struct file_parser p_race_parser
static
struct file_parser pain_parser
static
Initial value:
struct file_parser pit_parser
static
struct { ... } pl[]

A list of all the above parsers, plus those found in src/mon-init.c.

Referenced by cleanup_arrays(), display_panel(), init_arrays(), and panel_line().

const char* player_info_flags[]
static
Initial value:
{
#define PF(a, b, c)
NULL
}

Referenced by parse_class_flags(), and parse_p_race_play_flags().

struct init_module player_module
const char* slay_names[]
static
const char* slays[]
static
const char* slots[]
static
Initial value:
{
#define EQUIP(a, b, c, d, e, f)
NULL
}

Referenced by parse_body_slot().

struct init_module store_module
const char* terrain_flags[]
static

Referenced by parse_feat_flags().

const char* trap_flags[]
static
Initial value:
{
#define TRF(a, b)
NULL
}

Referenced by parse_trap_flags().

struct file_parser trap_parser
struct angband_constants* z_info

Structure (not array) of game constants.

Referenced by add_activation(), add_monster_lights(), artifacts_acceptable(), brand_object(), build_store(), build_tunnel(), build_vault(), calc_inventory(), cave_generate(), cave_new(), cave_update_flow(), cavern_gen(), choose_item(), choose_profile(), chunk_copy(), classic_gen(), cleanup_lore(), cleanup_monster(), cleanup_profile(), cleanup_quest(), collect_known_artifacts(), count_known_monsters(), create_slay_cache(), display_feeling(), do_cmd_alter_aux(), do_cmd_autopickup(), do_cmd_buy(), do_cmd_cast(), do_cmd_close(), do_cmd_disarm(), do_cmd_drop(), do_cmd_fire(), do_cmd_fire_at_nearest(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_hold(), do_cmd_jump(), do_cmd_knowledge_artifacts(), do_cmd_knowledge_ego_items(), do_cmd_knowledge_features(), do_cmd_knowledge_monsters(), do_cmd_open(), do_cmd_pickup(), do_cmd_query_symbol(), do_cmd_refill(), do_cmd_search(), do_cmd_sleep(), do_cmd_study_book(), do_cmd_study_spell(), do_cmd_takeoff(), do_cmd_tunnel(), do_cmd_walk(), do_cmd_wiz_hack_ben(), do_cmd_wiz_jump(), do_cmd_wiz_learn(), do_randart(), drop_near(), dump_autoinscriptions(), dump_features(), dump_monsters(), dump_objects(), effect_handler_AGGRAVATE(), effect_handler_DEEP_DESCENT(), effect_handler_MASS_BANISH(), effect_handler_TELEPORT_LEVEL(), ego_menu(), eval_monster_power(), find_cave_profile(), find_range(), find_space(), finish_parse_lore(), finish_parse_monster(), finish_parse_profile(), finish_parse_quest(), flavor_assign_fixed(), flavor_assign_random(), flavor_init(), floor_carry(), gauntlet_gen(), gear_to_label(), get_artifact_from_kind(), get_debug_command(), get_mon_num(), get_money(), get_moves(), get_moves_fear(), get_moves_flow(), get_obj_num(), get_obj_num_by_kind(), hallucinatory_monster(), hallucinatory_object(), hard_centre_gen(), ignore_birth_init(), ignore_collect_kind(), init_ignore(), init_names(), init_obj_make(), init_player(), init_race_allocs(), inven_can_stack_partial(), inven_carry(), inven_carry_okay(), inven_stack_okay(), is_daytime(), is_quest(), item_is_available(), label_to_inven(), label_to_quiver(), labyrinth_gen(), lair_gen(), load_roller_data(), lookup_artifact_name(), lookup_feat(), lookup_kind(), lookup_monster(), lookup_pit_profile(), lookup_sval(), lookup_symbol(), lookup_trap(), lore_append_attack(), lore_do_probe(), lore_update(), make_artifact(), make_artifact_special(), make_attack_normal(), make_attack_spell(), make_ego_item(), make_object(), melee_effect_experience(), melee_effect_handler_DRAIN_CHARGES(), melee_effect_handler_EAT_FOOD(), melee_effect_handler_EAT_ITEM(), modified_gen(), mon_pop(), mon_restrict(), mon_summary(), money_kind(), monster_can_flow(), moria_gen(), new_level_display_update(), obj_known_light(), object_absorb(), object_absorb_partial(), object_info_ego(), object_prep(), object_similar(), objkind_byid(), on_new_level(), pack_is_full(), pack_is_overfull(), pack_overflow(), pack_slots_used(), parse_frequencies(), parse_lore_b(), parse_mon_base_pain(), parse_monster_info(), parse_prefs_feat(), parse_prefs_trap(), parse_v_x(), pick_trap(), place_feeling(), place_stairs(), place_trap(), player_book_has_unlearned_spells(), player_init(), player_pickup_item(), player_quests_free(), player_quests_reset(), player_resting_step_turn(), process_monster_glyph(), process_monster_multiply(), process_monsters(), process_world(), project(), project_player_handler_CHAOS(), project_player_handler_NETHER(), project_player_handler_TIME(), projectable(), push_object(), py_attack(), quest_check(), ranged_helper(), rd_artifacts(), rd_dungeon(), rd_item(), rd_monster_memory(), rd_monsters_aux(), rd_object_memory(), rd_player(), rd_quests(), rd_stores_aux(), recalculate_stats(), refill_lamp(), refresh_stock(), reset_visuals(), room_build(), run_game_loop(), run_step(), scan_items(), scramble(), see_floor_items(), seen_tval(), set_pit_type(), setup_tests(), show_equip(), show_floor(), show_inven(), show_obj_list(), show_quiver(), slay_power(), spell_identify_unknown_available(), spell_value_base_max_sight(), spoil_artifact(), spoil_mon_desc(), spoil_mon_info(), spoil_obj_desc(), square_add_stairs(), store_base_power(), store_carry(), store_create_random(), store_maint(), store_menu_init(), store_new(), store_object_absorb(), store_update(), target_set_interactive(), target_set_interactive_aux(), teardown_tests(), textui_browse_knowledge(), textui_browse_object_knowledge(), textui_enter_store(), textui_get_item(), textui_prefs_init(), town_gen(), town_gen_layout(), try_supercharge(), turn_energy(), tval_sval_count(), tval_sval_list(), update_one(), update_view_one(), use_aux(), wield_item(), wiz_create_item(), wr_artifacts(), wr_ignore(), wr_monster_memory(), wr_object_memory(), wr_quests(), and write_character_dump().

struct init_module z_quark_module