X-Git-Url: http://git.shiar.net/netris.git/blobdiff_plain/4f561019fc85c2817e3a72341397d1df32bc0868..45dc9d995860486f1758dcf79fd2d8cd8dfb210a:/curses.c diff --git a/curses.c b/curses.c index 030ed25..8d500d9 100644 --- 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)