diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-05 20:20:25 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-05 20:20:25 +0000 |
commit | d8539e4ccac014c306329cda2c8bed036a80af39 (patch) | |
tree | 2ba911e66c31102173f4df9cbac19049a7f45a4b /src/itemshortcut.h | |
parent | c65678cd7016d56aa3f8360b7e8d36e275b8c90e (diff) | |
download | mana-d8539e4ccac014c306329cda2c8bed036a80af39.tar.gz mana-d8539e4ccac014c306329cda2c8bed036a80af39.tar.bz2 mana-d8539e4ccac014c306329cda2c8bed036a80af39.tar.xz mana-d8539e4ccac014c306329cda2c8bed036a80af39.zip |
Fix drawing of very high fringe tiles by keeping track of the maximum tile
height.
Diffstat (limited to 'src/itemshortcut.h')
-rw-r--r-- | src/itemshortcut.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/itemshortcut.h b/src/itemshortcut.h index d211c7f3..fecb7d86 100644 --- a/src/itemshortcut.h +++ b/src/itemshortcut.h @@ -18,20 +18,19 @@ * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * $Id$ */ #ifndef _TMW_ITEMSHORTCUT_H__ #define _TMW_ITEMSHORTCUT_H__ -#include "item.h" - #define SHORTCUT_ITEMS 10 +class Item; + /** - * The item pointer + * The class which keeps track of the item shortcuts. */ -typedef Item* ItemPtr; - class ItemShortcut { public: @@ -55,7 +54,7 @@ class ItemShortcut * * @param index Index of the shortcut item. */ - ItemPtr getItem(int index) const + Item* getItem(int index) const { return mItems[index]; } /** @@ -67,7 +66,7 @@ class ItemShortcut /** * Returns the item that is currently selected. */ - ItemPtr getItemSelected() const + Item* getItemSelected() const { return mItemSelected; } /** @@ -92,20 +91,20 @@ class ItemShortcut * * @param item The item that is to be assigned. */ - void setItemSelected(ItemPtr item) + void setItemSelected(Item* item) { mItemSelected = item; } /** * A flag to check if the item is selected. */ bool isItemSelected() - { return (mItemSelected) ? true : false; } + { return mItemSelected; } /** * Remove a item from the shortcut. */ void removeItem(int index) - { mItems[index] = NULL; } + { mItems[index] = 0; } /** * Try to use the item specified by the index. @@ -120,8 +119,8 @@ class ItemShortcut */ void save(); - ItemPtr mItems[SHORTCUT_ITEMS]; /**< the items stored */ - ItemPtr mItemSelected; /**< the item held by cursor */ + Item* mItems[SHORTCUT_ITEMS]; /**< The items stored. */ + Item* mItemSelected; /**< The item held by cursor. */ }; |