summaryrefslogtreecommitdiff
path: root/src/xtra2.cc
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
commitf035201f330a3b1f50a2041ea9ad3f854f7d4e00 (patch)
tree7ef58d3a83ec4b50a0fe469a704773e5e1e77606 /src/xtra2.cc
parent7f147b21e23662c89bd28479ea67ee7c6a94fc0c (diff)
Move all options to a struct instead of using globals
Diffstat (limited to 'src/xtra2.cc')
-rw-r--r--src/xtra2.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 9581a7ee..ce4c7de0 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -3370,7 +3370,7 @@ void verify_panel(void)
if (max_pcol_min < 0) max_pcol_min = 0;
/* An option: center on player */
- if (center_player)
+ if (options->center_player)
{
/* Center vertically */
prow_min = y - panel_hgt;
@@ -3444,7 +3444,10 @@ void verify_panel(void)
panel_col_min = pcol_min;
/* Hack -- optional disturb on "panel change" */
- if (disturb_panel && !center_player) disturb(0);
+ if (options->disturb_panel && !options->center_player)
+ {
+ disturb(0);
+ }
/* Recalculate the boundaries */
panel_bounds();
@@ -4733,7 +4736,10 @@ bool_ get_aim_dir(int *dp)
dir = command_dir;
/* Hack -- auto-target if requested */
- if (use_old_target && target_okay()) dir = 5;
+ if (options->use_old_target && target_okay())
+ {
+ dir = 5;
+ }
/* Ask until satisfied */
while (!dir)