From 1240589615918547fab96a8b9315a66d068e712e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 20 Aug 2015 22:41:22 +0300 Subject: Add support for reading iconColors palette field from items. --- src/resources/iteminfo.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/resources/iteminfo.h') diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 27191f92e..c022b650a 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -245,13 +245,22 @@ class ItemInfo final const SpriteToItemMap *getSpriteToItemReplaceMap(const int directions) const A_WARN_UNUSED; - std::string getDyeColorsString(const ItemColor color) const A_WARN_UNUSED; + std::string getDyeColorsString(const ItemColor color) + const A_WARN_UNUSED; + + std::string getDyeIconColorsString(const ItemColor color) + const A_WARN_UNUSED; void setColorsList(const std::string &name); + void setIconColorsList(const std::string &name); + bool isHaveColors() const A_WARN_UNUSED { return !mColorsListName.empty(); } + bool isHaveIconColors() const A_WARN_UNUSED + { return !mIconColorsListName.empty(); } + const std::string replaceColors(std::string str, const ItemColor color) const A_WARN_UNUSED; @@ -274,10 +283,16 @@ class ItemInfo final int getColorsSize() const { return mColorsList ? static_cast(mColorsList->size()) : 0; } - std::string getColorName(const ItemColor idx) const; + int getIconColorsSize() const + { return mIconColorsList ? static_cast(mIconColorsList->size()) + : 0; } + std::string getColorName(const ItemColor idx) const; std::string getColor(const ItemColor idx) const; + std::string getIconColorName(const ItemColor idx) const; + std::string getIconColor(const ItemColor idx) const; + int mDrawBefore[10]; int mDrawAfter[10]; int mDrawPriority[10]; @@ -325,7 +340,9 @@ class ItemInfo final std::map mSounds; std::map mTags; const std::map *mColorsList; + const std::map *mIconColorsList; std::string mColorsListName; + std::string mIconColorsListName; ItemColor mCardColor; int mHitEffectId; int mCriticalHitEffectId; -- cgit v1.2.3-60-g2f50