source: network-game/common/Message.h@ 5806dc2

Last change on this file since 5806dc2 was 88cdae2, checked in by Dmitry Portnoy <dmp1488@…>, 12 years ago

The user can now move around the screen by clicking once they're logged in. A new message of type MSG_TYPE_PLAYER_MOVE is sent to the server.

  • Property mode set to 100644
File size: 455 bytes
RevLine 
[8e540f4]1#ifndef _MESSAGE_H
[2488852]2#define _MESSAGE_H
[7d7df47]3
[2318fff]4#define MSG_TYPE_REGISTER 1
5#define MSG_TYPE_LOGIN 2
6#define MSG_TYPE_LOGOUT 3
7#define MSG_TYPE_CHAT 4
[edfd1d0]8#define MSG_TYPE_PLAYER 5
[88cdae2]9#define MSG_TYPE_PLAYER_MOVE 6
[7d7df47]10
11typedef struct
12{
[0dde5da]13 short type;
14 char buffer[256];
[7d7df47]15} NETWORK_MSG;
16
[a845faf]17int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
18
19int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
20
[e084950]21#endif
Note: See TracBrowser for help on using the repository browser.