X-Git-Url: http://git.shiar.net/netris.git/blobdiff_plain/968bf843bad5fc3d0c2d96a26fc39f3f01d94bfc..776faa936ea4b3f5ccaacda0f05a2ed1e945d304:/netris.h diff --git a/netris.h b/netris.h index 45d61bf..874ec0b 100644 --- a/netris.h +++ b/netris.h @@ -65,11 +65,13 @@ typedef long netint4; #define DEFAULT_PORT 9284 /* Very arbitrary */ -#define DEFAULT_KEYS "jkl mspf^l" +//#define DEFAULT_KEYS "hlkj mspf^l" +//#define DEFAULT_KEYS "4685 2spf^l" +#define DEFAULT_KEYS "dcaf b^sp^f^l" /* Protocol versions */ #define MAJOR_VERSION 1 -#define PROTOCOL_VERSION 3 +#define PROTOCOL_VERSION 4 #define ROBOT_VERSION 1 #define MAX_BOARD_WIDTH 32 @@ -101,7 +103,7 @@ typedef enum _MyEventType { E_none, E_alarm, E_key, E_net, E_lostConn, E_robot, E_lostRobot } MyEventType; typedef enum _NetPacketType { NP_endConn, NP_giveJunk, NP_newPiece, NP_down, NP_left, NP_right, - NP_rotate, NP_drop, NP_clear, + NP_rotright, NP_rotleft, NP_drop, NP_clear, NP_insertJunk, NP_startConn, NP_userName, NP_pause, NP_version, NP_byeBye } NetPacketType; @@ -137,7 +139,7 @@ typedef struct _EventGenRec { } EventGenRec; typedef struct _Shape { - struct _Shape *rotateTo; + struct _Shape *rotateTo, *rotateFrom; int initY, initX, mirrored; Dir initDir; BlockType type; @@ -155,7 +157,7 @@ typedef int (*ShapeDrawFunc)(int scr, int y, int x, EXT GameType game; EXT int boardHeight[MAX_SCREENS]; EXT int boardVisible[MAX_SCREENS], boardWidth[MAX_SCREENS]; -EXT Shape *curShape[MAX_SCREENS]; +EXT Shape *curShape[MAX_SCREENS], *nextShape[MAX_SCREENS]; EXT int curY[MAX_SCREENS], curX[MAX_SCREENS]; EXT char opponentName[16], opponentHost[256]; EXT int standoutEnable, colorEnable;