summaryrefslogtreecommitdiffstats
path: root/tetris/tetris.h
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-06-11 16:47:39 +0000
committerchristos <christos@NetBSD.org>2014-06-11 16:47:39 +0000
commit1033fba35c308f3253abd40f163d7c52ef7ac5fb (patch)
tree7188b5503b94cde1c8280e6c0336559d7a778bea /tetris/tetris.h
parentdb7a726b9bff1bdf1fbba8c65d338e1236f854bb (diff)
downloadbsdgames-darwin-1033fba35c308f3253abd40f163d7c52ef7ac5fb.tar.gz
bsdgames-darwin-1033fba35c308f3253abd40f163d7c52ef7ac5fb.tar.zst
bsdgames-darwin-1033fba35c308f3253abd40f163d7c52ef7ac5fb.zip
Add a little color. In order to minimize logic differences, keep 0 as the
empty board value, and since 7 is white, turn white into black (0) when painting.
Diffstat (limited to 'tetris/tetris.h')
-rw-r--r--tetris/tetris.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tetris/tetris.h b/tetris/tetris.h
index 37f0d9ba..4f2fbccd 100644
--- a/tetris/tetris.h
+++ b/tetris/tetris.h
@@ -1,4 +1,4 @@
-/* $NetBSD: tetris.h,v 1.12 2009/08/12 08:51:21 dholland Exp $ */
+/* $NetBSD: tetris.h,v 1.13 2014/06/11 16:47:39 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -123,6 +123,7 @@ extern int Rows, Cols; /* current screen size */
* rotated forms.
*/
struct shape {
+ int color;
int rot; /* index of rotated version of this shape */
int off[3]; /* offsets to other blots if center is at (0,0) */
};