source: network-game/common/Message.h@ b650f8a

Last change on this file since b650f8a was b978503, checked in by dportnoy <dmp1488@…>, 11 years ago

Minor changes

  • Property mode set to 100644
File size: 923 bytes
Line 
1#ifndef _MESSAGE_H
2#define _MESSAGE_H
3
4#define MSG_TYPE_REGISTER 1
5#define MSG_TYPE_LOGIN 2
6#define MSG_TYPE_LOGOUT 3
7#define MSG_TYPE_CHAT 4
8#define MSG_TYPE_PLAYER 5 // server sends this to update player positions
9#define MSG_TYPE_PLAYER_MOVE 6 // client sends this when a player wants to move
10#define MSG_TYPE_OBJECT 7
11#define MSG_TYPE_REMOVE_OBJECT 8
12#define MSG_TYPE_PICKUP_FLAG 9
13#define MSG_TYPE_DROP_FLAG 10
14#define MSG_TYPE_SCORE 11
15#define MSG_TYPE_START_ATTACK 12
16#define MSG_TYPE_ATTACK 13
17#define MSG_TYPE_PROJECTILE 14
18#define MSG_TYPE_REMOVE_PROJECTILE 15
19
20typedef struct
21{
22 short type;
23 char buffer[256];
24} NETWORK_MSG;
25
26int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
27
28int receiveMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest);
29
30#endif
Note: See TracBrowser for help on using the repository browser.