summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commit59df18cd52b37fb69097a7ce9ad7d1e7efa734de (patch)
treed216fc406f204afb1e25afb503cee265b584b3f1 /src
parentf673763cfaf90c81db4af495aa06b6fc7906ddd9 (diff)
Remove option_{flag,mask} arrays
Diffstat (limited to 'src')
-rw-r--r--src/dungeon.cc20
-rw-r--r--src/init2.cc31
-rw-r--r--src/loadsave.cc120
-rw-r--r--src/option_type.hpp8
-rw-r--r--src/options.hpp270
-rw-r--r--src/variable.hpp2
6 files changed, 196 insertions, 255 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc
index b2f8aa25..eeec226b 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -5147,26 +5147,6 @@ void play_game()
Rand_state_init(seed);
}
- /* Extract the options */
- for (auto const &option: options->standard_options)
- {
- int os = option.o_page;
- int ob = option.o_bit;
-
- /* Set the "default" options */
- if (option.o_var)
- {
- if (option_flag[os] & (1L << ob))
- {
- *option.o_var = TRUE;
- }
- else
- {
- *option.o_var = FALSE;
- }
- }
- }
-
/* Roll new character */
if (new_game)
{
diff --git a/src/init2.cc b/src/init2.cc
index 4c6f7f75..0fb1a5a8 100644
--- a/src/init2.cc
+++ b/src/init2.cc
@@ -809,37 +809,6 @@ static errr init_other(void)
(void)quark_add("uncursed");
(void)quark_add("on sale");
-
- /*** Prepare the options ***/
-
- /* Scan the options */
- for (auto const &option : options->standard_options)
- {
- int os = option.o_page;
- int ob = option.o_bit;
-
- /* Set the "default" options */
- if (option.o_var)
- {
- /* Accept */
- option_mask[os] |= (1L << ob);
-
- /* Set */
- if (option.o_norm)
- {
- /* Set */
- option_flag[os] |= (1L << ob);
- }
-
- /* Clear */
- else
- {
- /* Clear */
- option_flag[os] &= ~(1L << ob);
- }
- }
- }
-
/* Analyze the windows */
for (n = 0; n < 8; n++)
{
diff --git a/src/loadsave.cc b/src/loadsave.cc
index a46a8787..b3b04b9c 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -68,6 +68,19 @@ enum class ls_flag_t {
SAVE = 7
};
+/**
+ * Structure for loading/saving option values
+ */
+namespace {
+
+struct option_value {
+ std::string name;
+ bool_ value;
+};
+
+} // namespace (anonymous)
+
+
/*
* Basic byte-level reading from savefile. This provides a single point
* of interface to the pseudoencryption that ToME (and Angband)
@@ -278,6 +291,13 @@ static void do_std_string(std::string &s, ls_flag_t flag)
}
}
+static void do_option_value(option_value *option_value, ls_flag_t flag)
+{
+ do_std_string(option_value->name, flag);
+ do_bool(&option_value->value, flag);
+}
+
+
namespace {
/**
@@ -1727,45 +1747,58 @@ static void do_options(ls_flag_t flag)
do_bool(&options->autosave_t, flag);
do_s16b(&options->autosave_freq, flag);
- if (flag == ls_flag_t::LOAD)
+ // Standard options
{
- /* Read the option flags */
- for (n = 0; n < 8; n++) do_u32b(&oflag[n], flag);
+ std::vector<option_value> option_values;
- /* Read the option masks */
- for (n = 0; n < 8; n++) do_u32b(&mask[n], flag);
+ // If we're saving we need to map to a vector of key-value pairs.
+ if (flag == ls_flag_t::SAVE)
+ {
+ for (auto const &option: options->standard_options)
+ {
+ option_values.emplace_back(
+ option_value {
+ option.o_text,
+ *option.o_var
+ }
+ );
+ }
+ }
- /* Analyze the options */
- for (n = 0; n < 8; n++)
+ // Read/write the option values
+ do_vector(flag, option_values, do_option_value);
+
+ // If we're loading we need to set options based of the key-value pairs.
+ if (flag == ls_flag_t::LOAD)
{
- /* Analyze the options */
- for (i = 0; i < 32; i++)
+ // Go through all the options that were loaded.
+ for (auto const &option_value: option_values)
{
- /* Process valid flags */
- if (mask[n] & (1L << i))
+ // We need to search through all the options
+ // that are actually in the game; we'll ignore
+ // saved options that are now gone.
+ const option_type *found_option;
+ for (auto const &option: options->standard_options)
{
- /* Process valid flags */
- if (option_mask[n] & (1L << i))
+ if (option_value.name == option.o_text)
{
- /* Set */
- if (oflag[n] & (1L << i))
- {
- /* Set */
- option_flag[n] |= (1L << i);
- }
-
- /* Clear */
- else
- {
- /* Clear */
- option_flag[n] &= ~(1L << i);
- }
+ found_option = &option;
+ break;
}
}
+
+ // If we found the option, we'll set the value.
+ if (found_option)
+ {
+ *(*found_option).o_var = option_value.value;
+ }
}
}
+ }
+ if (flag == ls_flag_t::LOAD)
+ {
/*** Window Options ***/
/* Read the window flags */
@@ -1804,42 +1837,9 @@ static void do_options(ls_flag_t flag)
}
}
}
+
if (flag == ls_flag_t::SAVE)
{
- /* Analyze the options */
- for (auto const &option: options->standard_options)
- {
- int os = option.o_page;
- int ob = option.o_bit;
-
- /* Process real entries */
- if (option.o_var)
- {
- /* Set */
- if (*option.o_var)
- {
- /* Set */
- option_flag[os] |= (1L << ob);
- }
-
- /* Clear */
- else
- {
- /* Clear */
- option_flag[os] &= ~(1L << ob);
- }
- }
- }
-
-
- /*** Normal options ***/
-
- /* Dump the flags */
- for (i = 0; i < 8; i++) do_u32b(&option_flag[i], flag);
-
- /* Dump the masks */
- for (i = 0; i < 8; i++) do_u32b(&option_mask[i], flag);
-
/*** Window options ***/
/* Dump the flags */
diff --git a/src/option_type.hpp b/src/option_type.hpp
index 58834b79..4d8a7a51 100644
--- a/src/option_type.hpp
+++ b/src/option_type.hpp
@@ -8,17 +8,11 @@
struct option_type
{
/**
- * Address of actual option variable. NULL signals the
- * end of the table.
+ * Address of actual option variable.
*/
bool_ *o_var;
/**
- * Default value.
- */
- byte o_norm;
-
- /**
* Option page number.
*/
byte o_page;
diff --git a/src/options.hpp b/src/options.hpp
index a1b125a0..421a11f3 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -13,192 +13,192 @@ struct options {
//
// Option Set 1 -- User Interface
//
- bool_ rogue_like_commands; /* Rogue-like commands */
- bool_ quick_messages; /* Activate quick messages */
- bool_ carry_query_flag; /* Prompt before picking things up */
- bool_ use_old_target; /* Use old target by default */
- bool_ always_pickup; /* Pick things up by default */
- bool_ always_repeat; /* Repeat obvious commands */
- bool_ ring_bell; /* Ring the bell (on errors, etc) */
+ bool_ rogue_like_commands = FALSE; /* Rogue-like commands */
+ bool_ quick_messages = TRUE; /* Activate quick messages */
+ bool_ carry_query_flag = FALSE; /* Prompt before picking things up */
+ bool_ use_old_target = FALSE; /* Use old target by default */
+ bool_ always_pickup = FALSE; /* Pick things up by default */
+ bool_ always_repeat = TRUE; /* Repeat obvious commands */
+ bool_ ring_bell = FALSE; /* Ring the bell (on errors, etc) */
//
// Option Set 2 -- Disturbance
//
- bool_ find_ignore_stairs; /* Run past stairs */
- bool_ find_ignore_doors; /* Run through open doors */
- bool_ find_cut; /* Run past known corners */
- bool_ find_examine; /* Run into potential corners */
- bool_ disturb_move; /* Disturb whenever any monster moves */
- bool_ disturb_near; /* Disturb whenever viewable monster moves */
- bool_ disturb_panel; /* Disturb whenever map panel changes */
- bool_ disturb_detect; /* Disturb whenever leaving trap-detected area */
- bool_ disturb_state; /* Disturn whenever player state changes */
- bool_ disturb_minor; /* Disturb whenever boring things happen */
- bool_ disturb_other; /* Disturb whenever various things happen */
- bool_ last_words; /* Get last words upon dying */
- bool_ small_levels; /* Allow unusually small dungeon levels */
- bool_ empty_levels; /* Allow empty 'arena' levels */
- bool_ confirm_stairs; /* Prompt before staircases... */
- bool_ wear_confirm; /* Confirm before putting on known cursed items */
- bool_ disturb_pets; /* Pets moving nearby disturb us */
+ bool_ find_ignore_stairs = FALSE; /* Run past stairs */
+ bool_ find_ignore_doors = TRUE; /* Run through open doors */
+ bool_ find_cut = FALSE; /* Run past known corners */
+ bool_ find_examine = TRUE; /* Run into potential corners */
+ bool_ disturb_move = FALSE; /* Disturb whenever any monster moves */
+ bool_ disturb_near = TRUE; /* Disturb whenever viewable monster moves */
+ bool_ disturb_panel = TRUE; /* Disturb whenever map panel changes */
+ bool_ disturb_detect = TRUE; /* Disturb whenever leaving trap-detected area */
+ bool_ disturb_state = TRUE; /* Disturn whenever player state changes */
+ bool_ disturb_minor = TRUE; /* Disturb whenever boring things happen */
+ bool_ disturb_other = FALSE; /* Disturb whenever various things happen */
+ bool_ last_words = TRUE; /* Get last words upon dying */
+ bool_ wear_confirm = TRUE; /* Confirm before putting on known cursed items */
+ bool_ confirm_stairs = FALSE; /* Prompt before staircases... */
+ bool_ disturb_pets = FALSE; /* Pets moving nearby disturb us */
//
// Option Set 3 -- Game-Play
//
- bool_ auto_scum; /* Auto-scum for good levels */
- bool_ view_perma_grids; /* Map remembers all perma-lit grids */
- bool_ view_torch_grids; /* Map remembers all torch-lit grids */
- bool_ dungeon_align; /* Generate dungeons with aligned rooms */
- bool_ dungeon_stair; /* Generate dungeons with connected stairs */
- bool_ flow_by_sound; /* Monsters track new player location */
- bool_ smart_learn; /* Monsters learn from their mistakes */
+ bool_ auto_scum = TRUE; /* Auto-scum for good levels */
+ bool_ view_perma_grids = TRUE; /* Map remembers all perma-lit grids */
+ bool_ view_torch_grids = FALSE; /* Map remembers all torch-lit grids */
+ bool_ dungeon_align = TRUE; /* Generate dungeons with aligned rooms */
+ bool_ dungeon_stair = TRUE; /* Generate dungeons with connected stairs */
+ bool_ flow_by_sound = FALSE; /* Monsters track new player location */
+ bool_ smart_learn = FALSE; /* Monsters learn from their mistakes */
+ bool_ small_levels = TRUE; /* Allow unusually small dungeon levels */
+ bool_ empty_levels = TRUE; /* Allow empty 'arena' levels */
//
// Option Set 4 -- Efficiency
//
- bool_ view_reduce_lite; /* Reduce lite-radius when running */
- bool_ avoid_abort; /* Avoid checking for user abort */
- bool_ avoid_shimmer; /* Avoid processing extra shimmering */
- bool_ avoid_other; /* Avoid processing special colors */
- bool_ flush_failure; /* Flush input on any failure */
- bool_ flush_disturb; /* Flush input on disturbance */
- bool_ flush_command; /* Flush input before every command */
- bool_ fresh_before; /* Flush output before normal commands */
- bool_ fresh_after; /* Flush output after normal commands */
- bool_ fresh_message; /* Flush output after all messages */
- bool_ hilite_player; /* Hilite the player with the cursor */
- bool_ view_yellow_lite; /* Use special colors for torch-lit grids */
- bool_ view_bright_lite; /* Use special colors for 'viewable' grids */
- bool_ view_granite_lite; /* Use special colors for wall grids (slow) */
- bool_ view_special_lite; /* Use special colors for floor grids (slow) */
- bool_ center_player; /* Center view on player */
+ bool_ view_reduce_lite = FALSE; /* Reduce lite-radius when running */
+ bool_ avoid_abort = FALSE; /* Avoid checking for user abort */
+ bool_ avoid_shimmer = FALSE; /* Avoid processing extra shimmering */
+ bool_ avoid_other = FALSE; /* Avoid processing special colors */
+ bool_ flush_failure = TRUE; /* Flush input on any failure */
+ bool_ flush_disturb = FALSE; /* Flush input on disturbance */
+ bool_ flush_command = FALSE; /* Flush input before every command */
+ bool_ fresh_before = TRUE; /* Flush output before normal commands */
+ bool_ fresh_after = FALSE; /* Flush output after normal commands */
+ bool_ fresh_message = FALSE; /* Flush output after all messages */
+ bool_ hilite_player = FALSE; /* Hilite the player with the cursor */
+ bool_ view_yellow_lite = FALSE; /* Use special colors for torch-lit grids */
+ bool_ view_bright_lite = FALSE; /* Use special colors for 'viewable' grids */
+ bool_ view_granite_lite = FALSE; /* Use special colors for wall grids (slow) */
+ bool_ view_special_lite = FALSE; /* Use special colors for floor grids (slow) */
+ bool_ center_player = FALSE; /* Center view on player */
//
// Option Set 5 - ToME options
//
- bool_ linear_stats;
- bool_ player_char_health; /* Display the player as a special symbol when in bad health ? */
- bool_ ingame_help; /* In-game contextual help? */
- bool_ auto_more; /* Auto more */
+ bool_ ingame_help = TRUE; /* In-game contextual help? */
+ bool_ auto_more = FALSE; /* Auto more */
+ bool_ player_char_health = TRUE; /* Display the player as a special symbol when in bad health ? */
+ bool_ linear_stats = TRUE;
//
// Option Set 6 - Birth options
//
- bool_ always_small_level;
- bool_ autoroll;
- bool_ fate_option;
- bool_ ironman_rooms;
- bool_ joke_monsters;
- bool_ point_based;
- bool_ preserve;
- bool_ no_selling;
+ bool_ preserve = TRUE; /* Preserve artifacts */
+ bool_ autoroll = TRUE; /* Specify 'minimal' stats to roll */
+ bool_ point_based = FALSE; /* Generate character using a point system */
+ bool_ ironman_rooms = FALSE; /* Always generate very unusual rooms */
+ bool_ joke_monsters = FALSE; /* Allow 'joke' monsters */
+ bool_ always_small_level = FALSE; /* Force small levels */
+ bool_ fate_option = TRUE; /* Player can receive fates */
+ bool_ no_selling = FALSE; /* Player cannot sell items */
//
// Other options
//
- bool_ cheat_peek; /* Peek into object creation */
- bool_ cheat_hear; /* Peek into monster creation */
- bool_ cheat_room; /* Peek into dungeon creation */
- bool_ cheat_xtra; /* Peek into something else */
- bool_ cheat_live; /* Allow player to avoid death */
+ bool_ cheat_peek = FALSE; /* Peek into object creation */
+ bool_ cheat_hear = FALSE; /* Peek into monster creation */
+ bool_ cheat_room = FALSE; /* Peek into dungeon creation */
+ bool_ cheat_xtra = FALSE; /* Peek into something else */
+ bool_ cheat_live = FALSE; /* Allow player to avoid death */
- byte hitpoint_warn; /* Hitpoint warning (0 to 9) */
+ byte hitpoint_warn = 0; /* Hitpoint warning (0 to 9) */
- byte delay_factor; /* Delay factor (0 to 9) */
+ byte delay_factor = 0; /* Delay factor (0 to 9) */
- s16b autosave_freq; /* Autosave frequency */
- bool_ autosave_t; /* Timed autosave */
- bool_ autosave_l; /* Autosave before entering new levels */
+ s16b autosave_freq = 100; /* Autosave frequency */
+ bool_ autosave_t = FALSE; /* Timed autosave */
+ bool_ autosave_l = FALSE; /* Autosave before entering new levels */
/**
* Option groups
*/
std::vector<option_type> standard_options = {
// User-Interface
- { &rogue_like_commands, FALSE, 1, 0, "rogue_like_commands", "Rogue-like commands" },
- { &quick_messages , TRUE , 1, 1, "quick_messages" , "Activate quick messages" },
- { &carry_query_flag , FALSE, 1, 3, "carry_query_flag" , "Prompt before picking things up" },
- { &use_old_target , FALSE, 1, 4, "use_old_target" , "Use old target by default" },
- { &always_pickup , FALSE, 1, 5, "always_pickup" , "Pick things up by default" },
- { &always_repeat , TRUE , 1, 7, "always_repeat" , "Repeat obvious commands" },
- { &ring_bell , FALSE, 1, 18, "ring_bell" , "Audible bell (on errors, etc)" },
+ { &rogue_like_commands, 1, 0, "rogue_like_commands", "Rogue-like commands" },
+ { &quick_messages , 1, 1, "quick_messages" , "Activate quick messages" },
+ { &carry_query_flag , 1, 3, "carry_query_flag" , "Prompt before picking things up" },
+ { &use_old_target , 1, 4, "use_old_target" , "Use old target by default" },
+ { &always_pickup , 1, 5, "always_pickup" , "Pick things up by default" },
+ { &always_repeat , 1, 7, "always_repeat" , "Repeat obvious commands" },
+ { &ring_bell , 1, 18, "ring_bell" , "Audible bell (on errors, etc)" },
// Disturbance
- { &find_ignore_stairs , FALSE, 2, 0, "find_ignore_stairs" , "Run past stairs" },
- { &find_ignore_doors , TRUE , 2, 1, "find_ignore_doors" , "Run through open doors" },
- { &find_cut , FALSE, 2, 2, "find_cut" , "Run past known corners" },
- { &find_examine , TRUE , 2, 3, "find_examine" , "Run into potential corners" },
- { &disturb_move , FALSE, 2, 4, "disturb_move" , "Disturb whenever any monster moves" },
- { &disturb_near , TRUE , 2, 5, "disturb_near" , "Disturb whenever viewable monster moves" },
- { &disturb_panel , TRUE , 2, 6, "disturb_panel" , "Disturb whenever map panel changes" },
- { &disturb_detect , TRUE , 2, 21, "disturb_detect" , "Disturb whenever leaving trap-detected area" },
- { &disturb_state , TRUE , 2, 7, "disturb_state" , "Disturb whenever player state changes" },
- { &disturb_minor , TRUE , 2, 8, "disturb_minor" , "Disturb whenever boring things happen" },
- { &disturb_other , FALSE, 2, 9, "disturb_other" , "Disturb whenever random things happen" },
- { &last_words , TRUE , 2, 12, "last_words" , "Get last words when the character dies" },
- { &wear_confirm , TRUE , 2, 15, "confirm_wear" , "Confirm to wear/wield known cursed items" },
- { &confirm_stairs , FALSE, 2, 16, "confirm_stairs" , "Prompt before exiting a dungeon level" },
- { &disturb_pets , FALSE, 2, 17, "disturb_pets" , "Disturb when visible pets move" },
+ { &find_ignore_stairs , 2, 0, "find_ignore_stairs" , "Run past stairs" },
+ { &find_ignore_doors , 2, 1, "find_ignore_doors" , "Run through open doors" },
+ { &find_cut , 2, 2, "find_cut" , "Run past known corners" },
+ { &find_examine , 2, 3, "find_examine" , "Run into potential corners" },
+ { &disturb_move , 2, 4, "disturb_move" , "Disturb whenever any monster moves" },
+ { &disturb_near , 2, 5, "disturb_near" , "Disturb whenever viewable monster moves" },
+ { &disturb_panel , 2, 6, "disturb_panel" , "Disturb whenever map panel changes" },
+ { &disturb_detect , 2, 21, "disturb_detect" , "Disturb whenever leaving trap-detected area" },
+ { &disturb_state , 2, 7, "disturb_state" , "Disturb whenever player state changes" },
+ { &disturb_minor , 2, 8, "disturb_minor" , "Disturb whenever boring things happen" },
+ { &disturb_other , 2, 9, "disturb_other" , "Disturb whenever random things happen" },
+ { &last_words , 2, 12, "last_words" , "Get last words when the character dies" },
+ { &wear_confirm , 2, 15, "confirm_wear" , "Confirm to wear/wield known cursed items" },
+ { &confirm_stairs , 2, 16, "confirm_stairs" , "Prompt before exiting a dungeon level" },
+ { &disturb_pets , 2, 17, "disturb_pets" , "Disturb when visible pets move" },
// Game-Play
- { &auto_scum , TRUE , 3, 1, "auto_scum" , "Auto-scum for good levels" },
- { &view_perma_grids , TRUE , 3, 6, "view_perma_grids" , "Map remembers all perma-lit grids" },
- { &view_torch_grids , FALSE, 3, 7, "view_torch_grids" , "Map remembers all torch-lit grids" },
- { &dungeon_align , TRUE , 3, 8, "dungeon_align" , "Generate dungeons with aligned rooms" },
- { &dungeon_stair , TRUE , 3, 9, "dungeon_stair" , "Generate dungeons with connected stairs" },
- { &flow_by_sound , FALSE, 3, 10, "flow_by_sound" , "Monsters chase current location (v.slow)" },
- { &smart_learn , FALSE, 3, 14, "smart_learn" , "Monsters learn from their mistakes" },
- { &small_levels , TRUE , 3, 17, "small_levels" , "Allow unusually small dungeon levels" },
- { &empty_levels , TRUE , 3, 18, "empty_levels" , "Allow empty 'arena' levels" },
+ { &auto_scum , 3, 1, "auto_scum" , "Auto-scum for good levels" },
+ { &view_perma_grids , 3, 6, "view_perma_grids" , "Map remembers all perma-lit grids" },
+ { &view_torch_grids , 3, 7, "view_torch_grids" , "Map remembers all torch-lit grids" },
+ { &dungeon_align , 3, 8, "dungeon_align" , "Generate dungeons with aligned rooms" },
+ { &dungeon_stair , 3, 9, "dungeon_stair" , "Generate dungeons with connected stairs" },
+ { &flow_by_sound , 3, 10, "flow_by_sound" , "Monsters chase current location (v.slow)" },
+ { &smart_learn , 3, 14, "smart_learn" , "Monsters learn from their mistakes" },
+ { &small_levels , 3, 17, "small_levels" , "Allow unusually small dungeon levels" },
+ { &empty_levels , 3, 18, "empty_levels" , "Allow empty 'arena' levels" },
// Efficiency
- { &view_reduce_lite , FALSE, 4, 0, "view_reduce_lite" , "Reduce lite-radius when running" },
- { &avoid_abort , FALSE, 4, 2, "avoid_abort" , "Avoid checking for user abort" },
- { &avoid_shimmer , FALSE, 4, 17, "avoid_shimmer" , "Avoid extra shimmering (fast)" },
- { &avoid_other , FALSE, 4, 3, "avoid_other" , "Avoid processing special colors (fast)" },
- { &flush_failure , TRUE , 4, 4, "flush_failure" , "Flush input on various failures" },
- { &flush_disturb , FALSE, 4, 5, "flush_disturb" , "Flush input whenever disturbed" },
- { &flush_command , FALSE, 4, 6, "flush_command" , "Flush input before every command" },
- { &fresh_before , TRUE , 4, 7, "fresh_before" , "Flush output before every command" },
- { &fresh_after , FALSE, 4, 8, "fresh_after" , "Flush output after every command" },
- { &fresh_message , FALSE, 4, 9, "fresh_message" , "Flush output after every message" },
- { &hilite_player , FALSE, 4, 11, "hilite_player" , "Hilite the player with the cursor" },
- { &view_yellow_lite , FALSE, 4, 12, "view_yellow_lite" , "Use special colors for torch-lit grids" },
- { &view_bright_lite , FALSE, 4, 13, "view_bright_lite" , "Use special colors for 'viewable' grids" },
- { &view_granite_lite , FALSE, 4, 14, "view_granite_lite" , "Use special colors for wall grids (slow)" },
- { &view_special_lite , FALSE, 4, 15, "view_special_lite" , "Use special colors for floor grids (slow)" },
- { &center_player , FALSE, 4, 16, "center_player" , "Center the view on the player (very slow)" },
+ { &view_reduce_lite , 4, 0, "view_reduce_lite" , "Reduce lite-radius when running" },
+ { &avoid_abort , 4, 2, "avoid_abort" , "Avoid checking for user abort" },
+ { &avoid_shimmer , 4, 17, "avoid_shimmer" , "Avoid extra shimmering (fast)" },
+ { &avoid_other , 4, 3, "avoid_other" , "Avoid processing special colors (fast)" },
+ { &flush_failure , 4, 4, "flush_failure" , "Flush input on various failures" },
+ { &flush_disturb , 4, 5, "flush_disturb" , "Flush input whenever disturbed" },
+ { &flush_command , 4, 6, "flush_command" , "Flush input before every command" },
+ { &fresh_before , 4, 7, "fresh_before" , "Flush output before every command" },
+ { &fresh_after , 4, 8, "fresh_after" , "Flush output after every command" },
+ { &fresh_message , 4, 9, "fresh_message" , "Flush output after every message" },
+ { &hilite_player , 4, 11, "hilite_player" , "Hilite the player with the cursor" },
+ { &view_yellow_lite , 4, 12, "view_yellow_lite" , "Use special colors for torch-lit grids" },
+ { &view_bright_lite , 4, 13, "view_bright_lite" , "Use special colors for 'viewable' grids" },
+ { &view_granite_lite , 4, 14, "view_granite_lite" , "Use special colors for wall grids (slow)" },
+ { &view_special_lite , 4, 15, "view_special_lite" , "Use special colors for floor grids (slow)" },
+ { &center_player , 4, 16, "center_player" , "Center the view on the player (very slow)" },
// ToME options
- { &ingame_help , TRUE , 5, 1, "ingame_help" , "Ingame contextual help" },
- { &auto_more , FALSE, 5, 4, "auto_more" , "Automatically clear '-more-' prompts" },
- { &player_char_health , TRUE , 5, 6, "player_char_health" , "Player char represent his/her health" },
- { &linear_stats , TRUE , 5, 7, "linear_stats" , "Stats are represented in a linear way" },
+ { &ingame_help , 5, 1, "ingame_help" , "Ingame contextual help" },
+ { &auto_more , 5, 4, "auto_more" , "Automatically clear '-more-' prompts" },
+ { &player_char_health , 5, 6, "player_char_health" , "Player char represent his/her health" },
+ { &linear_stats , 5, 7, "linear_stats" , "Stats are represented in a linear way" },
// Birth Options
- { &preserve , TRUE , 6, 2, "preserve" , "Preserve artifacts" },
- { &autoroll , TRUE , 6, 3, "autoroll" , "Specify 'minimal' stats" },
- { &point_based , FALSE, 6, 17, "point_based" , "Generate character using a point system" },
- { &ironman_rooms , FALSE, 6, 6, "ironman_rooms" , "Always generate very unusual rooms" },
- { &joke_monsters , FALSE, 6, 14, "joke_monsters" , "Allow use of some 'joke' monsters" },
- { &always_small_level , FALSE, 6, 16, "always_small_level" , "Always make small levels" },
- { &fate_option , TRUE , 6, 18, "fate_option" , "You can receive fates, good or bad" },
- { &no_selling , FALSE, 6, 20, "no_selling" , "Items always sell for 0 gold" },
+ { &preserve , 6, 2, "preserve" , "Preserve artifacts" },
+ { &autoroll , 6, 3, "autoroll" , "Specify 'minimal' stats" },
+ { &point_based , 6, 17, "point_based" , "Generate character using a point system" },
+ { &ironman_rooms , 6, 6, "ironman_rooms" , "Always generate very unusual rooms" },
+ { &joke_monsters , 6, 14, "joke_monsters" , "Allow use of some 'joke' monsters" },
+ { &always_small_level , 6, 16, "always_small_level" , "Always make small levels" },
+ { &fate_option , 6, 18, "fate_option" , "You can receive fates, good or bad" },
+ { &no_selling , 6, 20, "no_selling" , "Items always sell for 0 gold" },
};
/*
* Cheating options
*/
std::vector<option_type> cheat_options = {
- { &cheat_peek, FALSE, 0, 0, "cheat_peek", "Peek into object creation" },
- { &cheat_hear, FALSE, 0, 1, "cheat_hear", "Peek into monster creation" },
- { &cheat_room, FALSE, 0, 2, "cheat_room", "Peek into dungeon creation" },
- { &cheat_xtra, FALSE, 0, 3, "cheat_xtra", "Peek into something else" },
- { &cheat_live, FALSE, 0, 5, "cheat_live", "Allow player to avoid death" },
+ { &cheat_peek, 0, 0, "cheat_peek", "Peek into object creation" },
+ { &cheat_hear, 0, 1, "cheat_hear", "Peek into monster creation" },
+ { &cheat_room, 0, 2, "cheat_room", "Peek into dungeon creation" },
+ { &cheat_xtra, 0, 3, "cheat_xtra", "Peek into something else" },
+ { &cheat_live, 0, 5, "cheat_live", "Allow player to avoid death" },
};
/**
* Autosave boolean options
*/
std::vector<option_type> autosave_options {
- { &autosave_l, FALSE, 0, 6, "autosave_l", "Autosave when entering new levels" },
- { &autosave_t, FALSE, 0, 7, "autosave_t", "Timed autosave" }
+ { &autosave_l, 0, 6, "autosave_l", "Autosave when entering new levels" },
+ { &autosave_t, 0, 7, "autosave_t", "Timed autosave" }
};
/*
diff --git a/src/variable.hpp b/src/variable.hpp
index e16eae93..b69751a4 100644
--- a/src/variable.hpp
+++ b/src/variable.hpp
@@ -144,8 +144,6 @@ extern char **macro__pat;
extern char **macro__act;
extern bool_ *macro__cmd;
extern char *macro__buf;
-extern u32b option_flag[8];
-extern u32b option_mask[8];
extern u32b window_flag[ANGBAND_TERM_MAX];
extern u32b window_mask[ANGBAND_TERM_MAX];
extern cave_type **cave;