summaryrefslogtreecommitdiff
path: root/src/xtra1.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/xtra1.cc
parent7f147b21e23662c89bd28479ea67ee7c6a94fc0c (diff)
Move all options to a struct instead of using globals
Diffstat (limited to 'src/xtra1.cc')
-rw-r--r--src/xtra1.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/xtra1.cc b/src/xtra1.cc
index c7fd9213..072e097a 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -63,7 +63,7 @@
*/
void cnv_stat(int val, char *out_val)
{
- if (!linear_stats)
+ if (!options->linear_stats)
{
/* Above 18 */
if (val > 18)
@@ -230,7 +230,7 @@ static void prt_sane(void)
{
color = TERM_L_GREEN;
}
- else if (perc > (10 * hitpoint_warn))
+ else if (perc > (10 * options->hitpoint_warn))
{
color = TERM_YELLOW;
}
@@ -419,7 +419,10 @@ static void prt_hp(void)
byte color;
- if (player_char_health) lite_spot(p_ptr->py, p_ptr->px);
+ if (options->player_char_health)
+ {
+ lite_spot(p_ptr->py, p_ptr->px);
+ }
if (p_ptr->necro_extra & CLASS_UNDEAD)
{
@@ -431,7 +434,7 @@ static void prt_hp(void)
{
color = TERM_L_BLUE;
}
- else if (p_ptr->chp > (p_ptr->mhp * hitpoint_warn) / 10)
+ else if (p_ptr->chp > (p_ptr->mhp * options->hitpoint_warn) / 10)
{
color = TERM_VIOLET;
}
@@ -451,7 +454,7 @@ static void prt_hp(void)
{
color = TERM_L_GREEN;
}
- else if (p_ptr->chp > (p_ptr->mhp * hitpoint_warn) / 10)
+ else if (p_ptr->chp > (p_ptr->mhp * options->hitpoint_warn) / 10)
{
color = TERM_YELLOW;
}
@@ -490,7 +493,7 @@ static void prt_mh(void)
{
color = TERM_L_GREEN;
}
- else if (o_ptr->pval2 > (o_ptr->pval3 * hitpoint_warn) / 10)
+ else if (o_ptr->pval2 > (o_ptr->pval3 * options->hitpoint_warn) / 10)
{
color = TERM_YELLOW;
}
@@ -518,7 +521,7 @@ static void prt_sp(void)
{
color = TERM_L_GREEN;
}
- else if (p_ptr->csp > (p_ptr->msp * hitpoint_warn) / 10)
+ else if (p_ptr->csp > (p_ptr->msp * options->hitpoint_warn) / 10)
{
color = TERM_YELLOW;
}
@@ -2013,7 +2016,7 @@ static void calc_torch(void)
/* Reduce lite when running if requested */
- if (running && view_reduce_lite)
+ if (running && options->view_reduce_lite)
{
/* Reduce the lite radius if needed */
if (p_ptr->cur_lite > 1) p_ptr->cur_lite = 1;