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