(tend_nxtitem,nxtitem,sarg_type,snxtitem,snxtitem_all,snxtsct,nxtitemp):
change NS_ALL to NS_EVERYTHING in ns_seltype because of a conflict with winsock2.h which is used in the WIN32 build.
This commit is contained in:
parent
9b56e4d5a0
commit
c99a5b4f43
7 changed files with 14 additions and 14 deletions
|
@ -131,7 +131,7 @@ typedef enum {
|
||||||
NS_LIST, /* list of IDs */
|
NS_LIST, /* list of IDs */
|
||||||
NS_DIST, /* circular area */
|
NS_DIST, /* circular area */
|
||||||
NS_AREA, /* rectangular area */
|
NS_AREA, /* rectangular area */
|
||||||
NS_ALL, /* everything */
|
NS_EVERYTHING, /* everything */
|
||||||
NS_XY, /* one sector area */
|
NS_XY, /* one sector area */
|
||||||
NS_GROUP /* group, i.e. fleet, wing, army */
|
NS_GROUP /* group, i.e. fleet, wing, army */
|
||||||
} ns_seltype;
|
} ns_seltype;
|
||||||
|
|
|
@ -232,8 +232,8 @@ tend_nxtitem(struct nstr_item *np, void *ptr)
|
||||||
case NS_LIST:
|
case NS_LIST:
|
||||||
/* The change is to take the player->owner check out here */
|
/* The change is to take the player->owner check out here */
|
||||||
break;
|
break;
|
||||||
case NS_ALL:
|
case NS_EVERYTHING:
|
||||||
/* XXX maybe combine NS_LIST and NS_ALL later */
|
/* XXX maybe combine NS_LIST and NS_EVERYTHING later */
|
||||||
break;
|
break;
|
||||||
case NS_DIST:
|
case NS_DIST:
|
||||||
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
||||||
|
|
|
@ -72,8 +72,8 @@ nxtitem(struct nstr_item *np, void *ptr)
|
||||||
if ((np->flags & EFF_OWNER) && !player->owner)
|
if ((np->flags & EFF_OWNER) && !player->owner)
|
||||||
selected = 0;
|
selected = 0;
|
||||||
break;
|
break;
|
||||||
case NS_ALL:
|
case NS_EVERYTHING:
|
||||||
/* XXX maybe combine NS_LIST and NS_ALL later */
|
/* XXX maybe combine NS_LIST and NS_EVERYTHING later */
|
||||||
break;
|
break;
|
||||||
case NS_DIST:
|
case NS_DIST:
|
||||||
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
* #1, lx:ly,hx:hy --> NS_AREA
|
* #1, lx:ly,hx:hy --> NS_AREA
|
||||||
* @x,y:dist --> NS_DIST
|
* @x,y:dist --> NS_DIST
|
||||||
* %d or %d/%d/%d --> NS_LIST
|
* %d or %d/%d/%d --> NS_LIST
|
||||||
* * --> NS_ALL
|
* * --> NS_EVERYTHING
|
||||||
*
|
*
|
||||||
* or 0 for none of the above.
|
* or 0 for none of the above.
|
||||||
*/
|
*/
|
||||||
|
@ -61,7 +61,7 @@ sarg_type(char *str)
|
||||||
if (c == '@')
|
if (c == '@')
|
||||||
return NS_DIST;
|
return NS_DIST;
|
||||||
if (c == '*')
|
if (c == '*')
|
||||||
return NS_ALL;
|
return NS_EVERYTHING;
|
||||||
if (c == '#' || strchr(str, ',') != 0)
|
if (c == '#' || strchr(str, ',') != 0)
|
||||||
return NS_AREA;
|
return NS_AREA;
|
||||||
if (isdigit(c))
|
if (isdigit(c))
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* setup the nstr structure for sector selection.
|
* setup the nstr structure for sector selection.
|
||||||
* can select on NS_ALL, NS_AREA, NS_DIST, and NS_LIST.
|
* can select on NS_EVERYTHING, NS_AREA, NS_DIST, and NS_LIST.
|
||||||
* iterate thru the "condarg" string looking
|
* iterate thru the "condarg" string looking
|
||||||
* for arguments to compile into the nstr.
|
* for arguments to compile into the nstr.
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +89,7 @@ snxtitem(struct nstr_item *np, int type, s_char *str)
|
||||||
return 0;
|
return 0;
|
||||||
snxtitem_dist(np, type, cx, cy, dist);
|
snxtitem_dist(np, type, cx, cy, dist);
|
||||||
break;
|
break;
|
||||||
case NS_ALL:
|
case NS_EVERYTHING:
|
||||||
snxtitem_all(np, type);
|
snxtitem_all(np, type);
|
||||||
break;
|
break;
|
||||||
case NS_LIST:
|
case NS_LIST:
|
||||||
|
@ -184,7 +184,7 @@ snxtitem_all(struct nstr_item *np, int type)
|
||||||
{
|
{
|
||||||
memset(np, 0, sizeof(*np));
|
memset(np, 0, sizeof(*np));
|
||||||
np->cur = -1;
|
np->cur = -1;
|
||||||
np->sel = NS_ALL;
|
np->sel = NS_EVERYTHING;
|
||||||
np->type = type;
|
np->type = type;
|
||||||
np->index = -1;
|
np->index = -1;
|
||||||
np->read = ef_read;
|
np->read = ef_read;
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* setup the nstr_sect structure for sector selection.
|
* setup the nstr_sect structure for sector selection.
|
||||||
* can select on either NS_ALL, NS_AREA, or NS_RANGE
|
* can select on either NS_EVERYTHING, NS_AREA, or NS_RANGE
|
||||||
* iterate thru the "condarg" string looking
|
* iterate thru the "condarg" string looking
|
||||||
* for arguments to compile into the nstr.
|
* for arguments to compile into the nstr.
|
||||||
*/
|
*/
|
||||||
|
@ -74,7 +74,7 @@ snxtsct(struct nstr_sect *np, s_char *str)
|
||||||
return 0;
|
return 0;
|
||||||
snxtsct_dist(np, cx, cy, dist);
|
snxtsct_dist(np, cx, cy, dist);
|
||||||
break;
|
break;
|
||||||
case NS_ALL:
|
case NS_EVERYTHING:
|
||||||
/* fake "all" by doing a world-sized area query */
|
/* fake "all" by doing a world-sized area query */
|
||||||
snxtsct_area(np, &wr);
|
snxtsct_area(np, &wr);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -74,8 +74,8 @@ nxtitemp(struct nstr_item *np, int owner)
|
||||||
if ((np->flags & EFF_OWNER) && !owner)
|
if ((np->flags & EFF_OWNER) && !owner)
|
||||||
selected = 0;
|
selected = 0;
|
||||||
break;
|
break;
|
||||||
case NS_ALL:
|
case NS_EVERYTHING:
|
||||||
/* XXX maybe combine NS_LIST and NS_ALL later */
|
/* XXX maybe combine NS_LIST and NS_EVERYTHING later */
|
||||||
break;
|
break;
|
||||||
case NS_DIST:
|
case NS_DIST:
|
||||||
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
if (!xyinrange(gp->x, gp->y, &np->range)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue