]> git.pond.sub.org Git - empserver/commitdiff
Remove unused num_shipsatxy()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 11 May 2008 11:45:30 +0000 (13:45 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 11 May 2008 11:45:30 +0000 (13:45 +0200)
include/prototypes.h
src/lib/subs/list.c

index 9c112a8ffeb771c41495a688df092ed53f0e25bc..67aed982281640d73cf4ae244ba3d3ecec5ce02d 100644 (file)
@@ -471,7 +471,6 @@ extern int unitsatxy(coord, coord, int, int);
 extern int planesatxy(coord, coord, int, int);
 extern int asw_shipsatxy(coord, coord, int, int, struct plnstr *,
                         struct shiplist **);
 extern int planesatxy(coord, coord, int, int);
 extern int asw_shipsatxy(coord, coord, int, int, struct plnstr *,
                         struct shiplist **);
-extern int num_shipsatxy(coord, coord, int, int);
 extern int has_units(coord, coord, natid, struct lndstr *);
 extern int adj_units(coord, coord, natid);
 extern int islist(char *);
 extern int has_units(coord, coord, natid, struct lndstr *);
 extern int adj_units(coord, coord, natid);
 extern int islist(char *);
index 6c206e69861c976d45280afd4cbc2321f38d0eaa..567381e8bda29002c62ec885dcc87c535d31d619 100644 (file)
@@ -244,33 +244,6 @@ asw_shipsatxy(coord x, coord y, int wantflags, int nowantflags,
     return ships;
 }
 
     return ships;
 }
 
-int
-num_shipsatxy(coord x, coord y, int wantflags, int nowantflags)
-{
-    int ships;
-    struct nstr_item ni;
-    struct mchrstr *mp;
-    struct shpstr ship;
-
-    ships = 0;
-    snxtitem_xy(&ni, EF_SHIP, x, y);
-    while (nxtitem(&ni, &ship)) {
-       if (ship.shp_effic < SHIP_MINEFF || ship.shp_own == 0)
-           continue;
-       mp = &mchr[(int)ship.shp_type];
-       if (wantflags) {
-           if ((mp->m_flags & wantflags) == 0)
-               continue;
-       }
-       if (nowantflags) {
-           if (mp->m_flags & nowantflags)
-               continue;
-       }
-       ships++;
-    }
-    return ships;
-}
-
 int
 adj_units(coord x, coord y, natid own)
 {
 int
 adj_units(coord x, coord y, natid own)
 {