diff options
author | whitertandrek | 2018-03-19 12:57:28 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | acbe2e8832dc06fe80dbe9ac6a57a5ec9615a58c (patch) | |
tree | 5763fca2eefa67df9a756034be2c2875717f05af | |
parent | d95e32782abe260aa74162b8c868a583e857be15 (diff) | |
download | scummvm-rg350-acbe2e8832dc06fe80dbe9ac6a57a5ec9615a58c.tar.gz scummvm-rg350-acbe2e8832dc06fe80dbe9ac6a57a5ec9615a58c.tar.bz2 scummvm-rg350-acbe2e8832dc06fe80dbe9ac6a57a5ec9615a58c.zip |
PINK: Added findActor method
-rw-r--r-- | engines/pink/page.cpp | 7 | ||||
-rw-r--r-- | engines/pink/page.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/pink/page.cpp b/engines/pink/page.cpp index f0bdf32ba0..c59e29996f 100644 --- a/engines/pink/page.cpp +++ b/engines/pink/page.cpp @@ -37,6 +37,13 @@ void Page::load(Archive &archive) { archive >> _actors; } +Actor *Page::findActor(Common::String &name) { + return *Common::find_if(_actors.begin(), _actors.end(), [&name] + (Actor *actor) { + return name == actor->getName(); + });; +} + void GamePage::deserialize(Archive &archive) { Page::deserialize(archive); diff --git a/engines/pink/page.h b/engines/pink/page.h index 008b0a032b..3b06e5ea02 100644 --- a/engines/pink/page.h +++ b/engines/pink/page.h @@ -38,6 +38,8 @@ class Page : public NamedObject { public: void load(Archive &archive); + Actor *findActor(Common::String &name); + protected: ResourceMgr _resMgr; LeadActor *_leadActor; |