From 02d0eeb0e0a5f43971cf687eac35dcedc59a0247 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Mar 2007 04:17:01 +0100 Subject: [PATCH] block types named by shape, not color --- board.c | 4 ++-- curses.c | 16 ++++++++-------- netris.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/board.c b/board.c index 3ff3cb6..f1d159f 100644 --- 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) diff --git a/curses.c b/curses.c index e963cce..e0a77ab 100644 --- 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; diff --git a/netris.h b/netris.h index 1af1db6..e51486f 100644 --- 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; -- 2.30.0