#include <stdlib.h>
#include <string.h>
-void attakreport(int curt)
+void attakreport(bool curt)
+/* report status of bases under attack */
{
if (!curt) {
if (is_scheduled(FCDBAS)) {
}
-void report(void)
+void report(void)
+/* report on general game status */
{
char *s1,*s2,*s3;
if (!damaged(DRADIO) || game.condit == IHDOCKED || game.iseenit) {
/* Don't report this if not seen and
either the radio is dead or not at base! */
- attakreport(0);
+ attakreport(false);
game.iseenit = 1;
}
if (game.casual) prout(_("%d casualt%s suffered so far."),
}
void lrscan(void)
+/* long-range sensor scan */
{
int x, y;
chew();
}
void dreprt(void)
+/* damage report */
{
bool jdam = false;
int i;
}
}
-void chart(int nn)
+void chart(bool title)
+/* display the star chart */
{
int i,j;
chew();
rechart();
}
- if (nn == 0) prout(_(" STAR CHART FOR THE KNOWN GALAXY"));
+ if (!title) prout(_(" STAR CHART FOR THE KNOWN GALAXY"));
if (game.state.date > game.lastchart)
prout(_("(Last surveillance update %d stardates ago)."),
(int)(game.state.date-game.lastchart));
}
static void sectscan(int goodScan, int i, int j)
+/* light up an individual dot in a sector */
{
if (goodScan || (abs(i-game.sector.x)<= 1 && abs(j-game.sector.y) <= 1)){
if ((game.quad[i][j]==IHMATER0)||(game.quad[i][j]==IHMATER1)||(game.quad[i][j]==IHMATER2)||(game.quad[i][j]==IHE)||(game.quad[i][j]==IHF)){
proutn("- ");
}
-static void status(int req)
+static void status(int req)
+/* print status report lines */
{
char *cp = NULL;
int t, dam = 0;
break;
case 10:
if (game.options & OPTION_WORLDS) {
- int here = game.state.galaxy[game.quadrant.x][game.quadrant.y].planet;
- if (here != NOPLANET && game.state.plnets[here].inhabited != UNINHABITED)
- proutn(_("Major system %s"), systemname(here));
+ int plnet = game.state.galaxy[game.quadrant.x][game.quadrant.y].planet;
+ if (plnet != NOPLANET && game.state.plnets[plnet].inhabited != UNINHABITED)
+ proutn(_("Major system %s"), systemname(plnet));
else
proutn(_("Sector is uninhabited"));
}
break;
case 11:
- attakreport(1);
+ attakreport(true);
break;
}
}
-int srscan(int l)
+int srscan(int l)
+/* short-range scan */
{
/* the "sy" request is undocumented */
static char requests[][3] =
{"","da","co","po","ls","wa","en","to","sh","kl","sy", "ti"};
int i, j, jj, req=0;
- int goodScan=true, leftside=true, rightside=true, nn=false;
+ int goodScan=true, leftside=true, rightside=true, title=false;
switch (l) {
case SCAN_FULL: // SRSCAN
if (damaged(DSRSENS)) {
game.state.galaxy[game.quadrant.x][game.quadrant.y].charted = true;
}
scan();
- if (isit("chart")) nn = true;
+ if (isit("chart")) title = true;
if (isit("no")) rightside = false;
chew();
prout(" 1 2 3 4 5 6 7 8 9 10");
if (req!=0) return(goodScan);
}
prout("");
- if (nn) chart(1);
+ if (title) chart(true);
return(goodScan);
}
void eta(void)
+/* use computer to get estimated time of arrival for a warp jump */
{
int ix1, ix2, iy1, iy2;
bool wfl, prompt = false;