summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd7.c37
-rw-r--r--src/externs.h1
2 files changed, 14 insertions, 24 deletions
diff --git a/src/cmd7.c b/src/cmd7.c
index f174e96a..d148dc07 100644
--- a/src/cmd7.c
+++ b/src/cmd7.c
@@ -4390,7 +4390,7 @@ static void print_spell_batch(int batch, int max)
/*
* List ten random spells and ask to pick one.
*/
-static random_spell* select_spell_from_batch(int batch, bool_ quick)
+static random_spell* select_spell_from_batch(int batch)
{
char tmp[160];
@@ -4414,18 +4414,16 @@ static random_spell* select_spell_from_batch(int batch, bool_ quick)
mut_max = spell_num - batch * 10;
}
- strnfmt(tmp, 160, "(a-%c, * to list, A-%cto browse, / to rename, - to comment) Select a power: ",
+ strnfmt(tmp, 160, "(a-%c, A-%cto browse, / to rename, - to comment) Select a power: ",
I2A(mut_max - 1), I2A(mut_max - 1) - 'a' + 'A');
prt(tmp, 0, 0);
- if (quick)
+ while (1)
{
+ /* Print power list */
print_spell_batch(batch, mut_max);
- }
- while (1)
- {
/* Get a command */
which = inkey();
@@ -4440,16 +4438,6 @@ static random_spell* select_spell_from_batch(int batch, bool_ quick)
}
- /* List */
- if (which == '*' || which == '?' || which == ' ')
- {
- /* Print power list */
- print_spell_batch(batch, mut_max);
-
- /* Wait for next command */
- continue;
- }
-
/* Accept default */
if (which == '\r')
{
@@ -4552,7 +4540,7 @@ static random_spell* select_spell_from_batch(int batch, bool_ quick)
/*
* Pick a random spell from a menu
*/
-random_spell* select_spell(bool_ quick)
+static random_spell* select_spell()
{
char tmp[160];
@@ -4593,6 +4581,8 @@ random_spell* select_spell(bool_ quick)
if (which == ESCAPE)
{
+ Term_load();
+
ret = NULL;
break;
@@ -4602,7 +4592,9 @@ random_spell* select_spell(bool_ quick)
{
if (batch_max == 0)
{
- ret = select_spell_from_batch(0, quick);
+ Term_load();
+
+ ret = select_spell_from_batch(0);
break;
}
@@ -4613,7 +4605,9 @@ random_spell* select_spell(bool_ quick)
which = tolower(which);
if (isalpha(which) && (A2I(which) <= batch_max))
{
- ret = select_spell_from_batch(A2I(which), quick);
+ Term_load();
+
+ ret = select_spell_from_batch(A2I(which));
break;
}
@@ -4623,9 +4617,6 @@ random_spell* select_spell(bool_ quick)
}
}
- /* Restore the screen */
- Term_load();
-
/* Leave "icky" mode */
character_icky = FALSE;
@@ -4659,7 +4650,7 @@ void do_cmd_powermage(void)
}
- s_ptr = select_spell(FALSE);
+ s_ptr = select_spell();
if (s_ptr == NULL) return;
diff --git a/src/externs.h b/src/externs.h
index ea2c4831..3a4c50b5 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -828,7 +828,6 @@ extern void necro_info(char *p, int power);
extern void mindcraft_info(char *p, int power);
extern void symbiotic_info(char *p, int power);
extern void mimic_info(char *p, int power);
-extern random_spell* select_spell(bool_ quick);
extern void cast_magic_spell(int spell, byte level);
extern void do_cmd_summoner(void);
extern void do_cmd_mindcraft(void);