From fafa76be86d659f7004e589a6fe55a0d53fed82f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Dec 2015 23:06:48 +0300 Subject: Move equipment related constants into separate file. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/beingequipbackend.h | 2 ++ src/const/equipment.h | 30 ++++++++++++++++++++++++++++++ src/equipment.h | 2 -- src/net/ea/equipbackend.h | 3 +++ 6 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/const/equipment.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f561d8ed..5085424db 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -909,6 +909,7 @@ SET(SRCS game.h gamemodifiers.cpp gamemodifiers.h + const/equipment.h const/spells.h const/utils/timer.h const/render/graphics.h diff --git a/src/Makefile.am b/src/Makefile.am index 3148a0a35..c3b765088 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -471,6 +471,7 @@ SRC += events/actionevent.h \ dirs.h \ eventsmanager.cpp \ eventsmanager.h \ + const/equipment.h \ const/spells.h \ const/utils/timer.h \ const/render/graphics.h \ diff --git a/src/beingequipbackend.h b/src/beingequipbackend.h index b4941d018..01ab66802 100644 --- a/src/beingequipbackend.h +++ b/src/beingequipbackend.h @@ -23,6 +23,8 @@ #include "equipment.h" +#include "const/equipment.h" + #include "localconsts.h" class Being; diff --git a/src/const/equipment.h b/src/const/equipment.h new file mode 100644 index 000000000..fb28d7e12 --- /dev/null +++ b/src/const/equipment.h @@ -0,0 +1,30 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * 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 CONST_EQUIPMENT_H +#define CONST_EQUIPMENT_H + +#include "localconsts.h" + +static const int EQUIPMENT_SIZE = 27; + +#endif // CONST_EQUIPMENT_H diff --git a/src/equipment.h b/src/equipment.h index 149b1b340..40ed164e7 100644 --- a/src/equipment.h +++ b/src/equipment.h @@ -23,8 +23,6 @@ #ifndef EQUIPMENT_H #define EQUIPMENT_H -static const int EQUIPMENT_SIZE = 27; - #include "localconsts.h" class Item; diff --git a/src/net/ea/equipbackend.h b/src/net/ea/equipbackend.h index c264724a8..673708aa6 100644 --- a/src/net/ea/equipbackend.h +++ b/src/net/ea/equipbackend.h @@ -27,7 +27,10 @@ #include "being/playerinfo.h" +#include "const/equipment.h" + #include "gui/windows/inventorywindow.h" + namespace Ea { -- cgit v1.2.3-60-g2f50