diff options
-rw-r--r-- | engines/pink/actors/actor.cpp | 8 | ||||
-rw-r--r-- | engines/pink/actors/actor.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/pink/actors/actor.cpp b/engines/pink/actors/actor.cpp index 340b1c9f16..595d8e1146 100644 --- a/engines/pink/actors/actor.cpp +++ b/engines/pink/actors/actor.cpp @@ -23,6 +23,7 @@ #include "actor.h" #include "../page.h" #include "lead_actor.h" +#include "../actions/action.h" namespace Pink { @@ -39,4 +40,11 @@ Sequencer *Actor::getSequencer() { return _page->getSequencer(); } +Action *Actor::findAction(Common::String &name) { + return *Common::find_if(_actions.begin(), _actions.end(), [&name] + (Action* action) { + return name == action->getName(); + });; +} + } // End of namespace Pink diff --git a/engines/pink/actors/actor.h b/engines/pink/actors/actor.h index eb19c4169a..033fafa281 100644 --- a/engines/pink/actors/actor.h +++ b/engines/pink/actors/actor.h @@ -36,6 +36,9 @@ class Actor : public NamedObject { public: Actor() {}; virtual void deserialize(Archive &archive); + + Action *findAction(Common::String &name); + Sequencer *getSequencer(); protected: |