From 1abda37d9a6173f67ee12600ca8948cd205ebad1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Jul 2015 14:57:03 +0300 Subject: Move mapitemtype into enums directory. --- src/CMakeLists.txt | 2 +- src/Makefile.am | 2 +- src/being/localplayer.cpp | 3 ++- src/enums/resources/map/mapitemtype.h | 47 +++++++++++++++++++++++++++++++++++ src/gui/popups/popupmenu.cpp | 3 ++- src/gui/viewport.cpp | 2 +- src/gui/widgets/avatarlistbox.cpp | 3 ++- src/gui/widgets/tabs/socialtabbase.h | 2 +- src/net/ea/beinghandler.cpp | 4 +-- src/resources/map/map.cpp | 3 ++- src/resources/map/mapitem.cpp | 3 ++- src/resources/map/maplayer.cpp | 3 ++- src/resources/map/speciallayer.cpp | 2 +- src/resources/mapitemtype.h | 47 ----------------------------------- src/resources/mapreader.cpp | 3 ++- 15 files changed, 68 insertions(+), 61 deletions(-) create mode 100644 src/enums/resources/map/mapitemtype.h delete mode 100644 src/resources/mapitemtype.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a3ded644..1f806a932 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -652,7 +652,7 @@ SET(SRCS resources/db/moddb.cpp resources/db/moddb.h resources/mapinfo.h - resources/mapitemtype.h + enums/resources/map/mapitemtype.h resources/mapreader.cpp resources/mapreader.h resources/modinfo.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 4246b2e2e..fac1fce70 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -796,7 +796,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ resources/db/moddb.cpp \ resources/db/moddb.h \ resources/mapinfo.h \ - resources/mapitemtype.h \ + enums/resources/map/mapitemtype.h \ resources/mapreader.cpp \ resources/mapreader.h \ resources/modinfo.cpp \ diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 1e75865a6..af3f3df03 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -42,6 +42,8 @@ #include "enums/being/beingdirection.h" +#include "enums/resources/map/mapitemtype.h" + #include "particle/particle.h" #include "input/keyboardconfig.h" @@ -70,7 +72,6 @@ #include "resources/iteminfo.h" #include "resources/itemslot.h" -#include "resources/mapitemtype.h" #include "resources/db/weaponsdb.h" diff --git a/src/enums/resources/map/mapitemtype.h b/src/enums/resources/map/mapitemtype.h new file mode 100644 index 000000000..38677f479 --- /dev/null +++ b/src/enums/resources/map/mapitemtype.h @@ -0,0 +1,47 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ENUMS_RESOURCES_MAPITEMTYPE_H +#define ENUMS_RESOURCES_MAPITEMTYPE_H + +namespace MapItemType +{ + enum Type + { + EMPTY = 0, + HOME = 1, + ROAD = 2, + CROSS = 3, + ARROW_UP = 4, + ARROW_DOWN = 5, + ARROW_LEFT = 6, + ARROW_RIGHT = 7, + PORTAL = 8, + MUSIC = 9, + ATTACK = 10, + PRIORITY = 11, + IGNORE_ = 12, + PICKUP = 13, + NOPICKUP = 14, + SEPARATOR = 15 + }; +} // namespace MapItemType + +#endif // ENUMS_RESOURCES_MAPITEMTYPE_H diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 10b1db4ac..9adcc7b58 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -34,6 +34,8 @@ #include "being/playerrelation.h" #include "being/playerrelations.h" +#include "enums/resources/map/mapitemtype.h" + #include "input/inputmanager.h" #include "gui/buttontext.h" @@ -77,7 +79,6 @@ #include "resources/chatobject.h" #include "resources/iteminfo.h" -#include "resources/mapitemtype.h" #include "resources/db/npcdb.h" diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index ff7946ed6..caf55fcca 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -29,7 +29,7 @@ #include "sdlshared.h" #include "textmanager.h" -#include "resources/mapitemtype.h" +#include "enums/resources/map/mapitemtype.h" #include "resources/map/map.h" #include "resources/map/mapitem.h" diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 47debb1e7..308de5746 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -27,6 +27,8 @@ #include "being/localplayer.h" +#include "enums/resources/map/mapitemtype.h" + #include "gui/gui.h" #include "gui/popupmanager.h" #include "gui/skin.h" @@ -41,7 +43,6 @@ #include "gui/windows/chatwindow.h" #include "resources/image.h" -#include "resources/mapitemtype.h" #include "resources/map/map.h" diff --git a/src/gui/widgets/tabs/socialtabbase.h b/src/gui/widgets/tabs/socialtabbase.h index 24d11eaf1..98d2ddcb7 100644 --- a/src/gui/widgets/tabs/socialtabbase.h +++ b/src/gui/widgets/tabs/socialtabbase.h @@ -23,7 +23,7 @@ #include "actormanager.h" -#include "resources/mapitemtype.h" +#include "enums/resources/map/mapitemtype.h" #define addAvatars(mob, str, type) \ {\ diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index d50366884..76fe061ed 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -30,12 +30,12 @@ #include "being/playerrelation.h" #include "being/playerrelations.h" +#include "enums/resources/map/mapitemtype.h" + #include "gui/viewport.h" #include "gui/windows/socialwindow.h" -#include "resources/mapitemtype.h" - #include "resources/map/map.h" #include "net/serverfeatures.h" diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 8441252e2..b96abc7d2 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -39,12 +39,13 @@ #include "enums/resources/notifytypes.h" +#include "enums/resources/map/mapitemtype.h" + #include "gui/userpalette.h" #include "particle/particle.h" #include "resources/ambientlayer.h" -#include "resources/mapitemtype.h" #include "resources/resourcemanager.h" #include "resources/subimage.h" diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp index 16aa5794e..f1d045e7f 100644 --- a/src/resources/map/mapitem.cpp +++ b/src/resources/map/mapitem.cpp @@ -20,13 +20,14 @@ #include "resources/map/mapitem.h" +#include "enums/resources/map/mapitemtype.h" + #include "gui/gui.h" #include "gui/userpalette.h" #include "gui/fonts/font.h" #include "resources/image.h" -#include "resources/mapitemtype.h" #include "resources/resourcemanager.h" #include "render/graphics.h" diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 666df1b4a..97c2ba5f1 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -30,12 +30,13 @@ #include "being/localplayer.h" +#include "enums/resources/map/mapitemtype.h" + #include "gui/userpalette.h" #include "render/graphics.h" #include "resources/image.h" -#include "resources/mapitemtype.h" #include "resources/map/mapitem.h" #include "resources/map/maprowvertexes.h" diff --git a/src/resources/map/speciallayer.cpp b/src/resources/map/speciallayer.cpp index 811c5c03f..95ec90e35 100644 --- a/src/resources/map/speciallayer.cpp +++ b/src/resources/map/speciallayer.cpp @@ -20,7 +20,7 @@ #include "resources/map/speciallayer.h" -#include "resources/mapitemtype.h" +#include "enums/resources/map/mapitemtype.h" #include "resources/map/mapconsts.h" #include "resources/map/mapitem.h" diff --git a/src/resources/mapitemtype.h b/src/resources/mapitemtype.h deleted file mode 100644 index 2d8bb5f1c..000000000 --- a/src/resources/mapitemtype.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2011-2015 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef RESOURCES_MAPITEMTYPE_H -#define RESOURCES_MAPITEMTYPE_H - -namespace MapItemType -{ - enum Type - { - EMPTY = 0, - HOME = 1, - ROAD = 2, - CROSS = 3, - ARROW_UP = 4, - ARROW_DOWN = 5, - ARROW_LEFT = 6, - ARROW_RIGHT = 7, - PORTAL = 8, - MUSIC = 9, - ATTACK = 10, - PRIORITY = 11, - IGNORE_ = 12, - PICKUP = 13, - NOPICKUP = 14, - SEPARATOR = 15 - }; -} // namespace MapItemType - -#endif // RESOURCES_MAPITEMTYPE_H diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index d376ddbb4..54ee95ea5 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -28,6 +28,8 @@ #endif #include "logger.h" +#include "enums/resources/map/mapitemtype.h" + #include "resources/map/map.h" #include "resources/map/mapconsts.h" #include "resources/map/mapheights.h" @@ -36,7 +38,6 @@ #include "resources/animation.h" #include "resources/beingcommon.h" #include "resources/image.h" -#include "resources/mapitemtype.h" #include "resources/resourcemanager.h" #ifdef USE_OPENGL -- cgit v1.2.3-70-g09d2