unofficial version 0.7.2: mainly sync/reset fixes
[netris.git] / curses.c
index 030ed25ceb1d7958e1033782ddc0b9fc54cb8181..8d500d9528da4dd41fb945cd12062d09d1eea113 100644 (file)
--- a/curses.c
+++ b/curses.c
@@ -242,7 +242,12 @@ ExtFunc void DrawField(int scr)
                } //add robot indicator
        } //display playername/host
 
-       // draw blocks (which is usually just clear field)
+       {
+               int x, y;
+               for (y = 0; y <= Players[scr].boardVisible; y++)
+                       for (x = 0; x <= Players[scr].boardWidth; x++)
+                               PlotBlock(scr, y, x, GetBlock(scr, y, x));
+       } //draw field
 
        ShowPause(scr);
 } //DrawField
@@ -342,19 +347,6 @@ ExtFunc void PlotBlock(int scr, int y, int x, BlockType type)
          PlotBlock1(scr, boardYPos[scr] - y, boardXPos[scr] + 2 * x, type);
 } //PlotBlock
 
-ExtFunc void PlotShadowBlock1(int scr, int y, int x, BlockType type)
-{
-       move(y, x);
-       if (type == BT_none) addstr("  ");
-       else addstr("::");
-} //PlotShadowBlock1
-ExtFunc void PlotShadowBlock(int scr, int y, int x, BlockType type)
-{
-       if (y >= 0 && y < Players[scr].boardVisible &&
-               x >= 0 && x < Players[scr].boardWidth)
-         PlotShadowBlock1(scr, boardYPos[scr] - y, boardXPos[scr] + 2 * x, type);
-} //PlotShadowBlock
-
 ExtFunc void PlotBlockS1(int scr, int y, int x, BlockType type)
 { //DOESN"T WORK YET...
        move(y, x);
@@ -402,7 +394,12 @@ ExtFunc void ShowScore(int scr, struct _Score score)
                                "yield    %3d%%", 100 * score.adds / score.lines);
                        mvprintw(10, statusXPos, "apm %9.1f", score.adds * 60 / timer);
                }
-       }
+       } //display [ap]pm
+       else {
+               int i;
+               for (i = 7; i <= 10; i++)
+                       mvaddstr(i, statusXPos, "             ");
+       } //too early to display stats, remove old..
 } //ShowScore
 
 ExtFunc void FieldMessage(int playa, char *message)