]> granicus.if.org Git - nethack/commitdiff
Rename getpos_coord values to "compass" and "map"
authorPasi Kallinen <paxed@alt.org>
Wed, 13 Jan 2016 10:21:27 +0000 (12:21 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 13 Jan 2016 10:21:27 +0000 (12:21 +0200)
doc/Guidebook.mn
doc/Guidebook.tex
include/flag.h
src/do_name.c
src/options.c

index 44dc33b2953d361e2f94a7633077164a93be986e..bf9bc56bd82bf9c425e236c5a465cdcba7416a1d 100644 (file)
@@ -2129,7 +2129,7 @@ Cannot be set with the `O' command.  Persistent.
 When using the `/' command to look around on the map with
 ``autodescribe'' on, display coordinates after the description.
 The value specified should be the first letter of one of the following:
-absolute, cartesian, or none.  Default is none.
+compass, map, or none.  Default is none.
 .lp "help    "
 If more information is available for an object looked at
 with the `/' command, ask if you want to see it (default on). Turning help
index 88a9d8eb6c5899ea2fac0e72ebad982592fc0b5a..9883677320cbcf15ee1bd0100e30a3344807c82e 100644 (file)
@@ -2563,7 +2563,7 @@ Cannot be set with the `{\tt O}' command.  Persistent.
 When using the `{\tt /}' command to look around on the map with
 ``{\tt autodescribe}'' on, display coordinates after the description.
 The value specified should be the first letter of one of the following:
-absolute, cartesian, or none.  Default is none.
+compass, map, or none.  Default is none.
 %.lp
 \item[\ib{help}]
 If more information is available for an object looked at
index 298825660a1ec3f38988baeb4b5a38a33c073356..ac175880b858fa6effc408babc7f798c448e0934 100644 (file)
@@ -168,9 +168,9 @@ struct sysflag {
  */
 
 /* values for iflags.getpos_coords */
-#define GPCOORDS_NONE      'n'
-#define GPCOORDS_ABSOLUTE  'a'
-#define GPCOORDS_CARTESIAN 'c'
+#define GPCOORDS_NONE    'n'
+#define GPCOORDS_MAP     'm'
+#define GPCOORDS_COMPASS 'c'
 
 struct instance_flags {
     /* stuff that really isn't option or platform related. They are
index bd6d5e1954fd4753fa47765370079fcbc9727ab0..8f0768e3b94ffa0c802e1691e2bed7b2e0bea39b 100644 (file)
@@ -172,10 +172,9 @@ int dx, dy;
         if (dy) {
             if (abs(dy) > 9999)
                 dy = sgn(dy) * 9999;
-            Sprintf(eos(buf), "%d%c", abs(dy), (dy > 0) ? 's' : 'n');
+            Sprintf(eos(buf), "%d%c%s", abs(dy), (dy > 0) ? 's' : 'n',
+                    dx ? "," : "");
         }
-        if (dy && dx)
-            strkitten(buf, ',');
         if (dx) {
             if (abs(dx) > 9999)
                 dx = sgn(dx) * 9999;
@@ -201,12 +200,12 @@ int cx, cy;
         switch (iflags.getpos_coords) {
         default:
             break;
-        case GPCOORDS_CARTESIAN:
+        case GPCOORDS_COMPASS:
             dx = cc.x - u.ux;
             dy = cc.y - u.uy;
             Sprintf(tmpbuf, " (%s)", dxdy_to_dist_descr(dx, dy));
             break;
-        case GPCOORDS_ABSOLUTE:
+        case GPCOORDS_MAP:
             Sprintf(tmpbuf, " (%d,%d)", cc.x, cc.y);
             break;
         }
index 6ba023a3c69985a8e42be9c88b76012e372edc4d..7d6ddc357a3a140705dd74b902c6070d3d7a6133 100644 (file)
@@ -2343,8 +2343,8 @@ boolean tinitial, tfrom_file;
             return;
         } else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
             if (tolower(*op) == GPCOORDS_NONE
-                || tolower(*op) == GPCOORDS_CARTESIAN
-                || tolower(*op) == GPCOORDS_ABSOLUTE) {
+                || tolower(*op) == GPCOORDS_COMPASS
+                || tolower(*op) == GPCOORDS_MAP) {
                 iflags.getpos_coords = tolower(*op);
             } else
                 badoption(opts);
@@ -4034,12 +4034,12 @@ boolean setinitial, setfromfile;
         tmpwin = create_nhwindow(NHW_MENU);
         start_menu(tmpwin);
         any = zeroany;
-        any.a_char = GPCOORDS_ABSOLUTE;
-        add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_ABSOLUTE,
-                 0, ATR_NONE, "absolute", MENU_UNSELECTED);
-        any.a_char = GPCOORDS_CARTESIAN;
-        add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_CARTESIAN,
-                 0, ATR_NONE, "cartesian", MENU_UNSELECTED);
+        any.a_char = GPCOORDS_COMPASS;
+        add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_COMPASS,
+                 0, ATR_NONE, "compass", MENU_UNSELECTED);
+        any.a_char = GPCOORDS_MAP;
+        add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_MAP,
+                 0, ATR_NONE, "map", MENU_UNSELECTED);
         any.a_char = GPCOORDS_NONE;
         add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_NONE,
                  0, ATR_NONE, "none", MENU_UNSELECTED);
@@ -4798,8 +4798,8 @@ char *buf;
         Sprintf(buf, "%s", runmodes[flags.runmode]);
     } else if (!strcmp(optname, "getpos_coord")) {
         Sprintf(buf, "%s",
-                (iflags.getpos_coords == GPCOORDS_ABSOLUTE) ? "absolute"
-                : (iflags.getpos_coords == GPCOORDS_CARTESIAN) ? "cartesian"
+                (iflags.getpos_coords == GPCOORDS_MAP) ? "map"
+                : (iflags.getpos_coords == GPCOORDS_COMPASS) ? "compass"
                 : "none");
     } else if (!strcmp(optname, "scores")) {
         Sprintf(buf, "%d top/%d around%s", flags.end_top, flags.end_around,