document shapes array
authorMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 03:34:14 +0000 (04:34 +0100)
committerMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 03:34:14 +0000 (04:34 +0100)
board.c

diff --git a/board.c b/board.c
index f1d159fa3cb389de02a472b93266a918887d206e..538a0dfe406f1d4aec0ceee05596dd18705d08de 100644 (file)
--- a/board.c
+++ b/board.c
 #include "board.h"
 
 static const char shapes[7][4][4][4] = {
+       /*
+        * 4 rotations of 4x4 pixels per shape
+        * high nibble signifies joinage (left, right, top, bottom, from MSB)
+        * low nibble identifies block type (typically 2..8)
+        */
+
        { { {0x00, 0x00, 0x00, 0x00}, {0x47, 0xC7, 0x97, 0x00},
            {0x00, 0x00, 0x27, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //sharp horizontal
          { {0x00, 0x17, 0x00, 0x00}, {0x00, 0x37, 0x00, 0x00},
@@ -51,18 +57,18 @@ static const char shapes[7][4][4][4] = {
            {0x00, 0x28, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} } }, //T (white)
 
        { { {0x00, 0x00, 0x00, 0x00}, {0x00, 0x52, 0x82, 0x00},
-           {0x42, 0xA2, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} },
+           {0x42, 0xA2, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //lieing
          { {0x12, 0x00, 0x00, 0x00}, {0x62, 0x92, 0x00, 0x00},
-           {0x00, 0x22, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} },
+           {0x00, 0x22, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //standing
          { {0x00, 0x00, 0x00, 0x00}, {0x00, 0x52, 0x82, 0x00},
            {0x42, 0xA2, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //rep
          { {0x12, 0x00, 0x00, 0x00}, {0x62, 0x92, 0x00, 0x00},
            {0x00, 0x22, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} } }, //S (green)
 
        { { {0x00, 0x00, 0x00, 0x00}, {0x46, 0x96, 0x00, 0x00},
-           {0x00, 0x66, 0x86, 0x00}, {0x00, 0x00, 0x00, 0x00} },
+           {0x00, 0x66, 0x86, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //lieing
          { {0x00, 0x16, 0x00, 0x00}, {0x56, 0xA6, 0x00, 0x00},
-           {0x26, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} },
+           {0x26, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //standing
          { {0x00, 0x00, 0x00, 0x00}, {0x46, 0x96, 0x00, 0x00},
            {0x00, 0x66, 0x86, 0x00}, {0x00, 0x00, 0x00, 0x00} }, //rep
          { {0x00, 0x16, 0x00, 0x00}, {0x56, 0xA6, 0x00, 0x00},