block types named by shape, not color
authorMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 03:17:01 +0000 (04:17 +0100)
committerMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 03:17:01 +0000 (04:17 +0100)
board.c
curses.c
netris.h

diff --git a/board.c b/board.c
index 3ff3cb6c18826ba7f4919e58982f9b7599b25f29..f1d159fa3cb389de02a472b93266a918887d206e 100644 (file)
--- a/board.c
+++ b/board.c
@@ -75,7 +75,7 @@ static const char shapes[7][4][4][4] = {
          { {0x00, 0x00, 0x00, 0x00}, {0x44, 0xC4, 0xC4, 0x84},
            {0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //rep
          { {0x00, 0x14, 0x00, 0x00}, {0x00, 0x34, 0x00, 0x00},
-           {0x00, 0x34, 0x00, 0x00}, {0x00, 0x24, 0x00, 0x00} } }, //stick (blue)
+           {0x00, 0x34, 0x00, 0x00}, {0x00, 0x24, 0x00, 0x00} } }, //I, stick (blue)
 
        { { {0x00, 0x00, 0x00, 0x00}, {0x00, 0x55, 0x95, 0x00},
            {0x00, 0x65, 0xA5, 0x00}, {0x00, 0x00, 0x00, 0x00} },
@@ -84,7 +84,7 @@ static const char shapes[7][4][4][4] = {
          { {0x00, 0x00, 0x00, 0x00}, {0x00, 0x55, 0x95, 0x00},
            {0x00, 0x65, 0xA5, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //rep
          { {0x00, 0x00, 0x00, 0x00}, {0x00, 0x55, 0x95, 0x00},
-           {0x00, 0x65, 0xA5, 0x00}, {0x00, 0x00, 0x00, 0x00} } } //square (purple)
+           {0x00, 0x65, 0xA5, 0x00}, {0x00, 0x00, 0x00, 0x00} } } //O, square (purple)
 };
 
 int ShapeIterate(char s, int scr, int y, int x, ShapeDrawFunc func)
index e963cce128f580558054dbc7a87c38770f56b9a4..e0a77ab46a0519eb50bf1fff6521c647e60b0363 100644 (file)
--- a/curses.c
+++ b/curses.c
@@ -84,14 +84,14 @@ void InitScreens(void)
                        char type;
                        short color;
                } myColorTable[] = {
-                       { BT_white,   COLOR_WHITE },
-                       { BT_blue,    COLOR_BLUE },
-                       { BT_magenta, COLOR_MAGENTA },
-                       { BT_cyan,    COLOR_CYAN },
-                       { BT_yellow,  COLOR_YELLOW },
-                       { BT_green,   COLOR_GREEN },
-                       { BT_red,     COLOR_RED },
-                       { BT_none,    0 }
+                       { BT_T, COLOR_WHITE },
+                       { BT_I, COLOR_BLUE },
+                       { BT_O, COLOR_MAGENTA },
+                       { BT_L, COLOR_CYAN },
+                       { BT_J, COLOR_YELLOW },
+                       { BT_S, COLOR_GREEN },
+                       { BT_Z, COLOR_RED },
+                       { BT_none, 0 }
                }; //myColorTable
                int i = 0;
 
index 1af1db61bea6e27f9561af78d70dfa174993fd0a..e51486f87f225d40cb4c9ff2204cd29e369a4251 100644 (file)
--- a/netris.h
+++ b/netris.h
@@ -81,7 +81,7 @@ typedef long netint4;
 typedef enum _GameType { GT_onePlayer, GT_classicTwo, GT_len } GameType;
 typedef enum _BlockTypeA {
        BT_shadow, BT_none,
-       BT_green, BT_cyan, BT_blue, BT_magenta, BT_red, BT_yellow, BT_white,
+       BT_S, BT_L, BT_I, BT_O, BT_Z, BT_J, BT_T,
        BT_wall, BT_len
 } BlockTypeA;
 typedef enum _FDType { FT_read, FT_write, FT_except, FT_len } FDType;