summaryrefslogtreecommitdiff
path: root/src/net/messageout.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2011-06-03 11:19:20 -0600
committerJared Adams <jaxad0127@gmail.com>2011-06-03 12:08:26 -0600
commit3c0cb0e058324ee1d3116017f14387e9a6004442 (patch)
treeb9c00c3fdf1dff7e4c07bf4f8c83c2e7bc03c0f7 /src/net/messageout.h
parent894038adf52a3e2b42542239a147d6c1cc1ad204 (diff)
downloadmana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.gz
mana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.bz2
mana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.xz
mana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.zip
Replace SDL_types.h with cstdint
This required moving to C++0x, so it does that too, and fixes a few errors with that. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Diffstat (limited to 'src/net/messageout.h')
-rw-r--r--src/net/messageout.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/net/messageout.h b/src/net/messageout.h
index e05d3bd7..cecdea9d 100644
--- a/src/net/messageout.h
+++ b/src/net/messageout.h
@@ -22,9 +22,8 @@
#ifndef NET_MESSAGEOUT_H
#define NET_MESSAGEOUT_H
-#include <SDL_types.h>
-
-#include <iosfwd>
+#include <cstdint>
+#include <string>
namespace Net {
@@ -36,9 +35,20 @@ namespace Net {
class MessageOut
{
public:
- virtual void writeInt8(Uint8 value); /**< Writes a byte. */
- virtual void writeInt16(Uint16 value) = 0; /**< Writes a short. */
- virtual void writeInt32(Uint32 value) = 0; /**< Writes a "long". */
+ /**
+ * Writes an unsigned 8-bit integer to the message.
+ */
+ virtual void writeInt8(uint8_t value);
+
+ /**
+ * Writes an unsigned 16-bit integer to the message.
+ */
+ virtual void writeInt16(uint16_t value) = 0;
+
+ /**
+ * Writes an unsigned 32-bit integer to the message.
+ */
+ virtual void writeInt32(uint32_t value) = 0;
/**
* Writes a string. If a fixed length is not given (-1), it is stored
@@ -59,7 +69,7 @@ class MessageOut
virtual ~MessageOut() {}
protected:
- MessageOut(short id);
+ MessageOut(uint16_t id);
/**
* Expand the packet data to be able to hold more data.