]> thyrsus.com Git - tetrix.git/commitdiff
Halfway to new release.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 1 Aug 2002 22:05:25 +0000 (22:05 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 1 Aug 2002 22:05:25 +0000 (22:05 +0000)
Makefile
tet.c

index 8b326e177fd73fa9aa5a81f88652dd913976b7db..37c21a1976a5b7ebd75eaa2054a595f11b745a70 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
 #    later on will erase high scores for the machine.
 
 # Don't forget to change the spec file when you bump the version number.
-VERSION=2.1
+VERS=2.1
 
 CFLAGS=-O -DIBM
 LFLAGS = -s
diff --git a/tet.c b/tet.c
index 975f0e8aea84dc5caa4dcbaf6981e32e51b0d64a..1629198a0efd537905125f7b1919ba4b735a05b4 100644 (file)
--- a/tet.c
+++ b/tet.c
@@ -17,7 +17,7 @@ static int InitPause;         /* Initial value of CurrentPause */
 static int CurrentPause;       /* Time between movements per level */
 static int FallingDown;                /* True when space bar is pressed */
 static int Beep;               /* Beep on invalid move? */
-static char Key;               /* holds last key polled */
+static int Key;                        /* holds last key polled */
 
 int dispchars[6]
 # ifdef IBMASCIZ
@@ -101,6 +101,9 @@ Init()
        Beep=0;
        HighsChanged = 0;
        initscr();
+#ifdef KEY_MIN
+       keypad(stdscr, TRUE);
+#endif /* KEY_MIN */
        nodelay(stdscr, TRUE);
        noecho();
        cbreak();
@@ -268,6 +271,9 @@ Play()
 
                case RIGHT_KEY:
                case L_RIGHT_KEY:
+#ifdef KEY_MIN
+               case KEY_RIGHT:
+#endif /* KEY_MIN */
                    if (MoveRight(Type, MINX + Column, MINY + Row))
                        Column += 1;
                    else if (Beep)
@@ -276,6 +282,9 @@ Play()
 
                case LEFT_KEY:
                case L_LEFT_KEY:
+#ifdef KEY_MIN
+               case KEY_LEFT:
+#endif /* KEY_MIN */
                    if (MoveLeft(Type, MINX + Column, MINY + Row))
                        Column -= 1;
                    else if (Beep)
@@ -284,6 +293,9 @@ Play()
 
                case ROTATE_KEY:
                case L_ROTATE_KEY:
+#ifdef KEY_MIN
+               case KEY_UP:
+#endif /* KEY_MIN */
                    ntype = Rotate(Type, MINX + Column, MINY + Row);
                    if (Beep && ntype == Type)
                        beep();
@@ -470,10 +482,12 @@ TestRows()
 Leave()
 {
        erase();
+#ifdef CHATTY
        mvaddstr(22,48,"Tetrix says Bye\n");
        mvaddstr(23,0,"");
        refresh();
        sleep(1);
+#endif /* CHATTY */
        endwin();
        exit(0);
 }