aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/inventory.cpp
diff options
context:
space:
mode:
authorwhitertandrek2018-03-17 20:05:09 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit4ff13d64ba3812a0847ef9f0634581ba0715e075 (patch)
treecc663a1a6ba1f9c0c0ebda2d50970752db0dc3a8 /engines/pink/objects/inventory.cpp
parent5d1c4af5f6b1f197eb4c3af7dbc05b591047406d (diff)
downloadscummvm-rg350-4ff13d64ba3812a0847ef9f0634581ba0715e075.tar.gz
scummvm-rg350-4ff13d64ba3812a0847ef9f0634581ba0715e075.tar.bz2
scummvm-rg350-4ff13d64ba3812a0847ef9f0634581ba0715e075.zip
PINK: Added InventoryItem class
Diffstat (limited to 'engines/pink/objects/inventory.cpp')
-rw-r--r--engines/pink/objects/inventory.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp
new file mode 100644
index 0000000000..7a606e93a4
--- /dev/null
+++ b/engines/pink/objects/inventory.cpp
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include "inventory.h"
+
+namespace Pink {
+
+void Pink::InventoryItem::deserialize(Archive &archive) {
+ NamedObject::deserialize(archive);
+ _initialOwner = archive.readString();
+ _currentOwner = _initialOwner;
+}
+
+InventoryMgr::~InventoryMgr() {
+ for (int i = 0; i < _invItems.size(); ++i) {
+ delete _invItems[i];
+ }
+}
+
+void InventoryMgr::deserialize(Archive &archive) {
+ archive >> _invItems;
+}
+
+} // End of namespace Pink
+
+