From 2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 12 Jun 2008 09:06:01 +0000 Subject: Merged revisions 3738 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3738 | b_lindeijer | 2007-11-16 00:44:01 +0100 (Fri, 16 Nov 2007) | 3 lines Moved item icon from ItemInfo class to the Item class, so that it can be loaded on demand. Results in faster startup time and reduced memory usage. ........ --- src/localplayer.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/localplayer.h') diff --git a/src/localplayer.h b/src/localplayer.h index bdf43fff..5ce94081 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -70,18 +70,10 @@ class LocalPlayer : public Player virtual void drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) {}; - void clearInventory(); - void addInvItem(int id, int quantity, bool equipment); - void addInvItem(int index, int id, int quantity, bool equipment); - Item* getInvItem(int index); - /** - * Searches for the specified item by it's identification. - * - * @param itemId The id of the item to be searched. - * @return Item found on success, NULL on failure. + * Returns the player's inventory. */ - Item* searchForItem(int itemId); + Inventory* getInventory() const { return mInventory; } /** * Equips an item. @@ -213,8 +205,6 @@ class LocalPlayer : public Player float mLastAttackTime; /**< Used to synchronize the charge dialog */ - Inventory *mInventory; - protected: void walk(unsigned char dir); @@ -230,6 +220,8 @@ class LocalPlayer : public Player int mWalkingDir; /**< The direction the player is walking in. */ int mDestX; /**< X coordinate of destination. */ int mDestY; /**< Y coordinate of destination. */ + + Inventory *mInventory; }; extern LocalPlayer *player_node; -- cgit v1.2.3-70-g09d2