*/
#include "netris.h"
+#include <time.h>
#include <sys/types.h>
#include <unistd.h>
#include <term.h>
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);
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
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
+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
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
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'.
int key;
char *p, *cmd;
+ myLinesCleared = enemyLinesCleared = 0;
speed = stepDownInterval;
ResetBaseTime();
InitBoard(scr);
DropPiece(scr2);
break;
case NP_clear:
- ClearFullLines(scr2);
+ {
+ int cleared = ClearFullLines(scr2);
+ if (cleared) {
+ enemyLinesCleared += cleared;
+ enemyTotalLinesCleared += cleared;
+ ShowDisplayInfo();
+ RefreshScreen();
+ }
+ }
break;
case NP_insertJunk:
{
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) {
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 */