X-Git-Url: http://git.shiar.nl/netris.git/blobdiff_plain/5902d7f327fcf57d2b1a47f1b4a3aa98f4ab08a8..406e72f6bc3be827e1202d817677e8af093231dc:/netris.h diff --git a/netris.h b/netris.h index 72e2522..28a4132 100644 --- a/netris.h +++ b/netris.h @@ -15,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id: netris.h,v 1.28 1999/05/16 06:56:29 mhw Exp $ */ #ifndef __NETRIS_H @@ -65,9 +63,9 @@ typedef long netint4; #define CONFIG_FILE "netris.conf" -//#define DEFAULT_KEYS "hlkj mfp^lq" -//#define DEFAULT_KEYS "4685 2fp^lq" -#define DEFAULT_KEYS "dcaf b^fp^lq" +//#define DEFAULT_KEYS "hlkj mnfp^ltq" +//#define DEFAULT_KEYS "4685 02fp^l^mq" +#define DEFAULT_KEYS "dcaf xb^fp^l^mq" #define MAX_BOARD_WIDTH 32 #define MAX_BOARD_HEIGHT 64 @@ -80,14 +78,11 @@ typedef long netint4; #define EM_connect 000020 #define EM_any 000777 -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 _Dir { D_down, D_right, D_up, D_left } Dir; -typedef enum _Cmd { C_end, C_forw, C_back, C_left, C_right, C_plot } Cmd; typedef enum _FDType { FT_read, FT_write, FT_except, FT_len } FDType; typedef enum _MyEventType { E_none, E_alarm, E_key, E_connect, E_net, E_lostConn @@ -133,10 +128,6 @@ typedef struct _MyEvent { union { char key; _netEvent net; - struct { - int size; - char *data; - } robot; } u; } MyEvent; @@ -155,12 +146,6 @@ typedef struct _EventGenRec { int bufSize, bufGoal; } EventGenRec; -MyEventType NetGenFunc(EventGenRec *gen, MyEvent *event); - -typedef struct _Shape { - char shape, rotate; -} Shape; - /* NP_startConn flags */ #define SCF_paused 1 @@ -169,7 +154,6 @@ typedef struct { char name[16]; int flags; int team; - int dropmode; int boardHeight, boardWidth, boardVisible; int curX, curY; char curShape, nextShape; @@ -189,7 +173,9 @@ EXT int spied; //in player.flags #define SPEEDINC 1.2 #define SPEEDMINIMUM 40000 +typedef enum _GameType { GT_onePlayer, GT_classicTwo, GT_len } GameType; typedef struct { + GameType type; int gravity; //1 int started; //2 int continuous; //3 @@ -201,13 +187,12 @@ EXT _Game Game; #define MSG_WIDTH 128 -EXT GameType game; // => Game.type +EXT short port; // => just in client.c, parameter to inet connect -EXT short port; // => just in game.c, parameter to inet connect +static const char *teamname[] = { + "", "Green", "Cyan", "Blue", "Purple", + "Red", "Grey", "White", "*Orange" +}; #endif //__NETRIS_H -/* - * vi: ts=4 ai - * vim: noai si - */