summaryrefslogtreecommitdiff
path: root/src/floor_item.h
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-02-11 09:30:26 +0000
committerDavid Athay <ko2fan@gmail.com>2009-02-11 09:30:26 +0000
commit91111ca5d13072ea3b834e23835df9c077329e39 (patch)
treef0af8dd08b766164835cf9b5412a9aa3267dbad7 /src/floor_item.h
parent8046bb2626b30fecdcea54eb0aa3349cdb7d277b (diff)
parent63ac001daa7dfc0735dfefd9c2829c8786b4edaf (diff)
downloadmana-91111ca5d13072ea3b834e23835df9c077329e39.tar.gz
mana-91111ca5d13072ea3b834e23835df9c077329e39.tar.bz2
mana-91111ca5d13072ea3b834e23835df9c077329e39.tar.xz
mana-91111ca5d13072ea3b834e23835df9c077329e39.zip
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/floor_item.h')
-rw-r--r--src/floor_item.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/floor_item.h b/src/floor_item.h
index e0a67eca..444c756a 100644
--- a/src/floor_item.h
+++ b/src/floor_item.h
@@ -22,11 +22,16 @@
#ifndef FLOORITEM_H
#define FLOORITEM_H
-#include "graphics.h"
-#include "item.h"
-#include "map.h"
+#include <list>
+
#include "sprite.h"
-#include "resources/image.h"
+
+class Graphics;
+class Image;
+class Item;
+class Map;
+
+typedef std::list<Sprite*> Sprites;
/**
* An item lying on the floor.
@@ -51,47 +56,36 @@ class FloorItem : public Sprite
/**
* Returns instance id of this item.
*/
- unsigned int
- getId() const { return mId; }
+ unsigned int getId() const { return mId; }
/**
* Returns the item id.
*/
- unsigned int
- getItemId() const { return mItem->getId(); }
+ unsigned int getItemId() const;
/**
* Returns the x coordinate.
*/
- unsigned short
- getX() const { return mX; }
+ unsigned short getX() const { return mX; }
/**
* Returns the y coordinate.
*/
- unsigned short
- getY() const { return mY; }
+ unsigned short getY() const { return mY; }
/**
* Returns the pixel y coordinate.
*
* @see Sprite::getPixelY()
*/
- int
- getPixelY() const { return mY * 32; }
+ int getPixelY() const { return mY * 32; }
/**
* Draws this floor item to the given graphics context.
*
* @see Sprite::draw(Graphics, int, int)
*/
- void
- draw(Graphics *graphics, int offsetX, int offsetY) const
- {
- graphics->drawImage(mItem->getImage(),
- mX * 32 + offsetX,
- mY * 32 + offsetY);
- }
+ void draw(Graphics *graphics, int offsetX, int offsetY) const;
private:
unsigned int mId;