cockatrice meat has a distinct flavor to some
wish request for "<something> armor" will match item named "<something> mail"
Fire Brand and Frost Brand have a chance to avoid taking rust damage
+support ^R (and ^L in numpad mode) to request display repaint during direction
+ choosing and location choosing prompting modes
Platform- and/or Interface-Specific New Features
/* ### cmd.c ### */
+E boolean FDECL(redraw_cmd, (CHAR_P));
#ifdef USE_TRAMPOLI
E int NDECL(doextcmd);
E int NDECL(domonability);
E int NDECL(doprev_message);
E int NDECL(timed_occupation);
-E int NDECL(wiz_attributes);
+E int NDECL(doattributes);
E int NDECL(enter_explore_mode);
# ifdef WIZARD
E int NDECL(wiz_detect);
return (n != -1);
}
+/* ^X command */
STATIC_PTR int
doattributes()
{
}
}
+/* decide whether a character (user input keystroke) requests screen repaint */
+boolean
+redraw_cmd(c)
+char c;
+{
+ return (c == C('r') || (iflags.num_pad && c == C('l')));
+}
static const char template[] = "%-18s %4ld %6ld";
static const char count_str[] = " count bytes";
dirsym = yn_function((s && *s != '^') ? s : "In what direction?",
(char *)0, '\0');
- if (dirsym == C('r')) { /* ^R */
+ if (redraw_cmd(dirsym)) { /* ^R */
docrt(); /* redraw */
goto retry;
}
return bufs[bufidx];
}
-/* same definition as in cmd.c */
-#ifndef C
-#define C(a) ((a) & 0x1f) /* ^a */
-#endif
-
/* the response for '?' help request in getpos() */
STATIC_OVL void
getpos_help(force, goal)
const char *sdp;
if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */
+ if (!goal) goal = "desired location";
if (flags.verbose) {
pline("(For instructions type a ?)");
msg_given = TRUE;
#ifdef CLIPPING
cliparound(cx, cy);
#endif
- curs(WIN_MAP, cx,cy);
flush_screen(0);
+ curs(WIN_MAP, cx, cy);
#ifdef MAC
lock_mouse_cursor(TRUE);
#endif
goto nxtc;
}
- if(c == '?'){
- getpos_help(force, goal);
- } else if (c == C('r')) { /* ^R */
- docrt(); /* redraw */
+ if (c == '?' || redraw_cmd(c)) {
+ if (c == '?')
+ getpos_help(force, goal);
+ else /* ^R */
+ docrt(); /* redraw */
+ /* update message window to reflect that we're still targetting */
+ pline("Move cursor to %s:", goal);
+ msg_given = TRUE;
} else {
if (!index(quitchars, c)) {
char matching[MAXPCHARS];
#ifdef CLIPPING
cliparound(cx, cy);
#endif
- curs(WIN_MAP,cx,cy);
flush_screen(0);
+ curs(WIN_MAP, cx, cy);
}
#ifdef MAC
lock_mouse_cursor(FALSE);