summaryrefslogtreecommitdiff
path: root/src/flooritem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-03 02:50:03 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-03 02:50:03 +0200
commitde51eaa43e05c2126fc1eef2a7e115843f972547 (patch)
tree286a05a069e048247f90c7595f1b8939be784608 /src/flooritem.cpp
parentd4c08d3bf69410a35a50875de50cc6fe74b3bf3e (diff)
parent8627c7745f47492ab349da6a74e98e3d5813418f (diff)
downloadplus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.gz
plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.bz2
plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.xz
plus-de51eaa43e05c2126fc1eef2a7e115843f972547.zip
Merge branch 'coloritems'
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..740daf387 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.getDyeColorsString(mColor));
}
const ItemInfo &FloorItem::getInfo() const