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...


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


enum  {
 Option types. More...
enum  { OP, OP }
 Option indexes. More...


const char * option_name (int opt)
 Functions. 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_cheat (void)
 Clear cheat options. More...
void options_init_defaults (struct player_options *opts)
 Set player default options. More...
void init_options (void)
 Initialise options package. More...


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

◆ OP

#define OP (   a,
)    OPT_##a,


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

Referenced by attempt_shield_bash(), auto_pickup_okay(), build_large(), build_room_template(), build_vault(), calc_blows(), calc_obj_feeling(), cave_generate(), cavern_gen(), choose_profile(), classic_gen(), close_game(), cmd_sub_entry(), collect_known_artifacts(), context_menu_cave(), context_menu_object(), context_menu_player(), context_menu_player_2(), describe_damage(), 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_locate(), do_cmd_redraw(), do_cmd_sell(), drop_find_grid(), effect_handler_CREATE_STAIRS(), effect_handler_DESTRUCTION(), effect_handler_JUMP_AND_BITE(), effect_handler_RECALL(), effect_handler_TELEPORT_LEVEL(), find_space(), flavor_init(), floor_carry(), gauntlet_gen(), get_item_action(), get_monster_brand_multiplier(), get_tag(), grid_data_as_text(), grid_get_attr(), hard_centre_gen(), hp_colour_change(), idle_update(), improve_attack_modifier(), inkey_ex(), keymap_dump(), labyrinth_gen(), lair_gen(), lore_append_movement(), lore_title(), make_artifact(), make_artifact_special(), make_attack_normal(), make_gold(), make_ranged_shot(), make_ranged_throw(), map_info(), modified_chunk(), modified_gen(), monster_turn(), msg_flush(), new_player_spot(), obj_desc_get_basename(), pick_and_place_distant_monster(), pick_trap(), place_new_monster_one(), player_outfit(), player_set_recall_depth(), pre_turn_refresh(), prepare_next_level(), price_item(), prt_level_feeling(), prt_speed(), py_attack_real(), ranged_helper(), rd_chunks(), rd_dungeon_aux(), rd_misc(), recharged_notice(), refresh(), remove_bad_spells(), show_command_list(), show_speed(), sound(), spoil_artifact(), store_display_help(), store_menu_set_selections(), store_sell(), store_update(), store_will_buy(), 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(), verify_panel(), wr_chunks(), and wr_dungeon_aux().


#define OPT_PAGE_BIRTH   1



Information for "do_cmd_options()".

Referenced by init_options().


#define OPT_PAGE_PER   21

Referenced by init_options(), and option_toggle_menu().


#define PLAYER_NAME_LEN   32

Referenced by get_name_command().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Option types.


◆ anonymous enum

anonymous enum

Option indexes.


Function Documentation

◆ init_options()

void init_options ( void  )

Initialise options package.

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

◆ option_desc()

const char* option_desc ( int  opt)

Given an option index, return its description.

References option_entry::description, and options.

Referenced by option_toggle_display(), and write_character_dump().

◆ option_name()

const char* option_name ( int  opt)

◆ option_set()

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().

◆ option_type()

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().

◆ options_init_cheat()

void options_init_cheat ( void  )

Clear cheat options.

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

Referenced by do_cmd_accept_character().

◆ options_init_defaults()

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

◆ option_page

int option_page[OPT_PAGE_MAX][OPT_PAGE_PER]

Option screen interface.

Referenced by init_options(), and option_toggle_menu().