summaryrefslogtreecommitdiff
path: root/src/net/protocol.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-03 16:13:12 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-03 16:13:12 +0000
commit182b5231ba13a0a5865a1b7dcb4731c3009d4c57 (patch)
treed0f536d7c3357825efc5f527922c10487517e8bf /src/net/protocol.h
parentb48b39c87da9fc2c59be533e1dc445cc82c2f323 (diff)
downloadmana-client-182b5231ba13a0a5865a1b7dcb4731c3009d4c57.tar.gz
mana-client-182b5231ba13a0a5865a1b7dcb4731c3009d4c57.tar.bz2
mana-client-182b5231ba13a0a5865a1b7dcb4731c3009d4c57.tar.xz
mana-client-182b5231ba13a0a5865a1b7dcb4731c3009d4c57.zip
Some indent, comment and const parameter changes.
Diffstat (limited to 'src/net/protocol.h')
-rw-r--r--src/net/protocol.h53
1 files changed, 43 insertions, 10 deletions
diff --git a/src/net/protocol.h b/src/net/protocol.h
index 374024e3..3a46e91f 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -17,14 +17,16 @@
* You should have received a copy of the GNU General Public License
* along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * $Id$
*/
+#ifndef _TMW_PROTOCOL_H
+#define _TMW_PROTOCOL_H
+
#ifdef WIN32
#pragma warning (disable:4312)
#endif
-
-#ifndef _TMW_PROTOCOL_H
-#define _TMW_PROTOCOL_H
#include "../main.h"
#include "../being.h"
@@ -38,21 +40,52 @@
#endif
+/** Packet length by id */
short get_length(short id);
-unsigned short get_x(char *data);
-unsigned short get_y(char *data);
-unsigned char get_direction(char *data);
-unsigned short get_src_x(char *data);
-unsigned short get_src_y(char *data);
+
+/** Decodes x coord */
+unsigned short get_x(const char *data);
+
+/** Decodes y coord */
+unsigned short get_y(const char *data);
+
+/** Decodes direction */
+unsigned char get_direction(const char *data);
+
+/** Decodes src x coord */
+unsigned short get_src_x(const char *data);
+
+/** Decodes src y coord */
+unsigned short get_src_y(const char *data);
+
+/** Decodes src direction */
unsigned char get_src_direction(char data);
-unsigned short get_dest_x(char *data);
-unsigned short get_dest_y(char *data);
+
+/** Decodes dest x coord */
+unsigned short get_dest_x(const char *data);
+
+/** Decodes dest y coord */
+unsigned short get_dest_y(const char *data);
+
+/** Decodes dest direction */
unsigned char get_dest_direction(char data);
+
+/** Encodes coords and direction in 3 bytes data */
void set_coordinates(char *data, unsigned short x, unsigned short y, unsigned char direction);
+
+/** Initialize connection with map server */
void map_start();
+
+/** Requests to walk */
void walk(unsigned short x, unsigned short y, unsigned char direction);
+
+/** Request to speak */
void speak(char *speech);
+
+/** Request to attack */
void attack(unsigned short x, unsigned short y, unsigned char direction);
+
+/** Request action */
void action(char type, int id);
#endif