summaryrefslogtreecommitdiff
path: root/src/floor_item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/floor_item.cpp')
-rw-r--r--src/floor_item.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/floor_item.cpp b/src/floor_item.cpp
index 0c4c1c10..fbe606b4 100644
--- a/src/floor_item.cpp
+++ b/src/floor_item.cpp
@@ -20,8 +20,12 @@
*/
#include "floor_item.h"
+#include "graphics.h"
+#include "item.h"
#include "map.h"
+#include "resources/image.h"
+
FloorItem::FloorItem(unsigned int id,
unsigned int itemId,
unsigned short x,
@@ -46,3 +50,15 @@ FloorItem::~FloorItem()
delete mItem;
}
+
+unsigned int FloorItem::getItemId() const
+{
+ return mItem->getId();
+}
+
+void FloorItem::draw(Graphics *graphics, int offsetX, int offsetY) const
+{
+ graphics->drawImage(mItem->getImage(),
+ mX * 32 + offsetX,
+ mY * 32 + offsetY);
+}