summaryrefslogtreecommitdiffstats
path: root/src/ItemGrid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ItemGrid.cpp')
-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));