diff options
author | whitertandrek | 2018-03-19 21:39:20 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 4d8bd5958f186a2b7ff3881b5cfbb4c77e0cf103 (patch) | |
tree | 7bfea12cbaea7e8b0e4887c2982a2ae6edfe7ff4 /engines/pink | |
parent | 7c4bcc033d318b3396df9f1545afcc4da3bd4bc1 (diff) | |
download | scummvm-rg350-4d8bd5958f186a2b7ff3881b5cfbb4c77e0cf103.tar.gz scummvm-rg350-4d8bd5958f186a2b7ff3881b5cfbb4c77e0cf103.tar.bz2 scummvm-rg350-4d8bd5958f186a2b7ff3881b5cfbb4c77e0cf103.zip |
PINK: added setIdleAction to actor
Diffstat (limited to 'engines/pink')
-rw-r--r-- | engines/pink/actors/actor.cpp | 19 | ||||
-rw-r--r-- | engines/pink/actors/actor.h | 9 |
2 files changed, 26 insertions, 2 deletions
diff --git a/engines/pink/actors/actor.cpp b/engines/pink/actors/actor.cpp index c4c9b78a23..d9363b6ea6 100644 --- a/engines/pink/actors/actor.cpp +++ b/engines/pink/actors/actor.cpp @@ -51,4 +51,23 @@ GamePage *Actor::getPage() const { return _page; } +void Actor::setIdleAction(bool unk) { + assert(_action == nullptr); + + uint i; + for (i = 0; i < _actions.size(); ++i) { + if (_action[i].getName() == "Idle") { + _action = _actions[i]; + break; + } + } + if (!_action) { + _isActionEnd = 1; + } + else { + _isActionEnd = 0; + //call action virt method + } +} + } // End of namespace Pink diff --git a/engines/pink/actors/actor.h b/engines/pink/actors/actor.h index 1db59cf287..fd9c25b813 100644 --- a/engines/pink/actors/actor.h +++ b/engines/pink/actors/actor.h @@ -34,7 +34,10 @@ class Sequencer; class Actor : public NamedObject { public: - Actor() {}; + Actor() + : _page(nullptr), _action(nullptr), + _isActionEnd(1) + {}; virtual void deserialize(Archive &archive); Action *findAction(Common::String &name); @@ -42,11 +45,13 @@ public: Sequencer *getSequencer(); GamePage *getPage() const; + void setIdleAction(bool unk); + protected: GamePage *_page; - //int possibly_isActionNotExist; Action *_action; Common::Array<Action*> _actions; + bool _isActionEnd; }; } // End of namespace Pink |