diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 10:20:34 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 10:20:34 +0200 |
commit | 7d75770faa5ce498a9351951281de3c5d7019e9a (patch) | |
tree | dfd977189499becf096009fa3c216944aa6618dd | |
parent | 3224281f94c23f0fecc66e478da2d647b8c0c588 (diff) |
Show character powers immediately when (U)sing
-rw-r--r-- | src/powers.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/powers.c b/src/powers.c index 613968df..a12d55f6 100644 --- a/src/powers.c +++ b/src/powers.c @@ -1262,13 +1262,13 @@ static void power_activate(int power) /* * Print a batch of power. */ -static void print_power_batch(int *p, int start, int max, bool_ mode) +static void print_power_batch(int *p, int start, int max) { char buff[80]; power_type* spell; int i = start, j = 0; - if (mode) prt(format(" %-31s Level Mana Fail", "Name"), 1, 20); + prt(format(" %-31s Level Mana Fail", "Name"), 1, 20); for (i = start; i < (start + 20); i++) { @@ -1279,10 +1279,10 @@ static void print_power_batch(int *p, int start, int max, bool_ mode) sprintf(buff, " %c-%3d) %-30s %5d %4d %s@%d", I2A(j), p[i] + 1, spell->name, spell->level, spell->cost, stat_names[spell->stat], spell->diff); - if (mode) prt(buff, 2 + j, 20); + prt(buff, 2 + j, 20); j++; } - if (mode) prt("", 2 + j, 20); + prt("", 2 + j, 20); prt(format("Select a power (a-%c), +/- to scroll:", I2A(j - 1)), 0, 0); } @@ -1296,7 +1296,6 @@ static power_type* select_power(int *x_idx) char which; int max = 0, i, start = 0; power_type* ret; - bool_ mode = FALSE; int p[POWER_MAX]; /* Count the max */ @@ -1322,7 +1321,7 @@ static power_type* select_power(int *x_idx) while (1) { - print_power_batch(p, start, max, mode); + print_power_batch(p, start, max); which = inkey(); if (which == ESCAPE) @@ -1331,12 +1330,6 @@ static power_type* select_power(int *x_idx) ret = NULL; break; } - else if (which == '*' || which == '?' || which == ' ') - { - mode = (mode) ? FALSE : TRUE; - Term_load(); - character_icky = FALSE; - } else if (which == '+') { start += 20; |