comparison arogue5/misc.c @ 76:ad2cb9a07aaa

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.
author John "Elwin" Edwards <elwin@sdf.org>
date Sat, 08 Sep 2012 22:05:05 -0700
parents c49f7927b0fa
children f2951c4e28d9
comparison
equal deleted inserted replaced
75:19903deed392 76:ad2cb9a07aaa
725 !m_know[which] && 725 !m_know[which] &&
726 askme && 726 askme &&
727 (obj->o_flags & ISKNOW) == 0 && 727 (obj->o_flags & ISKNOW) == 0 &&
728 m_guess[which] == NULL) { 728 m_guess[which] == NULL) {
729 msg(terse ? "Call it: " : "What do you want to call it? "); 729 msg(terse ? "Call it: " : "What do you want to call it? ");
730 if (get_str(buf, cw) == NORM) { 730 if (get_str(buf, msgw) == NORM) {
731 m_guess[which] = new((unsigned int) strlen(buf) + 1); 731 m_guess[which] = new((unsigned int) strlen(buf) + 1);
732 strcpy(m_guess[which], buf); 732 strcpy(m_guess[which], buf);
733 } 733 }
734 } 734 }
735 if (item != NULL && which == MM_SKILLS) 735 if (item != NULL && which == MM_SKILLS)