Angband
Data Structures | Macros | Enumerations | Functions | Variables
option.h File Reference

Options table and definitions. More...

#include "z-file.h"
#include "list-options.h"

Go to the source code of this file.

Data Structures

struct  player_options
 The option data structures. More...
 

Macros

#define PLAYER_NAME_LEN   32
 
#define OP(a, b, c, d)   OPT_##a,
 
#define OPT(p, opt_name)   p->opts.opt[OPT_##opt_name]
 
#define OPT_PAGE_MAX   OP_SCORE
 Information for "do_cmd_options()". More...
 
#define OPT_PAGE_PER   20
 
#define OPT_PAGE_BIRTH   1
 

Enumerations

enum  {
  OP_INTERFACE = 0, OP_BIRTH, OP_CHEAT, OP_SCORE,
  OP_SPECIAL, OP_MAX
}
 Option types. More...
 
enum  { OP, OP }
 Option indexes. More...
 

Functions

void options_init_cheat (void)
 Functions. More...
 
const char * option_name (int opt)
 Given an option index, return its name. More...
 
const char * option_desc (int opt)
 Given an option index, return its description. More...
 
int option_type (int opt)
 Determine the type of option (score, birth etc) More...
 
bool option_set (const char *opt, int val)
 Set an option, return true if successful. More...
 
void options_init_defaults (struct player_options *opts)
 Set player default options. More...
 
void init_options (void)
 Initialise options package. More...
 

Variables

int option_page [OPT_PAGE_MAX][OPT_PAGE_PER]
 Option screen interface. More...
 

Detailed Description

Options table and definitions.

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.

Macro Definition Documentation

#define OP (   a,
  b,
  c,
 
)    OPT_##a,
#define OPT (   p,
  opt_name 
)    p->opts.opt[OPT_##opt_name]

Referenced by auto_pickup_okay(), calc_obj_feeling(), cave_generate(), close_game(), cmd_sub_entry(), collect_known_artifacts(), context_menu_cave(), context_menu_object(), context_menu_player(), context_menu_player_2(), count_known_monsters(), describe_flavor_text(), display_feeling(), display_knowledge(), display_monster(), display_object(), do_cmd_accept_character(), do_cmd_go_down(), do_cmd_go_up(), do_cmd_knowledge_ego_items(), do_cmd_knowledge_monsters(), do_cmd_locate(), do_cmd_query_symbol(), do_cmd_redraw(), do_cmd_sell(), drop_find_grid(), effect_handler_DESTRUCTION(), effect_handler_RECALL(), effect_handler_TELEPORT_LEVEL(), flavor_init(), floor_carry(), get_item_action(), get_tag(), grid_data_as_text(), grid_get_attr(), hp_colour_change(), idle_update(), inkey_ex(), keymap_dump(), lore_description(), lore_title(), make_artifact(), make_artifact_special(), make_attack_normal(), make_gold(), map_info(), msg_flush(), new_player_spot(), obj_desc_get_basename(), pick_and_place_distant_monster(), place_new_monster_one(), player_outfit(), pre_turn_refresh(), price_item(), process_monster(), process_world(), prt_level_feeling(), py_attack_real(), ranged_helper(), rd_misc(), recharged_notice(), refresh(), remove_bad_spells(), show_command_list(), sound(), spoil_artifact(), store_display_help(), store_menu_set_selections(), store_sell(), store_update(), store_will_buy_tester(), take_hit(), target_dir_allow(), textui_browse_knowledge(), textui_browse_object_knowledge(), textui_get_aim_dir(), textui_get_command(), textui_process_click(), textui_process_command(), ui_keymap_create(), ui_keymap_query(), ui_keymap_remove(), update_maps(), update_mon(), update_smart_learn(), and verify_panel().

#define OPT_PAGE_BIRTH   1
#define OPT_PAGE_MAX   OP_SCORE

Information for "do_cmd_options()".

Referenced by init_options().

#define OPT_PAGE_PER   20

Referenced by init_options(), and option_toggle_menu().

#define PLAYER_NAME_LEN   32

Referenced by get_name_command().

Enumeration Type Documentation

anonymous enum

Option types.

Enumerator
OP_INTERFACE 
OP_BIRTH 
OP_CHEAT 
OP_SCORE 
OP_SPECIAL 
OP_MAX 
anonymous enum

Option indexes.

Enumerator
OP 
OP 

Function Documentation

void init_options ( void  )

Initialise options package.

References OPT_PAGE_MAX, OPT_PAGE_PER, option_page, options, and type.

const char* option_desc ( int  opt)

Given an option index, return its description.

References option_entry::description, NULL, and options.

Referenced by option_toggle_display(), and write_character_dump().

const char* option_name ( int  opt)

Given an option index, return its name.

References option_entry::name, NULL, and options.

Referenced by option_toggle_display(), option_toggle_handle(), wr_options(), and write_character_dump().

bool option_set ( const char *  opt,
int  val 
)

Set an option, return true if successful.

References player_options::opt, option_is_cheat(), options, player::opts, and streq.

Referenced by option_toggle_handle(), and rd_options().

int option_type ( int  opt)

Determine the type of option (score, birth etc)

References options, and option_entry::type.

Referenced by enter_score(), option_is_cheat(), option_toggle_handle(), and write_character_dump().

void options_init_cheat ( void  )

Functions.

Functions.

References i, player_options::opt, option_is_cheat(), and player::opts.

Referenced by do_cmd_accept_character().

void options_init_defaults ( struct player_options opts)

Set player default options.

References option_entry::normal, and options.

Referenced by init_player(), and test_effects().

Variable Documentation

int option_page[OPT_PAGE_MAX][OPT_PAGE_PER]

Option screen interface.

Referenced by init_options(), and option_toggle_menu().