Fix the bracket display.
[super-star-trek.git] / reports.c
index 29bcba5d061c865e26a101e210a4bb473b3b3eea..39f6930ba35e880ee550775b3f0910e42f14fc30 100644 (file)
--- a/reports.c
+++ b/reports.c
@@ -175,7 +175,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) {
@@ -190,29 +190,28 @@ void chart(int nn)
     int i,j;
     char *cp;
     chew();
-    if (stdamtim != FOREVER && stdamtim != game.state.date && condit == IHDOCKED) {
+
+    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");
-    }
-    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)
        rechart();
+    }
 
+    if (nn == 0) proutn("       STAR CHART FOR THE KNOWN GALAXY\n\r");
+    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)
@@ -225,6 +224,10 @@ void chart(int nn)
                if (*cp == '0')
                    *cp = '.';
            proutn(buf);
+           if ((game.options & OPTION_SHOWME) && i == quadx && j == quady)
+               proutn(">");
+           else
+               proutn(" ");
        }
        proutn("  |");
        if (i<GALSIZE) proutn("\n\r");
@@ -297,7 +300,7 @@ static void status(int req)
        break;
     case 6:
        proutn("Energy        %.2f", energy);
-       if (icrystl)    /* ESR */
+       if (icrystl && (game.options & OPTION_SHOWME))  /* ESR */
            proutn(" (have crystals)");
        break;
     case 7: