summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-05 21:49:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 12:12:22 +0300
commit2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch)
treef2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src
parentac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff)
downloadplus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz
plus-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp6
-rw-r--r--src/actions/chat.cpp2
-rw-r--r--src/actions/pets.cpp3
-rw-r--r--src/actormanager.cpp7
-rw-r--r--src/actormanager.h1
-rw-r--r--src/being/actorsprite.cpp3
-rw-r--r--src/being/being.cpp7
-rw-r--r--src/being/crazymoves.cpp2
-rw-r--r--src/being/localplayer.cpp5
-rw-r--r--src/being/localplayer.h4
-rw-r--r--src/being/playerrelations.cpp1
-rw-r--r--src/being/playerrelations.h2
-rw-r--r--src/client.cpp5
-rw-r--r--src/dirs.cpp2
-rw-r--r--src/dropshortcut.cpp2
-rw-r--r--src/enums/gui/themecolorid.h6
-rw-r--r--src/enums/resources/map/maptype.h6
-rw-r--r--src/events/keyevent.h2
-rw-r--r--src/eventsmanager.cpp1
-rw-r--r--src/flooritem.cpp2
-rw-r--r--src/flooritem.h2
-rw-r--r--src/gamemodifiers.cpp2
-rw-r--r--src/gui/dialogsmanager.cpp4
-rw-r--r--src/gui/dialogsmanager.h1
-rw-r--r--src/gui/fonts/textchunklist_unittest.cc82
-rw-r--r--src/gui/palette.h5
-rw-r--r--src/gui/popups/itempopup.cpp6
-rw-r--r--src/gui/popups/speechbubble.h8
-rw-r--r--src/gui/theme.cpp3
-rw-r--r--src/gui/themecolorsidoperators.h6
-rw-r--r--src/gui/userpalette.cpp302
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/viewport.cpp1
-rw-r--r--src/gui/widgets/avatarlistbox.cpp10
-rw-r--r--src/gui/widgets/basiccontainer.cpp2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/characterdisplay.cpp2
-rw-r--r--src/gui/widgets/chatinput.h2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/inttextfield.cpp5
-rw-r--r--src/gui/widgets/listbox.cpp5
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/selldialog.h2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/skilldata.h2
-rw-r--r--src/gui/widgets/skillinfo.cpp2
-rw-r--r--src/gui/widgets/skillinfo.h3
-rw-r--r--src/gui/widgets/slider.cpp6
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp7
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp8
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h3
-rw-r--r--src/gui/widgets/tabs/socialguildtab2.h6
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h3
-rw-r--r--src/gui/widgets/tabs/tab.cpp8
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/window.h1
-rw-r--r--src/gui/windowmenu.h2
-rw-r--r--src/gui/windows/buydialog.h1
-rw-r--r--src/gui/windows/buyingstoreselldialog.cpp1
-rw-r--r--src/gui/windows/buyselldialog.h1
-rw-r--r--src/gui/windows/changeemaildialog.cpp4
-rw-r--r--src/gui/windows/changepassworddialog.cpp4
-rw-r--r--src/gui/windows/charcreatedialog.cpp4
-rw-r--r--src/gui/windows/charselectdialog.cpp6
-rw-r--r--src/gui/windows/chatwindow.cpp4
-rw-r--r--src/gui/windows/chatwindow.h1
-rw-r--r--src/gui/windows/didyouknowwindow.h2
-rw-r--r--src/gui/windows/editserverdialog.cpp4
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp9
-rw-r--r--src/gui/windows/inventorywindow.h2
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/logindialog.cpp2
-rw-r--r--src/gui/windows/mailwindow.cpp2
-rw-r--r--src/gui/windows/minimap.cpp1
-rw-r--r--src/gui/windows/ministatuswindow.cpp20
-rw-r--r--src/gui/windows/ministatuswindow.h2
-rw-r--r--src/gui/windows/npcdialog.cpp4
-rw-r--r--src/gui/windows/npcdialog.h1
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/quitdialog.cpp2
-rw-r--r--src/gui/windows/registerdialog.cpp4
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/setupwindow.h2
-rw-r--r--src/gui/windows/shopselldialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp4
-rw-r--r--src/gui/windows/shopwindow.h2
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/socialwindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp34
-rw-r--r--src/gui/windows/tradewindow.cpp2
-rw-r--r--src/gui/windows/unregisterdialog.cpp4
-rw-r--r--src/gui/windows/updaterwindow.cpp13
-rw-r--r--src/gui/windows/whoisonline.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
-rw-r--r--src/input/inputactiondata.h2
-rw-r--r--src/input/inputmanager.h8
-rw-r--r--src/input/pages/basic.cpp2
-rw-r--r--src/input/pages/chat.cpp2
-rw-r--r--src/input/pages/emotes.cpp2
-rw-r--r--src/input/pages/gui.cpp2
-rw-r--r--src/input/pages/move.cpp2
-rw-r--r--src/input/pages/other.cpp2
-rw-r--r--src/input/pages/outfits.cpp2
-rw-r--r--src/input/pages/shortcuts.cpp2
-rw-r--r--src/input/pages/windows.cpp2
-rw-r--r--src/listeners/shoprenamelistener.cpp2
-rw-r--r--src/logger.cpp2
-rw-r--r--src/net/beinghandler.h2
-rw-r--r--src/net/character.h3
-rw-r--r--src/net/download.cpp2
-rw-r--r--src/net/ea/beinghandler.cpp7
-rw-r--r--src/net/ea/buysellhandler.cpp2
-rw-r--r--src/net/ea/buysellhandler.h2
-rw-r--r--src/net/ea/charserverhandler.cpp2
-rw-r--r--src/net/ea/gamehandler.cpp2
-rw-r--r--src/net/ea/inventoryhandler.cpp2
-rw-r--r--src/net/ea/network.cpp2
-rw-r--r--src/net/ea/partyhandler.cpp2
-rw-r--r--src/net/ea/playerhandler.cpp2
-rw-r--r--src/net/eathena/beinghandler.cpp11
-rw-r--r--src/net/eathena/buyingstorehandler.cpp3
-rw-r--r--src/net/eathena/buysellhandler.cpp2
-rw-r--r--src/net/eathena/cashshophandler.cpp4
-rw-r--r--src/net/eathena/charserverhandler.cpp4
-rw-r--r--src/net/eathena/chathandler.cpp2
-rw-r--r--src/net/eathena/gamehandler.cpp1
-rw-r--r--src/net/eathena/generalhandler.cpp8
-rw-r--r--src/net/eathena/guildhandler.cpp4
-rw-r--r--src/net/eathena/homunculushandler.cpp2
-rw-r--r--src/net/eathena/inventoryhandler.cpp2
-rw-r--r--src/net/eathena/markethandler.cpp4
-rw-r--r--src/net/eathena/mercenaryhandler.cpp4
-rw-r--r--src/net/eathena/pethandler.cpp4
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/eathena/vendinghandler.cpp3
-rw-r--r--src/net/playerhandler.h1
-rw-r--r--src/net/tmwa/beinghandler.cpp12
-rw-r--r--src/net/tmwa/buysellhandler.cpp3
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
-rw-r--r--src/net/tmwa/chathandler.cpp4
-rw-r--r--src/net/tmwa/gamehandler.cpp1
-rw-r--r--src/net/tmwa/generalhandler.cpp2
-rw-r--r--src/net/tmwa/guildmanager.cpp2
-rw-r--r--src/net/tmwa/playerhandler.cpp2
-rw-r--r--src/particle/textparticle.cpp2
-rw-r--r--src/resources/map/map.cpp2
-rw-r--r--src/resources/map/mapitem.cpp2
-rw-r--r--src/resources/map/maplayer.cpp2
-rw-r--r--src/resources/resourcemanager.cpp1
-rw-r--r--src/soundmanager.cpp1
-rw-r--r--src/spellmanager.cpp4
-rw-r--r--src/text.cpp2
-rw-r--r--src/touchmanager.cpp4
-rw-r--r--src/touchmanager.h1
-rw-r--r--src/utils/files_unittest.cc2
-rw-r--r--src/utils/stringutils.cpp15
-rw-r--r--src/utils/stringutils.h5
-rw-r--r--src/utils/stringutils_unittest.cc6
170 files changed, 446 insertions, 520 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 66ad410ee..713e80a9f 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -36,10 +36,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "gui/gui.h"
#include "gui/popupmanager.h"
#include "gui/sdlinput.h"
@@ -107,6 +103,8 @@
#endif
#endif
+#include <sstream>
+
#include "debug.h"
extern std::string tradePartnerName;
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 125a9b94c..9749e30fa 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -24,8 +24,6 @@
#include "actions/actiondef.h"
-#include "being/localplayer.h"
-
#include "gui/chatconsts.h"
#include "gui/windows/chatwindow.h"
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 24f0d51c4..6b141bddb 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -40,13 +40,14 @@
#include "net/chathandler.h"
#ifdef TMWA_SUPPORT
#include "net/net.h"
+#else
+#include "utils/stringutils.h"
#endif
#include "net/pethandler.h"
#include "net/serverfeatures.h"
#include "utils/chatutils.h"
#include "utils/gettext.h"
-#include "utils/stringutils.h"
#include "debug.h"
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 629c504ef..0c460ba40 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -28,10 +28,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
-
-#include "enums/net/packettype.h"
-
#include "gui/viewport.h"
#include "gui/widgets/tabs/chat/chattab.h"
@@ -1787,7 +1783,8 @@ void ActorManager::updateEffects(const std::map<BeingTypeId, int> &addEffects,
const BeingTypeId type = being->getSubType();
if (removeEffects.find(type) != removeEffects.end())
being->removeSpecialEffect();
- const std::map<BeingTypeId, int>::const_iterator idAdd = addEffects.find(type);
+ const std::map<BeingTypeId, int>::const_iterator
+ idAdd = addEffects.find(type);
if (idAdd != addEffects.end())
being->addSpecialEffect((*idAdd).second);
}
diff --git a/src/actormanager.h b/src/actormanager.h
index 483a2d2c9..324a4d2ab 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -27,7 +27,6 @@
#include "enums/simpletypes/allowsort.h"
#include "enums/simpletypes/allplayers.h"
-#include "enums/simpletypes/beingid.h"
#include "enums/simpletypes/beingtypeid.h"
#include "enums/simpletypes/npcnames.h"
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 1f7ea4b95..6f213903e 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -359,6 +359,8 @@ static const char *cursorType(const TargetCursorTypeT type)
case TargetCursorType::IN_RANGE:
return "in-range";
default:
+ case TargetCursorType::NONE:
+ case TargetCursorType::NUM_TCT:
case TargetCursorType::NORMAL:
return "normal";
}
@@ -373,6 +375,7 @@ static const char *cursorSize(const TargetCursorSizeT size)
case TargetCursorSize::MEDIUM:
return "m";
default:
+ case TargetCursorSize::NUM_TC:
case TargetCursorSize::SMALL:
return "s";
}
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 59ceb04d7..2fdbfe55a 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -39,14 +39,12 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
#include "enums/being/beingdirection.h"
-#include "enums/net/packettype.h"
-
#include "particle/particleinfo.h"
#include "gui/gui.h"
+#include "gui/userpalette.h"
#include "gui/fonts/font.h"
@@ -61,7 +59,6 @@
#include "net/gamehandler.h"
#include "net/npchandler.h"
#include "net/packetlimiter.h"
-#include "net/pethandler.h"
#include "net/playerhandler.h"
#include "net/serverfeatures.h"
@@ -1681,7 +1678,6 @@ void Being::petLogic()
setAction(BeingAction::STAND, 0);
fixPetSpawnPos(dstX, dstY);
setTileCoords(dstX, dstY);
- //petHandler->spawn(mOwner, mId, dstX, dstY);
mPetAi = true;
}
else if (!followDist || divX > followDist || divY > followDist)
@@ -3354,7 +3350,6 @@ void Being::addPet(const BeingId id)
int dstY = mY;
being->fixPetSpawnPos(dstX, dstY);
being->setTileCoords(dstX, dstY);
- //petHandler->spawn(this, being->mId, dstX, dstY);
}
}
diff --git a/src/being/crazymoves.cpp b/src/being/crazymoves.cpp
index 83eed7bd9..0405a0fcc 100644
--- a/src/being/crazymoves.cpp
+++ b/src/being/crazymoves.cpp
@@ -28,8 +28,6 @@
#include "enums/being/beingdirection.h"
-#include "enums/net/packettype.h"
-
#include "gui/windows/outfitwindow.h"
#include "net/packetlimiter.h"
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 23d3422f7..e85301754 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -40,11 +40,7 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
#include "enums/being/beingdirection.h"
-#include "enums/being/reachable.h"
-
-#include "enums/net/packettype.h"
#include "particle/particle.h"
@@ -52,6 +48,7 @@
#include "gui/chatconsts.h"
#include "gui/gui.h"
+#include "gui/userpalette.h"
#include "gui/popupmanager.h"
#include "gui/windows/chatwindow.h"
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 2425f7502..475101528 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -27,12 +27,8 @@
#include "enums/being/pickup.h"
-#include "enums/gui/usercolorid.h"
-
#include "enums/simpletypes/keep.h"
-#include "gui/userpalette.h"
-
#include "listeners/actorspritelistener.h"
#include "listeners/attributelistener.h"
#include "listeners/playerdeathlistener.h"
diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp
index 20192be07..2ebaf3f2f 100644
--- a/src/being/playerrelations.cpp
+++ b/src/being/playerrelations.cpp
@@ -24,6 +24,7 @@
#include "actormanager.h"
#include "configuration.h"
+#include "logger.h"
#include "being/localplayer.h"
#include "being/playerignorestrategy.h"
diff --git a/src/being/playerrelations.h b/src/being/playerrelations.h
index 0976fe167..5f7e6e2a4 100644
--- a/src/being/playerrelations.h
+++ b/src/being/playerrelations.h
@@ -23,8 +23,6 @@
#ifndef BEING_PLAYERRELATIONS_H
#define BEING_PLAYERRELATIONS_H
-#include "enums/being/relation.h"
-
#include "utils/stringvector.h"
#include "being/playerrelation.h"
diff --git a/src/client.cpp b/src/client.cpp
index 5c670696f..fe643ac8b 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -23,7 +23,6 @@
#include "client.h"
#include "chatlogger.h"
-#include "configuration.h"
#include "configmanager.h"
#include "defaults.h"
#include "dirs.h"
@@ -44,8 +43,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/gui/dialogtype.h"
-
#include "input/inputmanager.h"
#include "input/joystick.h"
#include "input/keyboardconfig.h"
@@ -137,6 +134,8 @@
#ifdef USE_OPENGL
#include "test/testlauncher.h"
#include "test/testmain.h"
+#else
+#include "configuration.h"
#endif
#ifdef __APPLE__
diff --git a/src/dirs.cpp b/src/dirs.cpp
index ecbd65ece..e5b3f395b 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -55,6 +55,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
#if defined __native_client__
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp
index 90cd921f5..02e831114 100644
--- a/src/dropshortcut.cpp
+++ b/src/dropshortcut.cpp
@@ -29,8 +29,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/net/packettype.h"
-
#include "net/packetlimiter.h"
#include "debug.h"
diff --git a/src/enums/gui/themecolorid.h b/src/enums/gui/themecolorid.h
index fe735c29d..963d85ef0 100644
--- a/src/enums/gui/themecolorid.h
+++ b/src/enums/gui/themecolorid.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_THEMECOLORID_H
-#define GUI_THEMECOLORID_H
+#ifndef ENUMS_GUI_THEMECOLORID_H
+#define ENUMS_GUI_THEMECOLORID_H
#include "enums/simpletypes/enumdefines.h"
@@ -253,4 +253,4 @@ enumStart(ThemeColorId)
}
enumEnd(ThemeColorId);
-#endif // GUI_THEMECOLORID_H
+#endif // ENUMS_GUI_THEMECOLORID_H
diff --git a/src/enums/resources/map/maptype.h b/src/enums/resources/map/maptype.h
index bb3607aa4..823e6c081 100644
--- a/src/enums/resources/map/maptype.h
+++ b/src/enums/resources/map/maptype.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RESOURCES_MAP_MAPTYPE_H
-#define RESOURCES_MAP_MAPTYPE_H
+#ifndef ENUMS_RESOURCES_MAP_MAPTYPE_H
+#define ENUMS_RESOURCES_MAP_MAPTYPE_H
#include "enums/simpletypes/enumdefines.h"
@@ -37,4 +37,4 @@ enumStart(MapType)
}
enumEnd(MapType);
-#endif // RESOURCES_MAP_MAPTYPE_H
+#endif // ENUMS_RESOURCES_MAP_MAPTYPE_H
diff --git a/src/events/keyevent.h b/src/events/keyevent.h
index d7b5b71b0..71897e1da 100644
--- a/src/events/keyevent.h
+++ b/src/events/keyevent.h
@@ -72,7 +72,9 @@
#include "input/key.h"
+#ifdef USE_SDL2
#include <string>
+#endif
class Widget;
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index bf1bedc1d..a6ae45e9c 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -23,6 +23,7 @@
#include "configuration.h"
#include "client.h"
#include "game.h"
+#include "logger.h"
#ifdef USE_MUMBLE
#include "mumblemanager.h"
#endif
diff --git a/src/flooritem.cpp b/src/flooritem.cpp
index a3ad4385c..ea4ae21d3 100644
--- a/src/flooritem.cpp
+++ b/src/flooritem.cpp
@@ -24,8 +24,6 @@
#include "configuration.h"
-#include "enums/gui/usercolorid.h"
-
#include "render/graphics.h"
#include "gui/gui.h"
diff --git a/src/flooritem.h b/src/flooritem.h
index c7a333329..9e9b95050 100644
--- a/src/flooritem.h
+++ b/src/flooritem.h
@@ -23,8 +23,6 @@
#ifndef FLOORITEM_H
#define FLOORITEM_H
-#include "enums/simpletypes/beingid.h"
-
#include "being/actorsprite.h"
#include "resources/cursor.h"
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 56facd8cc..8c2f71e50 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -27,8 +27,6 @@
#include "being/localplayer.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/viewport.h"
#include "gui/windows/chatwindow.h"
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index e8aa8cc2d..3425bc5a2 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -25,10 +25,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "being/playerinfo.h"
#include "gui/widgets/selldialog.h"
diff --git a/src/gui/dialogsmanager.h b/src/gui/dialogsmanager.h
index 11a4545ad..4dd4bcf7b 100644
--- a/src/gui/dialogsmanager.h
+++ b/src/gui/dialogsmanager.h
@@ -24,7 +24,6 @@
#define GUI_DIALOGSMANAGER_H
#include "enums/simpletypes/modal.h"
-#include "enums/simpletypes/showcenter.h"
#include "listeners/attributelistener.h"
#include "listeners/playerdeathlistener.h"
diff --git a/src/gui/fonts/textchunklist_unittest.cc b/src/gui/fonts/textchunklist_unittest.cc
index 116a386e5..f245af664 100644
--- a/src/gui/fonts/textchunklist_unittest.cc
+++ b/src/gui/fonts/textchunklist_unittest.cc
@@ -96,7 +96,7 @@ TEST_CASE("TextChunkList addRemoveBack 1", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
list.insertFirst(chunk);
@@ -113,9 +113,9 @@ TEST_CASE("TextChunkList addRemoveBack 2", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 4), Color(1, 2, 5), nullptr);
list.insertFirst(chunk2);
@@ -140,9 +140,9 @@ TEST_CASE("TextChunkList addRemoveBack 3", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(2, 3, 4), Color(2, 3, 4), nullptr);
list.insertFirst(chunk2);
@@ -161,11 +161,11 @@ TEST_CASE("TextChunkList addRemoveBack 4", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(2, 3, 4), Color(2, 3, 4), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(3, 4, 5), Color(3, 4, 5), nullptr);
list.insertFirst(chunk3);
@@ -191,7 +191,7 @@ TEST_CASE("TextChunkList moveToFirst 1", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(1, 2, 3), Color(2, 3, 4), nullptr);
list.insertFirst(chunk);
@@ -208,9 +208,9 @@ TEST_CASE("TextChunkList moveToFirst 2", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(2, 3, 4), Color(1, 2, 3), nullptr);
list.insertFirst(chunk1);
@@ -230,11 +230,11 @@ TEST_CASE("TextChunkList moveToFirst 3", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(1, 2, 3), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 4), Color(1, 2, 3), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 5), Color(1, 2, 3), nullptr);
list.insertFirst(chunk3);
@@ -257,11 +257,11 @@ TEST_CASE("TextChunkList moveToFirst 4", "TextChunkList")
{
TextChunkList list;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(), Color(), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(), Color(), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(), Color(), nullptr);
list.insertFirst(chunk1);
@@ -283,9 +283,9 @@ TEST_CASE("TextChunkList moveToFirst 4", "TextChunkList")
TEST_CASE("TextChunkList clear 1", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(), Color(), nullptr);
list.insertFirst(chunk);
@@ -302,13 +302,13 @@ TEST_CASE("TextChunkList clear 1", "TextChunkList")
TEST_CASE("TextChunkList clear 2", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -327,13 +327,13 @@ TEST_CASE("TextChunkList clear 2", "TextChunkList")
TEST_CASE("TextChunkList clear 3", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test",
+ TextChunk *const chunk3 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -358,13 +358,13 @@ TEST_CASE("TextChunkList clear 3", "TextChunkList")
TEST_CASE("TextChunkList clear 4", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test",
+ TextChunk *const chunk1 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test",
+ TextChunk *const chunk2 = new TextChunk("test",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -389,9 +389,9 @@ TEST_CASE("TextChunkList clear 4", "TextChunkList")
TEST_CASE("TextChunkList remove 1", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk = new TextChunk("test",
+ TextChunk *const chunk = new TextChunk("test",
Color(), Color(), nullptr);
list.insertFirst(chunk);
@@ -409,13 +409,13 @@ TEST_CASE("TextChunkList remove 1", "TextChunkList")
TEST_CASE("TextChunkList remove 2", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test1",
+ TextChunk *const chunk1 = new TextChunk("test1",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
@@ -435,13 +435,13 @@ TEST_CASE("TextChunkList remove 2", "TextChunkList")
TEST_CASE("TextChunkList remove 3", "TextChunkList")
{
TextChunkList list;
- int chunksLeft = textChunkCnt;
+ const int chunksLeft = textChunkCnt;
- TextChunk *chunk1 = new TextChunk("test1",
+ TextChunk *const chunk1 = new TextChunk("test1",
Color(1, 2, 3), Color(2, 0, 0), nullptr);
- TextChunk *chunk2 = new TextChunk("test2",
+ TextChunk *const chunk2 = new TextChunk("test2",
Color(1, 2, 3), Color(2, 0, 1), nullptr);
- TextChunk *chunk3 = new TextChunk("test3",
+ TextChunk *const chunk3 = new TextChunk("test3",
Color(1, 2, 3), Color(2, 0, 2), nullptr);
list.insertFirst(chunk1);
diff --git a/src/gui/palette.h b/src/gui/palette.h
index bee83daf3..6c96b3572 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -24,10 +24,7 @@
#ifndef GUI_PALETTE_H
#define GUI_PALETTE_H
-#include "logger.h"
-
#include "enums/gui/gradienttype.h"
-#include "enums/gui/usercolorid.h"
#include "gui/color.h"
@@ -39,6 +36,8 @@
#include <map>
#include <set>
+#include <string>
+#include <vector>
// Default Gradient Delay
#define GRADIENT_DELAY 40
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 5ae6830cc..6121c288f 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -249,8 +249,10 @@ void ItemPopup::setLabelColor(Label *label, const ItemType::Type type) const
{
caseSetColor(ItemType::UNUSABLE, ThemeColorId::GENERIC)
caseSetColor(ItemType::USABLE, ThemeColorId::USABLE)
- caseSetColor(ItemType::EQUIPMENT_ONE_HAND_WEAPON, ThemeColorId::ONEHAND)
- caseSetColor(ItemType::EQUIPMENT_TWO_HANDS_WEAPON, ThemeColorId::TWOHAND)
+ caseSetColor(ItemType::EQUIPMENT_ONE_HAND_WEAPON,
+ ThemeColorId::ONEHAND)
+ caseSetColor(ItemType::EQUIPMENT_TWO_HANDS_WEAPON,
+ ThemeColorId::TWOHAND)
caseSetColor(ItemType::EQUIPMENT_TORSO, ThemeColorId::TORSO)
caseSetColor(ItemType::EQUIPMENT_ARMS, ThemeColorId::ARMS)
caseSetColor(ItemType::EQUIPMENT_HEAD, ThemeColorId::HEAD)
diff --git a/src/gui/popups/speechbubble.h b/src/gui/popups/speechbubble.h
index 7f09ca187..b44bb1d13 100644
--- a/src/gui/popups/speechbubble.h
+++ b/src/gui/popups/speechbubble.h
@@ -45,10 +45,10 @@ class SpeechBubble final : public Popup
* Sets the name displayed for the speech bubble, and in what color.
*/
void setCaption(const std::string &name,
- const Color *const color1 =
- &theme->getColor(ThemeColorId::BUBBLE_NAME, 255),
- const Color *const color2 =
- &theme->getColor(ThemeColorId::BUBBLE_NAME_OUTLINE, 255));
+ const Color *const color1 = &theme->getColor(
+ ThemeColorId::BUBBLE_NAME, 255),
+ const Color *const color2 = &theme->getColor(
+ ThemeColorId::BUBBLE_NAME_OUTLINE, 255));
/**
* Sets the text to be displayed.
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 9735fc05b..3881311a9 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -27,9 +27,6 @@
#include "configuration.h"
#include "graphicsmanager.h"
-#include "enums/gui/progresscolorid.h"
-#include "enums/gui/themecolorid.h"
-
#include "gui/skin.h"
#include "gui/themeinfo.h"
diff --git a/src/gui/themecolorsidoperators.h b/src/gui/themecolorsidoperators.h
index b4781ed2d..eace32c72 100644
--- a/src/gui/themecolorsidoperators.h
+++ b/src/gui/themecolorsidoperators.h
@@ -18,11 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_THEMECOLORIDOPERATOR_H
-#define GUI_THEMECOLORIDOPERATOR_H
+#ifndef GUI_THEMECOLORIDOPERATORS_H
+#define GUI_THEMECOLORIDOPERATORS_H
#include "enums/gui/themecolorid.h"
ThemeColorIdT operator+(const ThemeColorIdT &id, const int& i);
-#endif // GUI_THEMECOLORIDOPERATOR_H
+#endif // GUI_THEMECOLORIDOPERATORS_H
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index bb82b3b78..8ae5cb8b0 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -23,8 +23,6 @@
#include "gui/userpalette.h"
-#include "enums/gui/usercolorid.h"
-
#include "configuration.h"
#include "utils/gettext.h"
@@ -114,117 +112,239 @@ UserPalette::UserPalette() :
mColors[static_cast<size_t>(UserColorId::NPC)] = ColorElem();
mColors[static_cast<size_t>(UserColorId::MONSTER)] = ColorElem();
- // TRANSLATORS: palette color
- addColor(UserColorId::BEING, 0xffffff, GradientType::STATIC, _("Being"));
- // TRANSLATORS: palette color
- addColor(UserColorId::FRIEND, 0xb0ffb0, GradientType::STATIC, _("Friend names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::DISREGARDED, 0xa00000, GradientType::STATIC, _("Disregarded names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::IGNORED, 0xff0000, GradientType::STATIC, _("Ignored names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::ERASED, 0xff0000, GradientType::STATIC, _("Erased names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PC, 0xffffff, GradientType::STATIC, _("Other players names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::SELF, 0xff8040, GradientType::STATIC, _("Own name"));
- // TRANSLATORS: palette color
- addColor(UserColorId::GM, 0x00ff00, GradientType::STATIC, _("GM names"));
- // TRANSLATORS: palette color
- addColor(UserColorId::NPC, 0xc8c8ff, GradientType::STATIC, _("NPCs"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MONSTER, 0xff4040, GradientType::STATIC, _("Monsters"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MONSTER_HP, 0x00ff00, GradientType::STATIC, _("Monster HP bar"), 50);
- addColor(UserColorId::MONSTER_HP2, 0xff0000, GradientType::STATIC,
- // TRANSLATORS: palette color
- _("Monster HP bar (second color)"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::PARTY, 0xff00d8, GradientType::STATIC, _("Party members"));
- // TRANSLATORS: palette color
- addColor(UserColorId::GUILD, 0xff00d8, GradientType::STATIC, _("Guild members"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PARTICLE, 0xffffff, GradientType::STATIC, _("Particle effects"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PICKUP_INFO, 0x28dc28, GradientType::STATIC, _("Pickup notification"));
- // TRANSLATORS: palette color
- addColor(UserColorId::EXP_INFO, 0xffff00, GradientType::STATIC, _("Exp notification"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PLAYER_HP, 0x00ff00, GradientType::STATIC, _("Player HP bar"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::PLAYER_HP2, 0xff0000, GradientType::STATIC,
- // TRANSLATORS: palette color
- _("Player HP bar (second color)"), 50);
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_PLAYER_MONSTER, 0x0064ff, GradientType::STATIC, _("Player hits monster"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_MONSTER_PLAYER, 0xff3232, GradientType::STATIC, _("Monster hits player"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_PLAYER_PLAYER, 0xff5050, GradientType::STATIC,
+ addColor(UserColorId::BEING,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Being"));
+ addColor(UserColorId::FRIEND,
+ 0xb0ffb0,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Friend names"));
+ addColor(UserColorId::DISREGARDED,
+ 0xa00000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Disregarded names"));
+ addColor(UserColorId::IGNORED,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Ignored names"));
+ addColor(UserColorId::ERASED,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Erased names"));
+ addColor(UserColorId::PC,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Other players names"));
+ addColor(UserColorId::SELF,
+ 0xff8040,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Own name"));
+ addColor(UserColorId::GM,
+ 0x00ff00,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("GM names"));
+ addColor(UserColorId::NPC,
+ 0xc8c8ff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("NPCs"));
+ addColor(UserColorId::MONSTER,
+ 0xff4040,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monsters"));
+ addColor(UserColorId::MONSTER_HP,
+ 0x00ff00,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster HP bar"),
+ 50);
+ addColor(UserColorId::MONSTER_HP2,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster HP bar (second color)"),
+ 50);
+ addColor(UserColorId::PARTY,
+ 0xff00d8,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Party members"));
+ addColor(UserColorId::GUILD,
+ 0xff00d8,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Guild members"));
+ addColor(UserColorId::PARTICLE,
+ 0xffffff,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Particle effects"));
+ addColor(UserColorId::PICKUP_INFO,
+ 0x28dc28,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Pickup notification"));
+ addColor(UserColorId::EXP_INFO,
+ 0xffff00,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Exp notification"));
+ addColor(UserColorId::PLAYER_HP,
+ 0x00ff00,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Player HP bar"), 50);
+ addColor(UserColorId::PLAYER_HP2,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Player HP bar (second color)"),
+ 50);
+ addColor(UserColorId::HIT_PLAYER_MONSTER,
+ 0x0064ff,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Player hits monster"));
+ addColor(UserColorId::HIT_MONSTER_PLAYER,
+ 0xff3232,
+ // TRANSLATORS: palette color
+ GradientType::STATIC,
+ _("Monster hits player"));
+ addColor(UserColorId::HIT_PLAYER_PLAYER,
+ 0xff5050,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Other player hits local player"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_CRITICAL, 0xff0000, GradientType::RAINBOW, _("Critical Hit"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HIT_LOCAL_PLAYER_MONSTER, 0x00ff00, GradientType::STATIC,
+ addColor(UserColorId::HIT_CRITICAL,
+ 0xff0000,
+ // TRANSLATORS: palette color
+ GradientType::RAINBOW,
+ _("Critical Hit"));
+ addColor(UserColorId::HIT_LOCAL_PLAYER_MONSTER,
+ 0x00ff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Local player hits monster"));
- addColor(UserColorId::HIT_LOCAL_PLAYER_CRITICAL, 0xff0000, GradientType::RAINBOW,
+ addColor(UserColorId::HIT_LOCAL_PLAYER_CRITICAL,
+ 0xff0000,
+ GradientType::RAINBOW,
// TRANSLATORS: palette color
_("Local player critical hit"));
- addColor(UserColorId::HIT_LOCAL_PLAYER_MISS, 0x00ffa6, GradientType::STATIC,
- // TRANSLATORS: palette color
+ addColor(UserColorId::HIT_LOCAL_PLAYER_MISS,
+ 0x00ffa6,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
_("Local player miss"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MISS, 0xffff00, GradientType::STATIC, _("Misses"));
- // TRANSLATORS: palette color
- addColor(UserColorId::PORTAL_HIGHLIGHT, 0xC80000, GradientType::STATIC, _("Portal highlight"));
- addColor(UserColorId::COLLISION_HIGHLIGHT, 0x0000C8, GradientType::STATIC,
+ addColor(UserColorId::MISS, 0xffff00,
// TRANSLATORS: palette color
- _("Default collision highlight"), 64);
- addColor(UserColorId::AIR_COLLISION_HIGHLIGHT, 0xe0e0ff, GradientType::STATIC,
+ GradientType::STATIC,
+ _("Misses"));
+ addColor(UserColorId::PORTAL_HIGHLIGHT,
+ 0xC80000,
// TRANSLATORS: palette color
- _("Air collision highlight"), 64);
- addColor(UserColorId::WATER_COLLISION_HIGHLIGHT, 0x2050e0, GradientType::STATIC,
+ GradientType::STATIC,
+ _("Portal highlight"));
+ addColor(UserColorId::COLLISION_HIGHLIGHT,
+ 0x0000C8,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Water collision highlight"), 64);
- addColor(UserColorId::GROUNDTOP_COLLISION_HIGHLIGHT, 0xffff00, GradientType::STATIC,
+ _("Default collision highlight"),
+ 64);
+ addColor(UserColorId::AIR_COLLISION_HIGHLIGHT,
+ 0xe0e0ff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Special ground collision highlight"), 20);
- addColor(UserColorId::WALKABLE_HIGHLIGHT, 0x00D000, GradientType::STATIC,
+ _("Air collision highlight"),
+ 64);
+ addColor(UserColorId::WATER_COLLISION_HIGHLIGHT,
+ 0x2050e0,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Walkable highlight"), 255);
- addColor(UserColorId::ATTACK_RANGE, 0xffffff, GradientType::STATIC,
+ _("Water collision highlight"),
+ 64);
+ addColor(UserColorId::GROUNDTOP_COLLISION_HIGHLIGHT,
+ 0xffff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Local player attack range"), 5);
- addColor(UserColorId::ATTACK_RANGE_BORDER, 0x0, GradientType::STATIC,
+ _("Special ground collision highlight"),
+ 20);
+ addColor(UserColorId::WALKABLE_HIGHLIGHT,
+ 0x00D000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Local player attack range border"), 76);
- addColor(UserColorId::MONSTER_ATTACK_RANGE, 0xff0000, GradientType::STATIC,
+ _("Walkable highlight"),
+ 255);
+ addColor(UserColorId::ATTACK_RANGE,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Monster attack range"), 20);
-
- addColor(UserColorId::FLOOR_ITEM_TEXT, 0xffffff, GradientType::STATIC,
+ _("Local player attack range"),
+ 5);
+ addColor(UserColorId::ATTACK_RANGE_BORDER,
+ 0x0,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Local player attack range border"),
+ 76);
+ addColor(UserColorId::MONSTER_ATTACK_RANGE,
+ 0xff0000,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Monster attack range"),
+ 20);
+ addColor(UserColorId::FLOOR_ITEM_TEXT,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Floor item amount color"), 100);
- addColor(UserColorId::HOME_PLACE, 0xffffff, GradientType::STATIC,
+ _("Floor item amount color"),
+ 100);
+ addColor(UserColorId::HOME_PLACE,
+ 0xffffff,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Home place"), 20);
- addColor(UserColorId::HOME_PLACE_BORDER, 0xffff00, GradientType::STATIC,
+ _("Home place"),
+ 20);
+ addColor(UserColorId::HOME_PLACE_BORDER,
+ 0xffff00,
+ GradientType::STATIC,
// TRANSLATORS: palette color
- _("Home place border"), 200);
- addColor(UserColorId::ROAD_POINT, 0x000000, GradientType::STATIC,
+ _("Home place border"),
+ 200);
+ addColor(UserColorId::ROAD_POINT,
+ 0x000000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Road point"), 100);
- addColor(UserColorId::NET, 0x000000, GradientType::STATIC,
+ addColor(UserColorId::NET,
+ 0x000000,
+ GradientType::STATIC,
// TRANSLATORS: palette color
_("Tiles border"), 64);
- // TRANSLATORS: palette color
- addColor(UserColorId::PET, 0xffffff, GradientType::STATIC, _("Pets"));
- // TRANSLATORS: palette color
- addColor(UserColorId::MERCENARY, 0xffffff, GradientType::STATIC, _("Mercenary"));
- // TRANSLATORS: palette color
- addColor(UserColorId::HOMUNCULUS, 0xffffff, GradientType::STATIC, _("Homunculus"));
+ addColor(UserColorId::PET,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Pets"));
+ addColor(UserColorId::MERCENARY,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Mercenary"));
+ addColor(UserColorId::HOMUNCULUS,
+ 0xffffff,
+ GradientType::STATIC,
+ // TRANSLATORS: palette color
+ _("Homunculus"));
commit(true);
}
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 1a7af763b..e5e9465f9 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -24,6 +24,8 @@
#ifndef GUI_USERPALETTE_H
#define GUI_USERPALETTE_H
+#include "logger.h"
+
#include "enums/gui/usercolorid.h"
#include "gui/palette.h"
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7bb6e2eef..42c002d39 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -42,6 +42,7 @@
#include "gui/gui.h"
#include "gui/popupmanager.h"
+#include "gui/userpalette.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index d5b6cbaf8..47debb1e7 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -25,8 +25,6 @@
#include "configuration.h"
#include "graphicsvertexes.h"
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "gui/gui.h"
@@ -42,8 +40,6 @@
#include "gui/windows/chatwindow.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/mapitemtype.h"
@@ -180,7 +176,8 @@ void AvatarListBox::draw(Graphics *graphics)
if (a->getMaxHp())
{
const ProgressColorIdT themeColor = (isPoison
- ? ProgressColorId::PROG_HP_POISON : ProgressColorId::PROG_HP);
+ ? ProgressColorId::PROG_HP_POISON
+ : ProgressColorId::PROG_HP);
Color color = Theme::getProgressColor(
themeColor, static_cast<float>(a->getHp())
/ static_cast<float>(a->getMaxHp()));
@@ -417,7 +414,8 @@ void AvatarListBox::safeDraw(Graphics *graphics)
if (a->getMaxHp())
{
const ProgressColorIdT themeColor = (isPoison
- ? ProgressColorId::PROG_HP_POISON : ProgressColorId::PROG_HP);
+ ? ProgressColorId::PROG_HP_POISON
+ : ProgressColorId::PROG_HP);
Color color = Theme::getProgressColor(
themeColor, static_cast<float>(a->getHp())
/ static_cast<float>(a->getMaxHp()));
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index bcf30a27f..1be1d4bc0 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -63,8 +63,6 @@
#include "gui/widgets/basiccontainer.h"
-#include "render/renderers.h"
-
#include <algorithm>
#include "debug.h"
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 842286ecb..98140e71c 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -68,8 +68,6 @@
#include "graphicsvertexes.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imageset.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index df0032990..b7af55018 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -24,8 +24,6 @@
#include "units.h"
-#include "enums/being/attributes.h"
-
#include "gui/gui.h"
#include "gui/windows/charselectdialog.h"
diff --git a/src/gui/widgets/chatinput.h b/src/gui/widgets/chatinput.h
index 592299312..1d2b6b426 100644
--- a/src/gui/widgets/chatinput.h
+++ b/src/gui/widgets/chatinput.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_CHATINPUT_H
#define GUI_WIDGETS_CHATINPUT_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/windows/chatwindow.h"
#include "configuration.h"
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index f7dbf3526..b5818308b 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 890a2af1f..d637b7194 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -24,8 +24,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/skin.h"
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 7d9506546..f40a855ec 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -25,8 +25,6 @@
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index d5242520f..6fa605c8b 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -24,8 +24,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/models/tablemodel.h"
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index b0e902223..fa525f87d 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -26,9 +26,10 @@
#include "gui/sdlinput.h"
#endif
-#include "enums/input/inputaction.h"
-
#include "utils/stringutils.h"
+
+#include <sstream>
+
#include "debug.h"
IntTextField::IntTextField(const Widget2 *const widget,
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 8e0bd2921..85e1a5b8f 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "listeners/selectionlistener.h"
#include "gui/focushandler.h"
@@ -95,7 +93,8 @@ ListBox::ListBox(const Widget2 *const widget,
mSelectionListeners(),
mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
mForegroundSelectedColor(getThemeColor(ThemeColorId::LISTBOX_SELECTED)),
- mForegroundSelectedColor2(getThemeColor(ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
+ mForegroundSelectedColor2(getThemeColor(
+ ThemeColorId::LISTBOX_SELECTED_OUTLINE)),
mOldSelected(-1),
mPadding(0),
mPressedIndex(-2),
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 181d6a46b..f2fe431f1 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -30,8 +30,6 @@
#include "gui/widgets/windowcontainer.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 2965fc410..59951c960 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -30,8 +30,6 @@
#include "gui/fonts/font.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "debug.h"
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 571568e6c..89ee13e85 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_PROGRESSBAR_H
#define GUI_WIDGETS_PROGRESSBAR_H
-#include "enums/gui/progresscolorid.h"
-
#include "gui/widgets/widget.h"
#include "listeners/widgetlistener.h"
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 781a52421..a95286fca 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -67,8 +67,6 @@
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 23b681907..1e43b31b5 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -74,8 +74,6 @@
#include "resources/image.h"
#include "resources/imagerect.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#include "utils/stringutils.h"
diff --git a/src/gui/widgets/selldialog.h b/src/gui/widgets/selldialog.h
index 439042a10..a9cb24870 100644
--- a/src/gui/widgets/selldialog.h
+++ b/src/gui/widgets/selldialog.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_SELLDIALOG_H
#define GUI_WIDGETS_SELLDIALOG_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index c90d2261c..fa56098d8 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -27,8 +27,6 @@
#include "gui/gui.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "utils/delete2.h"
diff --git a/src/gui/widgets/skilldata.h b/src/gui/widgets/skilldata.h
index 0317eccff..6408e8086 100644
--- a/src/gui/widgets/skilldata.h
+++ b/src/gui/widgets/skilldata.h
@@ -25,8 +25,6 @@
#include "resources/soundinfo.h"
-#include <string>
-
class Image;
struct SkillData final
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index 0778b6c12..92d753c4d 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -24,8 +24,6 @@
#include "being/playerinfo.h"
-#include "gui/theme.h"
-
#include "gui/widgets/skilldata.h"
#include "gui/models/skillmodel.h"
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index 038fc2a01..9324091bf 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -26,12 +26,11 @@
#include "enums/simpletypes/modifiable.h"
#include "enums/simpletypes/visible.h"
-#include "gui/color.h"
-
#include "resources/skillowner.h"
#include "resources/skilltype.h"
#include <string>
+
#include <vector>
#include <map>
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 4adc3003f..ae08eaaef 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -68,12 +68,8 @@
#include "graphicsvertexes.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -201,7 +197,6 @@ void Slider::draw(Graphics *graphics)
int w = getWidth();
const int h = getHeight();
- int x = 0;
const int y = mHasMouse ? (h - buttons[1].grid[HSTART]->getHeight()) / 2 :
(h - buttons[0].grid[HSTART]->getHeight()) / 2;
@@ -209,6 +204,7 @@ void Slider::draw(Graphics *graphics)
if (mRedraw || graphics->getRedraw())
{
+ int x = 0;
mRedraw = false;
mVertexes->clear();
if (!mHasMouse)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 4acc9ffd2..f96201e42 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -65,8 +65,6 @@
#include "gui/widgets/tabbedarea.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index a795e8ea1..0eb4200ad 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -57,6 +57,8 @@
#include <sys/time.h>
#endif
+#include <sstream>
+
#include "debug.h"
ChatTab *localChatTab = nullptr;
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index f7a2dcfd6..d5486c538 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -21,8 +21,6 @@
#include "gui/widgets/tabs/setup_colors.h"
-#include "enums/gui/usercolorid.h"
-
#include "gui/gui.h"
#include "gui/userpalette.h"
@@ -266,6 +264,8 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
mTextPreview->setOutline(true);
mTextPreview->useTextAlpha(false);
+// probably need combite both switches and add all mssing color ids.
+
switch (type)
{
case UserColorId::AIR_COLLISION_HIGHLIGHT:
@@ -411,7 +411,8 @@ void Setup_Colors::updateGradType()
// TRANSLATORS: color type
(grad == GradientType::RAINBOW) ? _("Rainbow") : _("Spectrum"));
- const bool enable = (grad == GradientType::STATIC || grad == GradientType::PULSE);
+ const bool enable = (grad == GradientType::STATIC ||
+ grad == GradientType::PULSE);
const bool delayEnable = true;
mGradDelayText->setEnabled(delayEnable);
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 24a385c0f..cc3b15498 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -25,8 +25,6 @@
#include "configuration.h"
-#include "enums/gui/dialogtype.h"
-
#include "input/inputactionoperators.h"
#include "input/inputmanager.h"
#include "input/keyboardconfig.h"
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 54015d788..a7a473593 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -22,8 +22,6 @@
#include "gui/widgets/tabs/setup_theme.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/gui.h"
#include "gui/themeinfo.h"
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 9acd36f86..ae587fe0e 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -24,8 +24,6 @@
#include "configuration.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windowmanager.h"
#include "gui/windows/okdialog.h"
@@ -41,8 +39,6 @@
#include "gui/widgets/slider.h"
#include "gui/widgets/dropdown.h"
-#include "render/renderers.h"
-
#include "utils/delete2.h"
#if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__APPLE__)
@@ -54,6 +50,10 @@
#include "gui/models/modelistmodel.h"
#include "gui/models/opengllistmodel.h"
+#include "render/renderers.h"
+
+#include <sstream>
+
#include "debug.h"
extern Graphics *mainGraphics;
diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h
index b51f8bc38..5490af1a0 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -55,7 +55,8 @@ class SocialGuildTab final : public SocialTab,
ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(guild, showBackground);
}
diff --git a/src/gui/widgets/tabs/socialguildtab2.h b/src/gui/widgets/tabs/socialguildtab2.h
index fb3857214..ef858447d 100644
--- a/src/gui/widgets/tabs/socialguildtab2.h
+++ b/src/gui/widgets/tabs/socialguildtab2.h
@@ -50,11 +50,13 @@ class SocialGuildTab2 final : public SocialTab,
setTabColor(&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB),
&getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_OUTLINE));
setHighlightedTabColor(&getThemeColor(
- ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED), &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED),
+ &getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::GUILD_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::GUILD_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(guild, showBackground);
}
diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h
index ff634bf3c..dd1acf5e1 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -57,7 +57,8 @@ class SocialPartyTab final : public SocialTab,
ThemeColorId::PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(
ThemeColorId::PARTY_SOCIAL_TAB_SELECTED),
- &getThemeColor(ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
+ &getThemeColor(
+ ThemeColorId::PARTY_SOCIAL_TAB_SELECTED_OUTLINE));
createControls(party, showBackground);
}
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index d8f58bf8d..5a4b4f5dc 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -74,8 +74,6 @@
#include "gui/widgets/label.h"
#include "gui/widgets/tabbedarea.h"
-#include "render/renderers.h"
-
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -111,11 +109,13 @@ Tab::Tab(const Widget2 *const widget) :
mTabHighlightedOutlineColor(&getThemeColor(
ThemeColorId::TAB_HIGHLIGHTED_OUTLINE)),
mTabSelectedColor(&getThemeColor(ThemeColorId::TAB_SELECTED)),
- mTabSelectedOutlineColor(&getThemeColor(ThemeColorId::TAB_SELECTED_OUTLINE)),
+ mTabSelectedOutlineColor(&getThemeColor(
+ ThemeColorId::TAB_SELECTED_OUTLINE)),
mFlashColor(&getThemeColor(ThemeColorId::TAB_FLASH)),
mFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_FLASH_OUTLINE)),
mPlayerFlashColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH)),
- mPlayerFlashOutlineColor(&getThemeColor(ThemeColorId::TAB_PLAYER_FLASH_OUTLINE)),
+ mPlayerFlashOutlineColor(&getThemeColor(
+ ThemeColorId::TAB_PLAYER_FLASH_OUTLINE)),
mFlash(0),
mVertexes(new ImageCollection),
mImage(nullptr),
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 248fbcb9e..c0aacd2c6 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -65,8 +65,6 @@
#include "gui/widgets/textbox.h"
-#include "enums/input/inputaction.h"
-
#include "gui/gui.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index f6e777e03..1ef0b3793 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -67,7 +67,6 @@
#define GUI_WIDGETS_WINDOW_H
#include "enums/simpletypes/modal.h"
-#include "enums/simpletypes/visible.h"
#include "listeners/mouselistener.h"
#include "listeners/widgetlistener.h"
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index d91526750..f5f0b1c7d 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -25,8 +25,6 @@
#include "enums/input/inputaction.h"
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/container.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h
index bef09083e..7aaa1e7c5 100644
--- a/src/gui/windows/buydialog.h
+++ b/src/gui/windows/buydialog.h
@@ -24,7 +24,6 @@
#define GUI_WINDOWS_BUYDIALOG_H
#include "enums/simpletypes/beingid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/buyingstoreselldialog.cpp b/src/gui/windows/buyingstoreselldialog.cpp
index f99251eb0..55b6a96fb 100644
--- a/src/gui/windows/buyingstoreselldialog.cpp
+++ b/src/gui/windows/buyingstoreselldialog.cpp
@@ -26,7 +26,6 @@
#include "inventory.h"
#include "shopitem.h"
-#include "being/being.h"
#include "being/playerinfo.h"
#include "gui/models/shopitems.h"
diff --git a/src/gui/windows/buyselldialog.h b/src/gui/windows/buyselldialog.h
index dc7435126..a8041fb99 100644
--- a/src/gui/windows/buyselldialog.h
+++ b/src/gui/windows/buyselldialog.h
@@ -24,7 +24,6 @@
#define GUI_WINDOWS_BUYSELLDIALOG_H
#include "enums/simpletypes/beingid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 4ab2c690c..fdafe5fed 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -40,6 +38,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
ChangeEmailDialog::ChangeEmailDialog(LoginData *const data) :
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index ed6ac578b..fda845d39 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -41,6 +39,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
ChangePasswordDialog::ChangePasswordDialog(LoginData *const data) :
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 436c4d841..049d91dc6 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -26,10 +26,6 @@
#include "enums/being/beingdirection.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 0ffba7984..4a69db0be 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -26,17 +26,11 @@
#include "configuration.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/input/inputaction.h"
-
#include "listeners/charrenamelistener.h"
#ifdef EATHENA_SUPPORT
#include "listeners/pincodelistener.h"
#endif
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/chardeleteconfirm.h"
#include "gui/windows/editdialog.h"
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7a62ad755..18c323339 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -33,8 +33,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
-
#include "input/inputmanager.h"
#include "gui/chatconsts.h"
@@ -75,6 +73,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
ChatWindow *chatWindow = nullptr;
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 1952909d4..ca8250fa0 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -26,7 +26,6 @@
#include "enums/gui/chatmsgtype.h"
#include "enums/simpletypes/ignorerecord.h"
-#include "enums/simpletypes/visible.h"
#include "enums/simpletypes/tryremovecolors.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/didyouknowwindow.h b/src/gui/windows/didyouknowwindow.h
index 4de462e97..d02d627f4 100644
--- a/src/gui/windows/didyouknowwindow.h
+++ b/src/gui/windows/didyouknowwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_DIDYOUKNOWWINDOW_H
#define GUI_WINDOWS_DIDYOUKNOWWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/linkhandler.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 18319dbde..5fb3ac714 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -21,10 +21,6 @@
#include "gui/windows/editserverdialog.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/models/typelistmodel.h"
#include "gui/windows/okdialog.h"
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 9c6602176..8e7d47f65 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -42,8 +42,6 @@
#include "gui/widgets/playerbox.h"
#include "gui/widgets/tabstrip.h"
-#include "render/renderers.h"
-
#include "resources/equipmentslots.h"
#include "resources/imageset.h"
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index c5934b7ba..4c11f1603 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -26,10 +26,6 @@
#include "item.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/playerinfo.h"
#include "input/inputmanager.h"
@@ -94,8 +90,9 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mRetrieveButton(nullptr),
mInvCloseButton(nullptr),
mWeightBar(nullptr),
- mSlotsBar(new ProgressBar(this, 0.0F, 100, 0, ProgressColorId::PROG_INVY_SLOTS,
- "slotsprogressbar.xml", "slotsprogressbar_fill.xml")),
+ mSlotsBar(new ProgressBar(this, 0.0F, 100, 0,
+ ProgressColorId::PROG_INVY_SLOTS,
+ "slotsprogressbar.xml", "slotsprogressbar_fill.xml")),
mFilter(nullptr),
mSortModel(new SortListModelInv),
mSortDropDown(new DropDown(this, mSortModel, false,
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index c220b75aa..062ac6bce 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -25,8 +25,6 @@
#include "inventory.h"
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index c765c5b5a..cdc2ed429 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -34,8 +34,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "utils/gettext.h"
#ifdef WIN32
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 2d7adc09f..5203bc228 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -25,8 +25,6 @@
#include "client.h"
#include "configuration.h"
-#include "enums/input/inputaction.h"
-
#include "listeners/openurllistener.h"
#include "gui/models/updatelistmodel.h"
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index e1edbb74b..530e71090 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -253,7 +253,7 @@ void MailWindow::viewPrev(const int id)
if (it == mMessages.begin())
{
it = mMessages.end();
- mListBox->setSelected(mMessages.size() - 1);
+ mListBox->setSelected(static_cast<int>(mMessages.size()) - 1);
}
else
{
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index ea22db3f4..9e2cb4b81 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -31,6 +31,7 @@
#include "gui/popupmanager.h"
#include "gui/viewport.h"
+#include "gui/userpalette.h"
#include "gui/popups/popupmenu.h"
#include "gui/popups/textpopup.h"
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 42a499771..65bef8e5c 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -26,10 +26,6 @@
#include "configuration.h"
#include "inventory.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -88,7 +84,8 @@ MiniStatusWindow::MiniStatusWindow() :
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
mJobBar(nullptr),
- mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR, ProgressColorId::PROG_WEIGHT,
+ mWeightBar(createBar(0, 140, 0, ThemeColorId::WEIGHT_BAR,
+ ProgressColorId::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml",
// TRANSLATORS: status bar name
"weight bar", _("weight bar"))),
@@ -98,16 +95,19 @@ MiniStatusWindow::MiniStatusWindow() :
"inventory slots bar",
// TRANSLATORS: status bar name
_("inventory slots bar"))),
- mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR, ProgressColorId::PROG_MONEY,
+ mMoneyBar(createBar(0, 130, 0, ThemeColorId::MONEY_BAR,
+ ProgressColorId::PROG_MONEY,
"moneyprogressbar.xml", "moneyprogressbar_fill.xml",
// TRANSLATORS: status bar name
"money bar", _("money bar"))),
- mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR, ProgressColorId::PROG_ARROWS,
+ mArrowsBar(createBar(0, 50, 0, ThemeColorId::ARROWS_BAR,
+ ProgressColorId::PROG_ARROWS,
"arrowsprogressbar.xml", "arrowsprogressbar_fill.xml",
// TRANSLATORS: status bar name
"arrows bar", _("arrows bar"))),
mStatusBar(createBar(100, (config.getIntValue("fontSize") > 16
- ? 250 : 165), 0, ThemeColorId::STATUS_BAR, ProgressColorId::PROG_STATUS,
+ ? 250 : 165), 0, ThemeColorId::STATUS_BAR,
+ ProgressColorId::PROG_STATUS,
"statusprogressbar.xml", "statusprogressbar_fill.xml",
// TRANSLATORS: status bar name
"status bar", _("status bar"))),
@@ -130,7 +130,9 @@ MiniStatusWindow::MiniStatusWindow() :
if (job)
{
- mJobBar = createBar(0, 100, 0, ThemeColorId::JOB_BAR, ProgressColorId::PROG_JOB,
+ mJobBar = createBar(0, 100, 0,
+ ThemeColorId::JOB_BAR,
+ ProgressColorId::PROG_JOB,
// TRANSLATORS: status bar name
"jobprogressbar.xml", "jobprogressbar_fill.xml",
"job bar", _("job bar"));
diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h
index cae3cd414..0146b3f00 100644
--- a/src/gui/windows/ministatuswindow.h
+++ b/src/gui/windows/ministatuswindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_MINISTATUSWINDOW_H
#define GUI_WINDOWS_MINISTATUSWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "listeners/arrowslistener.h"
#include "listeners/attributelistener.h"
#include "listeners/inventorylistener.h"
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 4f38dd66b..62ebd28bf 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -31,8 +31,6 @@
#include "being/being.h"
-#include "enums/net/packettype.h"
-
#include "gui/gui.h"
#include "gui/viewport.h"
@@ -65,6 +63,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
// TRANSLATORS: npc dialog button
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index 5d6786255..cdb5bff2a 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -25,7 +25,6 @@
#include "enums/simpletypes/beingid.h"
#include "enums/simpletypes/beingtypeid.h"
-#include "enums/simpletypes/visible.h"
#include "gui/models/extendedlistmodel.h"
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index c1d9b1d24..f5eadd440 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -47,6 +47,8 @@
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
OutfitWindow *outfitWindow = nullptr;
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index d16a22ff8..9c5a2dee1 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -27,8 +27,6 @@
#include "soundconsts.h"
#include "soundmanager.h"
-#include "enums/input/inputaction.h"
-
#include "gui/dialogsmanager.h"
#include "gui/viewport.h"
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 1f0dc68e2..d2c878e68 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -24,10 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
-#include "enums/input/inputaction.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 684ff448a..bd0f992e8 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -27,8 +27,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "net/download.h"
#include "gui/widgets/checkbox.h"
diff --git a/src/gui/windows/setupwindow.h b/src/gui/windows/setupwindow.h
index de274281f..263877c0e 100644
--- a/src/gui/windows/setupwindow.h
+++ b/src/gui/windows/setupwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_SETUPWINDOW_H
#define GUI_WINDOWS_SETUPWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/shopselldialog.cpp b/src/gui/windows/shopselldialog.cpp
index db5a64aca..d4683eedf 100644
--- a/src/gui/windows/shopselldialog.cpp
+++ b/src/gui/windows/shopselldialog.cpp
@@ -22,8 +22,6 @@
#include "gui/windows/shopselldialog.h"
-#include "shopitem.h"
-
#include "being/playerinfo.h"
#include "gui/windows/tradewindow.h"
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index ae5de90a1..9e45a9b71 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -22,8 +22,6 @@
#include "gui/windows/shopwindow.h"
-#include "enums/being/attributes.h"
-
#ifdef TMWA_SUPPORT
#include "gui/windows/buydialog.h"
#include "gui/windows/chatwindow.h"
@@ -90,6 +88,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
ShopWindow *shopWindow = nullptr;
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 9a2074cf2..ea70bf3c2 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_SHOPWINDOW_H
#define GUI_WINDOWS_SHOPWINDOW_H
-#include "enums/simpletypes/visible.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 6617c200c..b4cda6302 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -30,8 +30,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/setupwindow.h"
#include "gui/windows/shortcutwindow.h"
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 5889041e7..a8584d643 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -21,8 +21,6 @@
#include "gui/windows/socialwindow.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/windows/setupwindow.h"
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 39dfaa7e2..57f7d6f1e 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -28,10 +28,6 @@
#include "settings.h"
#include "units.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/progresscolorid.h"
-
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -112,17 +108,24 @@ StatusWindow::StatusWindow() :
if (!max)
max = 1;
- mHpBar = new ProgressBar(this, static_cast<float>(PlayerInfo::getAttribute(
- Attributes::HP)) / static_cast<float>(max), 80, 0, ProgressColorId::PROG_HP,
+ mHpBar = new ProgressBar(this,
+ static_cast<float>(PlayerInfo::getAttribute(Attributes::HP))
+ / static_cast<float>(max),
+ 80,
+ 0,
+ ProgressColorId::PROG_HP,
"hpprogressbar.xml", "hpprogressbar_fill.xml");
mHpBar->setColor(getThemeColor(ThemeColorId::HP_BAR),
getThemeColor(ThemeColorId::HP_BAR_OUTLINE));
max = PlayerInfo::getAttribute(Attributes::EXP_NEEDED);
- mXpBar = new ProgressBar(this, max ?
- static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP))
- / static_cast<float>(max) : static_cast<float>(0), 80, 0,
- ProgressColorId::PROG_EXP, "xpprogressbar.xml", "xpprogressbar_fill.xml");
+ mXpBar = new ProgressBar(this,
+ max ? static_cast<float>(PlayerInfo::getAttribute(Attributes::EXP))
+ / static_cast<float>(max) : static_cast<float>(0),
+ 80,
+ 0,
+ ProgressColorId::PROG_EXP,
+ "xpprogressbar.xml", "xpprogressbar_fill.xml");
mXpBar->setColor(getThemeColor(ThemeColorId::XP_BAR),
getThemeColor(ThemeColorId::XP_BAR_OUTLINE));
@@ -135,10 +138,13 @@ StatusWindow::StatusWindow() :
// TRANSLATORS: status window label
mMpLabel = new Label(this, _("MP:"));
const bool useMagic = playerHandler->canUseMagic();
- mMpBar = new ProgressBar(this, max ? static_cast<float>(
- PlayerInfo::getAttribute(Attributes::MAX_MP))
- / static_cast<float>(max) : static_cast<float>(0),
- 80, 0, useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP,
+ mMpBar = new ProgressBar(this,
+ max ? static_cast<float>(PlayerInfo::getAttribute(
+ Attributes::MAX_MP)) / static_cast<float>(max)
+ : static_cast<float>(0),
+ 80,
+ 0,
+ useMagic ? ProgressColorId::PROG_MP : ProgressColorId::PROG_NO_MP,
useMagic ? "mpprogressbar.xml" : "nompprogressbar.xml",
useMagic ? "mpprogressbar_fill.xml" : "nompprogressbar_fill.xml");
if (useMagic)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index c5951a7a5..7d1173856 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -30,8 +30,6 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "enums/being/attributes.h"
-
#include "gui/gui.h"
#include "gui/fonts/font.h"
diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp
index 5e8df8298..90c9bd404 100644
--- a/src/gui/windows/unregisterdialog.cpp
+++ b/src/gui/windows/unregisterdialog.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "gui/widgets/button.h"
@@ -40,6 +38,8 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include <sstream>
+
#include "debug.h"
UnRegisterDialog::UnRegisterDialog(LoginData *const data) :
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index ae63d194a..1ef2b7e2c 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -26,12 +26,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/gui/progresscolorid.h"
-
-#include "enums/input/inputaction.h"
-
-#include "enums/net/updatetype.h"
-
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
#include "gui/widgets/containerplacer.h"
@@ -58,6 +52,8 @@
#include <sys/stat.h>
+#include <sstream>
+
#include "debug.h"
UpdaterWindow *updaterWindow = nullptr;
@@ -193,8 +189,9 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
// TRANSLATORS: updater window button
mPlayButton(new Button(this, _("Play"), "play", this)),
- mProgressBar(new ProgressBar(this, 0.0, 310, 0, ProgressColorId::PROG_UPDATE,
- "updateprogressbar.xml", "updateprogressbar_fill.xml")),
+ mProgressBar(new ProgressBar(this, 0.0, 310, 0,
+ ProgressColorId::PROG_UPDATE,
+ "updateprogressbar.xml", "updateprogressbar_fill.xml")),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index db6e2ab4e..9ff00cd34 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -48,8 +48,6 @@
#include "being/localplayer.h"
#include "being/playerrelations.h"
-#include "enums/net/packettype.h"
-
#ifdef TMWA_SUPPORT
#include "net/download.h"
#endif
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index a2604cf80..3fc06293d 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -25,8 +25,6 @@
#include "client.h"
#include "settings.h"
-#include "enums/input/inputaction.h"
-
#include "gui/widgets/button.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/listbox.h"
diff --git a/src/input/inputactiondata.h b/src/input/inputactiondata.h
index f25a5a7f7..ae9359466 100644
--- a/src/input/inputactiondata.h
+++ b/src/input/inputactiondata.h
@@ -25,8 +25,6 @@
#include "actions/actionfuncptr.h"
-#include "enums/input/inputaction.h"
-
#include "enums/simpletypes/useargs.h"
struct InputActionData final
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h
index 79a197799..c9d71a091 100644
--- a/src/input/inputmanager.h
+++ b/src/input/inputmanager.h
@@ -21,8 +21,6 @@
#ifndef INPUT_INPUTMANAGER_H
#define INPUT_INPUTMANAGER_H
-#include "enums/input/inputaction.h"
-
#include "input/inputfunction.h"
#include "events/inputevent.h"
@@ -68,9 +66,11 @@ class InputManager final
InputFunction &getKey(InputActionT index) A_WARN_UNUSED;
- std::string getKeyValueString(const InputActionT index) const A_WARN_UNUSED;
+ std::string getKeyValueString(const InputActionT index)
+ const A_WARN_UNUSED;
- std::string getKeyStringLong(const InputActionT index) const A_WARN_UNUSED;
+ std::string getKeyStringLong(const InputActionT index)
+ const A_WARN_UNUSED;
std::string getKeyValueByName(const std::string &keyName);
diff --git a/src/input/pages/basic.cpp b/src/input/pages/basic.cpp
index bb8c8b5c2..c87ac56d9 100644
--- a/src/input/pages/basic.cpp
+++ b/src/input/pages/basic.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/input/pages/chat.cpp b/src/input/pages/chat.cpp
index 33ba3929c..c2e89a94b 100644
--- a/src/input/pages/chat.cpp
+++ b/src/input/pages/chat.cpp
@@ -20,8 +20,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/input/pages/emotes.cpp b/src/input/pages/emotes.cpp
index ddb80e7b9..ff638a752 100644
--- a/src/input/pages/emotes.cpp
+++ b/src/input/pages/emotes.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/input/pages/gui.cpp b/src/input/pages/gui.cpp
index da9ce4f91..4b799ac30 100644
--- a/src/input/pages/gui.cpp
+++ b/src/input/pages/gui.cpp
@@ -20,8 +20,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/input/pages/move.cpp b/src/input/pages/move.cpp
index 2156b9d27..c32a56330 100644
--- a/src/input/pages/move.cpp
+++ b/src/input/pages/move.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index 433907347..b3d57d4c8 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/input/pages/outfits.cpp b/src/input/pages/outfits.cpp
index 708587cbe..c3c4ff2a5 100644
--- a/src/input/pages/outfits.cpp
+++ b/src/input/pages/outfits.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/input/pages/shortcuts.cpp b/src/input/pages/shortcuts.cpp
index 075532ced..f72b2a116 100644
--- a/src/input/pages/shortcuts.cpp
+++ b/src/input/pages/shortcuts.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/input/pages/windows.cpp b/src/input/pages/windows.cpp
index 49efc9794..00e96a968 100644
--- a/src/input/pages/windows.cpp
+++ b/src/input/pages/windows.cpp
@@ -23,8 +23,6 @@
#include "gui/setupactiondata.h"
-#include "enums/input/inputaction.h"
-
#include "utils/gettext.h"
#include "debug.h"
diff --git a/src/listeners/shoprenamelistener.cpp b/src/listeners/shoprenamelistener.cpp
index 35c89dba6..6f2a01e05 100644
--- a/src/listeners/shoprenamelistener.cpp
+++ b/src/listeners/shoprenamelistener.cpp
@@ -23,8 +23,6 @@
#include "gui/windows/editdialog.h"
#include "gui/windows/shopwindow.h"
-#include "net/charserverhandler.h"
-
#include "debug.h"
ShopRenameListener shopRenameListener;
diff --git a/src/logger.cpp b/src/logger.cpp
index d5d1c3e3b..2c410abbe 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -38,6 +38,8 @@
#include <sys/time.h>
+#include <sstream>
+
#if defined(__ANDROID__) && defined(ANDROID_LOG)
#include <android/log.h>
#define LOG_ANDROID(x) __android_log_print(ANDROID_LOG_INFO, "manaplus", x);
diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h
index b21af2ae6..e79f26bb3 100644
--- a/src/net/beinghandler.h
+++ b/src/net/beinghandler.h
@@ -26,8 +26,6 @@
#include "enums/being/rank.h"
-#include "enums/simpletypes/beingid.h"
-
#include "net/messagein.h"
namespace Net
diff --git a/src/net/character.h b/src/net/character.h
index 4f0295660..4e30d18eb 100644
--- a/src/net/character.h
+++ b/src/net/character.h
@@ -28,9 +28,6 @@
#include "utils/delete2.h"
-#include <string>
-#include <vector>
-
#include "localconsts.h"
namespace Net
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 9e86d5ea1..5d84ebedf 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -43,6 +43,8 @@
#include "utils/files.h"
#endif
+#include <sstream>
+
#include "debug.h"
const char *DOWNLOAD_ERROR_MESSAGE_THREAD
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index a80a9d4f6..515deeee7 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -241,6 +241,13 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg)
}
break;
default:
+ case AttackType::SPLASH:
+ case AttackType::SKILL:
+ case AttackType::REPEATE:
+ case AttackType::MULTI_REFLECT:
+ case AttackType::TOUCH_SKILL:
+ case AttackType::MISS:
+ case AttackType::SKILLMISS:
UNIMPLIMENTEDPACKET;
break;
}
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 0e939c217..20d34bc9f 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -27,8 +27,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "gui/windows/buyselldialog.h"
#include "gui/windows/npcselldialog.h"
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index 1667332bb..c308bebf3 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -23,8 +23,6 @@
#ifndef NET_EA_BUYSELLHANDLER_H
#define NET_EA_BUYSELLHANDLER_H
-#include "enums/simpletypes/beingid.h"
-
#include "net/buysellhandler.h"
class BuyDialog;
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 42c704933..e798467e7 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -24,8 +24,6 @@
#include "client.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/okdialog.h"
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 583ef3409..2a526f4e9 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -26,8 +26,6 @@
#include "game.h"
#include "notifymanager.h"
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/okdialog.h"
#include "net/messagein.h"
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index e540b9bef..e95f62d3d 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -28,8 +28,6 @@
#include "enums/equipslot.h"
-#include "enums/being/attributes.h"
-
#include "net/messagein.h"
#include "net/ea/eaprotocol.h"
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index fd39e218b..a214cc4e5 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -28,6 +28,8 @@
#include "utils/gettext.h"
#include "utils/sdlhelper.h"
+#include <sstream>
+
#include "debug.h"
extern unsigned int mLastHost;
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 6b0be87e9..cb3498412 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -108,6 +108,7 @@ void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg,
NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ERROR);
break;
default:
+ case PartyShare::UNKNOWN:
UNIMPLIMENTEDPACKET;
break;
}
@@ -133,6 +134,7 @@ void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg,
NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ERROR);
break;
default:
+ case PartyShare::UNKNOWN:
UNIMPLIMENTEDPACKET;
break;
}
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 092dc8ca1..42084e419 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -33,8 +33,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/onlineplayer.h"
#include "gui/viewport.h"
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 9a678321a..ff12a909d 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1232,7 +1232,8 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg)
* later versions of eAthena for both mobs and
* players
*/
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
uint16_t srcX, srcY, dstX, dstY;
msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path");
@@ -1347,6 +1348,8 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg)
}
break;
default:
+ case AttackType::MISS:
+ case AttackType::SKILLMISS:
UNIMPLIMENTEDPACKET;
break;
}
@@ -1440,7 +1443,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
msg.readInt16("head direction");
@@ -1666,7 +1670,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
if (dstBeing)
{
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index baaee1aca..5e99994f9 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -25,12 +25,9 @@
#include "notifymanager.h"
#include "shopitem.h"
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buyingstoreselldialog.h"
#include "listeners/arrowslistener.h"
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 26a5a538b..c10978b3d 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -26,8 +26,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index c2b872eca..785e3f62a 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -20,12 +20,8 @@
#include "net/eathena/cashshophandler.h"
-#include "logger.h"
-
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 835360c64..63ca3f277 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -26,10 +26,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/charselectdialog.h"
#include "gui/windows/okdialog.h"
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 3cade553c..db7bb5829 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -47,8 +47,6 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include <string>
-
#include "debug.h"
extern Net::ChatHandler *chatHandler;
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 7fa94ab48..4902b959f 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -23,6 +23,7 @@
#include "net/eathena/gamehandler.h"
#include "client.h"
+#include "logger.h"
#include "being/localplayer.h"
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 072605e78..2f404ce76 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -24,24 +24,17 @@
#include "client.h"
#include "configuration.h"
-#include "logger.h"
-#include "enums/being/attributes.h"
-
-#include "gui/windows/inventorywindow.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
#include "gui/windows/statuswindow.h"
-#include "net/ea/guildhandler.h"
-
#include "gui/widgets/tabs/chat/guildtab.h"
#include "gui/widgets/tabs/chat/partytab.h"
#include "net/eathena/adminhandler.h"
#include "net/eathena/auctionhandler.h"
#include "net/eathena/bankhandler.h"
-#include "net/eathena/battlegroundhandler.h"
#include "net/eathena/beinghandler.h"
#include "net/eathena/buyingstorehandler.h"
#include "net/eathena/buysellhandler.h"
@@ -58,7 +51,6 @@
#include "net/eathena/itemhandler.h"
#include "net/eathena/loginhandler.h"
#include "net/eathena/mailhandler.h"
-#include "net/eathena/maphandler.h"
#include "net/eathena/markethandler.h"
#include "net/eathena/mercenaryhandler.h"
#include "net/eathena/network.h"
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index bffe95b94..31f1edba7 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -512,8 +512,8 @@ void GuildHandler::changeEmblem(std::string emblem) const
createOutPacket(CMSG_GUILD_CHANGE_EMBLEM);
if (emblem.size() > 200)
emblem = emblem.substr(0, 200);
- const int sz = emblem.size();
- outMsg.writeInt16(sz + 4, "len");
+ const int sz = static_cast<int>(emblem.size());
+ outMsg.writeInt16(static_cast<int16_t>(sz + 4), "len");
outMsg.writeString(emblem, sz, "emblem");
}
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp
index e2441ac14..537ea33d8 100644
--- a/src/net/eathena/homunculushandler.cpp
+++ b/src/net/eathena/homunculushandler.cpp
@@ -301,7 +301,7 @@ void HomunculusHandler::talk(const std::string &restrict text) const
createOutPacket(CMSG_HOMMERC_TALK);
outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len");
- outMsg.writeString(msg, sz, "message");
+ outMsg.writeString(msg, static_cast<int>(sz), "message");
outMsg.writeInt8(0, "zero byte");
}
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index ed834c9e8..54204234e 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -26,8 +26,6 @@
#include "enums/equipslot.h"
-#include "enums/being/attributes.h"
-
#include "being/localplayer.h"
#include "listeners/arrowslistener.h"
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index 12beafd98..ec9e3c095 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -24,8 +24,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
@@ -127,7 +125,7 @@ void MarketHandler::buyItem(const int itemId,
cnt = 100;
createOutPacket(CMSG_NPC_MARKET_BUY);
- outMsg.writeInt16(4 + 6 * cnt, "len");
+ outMsg.writeInt16(static_cast<int16_t>(4 + 6 * cnt), "len");
for (int f = 0; f < cnt; f ++)
{
outMsg.writeInt16(static_cast<int16_t>(itemId), "item id");
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp
index 82f7b59c2..bbe8cc8bf 100644
--- a/src/net/eathena/mercenaryhandler.cpp
+++ b/src/net/eathena/mercenaryhandler.cpp
@@ -23,7 +23,6 @@
#include "actormanager.h"
#include "notifymanager.h"
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/mercenaryinfo.h"
#include "being/playerinfo.h"
@@ -90,7 +89,8 @@ void MercenaryHandler::processMercenaryUpdate(Net::MessageIn &msg)
void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg)
{
// +++ need create if need mercenary being and update stats
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
msg.readInt16("atk");
msg.readInt16("matk");
msg.readInt16("hit");
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index f89a6d53a..f737ba6a1 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -21,20 +21,16 @@
#include "net/eathena/pethandler.h"
#include "actormanager.h"
-#include "inventory.h"
#include "notifymanager.h"
#include "being/localplayer.h"
#include "being/petinfo.h"
#include "being/playerinfo.h"
-#include "gui/chatconsts.h"
-
#include "gui/windows/eggselectiondialog.h"
#include "gui/widgets/tabs/chat/chattab.h"
-#include "net/chathandler.h"
#include "net/inventoryhandler.h"
#include "net/serverfeatures.h"
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 83cbec9ba..83f0a44b6 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -24,8 +24,6 @@
#include "being/localplayer.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/statuswindow.h"
#include "input/inputmanager.h"
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 1bbe491cf..f53a7b861 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -23,9 +23,6 @@
#include "actormanager.h"
#include "shopitem.h"
-#include "enums/being/attributes.h"
-
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index 3cb104d2c..75f726254 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -28,7 +28,6 @@
#include "enums/being/attributes.h"
#include "enums/being/beingaction.h"
-#include "enums/simpletypes/beingid.h"
#include "enums/simpletypes/keep.h"
#include "enums/simpletypes/notify.h"
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 7d13f2a70..a9b324b1e 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -1352,7 +1352,8 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg)
* later versions of eAthena for both mobs and
* players
*/
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
/*
* This packet doesn't have enough info to actually
@@ -1387,7 +1388,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
if (!dstBeing)
{
@@ -1525,7 +1527,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
if (dstBeing)
{
@@ -1598,7 +1601,8 @@ void BeingHandler::processIpResponse(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
if (dstBeing)
dstBeing->setIp(ipToString(msg.readInt32("ip address")));
BLOCK_END("BeingHandler::processIpResponse")
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 28261579e..7ee35c689 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -27,8 +27,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/shopwindow.h"
@@ -40,7 +38,6 @@
#include "resources/notifytypes.h"
-#include "utils/stringutils.h"
#include "utils/timer.h"
#include "debug.h"
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 32a09817a..71c56e457 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -26,10 +26,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/okdialog.h"
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index ed3a1318f..70ee87049 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -41,10 +41,6 @@
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
-#include "utils/stringutils.h"
-
-#include <string>
-
#include "debug.h"
extern Net::ChatHandler *chatHandler;
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index 83bc6e966..f1d7cd748 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -23,6 +23,7 @@
#include "net/tmwa/gamehandler.h"
#include "client.h"
+#include "logger.h"
#include "being/localplayer.h"
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index e7da97a1d..8c173f248 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -25,8 +25,6 @@
#include "client.h"
#include "configuration.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
#include "gui/windows/statuswindow.h"
diff --git a/src/net/tmwa/guildmanager.cpp b/src/net/tmwa/guildmanager.cpp
index bd96ba0f0..a83672f87 100644
--- a/src/net/tmwa/guildmanager.cpp
+++ b/src/net/tmwa/guildmanager.cpp
@@ -28,8 +28,6 @@
#include "being/localplayer.h"
-#include "enums/net/packettype.h"
-
#include "gui/windows/chatwindow.h"
#include "gui/windows/socialwindow.h"
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 8a730db8f..8707c5212 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -24,8 +24,6 @@
#include "being/localplayer.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/statuswindow.h"
#include "net/tmwa/inventoryhandler.h"
diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp
index eb67a1c0d..33a0c4b0c 100644
--- a/src/particle/textparticle.cpp
+++ b/src/particle/textparticle.cpp
@@ -22,8 +22,6 @@
#include "particle/textparticle.h"
-#include "enums/gui/themecolorid.h"
-
#include "gui/theme.h"
#include "gui/fonts/font.h"
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 7bad7ee3d..6c27a9a87 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -37,6 +37,8 @@
#include "being/localplayer.h"
+#include "gui/userpalette.h"
+
#include "particle/particle.h"
#include "resources/ambientlayer.h"
diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp
index 29f2b8eff..16aa5794e 100644
--- a/src/resources/map/mapitem.cpp
+++ b/src/resources/map/mapitem.cpp
@@ -20,8 +20,6 @@
#include "resources/map/mapitem.h"
-#include "enums/gui/usercolorid.h"
-
#include "gui/gui.h"
#include "gui/userpalette.h"
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 584d5702b..03afd6012 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -30,6 +30,8 @@
#include "being/localplayer.h"
+#include "gui/userpalette.h"
+
#include "render/graphics.h"
#include "resources/image.h"
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index a0efb224f..9985ec67d 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -52,6 +52,7 @@
#endif
#include <SDL_image.h>
+#include <sstream>
#include <sys/time.h>
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index f2d031356..a501e506b 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -23,6 +23,7 @@
#include "soundmanager.h"
#include "configuration.h"
+#include "logger.h"
#include "being/localplayer.h"
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index 90494a7d1..12ba4a422 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -27,8 +27,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/chatwindow.h"
#include "net/playerhandler.h"
@@ -37,6 +35,8 @@
#include "utils/dtor.h"
+#include <sstream>
+
#include "debug.h"
SpellManager *spellManager = nullptr;
diff --git a/src/text.cpp b/src/text.cpp
index ae5ed6afa..a665de641 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -26,8 +26,6 @@
#include "configuration.h"
#include "textmanager.h"
-#include "enums/gui/themecolorid.h"
-
#include "gui/gui.h"
#include "gui/theme.h"
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp
index f3adecf8e..0b04ae511 100644
--- a/src/touchmanager.cpp
+++ b/src/touchmanager.cpp
@@ -24,8 +24,6 @@
#include "graphicsvertexes.h"
#include "touchactions.h"
-#include "enums/gui/themecolorid.h"
-
#include "input/mouseinput.h"
#include "gui/gui.h"
@@ -35,8 +33,6 @@
#include "input/inputmanager.h"
-#include "render/renderers.h"
-
#include "gui/theme.h"
#include "resources/image.h"
diff --git a/src/touchmanager.h b/src/touchmanager.h
index 932d1981f..a281d8357 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -192,4 +192,3 @@ class TouchManager final : public ConfigListener
extern TouchManager touchManager;
#endif // TOUCHMANAGER_H
-
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc
index 4adfea8c9..5d227834e 100644
--- a/src/utils/files_unittest.cc
+++ b/src/utils/files_unittest.cc
@@ -34,7 +34,7 @@ TEST_CASE("Files renameFile", "files")
PHYSFS_init("manaplus");
dirSeparator = "/";
logger = new Logger();
- ResourceManager *resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
resman->addToSearchPath("data", false);
resman->addToSearchPath("../data", false);
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index c53d33884..7ad144331 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -23,6 +23,7 @@
#include "utils/stringutils.h"
#include <algorithm>
+#include <sstream>
#ifdef WIN32
#include <sys/time.h>
@@ -716,7 +717,7 @@ std::string toString(unsigned int num)
size_t idx = 28;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -727,7 +728,7 @@ std::string toString(unsigned long num)
size_t idx = 98;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -738,7 +739,7 @@ std::string toString(uint16_t num)
size_t idx = 8;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -749,7 +750,7 @@ std::string toString(unsigned char num)
size_t idx = 3;
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
return buf + idx + 1;
}
@@ -767,18 +768,18 @@ std::string toString(int num)
}
do
buf[idx--] = static_cast<char>((num % 10) + '0');
- while(num /= 10);
+ while (num /= 10);
if (useSign)
buf[idx--] = '-';
return buf + idx + 1;
}
-std::string toString(float num)
+std::string toString(const float num)
{
return strprintf("%f", num);
}
-std::string toString(double num)
+std::string toString(const double num)
{
return strprintf("%f", static_cast<float>(num));
}
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 738b56cb8..3307d6e73 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -25,7 +25,6 @@
#include "utils/stringvector.h"
-#include <sstream>
#include <list>
#include <set>
@@ -80,9 +79,9 @@ std::string toString(int num);
std::string toString(uint16_t num);
-std::string toString(float num);
+std::string toString(const float num);
-std::string toString(double num);
+std::string toString(const double num);
std::string toStringPrint(const unsigned int val);
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc
index 4dca829d7..a2c30bb76 100644
--- a/src/utils/stringutils_unittest.cc
+++ b/src/utils/stringutils_unittest.cc
@@ -102,13 +102,13 @@ TEST_CASE("stringuntils atox 1")
atox(str);
str = "";
- int k = atox(str);
+ REQUIRE(0 == atox(str));
str = "0";
- k = atox(str);
+ REQUIRE(0 == atox(str));
str = "0x";
- k = atox(str);
+ REQUIRE(0 == atox(str));
}
TEST_CASE("stringuntils ipToString 1")