]> granicus.if.org Git - nethack/commitdiff
a few miscellaneous comments
authorPatR <rankin@nethack.org>
Mon, 4 Jul 2022 00:51:47 +0000 (17:51 -0700)
committerPatR <rankin@nethack.org>
Mon, 4 Jul 2022 00:51:47 +0000 (17:51 -0700)
src/cmd.c
src/do_name.c
win/curses/cursmain.c

index 025595e01bdb31f48855a2644fad5e964fa61667..015afd83a521e60b8aa09e5e8a092f328172926f 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -2568,7 +2568,6 @@ struct ext_func_tab extcmdlist[] = {
     { '\177', "terrain",
               "view map without monsters or objects obstructing it",
               doterrain, IFBURIED | AUTOCOMPLETE, NULL },
-    /* therecmdmenu does not work as intended, should probably be removed */
     { '\0',   "therecmdmenu",
               "menu of commands you can do from here to adjacent spot",
               dotherecmdmenu, AUTOCOMPLETE | GENERALCMD, NULL },
index eaf58f23a1d5b0a9acb200009712cd4a3156bcf2..c85d53b37dccef93374825c21315d698dd6d7d46 100644 (file)
@@ -199,7 +199,8 @@ getpos_help(boolean force, const char *goal)
         }
  skip_non_mons:
         /* disgusting hack; the alternate selection characters work for any
-           getpos call, but only matter for dowhatis (and doquickwhatis) */
+           getpos call, but only matter for dowhatis (and doquickwhatis,
+           also for dotherecmdmenu's simulated mouse) */
         doing_what_is = (goal == what_is_an_unknown_object);
         if (doing_what_is) {
             Sprintf(kbuf, "'%s' or '%s' or '%s' or '%s'",
@@ -663,10 +664,11 @@ truncate_to_map(int *cx, int *cy, schar dx, schar dy)
     *cy += dy;
 }
 
+/* have the player use movement keystrokes to position the cursor at a
+   particular map location, then use one of [.,:;] to pick the spot */
 int
 getpos(coord *ccp, boolean force, const char *goal)
 {
-    const char *cp;
     static struct {
         int nhkf, ret;
     } const pick_chars_def[] = {
@@ -690,6 +692,7 @@ getpos(coord *ccp, boolean force, const char *goal)
         NHKF_GETPOS_VALID_PREV
     };
     struct _cmd_queue cq, *cmdq;
+    const char *cp;
     char pick_chars[6];
     char mMoOdDxX[13];
     int result = 0;
index be8074febb722591a9423fc644645827425edc1e..4bf0fe13c87055a35bb10a2602dccf6a1614ba40 100644 (file)
@@ -751,26 +751,29 @@ print_glyph(window, x, y, glyphinfo, bkglyphinfo)
                    a 1-1 map between glyphs and distinct things on the map).
                    bkglyphinfo is to render the background behind the glyph.
                    It's not used here.
-               -- bkglyphinfo contains a background glyph for potential use
-                   by some graphical or tiled environments to allow the depiction
-                   to fall against a background consistent with the grid 
-                   around x,y. If bkglyphinfo->glyph is NO_GLYPH, then the
-                   parameter should be ignored (do nothing with it).
+                -- bkglyphinfo contains a background glyph for potential use
+                   by some graphical or tiled environments to allow the
+                   depiction to fall against a background consistent with
+                   the grid around x,y. If bkglyphinfo->glyph is NO_GLYPH,
+                   then the parameter should be ignored (do nothing with it).
                 -- glyph_info struct fields:
-                    int glyph;            the display entity
-                    int color;            color for window ports not using a tile
-                    int ttychar;          the character mapping for the original tty
-                                          interface. Most or all window ports wanted
-                                          and used this for various things so it is
-                                          provided in 3.7+
+                    int glyph;    the display entity
+                    int color;    color for window ports not using a tile
+                    int ttychar;  the character mapping for the original tty
+                                  interface. Most or all window ports wanted
+                                  and used this for various things so it is
+                                  provided in 3.7+
                     short int symidx;     offset into syms array
                     unsigned glyphflags;  more detail about the entity
 
 */
 
 void
-curses_print_glyph(winid wid, coordxy x, coordxy y,
-                   const glyph_info *glyphinfo, const glyph_info *bkglyphinfo UNUSED)
+curses_print_glyph(
+    winid wid,
+    coordxy x, coordxy y,
+    const glyph_info *glyphinfo,
+    const glyph_info *bkglyphinfo UNUSED)
 {
     int glyph;
     int ch;
@@ -807,7 +810,7 @@ curses_print_glyph(winid wid, coordxy x, coordxy y,
            render lava in inverse video so that they look different */
         if ((special & (MG_BW_LAVA | MG_BW_ICE)) != 0 && iflags.use_inverse) {
             /* reset_glyphmap() only sets MG_BW_foo if color is off */
-            attr = A_REVERSE; 
+            attr = A_REVERSE;
         }
         /* highlight female monsters (wizard mode option) */
         if ((special & MG_FEMALE) && iflags.wizmgender) {