summaryrefslogtreecommitdiff
path: root/src/floor_item.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-26 22:22:22 +0100
committerIra Rice <irarice@gmail.com>2009-03-05 17:22:19 -0700
commit448d9076137fc5dde666a90820992a34a945cbf7 (patch)
treeee8d478fbced980a0ea868e9a7810ca56c49fe97 /src/floor_item.h
parenta79d05b01d4a2dc639e6d3a5b7ddd508e64d3511 (diff)
downloadmana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.gz
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.bz2
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.xz
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.zip
Got rid of Sint{8,16,32} and Uint32 for being ID
Using unsigned rarely makes sense, especially when the server doesn't use it either. Other uses of unsigned should be reviewed. In all other cases, int is the fastest integer type on any architecture. Using 8 or 16 bits can basically only be a memory optimization.
Diffstat (limited to 'src/floor_item.h')
-rw-r--r--src/floor_item.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/floor_item.h b/src/floor_item.h
index 8485172c..0972a983 100644
--- a/src/floor_item.h
+++ b/src/floor_item.h
@@ -43,11 +43,7 @@ class FloorItem : public Sprite
/**
* Constructor.
*/
- FloorItem(unsigned int id,
- unsigned int itemId,
- unsigned short x,
- unsigned short y,
- Map *map);
+ FloorItem(int id, int itemId, int x, int y, Map *map);
/**
* Destructor.
@@ -57,22 +53,22 @@ class FloorItem : public Sprite
/**
* Returns instance id of this item.
*/
- unsigned int getId() const { return mId; }
+ int getId() const { return mId; }
/**
* Returns the item id.
*/
- unsigned int getItemId() const;
+ int getItemId() const;
/**
* Returns the x coordinate.
*/
- unsigned short getX() const { return mX; }
+ int getX() const { return mX; }
/**
* Returns the y coordinate.
*/
- unsigned short getY() const { return mY; }
+ int getY() const { return mY; }
/**
* Returns the pixel y coordinate.
@@ -89,8 +85,8 @@ class FloorItem : public Sprite
void draw(Graphics *graphics, int offsetX, int offsetY) const;
private:
- unsigned int mId;
- unsigned short mX, mY;
+ int mId;
+ int mX, mY;
Item *mItem;
Sprites::iterator mSpriteIterator;
Map *mMap;