X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=reports.c;h=c43732670462480db8fa7eefd7e54104680c0aee;hb=5713361f64d054a03c2c8b49493ac8e601fe94a7;hp=ed1a14420e049d0e167a7657fa9650fde64ba186;hpb=665b7ab04d99076511156ac4da537f0fa144d268;p=super-star-trek.git diff --git a/reports.c b/reports.c index ed1a144..c437326 100644 --- a/reports.c +++ b/reports.c @@ -188,18 +188,17 @@ void rechart(void) void chart(int nn) { int i,j; - char *cp; chew(); if (game.damage[DRADIO] == 0.0) rechart(); if (lastchart < game.state.date && condit == IHDOCKED) { - proutn("Spock- \"I revised the Star Chart from the starbase's records.\"\n\r"); + prout("Spock- \"I revised the Star Chart from the starbase's records.\""); rechart(); } - if (nn == 0) proutn(" STAR CHART FOR THE KNOWN GALAXY\n\r"); + 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)); @@ -208,7 +207,7 @@ void chart(int nn) proutn("%d |", i); for_quadrants(j) { char buf[4]; - if ((game.options & OPTION_SHOWME) && i == quady && j == quadx) + if ((game.options & OPTION_SHOWME) && i == quadx && j == quady) proutn("<"); else proutn(" "); @@ -217,22 +216,18 @@ void chart(int nn) 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 == quady && j == quadx) + 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 @@ -390,7 +383,7 @@ int srscan(int l) } if (rightside) status(jj); - if (i