Data Structures | Macros | Functions | Variables
option.c File Reference

Options table and definitions. More...

#include "angband.h"
#include "init.h"
#include "option.h"
#include "list-options.h"

Data Structures

struct  option_entry


#define OP(a, b, c, d)   { #a, b, OP_##c, d },


const char * option_name (int opt)
 Given an option index, return its name.
const char * option_desc (int opt)
 Given an option index, return its description.
int option_type (int opt)
 Determine the type of option (score, birth etc)
static bool option_is_cheat (int opt)
bool option_set (const char *name, int val)
 Set an option, return TRUE if successful.
void init_options (void)
 Initialise options to defaults.


int option_page [OPT_PAGE_MAX][OPT_PAGE_PER] = { {0} }
 Option screen interface.
static option_entry options [OPT_MAX]
struct init_module options_module

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,
)    { #a, b, OP_##c, d },

Function Documentation

void init_options ( void  )
const char* option_desc ( int  opt)

Given an option index, return its description.

References option_entry::description.

Referenced by option_toggle_display(), and write_character_dump().

static bool option_is_cheat ( int  opt)

References OP_CHEAT, and option_type().

Referenced by option_set().

const char* option_name ( int  opt)

Given an option index, return its name.


References option_entry::name.

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

bool option_set ( const char *  name,
int  val 

Set an option, return TRUE if successful.

References FALSE, op_ptr, player_other::opt, option_is_cheat(), streq, and TRUE.

Referenced by death_randarts(), option_toggle_handle(), and rd_options().

int option_type ( int  opt)

Determine the type of option (score, birth etc)

References option_entry::type.

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

Variable Documentation

int option_page[OPT_PAGE_MAX][OPT_PAGE_PER] = { {0} }

Option screen interface.

The option data structures.

Referenced by init_options(), and option_toggle_menu().

option_entry options[OPT_MAX]
struct init_module options_module
Initial value:
.name = "options",
.init = init_options,
.cleanup = NULL