1 Author: Piotr Krukowiecki <piotrwww@krukowiecki.net> vim:ft=diff:
2 Description: patch to display line counter, BTS #304224
5 ===================================================================
8 @@ -258,6 +258,12 @@ ExtFunc void PlotUnderline(int scr, int
10 ExtFunc void ShowDisplayInfo(void)
12 + if (game == GT_classicTwo) {
13 + move(statusYPos - 5, statusXPos);
14 + printw("Enemy lines: %3d/%4d", enemyLinesCleared, enemyTotalLinesCleared);
16 + move(statusYPos - 4, statusXPos);
17 + printw("My lines: %3d/%4d", myLinesCleared, myTotalLinesCleared);
18 move(statusYPos - 3, statusXPos);
19 printw("Won: %3d", won);
20 move(statusYPos - 2, statusXPos);
21 @@ -282,7 +288,7 @@ ExtFunc void ShowDisplayInfo(void)
22 printw("Speed: %dms", speed / 1000);
25 - move(statusYPos - 6, statusXPos);
26 + move(statusYPos - 7, statusXPos);
28 addstr("Controlled by a fair robot");
30 @@ -290,7 +296,7 @@ ExtFunc void ShowDisplayInfo(void)
33 if (opponentFlags & SCF_usingRobot) {
34 - move(statusYPos - 5, statusXPos);
35 + move(statusYPos - 6, statusXPos);
36 if (opponentFlags & SCF_fairRobot)
37 addstr("The opponent is a fair robot");
40 ===================================================================
43 @@ -103,6 +103,7 @@ ExtFunc void OneGame(int scr, int scr2)
47 + myLinesCleared = enemyLinesCleared = 0;
48 speed = stepDownInterval;
51 @@ -297,7 +298,15 @@ ExtFunc void OneGame(int scr, int scr2)
55 - ClearFullLines(scr2);
57 + int cleared = ClearFullLines(scr2);
59 + enemyLinesCleared += cleared;
60 + enemyTotalLinesCleared += cleared;
68 @@ -343,7 +352,12 @@ ExtFunc void OneGame(int scr, int scr2)
72 - linesCleared = ClearFullLines(scr);
73 + myLinesCleared += linesCleared = ClearFullLines(scr);
74 + myTotalLinesCleared += linesCleared;
79 if (linesCleared > 0 && spied)
80 SendPacket(NP_clear, 0, NULL);
81 if (game == GT_classicTwo && linesCleared > 1) {
83 ===================================================================
86 @@ -182,6 +182,11 @@ EXT char scratch[1024];
87 extern ShapeOption stdOptions[];
88 extern char *version_string;
90 +EXT int myLinesCleared;
91 +EXT int enemyLinesCleared;
92 +EXT int myTotalLinesCleared;
93 +EXT int enemyTotalLinesCleared;