From 22f79fd0d623c8e11994905534f53da267e22935 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 3 Mar 2011 01:25:21 +0200 Subject: Dehardcode item colors. Now reading all from configs. --- src/resources/iteminfo.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/resources/iteminfo.h') diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 3b72c7830..297c1b036 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -25,6 +25,7 @@ #include "being.h" +#include "resources/colordb.h" #include "resources/spritedef.h" #include @@ -111,7 +112,9 @@ class ItemInfo mDrawPriority(0), mIsRemoveSprites(false), mAttackAction(SpriteAction::INVALID), - mAttackRange(0) + mAttackRange(0), + mColors(0), + mColorList("") { } @@ -235,6 +238,11 @@ class ItemInfo std::string getDyeColorsString(int color) const; + void setColorsList(std::string name); + + bool isHaveColors() + { return !mColorList.empty(); } + protected: SpriteDisplay mDisplay; /**< Display info (like icon) */ std::string mName; @@ -269,6 +277,8 @@ class ItemInfo /** Stores the names of sounds to be played at certain event. */ std::map < EquipmentSoundEvent, std::vector > mSounds; std::map mTags; + std::map *mColors; + std::string mColorList; }; #endif -- cgit v1.2.3-60-g2f50