aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/walk/walk_mgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pink/objects/walk/walk_mgr.cpp')
-rw-r--r--engines/pink/objects/walk/walk_mgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/pink/objects/walk/walk_mgr.cpp b/engines/pink/objects/walk/walk_mgr.cpp
new file mode 100644
index 0000000000..1b5ceef210
--- /dev/null
+++ b/engines/pink/objects/walk/walk_mgr.cpp
@@ -0,0 +1,20 @@
+//
+// Created by andrei on 3/17/18.
+//
+
+#include "walk_mgr.h"
+#include "walk_location.h"
+#include "engines/pink/objects/actors/lead_actor.h"
+#include "engines/pink/archive.h"
+
+
+void Pink::WalkMgr::deserialize(Pink::Archive &archive) {
+ _leadActor = static_cast<LeadActor*>(archive.readObject());
+ archive >> _locations;
+}
+
+Pink::WalkLocation *Pink::WalkMgr::findLocation(Common::String &name) {
+ return *Common::find_if(_locations.begin(), _locations.end(), [&name] (WalkLocation *location) {
+ return location->getName() == name;
+ });
+}