summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-17 20:13:48 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-17 20:13:48 +0300
commitc2efedab22275302f0a10cc197424d345a021d18 (patch)
tree7488abbb3655451a3f6a1621e0708f72011af5f6 /src/net/messagein.cpp
parent79aba82be3de5b6b571e2f59f7a34ded4b03160f (diff)
downloadmanaplus-c2efedab22275302f0a10cc197424d345a021d18.tar.gz
manaplus-c2efedab22275302f0a10cc197424d345a021d18.tar.bz2
manaplus-c2efedab22275302f0a10cc197424d345a021d18.tar.xz
manaplus-c2efedab22275302f0a10cc197424d345a021d18.zip
Replace SDL int types to C++ types.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 5848c8b18..445b43d3f 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -60,7 +60,7 @@ unsigned char MessageIn::readInt8()
return value;
}
-void MessageIn::readCoordinates(Uint16 &x, Uint16 &y)
+void MessageIn::readCoordinates(uint16_t &x, uint16_t &y)
{
if (mPos + 3 <= mLength)
{
@@ -75,13 +75,13 @@ void MessageIn::readCoordinates(Uint16 &x, Uint16 &y)
+ toString(static_cast<int>(y)));
}
-void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction)
+void MessageIn::readCoordinates(uint16_t &x, uint16_t &y, uint8_t &direction)
{
- Uint8 serverDir = 0;
+ uint8_t serverDir = 0;
if (mPos + 3 <= mLength)
{
const char *data = mData + mPos;
- Sint16 temp;
+ int16_t temp;
temp = MAKEWORD(data[1] & 0x00c0, data[0] & 0x00ff);
x = static_cast<unsigned short>(temp >> 6);
@@ -139,13 +139,13 @@ void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction)
static_cast<int>(serverDir)));
}
-void MessageIn::readCoordinatePair(Uint16 &srcX, Uint16 &srcY,
- Uint16 &dstX, Uint16 &dstY)
+void MessageIn::readCoordinatePair(uint16_t &srcX, uint16_t &srcY,
+ uint16_t &dstX, uint16_t &dstY)
{
if (mPos + 5 <= mLength)
{
const char *data = mData + mPos;
- Sint16 temp;
+ int16_t temp;
temp = MAKEWORD(data[3], data[2] & 0x000f);
dstX = static_cast<unsigned short>(temp >> 2);