diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/gui/questswindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/questswindow.h | 2 | ||||
-rw-r--r-- | src/gui/sdlinput.cpp | 2 | ||||
-rw-r--r-- | src/gui/sdlinput.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 7 | ||||
-rw-r--r-- | src/localconsts.h | 5 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 45 | ||||
-rw-r--r-- | src/net/serverinfo.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 45 |
10 files changed, 68 insertions, 50 deletions
diff --git a/src/game.cpp b/src/game.cpp index 3081cf089..58a559ec7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -90,7 +90,7 @@ #include "utils/gettext.h" #include "utils/mkdir.h" -#include "utils/translation/translationmanager.h" +//#include "utils/translation/translationmanager.h" #include <guichan/exception.hpp> #include <guichan/focushandler.hpp> diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index e9eb37600..a33de32b6 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -133,8 +133,8 @@ QuestsWindow::~QuestsWindow() delete mQuestsModel; mQuestsModel = nullptr; - for (std::map<int, std::vector<QuestItem*>>::iterator it = mQuests.begin(), - it_end = mQuests.end(); it != it_end; ++ it) + for (std::map<int, std::vector<QuestItem*> >::iterator it + = mQuests.begin(), it_end = mQuests.end(); it != it_end; ++ it) { std::vector<QuestItem*> &quests = (*it).second; for (std::vector<QuestItem*>::iterator it2 = quests.begin(), @@ -195,7 +195,7 @@ void QuestsWindow::loadQuest(int var, XmlNodePtr node) } quest->incomplete = splitToIntSet(incompleteStr, ','); quest->complete = splitToIntSet(completeStr, ','); - if (quest->incomplete.size() + quest->complete.size() == 0) + if (quest->incomplete.empty() && quest->complete.empty()) { logger->log("complete flags incorrect"); delete quest; diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h index 8454b80f5..4694acb8d 100644 --- a/src/gui/questswindow.h +++ b/src/gui/questswindow.h @@ -74,7 +74,7 @@ class QuestsWindow : public Window, public gcn::ActionListener ScrollArea *mTextScrollArea; Button *mCloseButton; std::map<int, int> mVars; - std::map<int, std::vector<QuestItem*>> mQuests; + std::map<int, std::vector<QuestItem*> > mQuests; std::vector<QuestItem*> mQuestLinks; Image *mCompleteIcon; Image *mIncompleteIcon; diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 55a4e0e6c..283d1b33e 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -284,7 +284,7 @@ int SDLInput::convertKeyCharacter(SDL_Event event) value = Key::ESCAPE; break; case SDLK_DELETE: - value = Key::DELETE; + value = Key::DELETE_; break; case SDLK_INSERT: value = Key::INSERT; diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index c3c0628ff..b6b41fe5c 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -91,7 +91,7 @@ namespace Key INSERT, HOME, PAGE_UP, - DELETE, + DELETE_, END, PAGE_DOWN, ESCAPE, diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index c09aea04c..45cb25463 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -67,9 +67,14 @@ void ItemLinkHandler::handleLink(const std::string &link, mItemPopup->setItem(itemInfo, 1, true); if (mItemPopup->isVisible()) + { mItemPopup->setVisible(false); + } else if (viewport) - mItemPopup->position(viewport->getMouseX(), viewport->getMouseY()); + { + mItemPopup->position(viewport->getMouseX(), + viewport->getMouseY()); + } } } else diff --git a/src/localconsts.h b/src/localconsts.h index b01718d92..61d1e0531 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -28,10 +28,15 @@ #ifdef __GNUC__ #define A_UNUSED __attribute__ ((unused)) +# ifdef __clang__ +# define gnu_printf printf +# endif #else #define A_UNUSED +#define gnu_printf printf #endif + //#define DEBUG_CONFIG 1 //#define DEBUG_BIND_TEXTURE 1 //#define DISABLE_RESOURCE_CACHING 1 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 3f98fed26..e20ad0dbb 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -23,28 +23,31 @@ #ifndef EATHENA_PROTOCOL_H #define EATHENA_PROTOCOL_H -enum +namespace EAthena { - JOB = 0xa, - - STR = 0xd, - AGI, - VIT, - INT, - DEX, - LUK, - - ATK, - DEF, - MATK, - MDEF, - HIT, - FLEE, - CRIT - -// KARMA, -// MANNER -}; + enum + { + JOB = 0xa, + + STR = 0xd, + AGI, + VIT, + INT, + DEX, + LUK, + + ATK, + DEF, + MATK, + MDEF, + HIT, + FLEE, + CRIT + +// KARMA, +// MANNER + }; +} enum { diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index 232ab532a..b4665946c 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -28,6 +28,8 @@ #include <string> #include <vector> +#include "localconsts.h" + class ServerInfo { public: diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index 72952cdd0..72540c54b 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -23,28 +23,31 @@ #ifndef TA_PROTOCOL_H #define TA_PROTOCOL_H -enum +namespace TmwAthena { - JOB = 0xa, - - STR = 0xd, - AGI, - VIT, - INT, - DEX, - LUK, - - ATK, - DEF, - MATK, - MDEF, - HIT, - FLEE, - CRIT - -// KARMA, -// MANNER -}; + enum + { + JOB = 0xa, + + STR = 0xd, + AGI, + VIT, + INT, + DEX, + LUK, + + ATK, + DEF, + MATK, + MDEF, + HIT, + FLEE, + CRIT + +// KARMA, +// MANNER + }; +} enum { |