Wed, 16 Apr 2014 22:20:59 +0200
changed netcode numbers
src/game.c | file | annotate | diff | comparison | revisions | |
src/network.h | file | annotate | diff | comparison | revisions |
1.1 --- a/src/game.c Wed Apr 16 21:57:53 2014 +0200 1.2 +++ b/src/game.c Wed Apr 16 22:20:59 2014 +0200 1.3 @@ -356,7 +356,7 @@ 1.4 exit(EXIT_FAILURE); 1.5 } 1.6 if (result > 0) { 1.7 - uint32_t code = net_recieve_code(opponent); 1.8 + uint8_t code = net_recieve_code(opponent); 1.9 1.10 Move move; 1.11 switch (code) {
2.1 --- a/src/network.h Wed Apr 16 21:57:53 2014 +0200 2.2 +++ b/src/network.h Wed Apr 16 22:20:59 2014 +0200 2.3 @@ -37,18 +37,18 @@ 2.4 extern "C" { 2.5 #endif 2.6 2.7 -#define NETCODE_ACCEPT 0x00 2.8 -#define NETCODE_DECLINE 0x01 2.9 +#define NETCODE_ACCEPT 0x02 2.10 +#define NETCODE_DECLINE 0x04 2.11 #define NETCODE_GAMEINFO 0x10 2.12 #define NETCODE_MOVE 0x20 2.13 -#define NETCODE_SURRENDER 0x21 2.14 -#define NETCODE_REMIS 0x22 2.15 -#define NETCODE_CHECK 0x23 2.16 +#define NETCODE_CHECK 0x22 2.17 #define NETCODE_CHECKMATE 0x24 2.18 -#define NETCODE_STALEMATE 0x25 2.19 -#define NETCODE_TIMEOVER 0x26 2.20 +#define NETCODE_STALEMATE 0x28 2.21 +#define NETCODE_SURRENDER 0x41 2.22 +#define NETCODE_REMIS 0x42 2.23 +#define NETCODE_TIMEOVER 0x44 2.24 2.25 -#define NETCODE_VERSION 12 2.26 +#define NETCODE_VERSION 13 2.27 2.28 typedef struct { 2.29 int fd; /* -1, if we are the client */