From 211aab93fed3462f875b66c3aecf0bfc98c3467a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 May 2014 14:57:40 +0300 Subject: Move mapobjectlayer into separate file. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/resources/map/map.cpp | 1 + src/resources/map/maplayer.cpp | 1 + src/resources/map/maplayer.h | 14 +----------- src/resources/map/mapobjectlist.h | 45 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 src/resources/map/mapobjectlist.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc95e36e2..8721c9036 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -712,6 +712,7 @@ SET(SRCS resources/map/maplayer.cpp resources/map/maplayer.h resources/map/mapobject.h + resources/map/mapobjectlist.h resources/map/maprowvertexes.h resources/map/metatile.h render/mgl.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 77673a7f4..2289e37ba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -801,6 +801,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ resources/map/maplayer.cpp \ resources/map/maplayer.h \ resources/map/mapobject.h \ + resources/map/mapobjectlist.h \ resources/map/maprowvertexes.h \ resources/map/metatile.h \ render/mgl.cpp \ diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index ee401c2fb..7ab41fbef 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -44,6 +44,7 @@ #include "resources/subimage.h" #include "resources/map/location.h" +#include "resources/map/mapobjectlist.h" #include "resources/map/tileanimation.h" #include "utils/delete2.h" diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 2908f6a42..0bef81273 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -36,6 +36,7 @@ #include "resources/image.h" #include "resources/resourcemanager.h" +#include "resources/map/mapobjectlist.h" #include "resources/map/maprowvertexes.h" #include "gui/font.h" diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index 7da75a6f8..a631932b6 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -38,22 +38,10 @@ class Image; class ImageVertexes; class MapItem; +class MapObjectList; class MapRowVertexes; class SpecialLayer; -class MapObjectList final -{ - public: - MapObjectList() : - objects() - { - } - - A_DELETE_COPY(MapObjectList) - - std::vector objects; -}; - /** * A map layer. Stores a grid of tiles and their offset, and implements layer * rendering. diff --git a/src/resources/map/mapobjectlist.h b/src/resources/map/mapobjectlist.h new file mode 100644 index 000000000..a4801c821 --- /dev/null +++ b/src/resources/map/mapobjectlist.h @@ -0,0 +1,45 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2014 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_MAP_MAPOBJECTLIST_H +#define RESOURCES_MAP_MAPOBJECTLIST_H + +#include "resources/map/mapobject.h" + +#include + +#include "localconsts.h" + +class MapObjectList final +{ + public: + MapObjectList() : + objects() + { + } + + A_DELETE_COPY(MapObjectList) + + std::vector objects; +}; + +#endif // RESOURCES_MAP_MAPOBJECTLIST_H -- cgit v1.2.3-60-g2f50