From 92df4be8639666a859c58a21af843b5c4e07869b Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Mar 2007 04:34:14 +0100 Subject: [PATCH] document shapes array --- board.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/board.c b/board.c index f1d159f..538a0df 100644 --- a/board.c +++ b/board.c @@ -23,6 +23,12 @@ #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}, -- 2.30.0