]> git.deb.at Git - pkg/netris.git/commitdiff
Imported Debian patch 0.52-6 debian/0.52-6
authorGerfried Fuchs <alfie@debian.org>
Fri, 8 Sep 2006 19:08:42 +0000 (14:08 -0500)
committerGerfried Fuchs <rhonda@debian.at>
Wed, 14 Jul 2010 19:42:42 +0000 (21:42 +0200)
curses.c
debian/changelog
debian/control
debian/copyright
game.c
netris.h

index cdbc9f53544d3a0870f6b83782a88362f1803fe2..dc708bd4b4ce5f03d1c6dc0cb8a389c78e348cc5 100644 (file)
--- a/curses.c
+++ b/curses.c
@@ -20,6 +20,7 @@
  */
 
 #include "netris.h"
+#include <time.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <term.h>
@@ -264,6 +265,12 @@ ExtFunc void PlotUnderline(int scr, int x, int flag)
 
 ExtFunc void ShowDisplayInfo(void)
 {
+       if (game == GT_classicTwo) {
+               move(statusYPos - 5, statusXPos);
+               printw("Enemy lines: %3d/%4d", enemyLinesCleared, enemyTotalLinesCleared);
+       }
+       move(statusYPos - 4, statusXPos);
+       printw("My lines:    %3d/%4d", myLinesCleared, myTotalLinesCleared);
        move(statusYPos - 3, statusXPos);
        printw("Won:  %3d", won);
        move(statusYPos - 2, statusXPos);
@@ -288,7 +295,7 @@ ExtFunc void ShowDisplayInfo(void)
        printw("Speed: %dms", speed / 1000);
        clrtoeol();
        if (robotEnable) {
-               move(statusYPos - 6, statusXPos);
+               move(statusYPos - 7, statusXPos);
                if (fairRobot)
                        addstr("Controlled by a fair robot");
                else
@@ -296,7 +303,7 @@ ExtFunc void ShowDisplayInfo(void)
                clrtoeol();
        }
        if (opponentFlags & SCF_usingRobot) {
-               move(statusYPos - 5, statusXPos);
+               move(statusYPos - 6, statusXPos);
                if (opponentFlags & SCF_fairRobot)
                        addstr("The opponent is a fair robot");
                else
index e8e5b838fb16ab1e9b36c16c53683466b3b2c164..a1e40ec02f1168978b13b180cb95e85ea15b4922 100644 (file)
@@ -1,3 +1,13 @@
+netris (0.52-6) unstable; urgency=low
+
+  * #include <time.h> in curses.c (closes: #345305)
+  * Add patch to display line count, contributed by Piotr Krukowiecki
+    (closes: #304224)
+  * Bumped Standards-Version to 3.7.2, no changes needed.
+  * Updated FSF address in copyright file.
+
+ -- Gerfried Fuchs <alfie@debian.org>  Fri, 08 Sep 2006 14:08:42 -0500
+
 netris (0.52-5) unstable; urgency=low
 
   * Erm, add small fix for 64bit machines from #325926 which was meant to be
index 0f451bec845f3625ef7e5907cecc5e2687b78464..d097518ecea57f7e164a1848f475b67444de0217 100644 (file)
@@ -3,7 +3,7 @@ Section: games
 Priority: optional
 Maintainer: Gerfried Fuchs <alfie@debian.org>
 Build-Depends: libncurses5-dev
-Standards-Version: 3.6.2
+Standards-Version: 3.7.2
 
 Package: netris
 Architecture: any
index d677c00f548ba528b7fa3e275286c7f30e113b61..63c4f910991ce1b9b8d167f6bcd2d62217c453a4 100644 (file)
@@ -17,8 +17,8 @@ It was downloaded from ftp://ftp.netris.org/pub/netris/
     
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
-    Foundation, 59 Temple Place - Suite 330,
-    Boston, MA 02111-1307, USA.
+    Foundation, 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301 USA.
 
 On Debian GNU/Linux systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/game.c b/game.c
index ad188cf0d28e38586876ad7259a6bf626809ba57..e57e7ca802c47ee976181ce22befe4b0d1b39def 100644 (file)
--- a/game.c
+++ b/game.c
@@ -103,6 +103,7 @@ ExtFunc void OneGame(int scr, int scr2)
        int key;
        char *p, *cmd;
 
+       myLinesCleared = enemyLinesCleared = 0;
        speed = stepDownInterval;
        ResetBaseTime();
        InitBoard(scr);
@@ -297,7 +298,15 @@ ExtFunc void OneGame(int scr, int scr2)
                                                        DropPiece(scr2);
                                                        break;
                                                case NP_clear:
-                                                       ClearFullLines(scr2);
+                                                       {
+                                                               int cleared = ClearFullLines(scr2);
+                                                               if (cleared) {
+                                                                       enemyLinesCleared += cleared;
+                                                                       enemyTotalLinesCleared += cleared;
+                                                                       ShowDisplayInfo();
+                                                                       RefreshScreen();
+                                                               }
+                                                       }
                                                        break;
                                                case NP_insertJunk:
                                                {
@@ -343,7 +352,12 @@ ExtFunc void OneGame(int scr, int scr2)
        nextPiece:
                dropMode = 0;
                FreezePiece(scr);
-               linesCleared = ClearFullLines(scr);
+               myLinesCleared += linesCleared = ClearFullLines(scr);           
+               myTotalLinesCleared += linesCleared;
+               if (linesCleared) {
+                       ShowDisplayInfo();
+                       RefreshScreen();
+               }
                if (linesCleared > 0 && spied)
                        SendPacket(NP_clear, 0, NULL);
                if (game == GT_classicTwo && linesCleared > 1) {
index 24f3578a3834c85f99628ce345599c31ef155df8..db746e5341e23bd5060dbe19ca3082e4c1d1c1dc 100644 (file)
--- a/netris.h
+++ b/netris.h
@@ -182,6 +182,11 @@ EXT char scratch[1024];
 extern ShapeOption stdOptions[];
 extern char *version_string;
 
+EXT int myLinesCleared;
+EXT int enemyLinesCleared;
+EXT int myTotalLinesCleared;
+EXT int enemyTotalLinesCleared;
+
 #include "proto.h"
 
 #endif /* NETRIS_H */