X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=reports.c;h=f0dc134eb88d29d975e7cb753952030d2882ef97;hp=29bcba5d061c865e26a101e210a4bb473b3b3eea;hb=ca9de456d928ab8f7ef95f2fa03aeab2b3161d97;hpb=1e2622cf770b7183b813e0dc0095f085dda4419f diff --git a/reports.c b/reports.c index 29bcba5..f0dc134 100644 --- a/reports.c +++ b/reports.c @@ -54,10 +54,9 @@ void report(void) if (skill>SKILL_GOOD && thawed && !alldone) prout("No plaque is allowed."); if (tourn) prout("This is tournament game %d.", tourn); prout("Your secret password is \"%s\"",game.passwd); - proutn("%d of %d Klingons have been killed", - game.state.killk+game.state.killc+game.state.nsckill, inkling); - if (game.state.killc) prout(", including %d Commander%s.", game.state.killc, game.state.killc==1?"":"s"); - else if (game.state.killk+game.state.nsckill > 0) prout(", but no Commanders."); + proutn("%d of %d Klingons have been killed", KLINGKILLED, INKLINGTOT); + if (NKILLC) prout(", including %d Commander%s.", NKILLC, NKILLC==1?"":"s"); + else if (NKILLK + NKILLSC > 0) prout(", but no Commanders."); else prout("."); if (skill > SKILL_FAIR) prout("The Super Commander has %sbeen destroyed.", game.state.nscrem?"not ":""); @@ -124,7 +123,7 @@ void lrscan(void) prout("LONG-RANGE SENSORS DAMAGED."); return; } - proutn("Starbase's long-range scan"); + prout("Starbase's long-range scan"); } else { prout("Long-range scan"); @@ -175,7 +174,7 @@ void rechart(void) /* update the chart in the Enterprise's computer from galaxy data */ { int i, j; - stdamtim = game.state.date; + lastchart = game.state.date; for_quadrants(i) for_quadrants(j) if (game.state.galaxy[i][j].charted) { @@ -188,48 +187,46 @@ void rechart(void) void chart(int nn) { int i,j; - char *cp; chew(); - if (stdamtim != FOREVER && stdamtim != game.state.date && condit == IHDOCKED) { - proutn("Spock- \"I revised the Star Chart from the starbase's records.\"\n\r"); - } - if (nn == 0) proutn(" STAR CHART FOR THE KNOWN GALAXY\n\r"); - if (stdamtim != FOREVER) { - if (condit == IHDOCKED) { - /* We are docked, so restore chart from base information */ - rechart(); - } - else if (game.state.date-stdamtim) { - prout("(Last surveillance update %d stardates ago).", - (int)(game.state.date-stdamtim)); - } - } - else if (game.damage[DRADIO] == 0.0) + + if (game.damage[DRADIO] == 0.0) rechart(); + if (lastchart < game.state.date && condit == IHDOCKED) { + prout("Spock- \"I revised the Star Chart from the starbase's records.\""); + rechart(); + } + + if (nn == 0) prout(" STAR CHART FOR THE KNOWN GALAXY"); + if (game.state.date > lastchart) + prout("(Last surveillance update %d stardates ago).", + (int)(game.state.date-lastchart)); prout(" 1 2 3 4 5 6 7 8"); for_quadrants(i) { proutn("%d |", i); for_quadrants(j) { char buf[4]; - proutn(" "); + if ((game.options & OPTION_SHOWME) && i == quadx && j == quady) + proutn("<"); + else + proutn(" "); if (game.state.galaxy[i][j].supernova) strcpy(buf, "***"); else if (!game.state.galaxy[i][j].charted && game.state.galaxy[i][j].starbase) strcpy(buf, ".1."); else if (game.state.galaxy[i][j].charted) - sprintf(buf, "%d%d%d", game.state.chart[i][j].klingons, game.state.chart[i][j].starbase, game.state.chart[i][j].stars); + sprintf(buf, "%3d", game.state.chart[i][j].klingons*100 + game.state.chart[i][j].starbase * 10 + game.state.chart[i][j].stars); else strcpy(buf, "..."); - for (cp = buf; cp < buf + sizeof(buf); cp++) - if (*cp == '0') - *cp = '.'; proutn(buf); + if ((game.options & OPTION_SHOWME) && i == quadx && j == quady) + proutn(">"); + else + proutn(" "); } proutn(" |"); - if (i sizeof(requests)/sizeof(requests[0])) { - prout("UNRECOGNIZED REQUEST. Legal requests are:\n" - " date, condition, position, lsupport, warpfactor,\n" - " energy, torpedoes, shields, klingons, time, bases."); + prout("UNRECOGNIZED REQUEST. Legal requests are:"); + prout(" date, condition, position, lsupport, warpfactor,"); + prout(" energy, torpedoes, shields, klingons, time, bases."); return FALSE; } // no break @@ -387,7 +382,7 @@ int srscan(int l) } if (rightside) status(jj); - if (i