diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configmanager.cpp | 2 | ||||
-rw-r--r-- | src/game.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 1 | ||||
-rw-r--r-- | src/input/inputmanager.cpp | 3 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 29 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 9 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 11 |
9 files changed, 27 insertions, 36 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp index b90ac3180..64916ee4f 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -29,8 +29,6 @@ #include "being/beingspeech.h" -#include "input/inputmanager.h" - #include "utils/files.h" #include "utils/gettext.h" #include "utils/mkdir.h" diff --git a/src/game.cpp b/src/game.cpp index e00e42d09..5b1c1455e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -408,7 +408,8 @@ Game::Game() : if (localPlayer) localPlayer->updatePets(); - settings.disableLoggingInGame = config.getBoolValue("disableLoggingInGame"); + settings.disableLoggingInGame = config.getBoolValue( + "disableLoggingInGame"); } Game::~Game() diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index a78052404..193c13c8d 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -47,7 +47,6 @@ #include "resources/equipmentslots.h" #include "resources/imageset.h" -#include "resources/itemslot.h" #include "utils/delete2.h" #include "utils/dtor.h" diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 8803654c8..508381fb0 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -23,7 +23,6 @@ #include "gui/windows/statuswindow.h" #include "configuration.h" -#include "equipment.h" #include "gamemodifiers.h" #include "inventory.h" #include "item.h" diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index e551d37f2..3c67575f6 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -730,7 +730,8 @@ bool InputManager::checkKey(const InputActionData *const key) const || isActionActive0(key->modKeyIndex)); } -bool InputManager::invokeKey(const InputActionData *const key, const int keyNum) +bool InputManager::invokeKey(const InputActionData *const key, + const int keyNum) { // no validation to keyNum because it validated in caller diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index fa892af29..841e27c48 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -22,7 +22,6 @@ #include "net/ea/playerhandler.h" -#include "configuration.h" #include "game.h" #include "party.h" #include "notifymanager.h" @@ -32,7 +31,6 @@ #include "being/attributes.h" #include "being/localplayer.h" -#include "gui/dialogtype.h" #include "gui/viewport.h" #include "gui/windows/skilldialog.h" @@ -46,8 +44,6 @@ #include "net/ea/eaprotocol.h" -#include "utils/gettext.h" - #include "debug.h" // Max. distance we are willing to scroll after a teleport; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 48f31aeaa..d49fc145e 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -37,7 +37,6 @@ #include "input/keyboardconfig.h" #include "gui/windows/socialwindow.h" -#include "gui/windows/killstats.h" #include "gui/windows/outfitwindow.h" @@ -454,41 +453,41 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, const std::string color; switch (type) { - case 0: // change race + case 0: // change race dstBeing->setSubtype(static_cast<uint16_t>(id), 0); break; - case 1: // eAthena LOOK_HAIR + case 1: // eAthena LOOK_HAIR dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id *-1); break; - case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2 + case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2 dstBeing->setSprite(SPRITE_BODY, id, "", 1, true); if (!mHideShield) dstBeing->setSprite(SPRITE_FLOOR, id2); localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR); break; - case 3: // LOOK_HEAD_BOTTOM + case 3: // LOOK_HEAD_BOTTOM dstBeing->setSprite(SPRITE_WEAPON, id, color, static_cast<unsigned char>(id2)); localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON); break; - case 4: // LOOK_HEAD_TOP Change upper headgear for eAthena, hat for us + case 4: // LOOK_HEAD_TOP Change upper headgear for eAthena, hat for us dstBeing->setSprite(SPRITE_CLOTHES_COLOR, id, color, static_cast<unsigned char>(id2)); localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR); break; - case 5: // LOOK_HEAD_MID Change middle headgear for eathena, armor for us + case 5: // LOOK_HEAD_MID Change middle headgear for eathena, armor for us dstBeing->setSprite(SPRITE_HEAD_BOTTOM, id, color, static_cast<unsigned char>(id2)); localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM); break; - case 6: // eAthena LOOK_HAIR_COLOR + case 6: // eAthena LOOK_HAIR_COLOR dstBeing->setSpriteColor(SPRITE_HAIR_COLOR, ItemDB::get( dstBeing->getSpriteID(SPRITE_HAIR_COLOR)).getDyeColorsString(id)); break; - case 7: // Clothes color + case 7: // Clothes color // ignoring it break; - case 8: // eAthena LOOK_SHIELD + case 8: // eAthena LOOK_SHIELD if (!mHideShield) { dstBeing->setSprite(SPRITE_FLOOR, id, color, @@ -496,12 +495,12 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, } localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR); break; - case 9: // eAthena LOOK_SHOES + case 9: // eAthena LOOK_SHOES dstBeing->setSprite(SPRITE_HAIR, id, color, static_cast<unsigned char>(id2)); localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR); break; - case 10: // LOOK_GLOVES + case 10: // LOOK_GLOVES dstBeing->setSprite(SPRITE_SHOES, id, color, static_cast<unsigned char>(id2)); localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES); @@ -1043,7 +1042,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>( msg.readInt32("opt3"))); dstBeing->setKarma(msg.readUInt8("karma")); - uint8_t gender = msg.readUInt8("gender") & 3; + uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3); if (dstBeing->getType() == ActorType::Player) { @@ -1205,7 +1204,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>( msg.readInt32("opt3"))); dstBeing->setKarma(msg.readUInt8("karma")); - uint8_t gender = msg.readUInt8("gender") & 3; + uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3); if (dstBeing->getType() == ActorType::Player) { @@ -1370,7 +1369,7 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg) dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>( msg.readInt32("opt3"))); dstBeing->setKarma(msg.readUInt8("karma")); - uint8_t gender = msg.readUInt8("gender") & 3; + uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3); if (dstBeing->getType() == ActorType::Player) { diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index a74e8bee7..7f11598c5 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -529,7 +529,8 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg) dstBeing->updateSprite(SPRITE_WEAPON, headBottom, "", colors[0]); dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, + "", colors[1]); } else { @@ -680,7 +681,8 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg) dstBeing->updateSprite(SPRITE_WEAPON, headBottom, "", colors[0]); dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, + "", colors[1]); } else { @@ -831,7 +833,8 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg) dstBeing->updateSprite(SPRITE_WEAPON, headBottom, "", colors[0]); dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, + "", colors[1]); } else { diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index cec4d2772..c2aa6b4e0 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -23,25 +23,20 @@ #include "net/tmwa/playerhandler.h" #include "configuration.h" -#include "game.h" #include "being/attributes.h" #include "being/beingflag.h" #include "being/localplayer.h" +#include "gui/onlineplayer.h" + #include "gui/windows/statuswindow.h" +#include "gui/windows/whoisonline.h" #include "net/tmwa/inventoryhandler.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" -#include "gui/windows/whoisonline.h" - -#include "gui/onlineplayer.h" -#include "gui/viewport.h" - -#include "resources/map/map.h" - #include "debug.h" extern Net::PlayerHandler *playerHandler; |