summaryrefslogtreecommitdiff
path: root/src/floor_item.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
commit3dc311a652d1fda1252903a974920395e56e5668 (patch)
tree7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/floor_item.h
parent78771718bf7af14273d7bb0090dccff97b00b397 (diff)
downloadmana-3dc311a652d1fda1252903a974920395e56e5668.tar.gz
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.xz
mana-3dc311a652d1fda1252903a974920395e56e5668.zip
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/floor_item.h')
-rwxr-xr-xsrc/floor_item.h46
1 files changed, 37 insertions, 9 deletions
diff --git a/src/floor_item.h b/src/floor_item.h
index 2c31525e..cd3293b4 100755
--- a/src/floor_item.h
+++ b/src/floor_item.h
@@ -24,22 +24,50 @@
#ifndef _TMW_FLOORITEM_H
#define _TMW_FLOORITEM_H
-class FloorItem {
- private:
+/**
+ * An item lying on the floor.
+ */
+class FloorItem
+{
public:
- unsigned int id;
- unsigned int int_id;
- unsigned short x, y;
-
/**
* Constructor.
*/
- FloorItem();
+ FloorItem(unsigned int id,
+ unsigned int itemId,
+ unsigned short x,
+ unsigned short y):
+ id(itemId),
+ int_id(id),
+ x(x),
+ y(y)
+ {
+ }
/**
- * Destructor.
+ * Returns instance id of this item.
*/
- ~FloorItem();
+ unsigned int getId() { return int_id; }
+
+ /**
+ * Returns the item id.
+ */
+ unsigned int getItemId() { return id; }
+
+ /**
+ * Returns the x coordinate.
+ */
+ unsigned short getX() { return x; }
+
+ /**
+ * Returns the y coordinate.
+ */
+ unsigned short getY() { return y; }
+
+ private:
+ unsigned int id;
+ unsigned int int_id;
+ unsigned short x, y;
};
/** Removes all items from the list */