diff options
author | Jared Adams <jaxad0127@gmail.com> | 2011-06-03 11:19:20 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2011-06-03 12:08:26 -0600 |
commit | 3c0cb0e058324ee1d3116017f14387e9a6004442 (patch) | |
tree | b9c00c3fdf1dff7e4c07bf4f8c83c2e7bc03c0f7 /src/net/tmwa/messageout.cpp | |
parent | 894038adf52a3e2b42542239a147d6c1cc1ad204 (diff) | |
download | mana-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/tmwa/messageout.cpp')
-rw-r--r-- | src/net/tmwa/messageout.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index 71b8f756..7c3a3c61 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -31,7 +31,7 @@ namespace TmwAthena { -MessageOut::MessageOut(Uint16 id): +MessageOut::MessageOut(uint16_t id): Net::MessageOut(id) { mNetwork = TmwAthena::Network::instance(); @@ -44,7 +44,7 @@ void MessageOut::expand(size_t bytes) mNetwork->mOutSize += bytes; } -void MessageOut::writeInt16(Uint16 value) +void MessageOut::writeInt16(uint16_t value) { expand(2); mData[mPos] = value; @@ -52,7 +52,7 @@ void MessageOut::writeInt16(Uint16 value) mPos += 2; } -void MessageOut::writeInt32(Uint32 value) +void MessageOut::writeInt32(uint32_t value) { expand(4); mData[mPos] = value; @@ -62,13 +62,13 @@ void MessageOut::writeInt32(Uint32 value) mPos += 4; } -void MessageOut::writeCoordinates(Uint16 x, Uint16 y, Uint8 direction) +void MessageOut::writeCoordinates(uint16_t x, uint16_t y, uint8_t direction) { char *data = mData + mPos; mNetwork->mOutSize += 3; mPos += 3; - Uint16 temp = x; + int16_t temp = x; temp <<= 6; data[0] = temp >> 8; data[1] = temp; |