-/* $NetBSD: tetris.h,v 1.7 1999/09/12 09:02:24 jsm Exp $ */
+/* $NetBSD: tetris.h,v 1.11 2009/05/25 04:33:53 dholland Exp $ */
/*-
* Copyright (c) 1992, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#define B_SIZE (B_ROWS * B_COLS)
typedef unsigned char cell;
-cell board[B_SIZE]; /* 1 => occupied, 0 => empty */
+extern cell board[B_SIZE]; /* 1 => occupied, 0 => empty */
/* the displayed area (rows) */
#define D_FIRST 1
#define MINROWS 23
#define MINCOLS 40
-int Rows, Cols; /* current screen size */
+extern int Rows, Cols; /* current screen size */
/*
* Translations from board coordinates to display coordinates.
extern const struct shape shapes[];
#define randshape() (&shapes[random() % 7])
-const struct shape *curshape;
-const struct shape *nextshape;
+extern const struct shape *curshape;
+extern const struct shape *nextshape;
/*
* Shapes fall at a rate faster than once per second.
* The value eventually reaches a limit, and things stop going faster,
* but by then the game is utterly impossible.
*/
-long fallrate; /* less than 1 million; smaller => faster */
+extern long fallrate; /* less than 1 million; smaller => faster */
#define faster() (fallrate -= fallrate / 3000)
/*
* we find that it is at rest and integrate it---until then, it can
* still be moved or rotated).
*/
-int score; /* the obvious thing */
+extern int score; /* the obvious thing */
extern gid_t gid, egid;
-char key_msg[100];
-int showpreview;
+extern char key_msg[100];
+extern int showpreview;
-int fits_in __P((const struct shape *, int));
-void place __P((const struct shape *, int, int));
-void stop __P((const char *)) __attribute__((__noreturn__));
+int fits_in(const struct shape *, int);
+void place(const struct shape *, int, int);
+void stop(const char *) __dead;