/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
#include "prototypes.h"
#include "optlist.h"
-void satdisp(struct sctstr *sp, int acc, int showstuff);
-
static s_char **rad;
static s_char *radbuf;
if (noise[crackle])
continue;
if (flags & P_S) {
- if (sect.sct_type > SCT_RURAL) {
+ if (sect.sct_own && sect.sct_own != player->cnum) {
satdisp(§, acc, 0);
++count;
}
pr(" own shp# ship type sector eff\n");
}
}
- while (nxtitem(&ni, (caddr_t)&ship)) {
+ while (nxtitem(&ni, &ship)) {
if (ship.shp_own == 0)
continue;
if ((mchr[(int)ship.shp_type].m_flags & M_SUB) &&
prdate();
pr(" own lnd# unit type sector eff\n");
}
- while (nxtitem(&ni, (caddr_t)&land)) {
+ while (nxtitem(&ni, &land)) {
if (land.lnd_own == 0)
continue;
if (!chance((double)land.lnd_effic / 20.0))
void
satdisp(struct sctstr *sp, int acc, int showstuff)
{
- int vec[I_MAX + 1], first;
+ int first;
struct nstr_item ni;
struct shpstr ship;
struct lndstr land;
- if (getvec(VT_ITEM, vec, (caddr_t)sp, EF_SECTOR) < 0)
- return;
- prxy("%4d,%-4d ", sp->sct_x, sp->sct_y, player->cnum),
- pr("%c %3d %3d %3d %3d %3d %4d %4d %4d %4d %4d %4d %5d\n",
- dchr[sp->sct_type].d_mnem,
- sp->sct_own, roundintby((int)sp->sct_effic, acc / 2),
- roundintby((int)sp->sct_road, acc / 2),
- roundintby((int)sp->sct_rail, acc / 2),
- roundintby((int)sp->sct_defense, acc / 2),
- roundintby(vec[I_CIVIL], acc), roundintby(vec[I_MILIT], acc),
- roundintby(vec[I_SHELL], acc), roundintby(vec[I_GUN], acc),
- roundintby(vec[I_IRON], acc), roundintby(vec[I_PETROL], acc),
- roundintby(vec[I_FOOD], acc));
+ prxy("%4d,%-4d ", sp->sct_x, sp->sct_y, player->cnum);
+ pr("%c %3d %3d %3d %3d %3d %4d %4d %4d %4d %4d %4d %5d\n",
+ dchr[sp->sct_type].d_mnem,
+ sp->sct_own, roundintby((int)sp->sct_effic, acc / 2),
+ roundintby((int)sp->sct_road, acc / 2),
+ roundintby((int)sp->sct_rail, acc / 2),
+ roundintby((int)sp->sct_defense, acc / 2),
+ roundintby(sp->sct_item[I_CIVIL], acc),
+ roundintby(sp->sct_item[I_MILIT], acc),
+ roundintby(sp->sct_item[I_SHELL], acc),
+ roundintby(sp->sct_item[I_GUN], acc),
+ roundintby(sp->sct_item[I_IRON], acc),
+ roundintby(sp->sct_item[I_PETROL], acc),
+ roundintby(sp->sct_item[I_FOOD], acc));
map_set(player->cnum, sp->sct_x, sp->sct_y, dchr[sp->sct_type].d_mnem,
0);
if (!showstuff)
return;
snxtitem_xy(&ni, EF_SHIP, sp->sct_x, sp->sct_y);
first = 1;
- while (nxtitem(&ni, (caddr_t)&ship)) {
+ while (nxtitem(&ni, &ship)) {
if (ship.shp_own == 0)
continue;
if (mchr[(int)ship.shp_type].m_flags & M_SUB)
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
first = 1;
- while (nxtitem(&ni, (caddr_t)&land)) {
+ while (nxtitem(&ni, &land)) {
if (land.lnd_own == 0)
continue;
if (!chance((double)land.lnd_effic / 20.0))