changed netcode numbers

Wed, 16 Apr 2014 22:20:59 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 16 Apr 2014 22:20:59 +0200
changeset 43
12141136a0da
parent 42
21cb830efe91
child 44
1891d88cbd10

changed netcode numbers

src/game.c file | annotate | diff | comparison | revisions
src/network.h file | annotate | diff | comparison | revisions
--- a/src/game.c	Wed Apr 16 21:57:53 2014 +0200
+++ b/src/game.c	Wed Apr 16 22:20:59 2014 +0200
@@ -356,7 +356,7 @@
             exit(EXIT_FAILURE);
         }
         if (result > 0) {
-            uint32_t code = net_recieve_code(opponent);
+            uint8_t code = net_recieve_code(opponent);
 
             Move move;
             switch (code) {
--- a/src/network.h	Wed Apr 16 21:57:53 2014 +0200
+++ b/src/network.h	Wed Apr 16 22:20:59 2014 +0200
@@ -37,18 +37,18 @@
 extern "C" {
 #endif
     
-#define NETCODE_ACCEPT 0x00
-#define NETCODE_DECLINE 0x01
+#define NETCODE_ACCEPT 0x02
+#define NETCODE_DECLINE 0x04
 #define NETCODE_GAMEINFO 0x10
 #define NETCODE_MOVE 0x20
-#define NETCODE_SURRENDER 0x21
-#define NETCODE_REMIS 0x22
-#define NETCODE_CHECK 0x23
+#define NETCODE_CHECK 0x22
 #define NETCODE_CHECKMATE 0x24
-#define NETCODE_STALEMATE 0x25
-#define NETCODE_TIMEOVER 0x26
+#define NETCODE_STALEMATE 0x28
+#define NETCODE_SURRENDER 0x41
+#define NETCODE_REMIS 0x42
+#define NETCODE_TIMEOVER 0x44
 
-#define NETCODE_VERSION 12
+#define NETCODE_VERSION 13
 
 typedef struct {
     int fd; /* -1, if we are the client */

mercurial