From 70dc0c1046a468411147bee40763f0f5a499c847 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 8 Jun 2015 07:19:47 +0200 Subject: Remove '*' portion of prompt for pet command --- src/cmd1.cc | 92 +++++++++++++++++++++---------------------------------------- 1 file changed, 32 insertions(+), 60 deletions(-) (limited to 'src/cmd1.cc') diff --git a/src/cmd1.cc b/src/cmd1.cc index a936e83e..81e45776 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -4442,7 +4442,7 @@ void do_cmd_pet(void) char power_desc[36][80]; - bool_ flag, redraw; + bool_ flag; int ask; @@ -4521,80 +4521,55 @@ void do_cmd_pet(void) /* Nothing chosen yet */ flag = FALSE; - /* No redraw yet */ - redraw = FALSE; - /* Build a prompt (accept all spells) */ if (num <= 26) { /* Build a prompt (accept all spells) */ strnfmt(out_val, 78, - "(Command %c-%c, *=List, ESC=exit) Select a command: ", I2A(0), + "(Command %c-%c, ESC=exit) Select a command: ", I2A(0), I2A(num - 1)); } else { strnfmt(out_val, 78, - "(Command %c-%c, *=List, ESC=exit) Select a command: ", I2A(0), + "(Command %c-%c, ESC=exit) Select a command: ", I2A(0), '0' + num - 27); } - /* Get a command from the user */ - while (!flag && get_com(out_val, &choice)) - { - /* Request redraw */ - if ((choice == ' ') || (choice == '*') || (choice == '?')) - { - /* Show the list */ - if (!redraw) - { - byte y = 1, x = 0; - int ctr = 0; - char dummy[80]; - - strcpy(dummy, ""); - - /* Show list */ - redraw = TRUE; - - /* Save the screen */ - character_icky = TRUE; - Term_save(); + /* Save the screen */ + character_icky = TRUE; + Term_save(); - prt("", y++, x); + /* Show the list */ + { + byte y = 1, x = 0; + int ctr = 0; + char dummy[80]; - while (ctr < num) - { - strnfmt(dummy, 80, "%c) %s", I2A(ctr), power_desc[ctr]); - prt(dummy, y + ctr, x); - ctr++; - } + strcpy(dummy, ""); - if (ctr < 17) - { - prt("", y + ctr, x); - } - else - { - prt("", y + 17, x); - } - } + prt("", y++, x); - /* Hide the list */ - else - { - /* Hide list */ - redraw = FALSE; - - /* Restore the screen */ - Term_load(); - character_icky = FALSE; - } + while (ctr < num) + { + strnfmt(dummy, 80, "%c) %s", I2A(ctr), power_desc[ctr]); + prt(dummy, y + ctr, x); + ctr++; + } - /* Redo asking */ - continue; + if (ctr < 17) + { + prt("", y + ctr, x); } + else + { + prt("", y + 17, x); + } + } + /* Get a command from the user */ + while (!flag && get_com(out_val, &choice)) + { if (choice == '\r' && num == 1) { choice = 'a'; @@ -4642,11 +4617,8 @@ void do_cmd_pet(void) } /* Restore the screen */ - if (redraw) - { - Term_load(); - character_icky = FALSE; - } + Term_load(); + character_icky = FALSE; /* Abort if needed */ if (!flag) -- cgit v1.2.3