]> git.deb.at Git - pkg/netris.git/blobdiff - board.c
Imported Debian patch 0.52-5
[pkg/netris.git] / board.c
diff --git a/board.c b/board.c
index 125cdd0000768d3e519b9a34d4b07bd49fc7f194..621677c1a8002f196aad0a0c130df5f062815a61 100644 (file)
--- a/board.c
+++ b/board.c
@@ -1,6 +1,6 @@
 /*
  * Netris -- A free networked version of T*tris
- * Copyright (C) 1994,1995,1996  Mark H. Weaver <mhw@netris.org>
+ * Copyright (C) 1994-1996,1999  Mark H. Weaver <mhw@netris.org>
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: board.c,v 1.14 1996/02/09 08:22:08 mhw Exp $
+ * $Id: board.c,v 1.15 1999/05/16 06:56:24 mhw Exp $
  */
 
 #include "netris.h"
@@ -36,6 +36,19 @@ static int oldFalling[MAX_SCREENS][MAX_BOARD_WIDTH];
 
 ExtFunc void InitBoard(int scr)
 {
+       int s,w,h;
+
+       for(s = 0 ; s < MAX_SCREENS ; s++)
+               for(h = 0 ; h < MAX_BOARD_HEIGHT ; h++)
+                       for(w = 0 ; w < MAX_BOARD_WIDTH ; w++) {
+                               board[s][h][w] = 0;
+                               oldBoard[s][h][w] = 0;
+                               changed[s][h] = 0;
+                               falling[s][w] = 0;
+                               oldFalling[s][w] = 0;
+                       }
+                               
+
        boardHeight[scr] = MAX_BOARD_HEIGHT;
        boardVisible[scr] = 20;
        boardWidth[scr] = 10;
@@ -237,7 +250,7 @@ ExtFunc void InsertJunk(int scr, int count, int column)
                CopyLine(scr, y, y + count);
        for (y = 0; y < count; ++y)
                for (x = 0; x < boardWidth[scr]; ++x)
-                       SetBlock(scr, y, x, (x == column) ? BT_none : BT_piece1);
+                       SetBlock(scr, y, x, (x == column) ? BT_none : BT_white);
        curY[scr] += count;
 }