From: Gerfried Fuchs Date: Fri, 8 Sep 2006 19:08:42 +0000 (-0500) Subject: Imported Debian patch 0.52-6 X-Git-Tag: debian/0.52-6 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=cb0fadf37094e3bc1950eb43a58a64693de4c21f;p=pkg%2Fnetris.git Imported Debian patch 0.52-6 --- diff --git a/curses.c b/curses.c index cdbc9f5..dc708bd 100644 --- a/curses.c +++ b/curses.c @@ -20,6 +20,7 @@ */ #include "netris.h" +#include #include #include #include @@ -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 diff --git a/debian/changelog b/debian/changelog index e8e5b83..a1e40ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +netris (0.52-6) unstable; urgency=low + + * #include 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 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 diff --git a/debian/control b/debian/control index 0f451be..d097518 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: games Priority: optional Maintainer: Gerfried Fuchs Build-Depends: libncurses5-dev -Standards-Version: 3.6.2 +Standards-Version: 3.7.2 Package: netris Architecture: any diff --git a/debian/copyright b/debian/copyright index d677c00..63c4f91 100644 --- a/debian/copyright +++ b/debian/copyright @@ -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 ad188cf..e57e7ca 100644 --- 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) { diff --git a/netris.h b/netris.h index 24f3578..db746e5 100644 --- 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 */