From 929d29996585c4f2e4461519ccf2803936b81ae1 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 10 Apr 2013 21:03:15 +0000 Subject: ItemGrid: Renamed all Item to Slot - better and consistent naming git-svn-id: http://mc-server.googlecode.com/svn/trunk@1381 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ItemGrid.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/ItemGrid.h') diff --git a/source/ItemGrid.h b/source/ItemGrid.h index 91eba6f33..ed4d5e58d 100644 --- a/source/ItemGrid.h +++ b/source/ItemGrid.h @@ -36,17 +36,17 @@ public: void GetSlotCoords(int a_SlotNum, int & a_X, int & a_Y) const; // tolua_begin - // Retrieve items by coords or slot number; Logs warning and returns the first item on invalid coords / slotnum - const cItem & GetItem(int a_X, int a_Y) const; - cItem & GetItem(int a_X, int a_Y); - const cItem & GetItem(int a_SlotNum) const; - cItem & GetItem(int a_SlotNum); + // Retrieve slots by coords or slot number; Logs warning and returns the first slot on invalid coords / slotnum + const cItem & GetSlot(int a_X, int a_Y) const; + cItem & GetSlot(int a_X, int a_Y); + const cItem & GetSlot(int a_SlotNum) const; + cItem & GetSlot(int a_SlotNum); - // Set item by coords or slot number; Logs warning and doesn't set on invalid coords / slotnum - void SetItem(int a_X, int a_Y, const cItem & a_Item); - void SetItem(int a_X, int a_Y, short a_ItemType, char a_ItemCount, short a_ItemDamage); - void SetItem(int a_SlotNum, const cItem & a_Item); - void SetItem(int a_SlotNum, short a_ItemType, char a_ItemCount, short a_ItemDamage); + // Set slot by coords or slot number; Logs warning and doesn't set on invalid coords / slotnum + void SetSlot(int a_X, int a_Y, const cItem & a_Item); + void SetSlot(int a_X, int a_Y, short a_ItemType, char a_ItemCount, short a_ItemDamage); + void SetSlot(int a_SlotNum, const cItem & a_Item); + void SetSlot(int a_SlotNum, short a_ItemType, char a_ItemCount, short a_ItemDamage); /// Sets all items as empty void Clear(void); @@ -86,7 +86,7 @@ protected: int m_Width; int m_Height; int m_NumSlots; // m_Width * m_Height, for easier validity checking in the access functions - cItem * m_Items; // x + m_Width * y + cItem * m_Slots; // x + m_Width * y } ; // tolua_end -- cgit v1.2.3