(nxtitemp): Remove last parameter. Non-zero argument doesn't make
sense and is never passed. Callers changed.
This commit is contained in:
parent
e27724fbc9
commit
9b28594b5b
4 changed files with 10 additions and 16 deletions
|
@ -771,7 +771,7 @@ extern int load_it(struct shpstr *, struct sctstr *,
|
|||
extern void unload_it(struct shpstr *);
|
||||
extern void auto_fuel_ship(struct shpstr *);
|
||||
/* nxtitemp.c */
|
||||
extern s_char *nxtitemp(struct nstr_item *, int);
|
||||
extern s_char *nxtitemp(struct nstr_item *);
|
||||
/* nxtsctp.c */
|
||||
extern struct sctstr *nxtsctp(register struct nstr_sect *);
|
||||
/* plague.c */
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "common.h"
|
||||
|
||||
s_char *
|
||||
nxtitemp(struct nstr_item *np, int owner)
|
||||
nxtitemp(struct nstr_item *np)
|
||||
{
|
||||
struct genitem *gp;
|
||||
int selected;
|
||||
|
@ -66,13 +66,7 @@ nxtitemp(struct nstr_item *np, int owner)
|
|||
|
||||
selected = 1;
|
||||
switch (np->sel) {
|
||||
/*
|
||||
* This one won't work unless you're running in emp_player
|
||||
*
|
||||
*/
|
||||
case NS_LIST:
|
||||
if ((np->flags & EFF_OWNER) && !owner)
|
||||
selected = 0;
|
||||
break;
|
||||
case NS_ALL:
|
||||
/* XXX maybe combine NS_LIST and NS_ALL later */
|
||||
|
|
|
@ -168,7 +168,7 @@ guerrilla(struct sctstr *sp)
|
|||
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
|
||||
|
@ -463,7 +463,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
* Try not to kill any unit.
|
||||
*/
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
nunits++;
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
nunits++;
|
||||
|
@ -476,7 +476,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
|
||||
/* kill some security troops */
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
|
||||
continue;
|
||||
|
||||
|
@ -507,7 +507,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
|
||||
/* kill some normal troops */
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
continue;
|
||||
|
||||
|
@ -535,7 +535,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
/* Hmm.. still some left.. kill off units now */
|
||||
/* kill some normal troops */
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
continue;
|
||||
|
||||
|
@ -553,7 +553,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
/* Hmm.. still some left.. kill off units now */
|
||||
/* kill some security troops */
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
|
||||
while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
|
||||
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -393,7 +393,7 @@ shiprepair(struct shpstr *ship, struct natstr *np,
|
|||
|
||||
np->nat_money -= mult * mp->m_cost * build / 100.0;
|
||||
if (!player->simulation)
|
||||
ship->shp_effic += (s_char)build;
|
||||
ship->shp_effic += build;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -431,7 +431,7 @@ feed_ship(struct shpstr *sp, int etus, int *needed, int doit)
|
|||
/* doit - only steal food from land units during the update */
|
||||
if (ifood_eaten > sp->shp_item[I_FOOD] && sp->shp_nland > 0 && doit) {
|
||||
snxtitem_all(&ni, EF_LAND);
|
||||
while ((lp = (struct lndstr *)nxtitemp(&ni, 0)) &&
|
||||
while ((lp = (struct lndstr *)nxtitemp(&ni)) &&
|
||||
ifood_eaten > sp->shp_item[I_FOOD]) {
|
||||
if (lp->lnd_ship != sp->shp_uid)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue