initial interface requests
[netris.git] / netris.h
index 45d61bf1764f9ab2d32e1181e6ba2c44bb0670cb..874ec0b70063b2cd201c990a6e6f7be7469fd96a 100644 (file)
--- 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;