diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-20 22:41:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-20 22:41:22 +0300 |
commit | 1240589615918547fab96a8b9315a66d068e712e (patch) | |
tree | 4e361d32b965973e28a70d4c6b8c352fb2cb0a61 /src/resources/iteminfo.h | |
parent | f23abf81cd21907117bf4edf0d814d8bef950e13 (diff) | |
download | plus-1240589615918547fab96a8b9315a66d068e712e.tar.gz plus-1240589615918547fab96a8b9315a66d068e712e.tar.bz2 plus-1240589615918547fab96a8b9315a66d068e712e.tar.xz plus-1240589615918547fab96a8b9315a66d068e712e.zip |
Add support for reading iconColors palette field from items.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 21 |
1 files changed, 19 insertions, 2 deletions
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<int>(mColorsList->size()) : 0; } - std::string getColorName(const ItemColor idx) const; + int getIconColorsSize() const + { return mIconColorsList ? static_cast<int>(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 <ItemSoundEvent::Type, SoundInfoVect> mSounds; std::map <int, int> mTags; const std::map <ItemColor, ColorDB::ItemColorData> *mColorsList; + const std::map <ItemColor, ColorDB::ItemColorData> *mIconColorsList; std::string mColorsListName; + std::string mIconColorsListName; ItemColor mCardColor; int mHitEffectId; int mCriticalHitEffectId; |