arogue5: fix player's typed responses getting put at the wrong place.
Some sections of code that prompt the user for a string of input were calling get_str() with cw (the player-visible screen containing the map), which caused whatever the player typed to get printed starting at cw's idea of the cursor position, which was usually the Rogue's @-sign. This corrupted the map. The problem has been fixed by passing msgw (the message line at the top of the screen) to get_str(), so the player's typing appears where msgw thinks the cursor should be, which is in the sensible place right after the prompt. Some other get_str() invocations which used hw or stdscr have been left unmodified.
This commit is contained in:
parent
5fe41fbc3a
commit
8b252e70a9
7 changed files with 8 additions and 8 deletions
|
|
@ -312,7 +312,7 @@ command()
|
|||
int tlev;
|
||||
prbuf[0] = '\0';
|
||||
msg("Which level? ");
|
||||
if(get_str(prbuf,cw) == NORM) {
|
||||
if(get_str(prbuf, msgw) == NORM) {
|
||||
tlev = atoi(prbuf);
|
||||
if(tlev < 1) {
|
||||
mpos = 0;
|
||||
|
|
@ -929,7 +929,7 @@ bool mark;
|
|||
free(guess[obj->o_which]);
|
||||
strcpy(prbuf, elsewise);
|
||||
}
|
||||
if (get_str(prbuf, cw) == NORM) {
|
||||
if (get_str(prbuf, msgw) == NORM) {
|
||||
if (mark) {
|
||||
strncpy(obj->o_mark, prbuf, MARKLEN-1);
|
||||
obj->o_mark[MARKLEN-1] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue