summaryrefslogtreecommitdiff
path: root/src/flooritem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-27 18:08:34 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-27 23:26:17 +0200
commitdf5c7ae83a80db63ab90142df9e3a93f5ee630d0 (patch)
tree465991eb7785c1d17e1b15f6798efa67951a0c83 /src/flooritem.cpp
parent41e84157e0eca3a494cd6d44eec96dfbde0f5626 (diff)
downloadmanaplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.gz
manaplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.bz2
manaplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.xz
manaplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.zip
First part of implimintation item colors.
Diffstat (limited to 'src/flooritem.cpp')
-rw-r--r--src/flooritem.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/flooritem.cpp b/src/flooritem.cpp
index 619be25ea..700d9ed25 100644
--- a/src/flooritem.cpp
+++ b/src/flooritem.cpp
@@ -41,7 +41,8 @@ FloorItem::FloorItem(int id,
int x,
int y,
Map *map,
- int amount):
+ int amount,
+ unsigned char color):
ActorSprite(id),
mItemId(itemId),
mX(x),
@@ -49,7 +50,8 @@ FloorItem::FloorItem(int id,
mMap(map),
// mAlpha(1.0f),
mAmount(amount),
- mPickupCount(0)
+ mPickupCount(0),
+ mColor(color)
{
mDropTime = cur_time;
@@ -69,7 +71,8 @@ FloorItem::FloorItem(int id,
mPos.y = 0;
}
- setupSpriteDisplay(ItemDB::get(itemId).getDisplay(), true, 1);
+ ItemInfo info = ItemDB::get(itemId);
+ setupSpriteDisplay(info.getDisplay(), true, 1, info.getDyeString(mColor));
}
const ItemInfo &FloorItem::getInfo() const