diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-10 19:23:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-10 19:23:42 +0300 |
commit | dd18101f7bcc1962e1378766165351aa4cfda01d (patch) | |
tree | c17e27e70422cbd357f7206a37f06385bfe3b1e2 | |
parent | ea31c48b1d89c1fb849278c21a74a680b289f29f (diff) | |
download | manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.gz manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.bz2 manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.xz manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.zip |
Fix code style.
-rw-r--r-- | src/being/playerinfo.h | 2 | ||||
-rw-r--r-- | src/effectmanager.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/npcselldialog.cpp | 2 | ||||
-rw-r--r-- | src/main.h | 3 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/chathandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/skillhandler.cpp | 1 | ||||
-rw-r--r-- | src/resources/chatobject.h | 5 |
11 files changed, 25 insertions, 20 deletions
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 11dbd826c..d780c7da7 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -28,7 +28,9 @@ #include "enums/state.h" #include <map> +#ifdef EATHENA_SUPPORT #include <string> +#endif /** * Stat information storage structure. diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index a6671870b..e029faefa 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -87,6 +87,10 @@ bool EffectManager::triggerDirection(const int id, Being *const being, switch (direction) { case SpriteDirection::DOWN: + case SpriteDirection::DOWNRIGHT: + case SpriteDirection::DOWNLEFT: + case SpriteDirection::DEFAULT: + case SpriteDirection::INVALID: default: rotation = 0; break; @@ -94,6 +98,8 @@ bool EffectManager::triggerDirection(const int id, Being *const being, rotation = 90; break; case SpriteDirection::UP: + case SpriteDirection::UPRIGHT: + case SpriteDirection::UPLEFT: rotation = 180; break; case SpriteDirection::RIGHT: diff --git a/src/gui/windows/npcselldialog.cpp b/src/gui/windows/npcselldialog.cpp index f212bb595..24a3a442a 100644 --- a/src/gui/windows/npcselldialog.cpp +++ b/src/gui/windows/npcselldialog.cpp @@ -22,8 +22,6 @@ #include "gui/windows/npcselldialog.h" -#include "shopitem.h" - #include "being/playerinfo.h" #include "gui/windows/confirmdialog.h" diff --git a/src/main.h b/src/main.h index a67294890..9922ca531 100644 --- a/src/main.h +++ b/src/main.h @@ -72,7 +72,8 @@ #define PACKAGE_OS "Cygwin" #elif defined(__sun) || defined(sun) #define PACKAGE_OS "SunOS" -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) \ + || defined(__aix) || defined(__aix__) #define PACKAGE_OS "AIX" #elif defined(__sgi) || defined(__sgi__) || defined(_SGI) #define PACKAGE_OS "IRIX" diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index c12dc081e..f1bbc79c0 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -46,8 +46,6 @@ #include "resources/map/map.h" -#include "net/messagein.h" - #include "net/ea/eaprotocol.h" #include "debug.h" diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index b0620b1f2..3bc28ed08 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -53,7 +53,6 @@ #include "resources/map/map.h" -#include "utils/stringutils.h" #include "utils/timer.h" #include "debug.h" diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index f7ef27cb5..7461f8bd8 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -713,7 +713,7 @@ void ChatHandler::processChatRoomLeave(Net::MessageIn &msg) msg.readInt16("users"); const std::string name = msg.readString(24, "name"); const int status = msg.readUInt8("flag"); // 0 - left, 1 - kicked - switch(status) + switch (status) { case 0: NotifyManager::notify(NotifyTypes::ROOM_LEAVE, name); @@ -894,7 +894,7 @@ void ChatHandler::talkPet(const std::string &restrict text, void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg) { const int result = msg.readUInt8("flag"); - switch(result) + switch (result) { case 0: { @@ -933,7 +933,7 @@ void ChatHandler::processChatRoomDestroy(Net::MessageIn &msg) void ChatHandler::processChatRoomJoinFailed(Net::MessageIn &msg) { const int result = msg.readUInt8("flag"); - switch(result) + switch (result) { case 0: NotifyManager::notify(NotifyTypes::ROOM_ERROR_FULL); @@ -977,9 +977,9 @@ void ChatHandler::processChatRoomSettings(Net::MessageIn &msg) const int sz = msg.readInt16("len") - 17; const int ownerId = msg.readInt32("owner id"); const int chatId = msg.readInt32("chat id"); - const int limit = msg.readInt16("limit"); + const uint16_t limit = msg.readInt16("limit"); msg.readInt16("users"); - const int type = msg.readUInt8("type"); + const uint16_t type = msg.readUInt8("type"); const std::string &title = msg.readString(sz, "title"); ChatObject *const chat = localPlayer->getChat(); if (chat && chat->chatId == chatId) @@ -1000,7 +1000,7 @@ void ChatHandler::processChatRoomRoleChange(Net::MessageIn &msg) { const int role = msg.readInt32("role"); const std::string name = msg.readString(24, "name"); - switch(role) + switch (role) { case 0: NotifyManager::notify(NotifyTypes::ROOM_ROLE_OWNER, name); @@ -1034,7 +1034,7 @@ void ChatHandler::processMVPNoItem(Net::MessageIn &msg) void ChatHandler::processMannerMessage(Net::MessageIn &msg) { const int result = msg.readInt32("type"); - switch(result) + switch (result) { case 0: NotifyManager::notify(NotifyTypes::MANNER_CHANGED); @@ -1101,8 +1101,8 @@ void ChatHandler::setChatRoomOptions(const int limit, const std::string &title) const { createOutPacket(CMSG_SET_CHAT_ROOM_OPTIONS); - const int sz = title.size(); - outMsg.writeInt16(15 + sz, "len"); + const int sz = static_cast<int>(title.size()); + outMsg.writeInt16(static_cast<int16_t>(15 + sz), "len"); outMsg.writeInt16(static_cast<int16_t>(limit), "limit"); outMsg.writeInt8(static_cast<int8_t>(isPublic ? 1 : 0), "type"); outMsg.writeString(password, 8, "password"); diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 562e250b2..a7a9c3300 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -37,8 +37,6 @@ #include "resources/notifytypes.h" -#include "utils/stringutils.h" - #include "debug.h" extern Net::TradeHandler *tradeHandler; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 7ce768d62..27cad62ba 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -362,7 +362,8 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM); break; case 6: // eAthena LOOK_HAIR_COLOR - dstBeing->setHairColor(SPRITE_HAIR_COLOR, static_cast<uint8_t>(id)); + dstBeing->setHairColor(SPRITE_HAIR_COLOR, + static_cast<uint8_t>(id)); break; case 7: // Clothes color // ignoring it diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index 1567d576a..b88e9e509 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -35,7 +35,6 @@ #include "resources/notifytypes.h" #include "utils/gettext.h" -#include "utils/stringutils.h" #include "debug.h" diff --git a/src/resources/chatobject.h b/src/resources/chatobject.h index 431718e41..8ee55c930 100644 --- a/src/resources/chatobject.h +++ b/src/resources/chatobject.h @@ -21,7 +21,10 @@ #ifndef RESOURCES_CHATOBJECT_H #define RESOURCES_CHATOBJECT_H -#include "resources/image.h" +#include <map> +#include <string> + +#include "localconsts.h" struct ChatObject final { |