From db6b712e4169d80f8f2c84a0efbc553d2058c191 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 May 2014 15:42:09 +0300 Subject: Extract compountitem into separate file. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/being/compounditem.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/being/compoundsprite.h | 18 ++---------------- 4 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 src/being/compounditem.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 280078a01..46ce71ab1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -636,6 +636,7 @@ SET(SRCS commandhandler.h commands.cpp commands.h + being/compounditem.h being/compoundsprite.cpp being/compoundsprite.h being/gender.h diff --git a/src/Makefile.am b/src/Makefile.am index 3ce90be29..c5ff53410 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -725,6 +725,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ commandhandler.h \ commands.cpp \ commands.h \ + being/compounditem.h \ being/compoundsprite.cpp \ being/compoundsprite.h \ being/gender.h \ diff --git a/src/being/compounditem.h b/src/being/compounditem.h new file mode 100644 index 000000000..73909c56a --- /dev/null +++ b/src/being/compounditem.h @@ -0,0 +1,46 @@ +/* + * The ManaPlus Client + * 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 BEING_COMPOUNDITEM_H +#define BEING_COMPOUNDITEM_H + +#include + +#include "localconsts.h" + +class Image; + +typedef std::list VectorPointers; + +class CompoundItem final +{ + public: + CompoundItem(); + + A_DELETE_COPY(CompoundItem) + + ~CompoundItem(); + + VectorPointers data; + Image *image; + Image *alphaImage; +}; + +#endif // BEING_COMPOUNDITEM_H diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h index 20f5a376a..7e983ad2d 100644 --- a/src/being/compoundsprite.h +++ b/src/being/compoundsprite.h @@ -24,6 +24,8 @@ #include "sprite.h" +#include "being/compounditem.h" + #include #include @@ -31,22 +33,6 @@ class Image; -typedef std::list VectorPointers; - -class CompoundItem final -{ - public: - CompoundItem(); - - A_DELETE_COPY(CompoundItem) - - ~CompoundItem(); - - VectorPointers data; - Image *image; - Image *alphaImage; -}; - class CompoundSprite : public Sprite { public: -- cgit v1.2.3-70-g09d2