From 835dd846af75ea2cfc91f0134156f9c6545dd8ce Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 May 2014 16:16:29 +0300 Subject: Move map consts into separate file. --- src/resources/db/itemdb.cpp | 2 +- src/resources/iteminfo.cpp | 2 +- src/resources/map/map.h | 2 -- src/resources/map/mapconsts.h | 28 ++++++++++++++++++++++++++++ src/resources/map/speciallayer.cpp | 2 +- src/resources/mapreader.cpp | 1 + src/resources/spritedef.cpp | 2 +- 7 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 src/resources/map/mapconsts.h (limited to 'src/resources') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 9c8c49fc5..c2d58fccc 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -22,7 +22,7 @@ #include "resources/db/itemdb.h" -#include "resources/map/map.h" +#include "resources/map/mapconsts.h" #include "configuration.h" #include "logger.h" diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 911cacef6..d405e6909 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -22,7 +22,7 @@ #include "resources/iteminfo.h" -#include "resources/map/map.h" +#include "resources/map/mapconsts.h" #include "resources/db/colordb.h" #include "resources/db/itemdb.h" diff --git a/src/resources/map/map.h b/src/resources/map/map.h index 8c7939149..dac1778c3 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -60,8 +60,6 @@ typedef std::vector AmbientLayerVector; typedef AmbientLayerVector::const_iterator AmbientLayerVectorCIter; typedef AmbientLayerVector::iterator AmbientLayerVectorIter; -static const int mapTileSize = 32; - /** * A tile map. */ diff --git a/src/resources/map/mapconsts.h b/src/resources/map/mapconsts.h new file mode 100644 index 000000000..25bc9c4a9 --- /dev/null +++ b/src/resources/map/mapconsts.h @@ -0,0 +1,28 @@ +/* + * 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_MAPCONSTS_H +#define RESOURCES_MAP_MAPCONSTS_H + +static const int mapTileSize = 32; + +#endif // RESOURCES_MAP_MAPCONSTS_H diff --git a/src/resources/map/speciallayer.cpp b/src/resources/map/speciallayer.cpp index 2ebb6ef51..284069589 100644 --- a/src/resources/map/speciallayer.cpp +++ b/src/resources/map/speciallayer.cpp @@ -20,7 +20,7 @@ #include "resources/map/speciallayer.h" -#include "resources/map/map.h" +#include "resources/map/mapconsts.h" #include "resources/map/mapitem.h" #include "resources/map/maplayer.h" diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 3f0cb7343..ebdca49ac 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -28,6 +28,7 @@ #include "main.h" #include "resources/map/map.h" +#include "resources/map/mapconsts.h" #include "resources/map/tileset.h" #include "resources/animation.h" diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 77561d11c..c41d95aa5 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -24,7 +24,7 @@ #include "logger.h" -#include "resources/map/map.h" +#include "resources/map/mapconsts.h" #include "resources/action.h" #include "resources/animation.h" -- cgit v1.2.3-70-g09d2