summaryrefslogtreecommitdiff
path: root/src/net/manaserv
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/manaserv
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/manaserv')
-rw-r--r--src/net/manaserv/beinghandler.cpp2
-rw-r--r--src/net/manaserv/buysellhandler.cpp2
-rw-r--r--src/net/manaserv/charhandler.cpp2
-rw-r--r--src/net/manaserv/chathandler.cpp2
-rw-r--r--src/net/manaserv/effecthandler.cpp6
-rw-r--r--src/net/manaserv/gamehandler.cpp2
-rw-r--r--src/net/manaserv/guildhandler.cpp2
-rw-r--r--src/net/manaserv/inventoryhandler.cpp2
-rw-r--r--src/net/manaserv/itemhandler.cpp2
-rw-r--r--src/net/manaserv/loginhandler.cpp2
-rw-r--r--src/net/manaserv/messagein.cpp4
-rw-r--r--src/net/manaserv/messagein.h2
-rw-r--r--src/net/manaserv/messageout.cpp4
-rw-r--r--src/net/manaserv/messageout.h4
-rw-r--r--src/net/manaserv/network.cpp4
-rw-r--r--src/net/manaserv/npchandler.cpp2
-rw-r--r--src/net/manaserv/partyhandler.cpp2
-rw-r--r--src/net/manaserv/playerhandler.cpp8
-rw-r--r--src/net/manaserv/playerhandler.h4
-rw-r--r--src/net/manaserv/tradehandler.cpp2
20 files changed, 30 insertions, 30 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp
index 93f9c0835..ec09a81b8 100644
--- a/src/net/manaserv/beinghandler.cpp
+++ b/src/net/manaserv/beinghandler.cpp
@@ -51,7 +51,7 @@ namespace ManaServ
BeingHandler::BeingHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_BEING_ATTACK,
GPMSG_BEING_ENTER,
diff --git a/src/net/manaserv/buysellhandler.cpp b/src/net/manaserv/buysellhandler.cpp
index e9be139f6..f0cd860b6 100644
--- a/src/net/manaserv/buysellhandler.cpp
+++ b/src/net/manaserv/buysellhandler.cpp
@@ -45,7 +45,7 @@ namespace ManaServ
BuySellHandler::BuySellHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_NPC_BUY,
GPMSG_NPC_SELL,
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index db2d03247..f1af32354 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -62,7 +62,7 @@ extern ServerInfo chatServer;
CharHandler::CharHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
APMSG_CHAR_CREATE_RESPONSE,
APMSG_CHAR_DELETE_RESPONSE,
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index 12451e6f6..c978dee36 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -57,7 +57,7 @@ extern ServerInfo chatServer;
ChatHandler::ChatHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_SAY,
CPMSG_ENTER_CHANNEL_RESPONSE,
diff --git a/src/net/manaserv/effecthandler.cpp b/src/net/manaserv/effecthandler.cpp
index 59fb1e4f5..03e9002eb 100644
--- a/src/net/manaserv/effecthandler.cpp
+++ b/src/net/manaserv/effecthandler.cpp
@@ -35,7 +35,7 @@ namespace ManaServ
EffectHandler::EffectHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_CREATE_EFFECT_POS,
GPMSG_CREATE_EFFECT_BEING,
@@ -62,8 +62,8 @@ void EffectHandler::handleMessage(Net::MessageIn &msg)
void EffectHandler::handleCreateEffectPos(Net::MessageIn &msg)
{
int id = msg.readInt16();
- Uint16 x = msg.readInt16();
- Uint16 y = msg.readInt16();
+ uint16_t x = msg.readInt16();
+ uint16_t y = msg.readInt16();
effectManager->trigger(id, x, y);
}
diff --git a/src/net/manaserv/gamehandler.cpp b/src/net/manaserv/gamehandler.cpp
index 4a03dff0f..83e9a96b5 100644
--- a/src/net/manaserv/gamehandler.cpp
+++ b/src/net/manaserv/gamehandler.cpp
@@ -45,7 +45,7 @@ extern ServerInfo chatServer;
GameHandler::GameHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_DISCONNECT_RESPONSE,
0
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index be8a9609a..82dcea569 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -55,7 +55,7 @@ extern Connection *chatServerConnection;
GuildHandler::GuildHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
CPMSG_GUILD_CREATE_RESPONSE,
CPMSG_GUILD_INVITE_RESPONSE,
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index 2c9c84c76..130c0c457 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -49,7 +49,7 @@ extern Connection *gameServerConnection;
InventoryHandler::InventoryHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_INVENTORY_FULL,
GPMSG_INVENTORY,
diff --git a/src/net/manaserv/itemhandler.cpp b/src/net/manaserv/itemhandler.cpp
index 8ebe965ec..5a2cf9ebd 100644
--- a/src/net/manaserv/itemhandler.cpp
+++ b/src/net/manaserv/itemhandler.cpp
@@ -36,7 +36,7 @@ namespace ManaServ
ItemHandler::ItemHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_ITEMS,
GPMSG_ITEM_APPEAR,
diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp
index dc8f37d36..d470dc00c 100644
--- a/src/net/manaserv/loginhandler.cpp
+++ b/src/net/manaserv/loginhandler.cpp
@@ -49,7 +49,7 @@ LoginHandler::LoginHandler() :
mMinUserNameLength(4),
mMaxUserNameLength(10)
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
APMSG_LOGIN_RESPONSE,
APMSG_REGISTER_RESPONSE,
diff --git a/src/net/manaserv/messagein.cpp b/src/net/manaserv/messagein.cpp
index bc97155a9..b1f551145 100644
--- a/src/net/manaserv/messagein.cpp
+++ b/src/net/manaserv/messagein.cpp
@@ -34,9 +34,9 @@ MessageIn::MessageIn(const char *data, unsigned int length):
mId = readInt16();
}
-Sint16 MessageIn::readInt16()
+int16_t MessageIn::readInt16()
{
- Sint16 value = -1;
+ int16_t value = -1;
if (mPos + 2 <= mLength)
{
uint16_t t;
diff --git a/src/net/manaserv/messagein.h b/src/net/manaserv/messagein.h
index f22cdabca..21afd4544 100644
--- a/src/net/manaserv/messagein.h
+++ b/src/net/manaserv/messagein.h
@@ -41,7 +41,7 @@ class MessageIn : public Net::MessageIn
*/
MessageIn(const char *data, unsigned int length);
- Sint16 readInt16(); /**< Reads a short. */
+ int16_t readInt16(); /**< Reads a short. */
int readInt32(); /**< Reads a long. */
};
diff --git a/src/net/manaserv/messageout.cpp b/src/net/manaserv/messageout.cpp
index 0bb1c0f77..1fdc161c2 100644
--- a/src/net/manaserv/messageout.cpp
+++ b/src/net/manaserv/messageout.cpp
@@ -47,7 +47,7 @@ void MessageOut::expand(size_t bytes)
mDataSize = mPos + bytes;
}
-void MessageOut::writeInt16(Sint16 value)
+void MessageOut::writeInt16(int16_t value)
{
expand(2);
uint16_t t = ENET_HOST_TO_NET_16(value);
@@ -55,7 +55,7 @@ void MessageOut::writeInt16(Sint16 value)
mPos += 2;
}
-void MessageOut::writeInt32(Sint32 value)
+void MessageOut::writeInt32(int32_t value)
{
expand(4);
uint32_t t = ENET_HOST_TO_NET_32(value);
diff --git a/src/net/manaserv/messageout.h b/src/net/manaserv/messageout.h
index dc583ab3d..f0bb2978c 100644
--- a/src/net/manaserv/messageout.h
+++ b/src/net/manaserv/messageout.h
@@ -41,8 +41,8 @@ class MessageOut : public Net::MessageOut
*/
~MessageOut();
- void writeInt16(Sint16 value); /**< Writes a short. */
- void writeInt32(Sint32 value); /**< Writes a long. */
+ void writeInt16(int16_t value); /**< Writes a short. */
+ void writeInt32(int32_t value); /**< Writes a long. */
protected:
/**
diff --git a/src/net/manaserv/network.cpp b/src/net/manaserv/network.cpp
index 05041c56a..348905e50 100644
--- a/src/net/manaserv/network.cpp
+++ b/src/net/manaserv/network.cpp
@@ -97,13 +97,13 @@ Connection *getConnection()
void registerHandler(MessageHandler *handler)
{
- for (const Uint16 *i = handler->handledMessages; *i; i++)
+ for (const uint16_t *i = handler->handledMessages; *i; i++)
mMessageHandlers[*i] = handler;
}
void unregisterHandler(MessageHandler *handler)
{
- for (const Uint16 *i = handler->handledMessages; *i; i++)
+ for (const uint16_t *i = handler->handledMessages; *i; i++)
mMessageHandlers.erase(*i);
}
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 24a58ebd8..72f21ec1a 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -41,7 +41,7 @@ extern Connection *gameServerConnection;
NpcHandler::NpcHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_NPC_CHOICE,
GPMSG_NPC_POST,
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index 34fb2e954..e2b0fabd9 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -50,7 +50,7 @@ extern Connection *chatServerConnection;
PartyHandler::PartyHandler():
mParty(Party::getParty(PARTY_ID))
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
CPMSG_PARTY_INVITE_RESPONSE,
CPMSG_PARTY_INVITED,
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index eeb597908..b42aa383e 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -73,7 +73,7 @@ extern Connection *gameServerConnection;
PlayerHandler::PlayerHandler()
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_PLAYER_MAP_CHANGE,
GPMSG_PLAYER_SERVER_CHANGE,
@@ -271,7 +271,7 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
/*
case SMSG_PLAYER_ARROW_MESSAGE:
{
- Sint16 type = msg.readInt16();
+ int16_t type = msg.readInt16();
switch (type)
{
@@ -338,7 +338,7 @@ void PlayerHandler::stopAttack()
}
-void PlayerHandler::emote(Uint8 emoteId A_UNUSED)
+void PlayerHandler::emote(uint8_t emoteId A_UNUSED)
{
// TODO
}
@@ -446,7 +446,7 @@ void PlayerHandler::requestOnlineList()
}
-void PlayerHandler::updateStatus(Uint8 status)
+void PlayerHandler::updateStatus(uint8_t status)
{
}
diff --git a/src/net/manaserv/playerhandler.h b/src/net/manaserv/playerhandler.h
index 23d2f5e32..131960b32 100644
--- a/src/net/manaserv/playerhandler.h
+++ b/src/net/manaserv/playerhandler.h
@@ -48,7 +48,7 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler
void attack(int id, bool keep = false);
void stopAttack();
- void emote(Uint8 emoteId);
+ void emote(uint8_t emoteId);
void increaseAttribute(int attr);
void decreaseAttribute(int attr);
@@ -74,7 +74,7 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler
Vector getDefaultWalkSpeed() const;
- void updateStatus(Uint8 status);
+ void updateStatus(uint8_t status);
private:
void handleMapChangeMessage(Net::MessageIn &msg);
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index 72dbf9a9d..e13c134c6 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -83,7 +83,7 @@ namespace
TradeHandler::TradeHandler():
mAcceptTradeRequests(true)
{
- static const Uint16 _messages[] =
+ static const uint16_t _messages[] =
{
GPMSG_TRADE_REQUEST,
GPMSG_TRADE_CANCEL,