summaryrefslogtreecommitdiffstats
path: root/src/ItemGrid.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-06-15 15:32:33 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-16 14:11:28 +0200
commit0dd1cd750bb51403d85a226a97a5ad93eb99b144 (patch)
tree8c7a4e8580a780e1ed27f4141c32de7ec3087710 /src/ItemGrid.cpp
parentChoose # of threads based on system info (#3644) (diff)
downloadcuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar.gz
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar.bz2
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar.lz
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar.xz
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.tar.zst
cuberite-0dd1cd750bb51403d85a226a97a5ad93eb99b144.zip
Diffstat (limited to '')
-rw-r--r--src/ItemGrid.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ItemGrid.cpp b/src/ItemGrid.cpp
index e97a53f68..39757e198 100644
--- a/src/ItemGrid.cpp
+++ b/src/ItemGrid.cpp
@@ -73,6 +73,22 @@ void cItemGrid::GetSlotCoords(int a_SlotNum, int & a_X, int & a_Y) const
+void cItemGrid::CopyFrom(const cItemGrid & a_Src)
+{
+ ASSERT(m_Width == a_Src.m_Width);
+ ASSERT(m_Height == a_Src.m_Height);
+ for (int i = m_NumSlots - 1; i >= 0; --i)
+ {
+ m_Slots[i] = a_Src.m_Slots[i];
+ }
+
+ // The listeners are not copied
+}
+
+
+
+
+
const cItem & cItemGrid::GetSlot(int a_X, int a_Y) const
{
return GetSlot(GetSlotNum(a_X, a_Y));