and color for spellbooks with those descriptions from paper to leather;
eating those books now breaks vegetarian conduct
fix monsters not wielding digging implements
+wizard mode ^I^I didn't make temporary identifications become persistent if
+ the build configuration makes plain 'char' unsigned
+wizard mode #wizidentify didn't disclose extra information for unID'd items if
+ key bindings took away ^I and didn't bind #wizidentify to another key
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
#include "lev.h"
#include "func_tab.h"
+/* Macros for meta and ctrl modifiers:
+ * M and C return the meta/ctrl code for the given character;
+ * e.g., (C('c') is ctrl-c
+ */
+#ifndef M
+#ifndef NHSTDC
+#define M(c) (0x80 | (c))
+#else
+#define M(c) ((c) - 128)
+#endif /* NHSTDC */
+#endif
+
+#ifndef C
+#define C(c) (0x1f & (c))
+#endif
+
#ifdef ALTMETA
STATIC_VAR boolean alt_esc = FALSE;
#endif
{
if (wizard) {
iflags.override_ID = (int) cmd_from_func(wiz_identify);
- if (display_inventory((char *) 0, TRUE) == -1)
+ /* command remapping might leave #wizidentify as the only way
+ to invoke us, in which case cmd_from_func() will yield NUL;
+ it won't matter to display_inventory()/display_pickinv()
+ if ^I invokes some other command--what matters is that it
+ is never an inventory letter */
+ if (!iflags.override_ID)
+ iflags.override_ID = C('I');
+ /* C('I') == ^I == default keystroke for wiz_identify;
+ it doesn't matter whether the command has been remapped */
+ if (display_inventory((char *) 0, TRUE) == C('I'))
identify_pack(0, FALSE);
+ /* [TODO? if player picks a specific inventory item, ID it] */
iflags.override_ID = 0;
} else
pline("Unavailable command '%s'.",
en_win = WIN_ERR;
}
-/* Macros for meta and ctrl modifiers:
- * M and C return the meta/ctrl code for the given character;
- * e.g., (C('c') is ctrl-c
- */
-#ifndef M
-#ifndef NHSTDC
-#define M(c) (0x80 | (c))
-#else
-#define M(c) ((c) - 128)
-#endif /* NHSTDC */
-#endif
-
-#ifndef C
-#define C(c) (0x1f & (c))
-#endif
-
/* ordered by command name */
struct ext_func_tab extcmdlist[] = {
{ '#', "#", "perform an extended command",
dump_plines();
putstr(0, 0, "");
putstr(0, 0, "Inventory:");
- display_inventory((char *) 0, TRUE);
+ (void) display_inventory((char *) 0, TRUE);
container_contents(invent, TRUE, TRUE, FALSE);
enlightenment((BASICENLIGHTENMENT | MAGICENLIGHTENMENT),
(how >= PANICKED) ? ENL_GAMEOVERALIVE : ENL_GAMEOVERDEAD);
#include "hack.h"
+#ifndef C /* same as cmd.c */
+#define C(c) (0x1f & (c))
+#endif
+
#define NOINVSYM '#'
#define CONTAINED_SYM '>' /* designator for inside a container */
#define HANDS_SYM '-'
if (wizard && iflags.override_ID) {
char prompt[QBUFSZ];
- any.a_char = -1;
+ /* C('I') == ^I == default keystroke for wiz_identify;
+ it is guaranteed not to be in use as an inventory letter
+ (wiz_identify might be remapped to an ordinary letter,
+ making iflags.override_ID ambiguous as a return value) */
+ any.a_char = C('I');
/* wiz_identify stuffed the wiz_identify command character (^I)
- into iflags.override_ID for our use as an accelerator */
+ into iflags.override_ID for our use as an accelerator;
+ it could be ambiguous as a selector but the only time it
+ is wanted is in case where no item is being selected */
Sprintf(prompt, "Debug Identify (%s to permanently identify)",
visctrl(iflags.override_ID));
add_menu(win, NO_GLYPH, &any, '_', iflags.override_ID, ATR_NONE,