summaryrefslogtreecommitdiffstats
path: root/source/ItemGrid.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:03:15 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:03:15 +0200
commit929d29996585c4f2e4461519ccf2803936b81ae1 (patch)
tree86a5210c4384c9292d2d7b697f24d1dc8a6e2e6a /source/ItemGrid.h
parentAdded cItemGrid to represent an XY grid of items; converted chests to use cItemGrid. (diff)
downloadcuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.gz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.bz2
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.lz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.xz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.zst
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.zip
Diffstat (limited to '')
-rw-r--r--source/ItemGrid.h22
1 files changed, 11 insertions, 11 deletions
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