diff options
author | whitertandrek | 2018-03-23 21:51:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | bba35c5f2c71aa8c83c7ba9180f08ce7f609c911 (patch) | |
tree | 0d5facef654579f8d7c22ac428fc1d5208daef7f /engines/pink/objects/actors | |
parent | 26f2ff66402d6469b34b627278bcd2678a7f9119 (diff) | |
download | scummvm-rg350-bba35c5f2c71aa8c83c7ba9180f08ce7f609c911.tar.gz scummvm-rg350-bba35c5f2c71aa8c83c7ba9180f08ce7f609c911.tar.bz2 scummvm-rg350-bba35c5f2c71aa8c83c7ba9180f08ce7f609c911.zip |
PINK: Started implementation of Director class . For now engine can play logo scene, but sprites are at wrong positions because decoder doesn't support getting coordinates from CEL
Diffstat (limited to 'engines/pink/objects/actors')
-rw-r--r-- | engines/pink/objects/actors/actor.cpp | 21 | ||||
-rw-r--r-- | engines/pink/objects/actors/actor.h | 8 | ||||
-rw-r--r-- | engines/pink/objects/actors/lead_actor.h | 2 |
3 files changed, 21 insertions, 10 deletions
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp index 14faae1036..e612c83ae6 100644 --- a/engines/pink/objects/actors/actor.cpp +++ b/engines/pink/objects/actors/actor.cpp @@ -61,10 +61,10 @@ void Actor::init(bool unk) { } if (!_action) { - _isActionEnd = 1; + _isActionEnded = 1; } else { - _isActionEnd = 0; + _isActionEnded = 0; _action->start(unk); } } @@ -74,7 +74,7 @@ void Actor::hide() { } void Actor::endAction() { - _isActionEnd = 1; + _isActionEnded = 1; } void Actor::setAction(const Common::String &name) { @@ -84,11 +84,11 @@ void Actor::setAction(const Common::String &name) { void Actor::setAction(Action *newAction) { if (_action) { - _isActionEnd = 1; + _isActionEnded = 1; _action->end(); } if (newAction) { - _isActionEnd = 0; + _isActionEnded = 0; _action = newAction; _action->start(0); } @@ -97,7 +97,7 @@ void Actor::setAction(Action *newAction) { void Actor::setAction(Action *newAction, bool unk) { if (unk){ assert(0); // want to see this - _isActionEnd = 1; + _isActionEnded = 1; _action = newAction; } else setAction(newAction); @@ -108,7 +108,14 @@ Action *Actor::getAction() const { } bool Actor::isPlaying() { - return _isActionEnd; + return _isActionEnded; +} + +bool Actor::initPallete(Director *director) { + for (int i = 0; i < _actions.size(); ++i) { + if (_actions[i]->initPallete(director)) + break; + } } } // End of namespace Pink diff --git a/engines/pink/objects/actors/actor.h b/engines/pink/objects/actors/actor.h index 7bd65b3f48..dd75183251 100644 --- a/engines/pink/objects/actors/actor.h +++ b/engines/pink/objects/actors/actor.h @@ -31,12 +31,13 @@ namespace Pink { class GamePage; class Action; class Sequencer; +class Director; class Actor : public NamedObject { public: Actor() : _page(nullptr), _action(nullptr), - _isActionEnd(1) + _isActionEnded(1) {}; virtual void deserialize(Archive &archive); @@ -46,7 +47,6 @@ public: GamePage *getPage() const; Action *getAction() const; - bool isPlaying(); virtual void init(bool unk); void hide(); @@ -57,11 +57,13 @@ public: void setAction(Action *newAction); void setAction(Action *newAction, bool unk); + bool initPallete(Director *director); + protected: GamePage *_page; Action *_action; Common::Array<Action*> _actions; - bool _isActionEnd; + bool _isActionEnded; }; } // End of namespace Pink diff --git a/engines/pink/objects/actors/lead_actor.h b/engines/pink/objects/actors/lead_actor.h index b511f4010d..319c3f7deb 100644 --- a/engines/pink/objects/actors/lead_actor.h +++ b/engines/pink/objects/actors/lead_actor.h @@ -53,6 +53,8 @@ public: State getState() const; + void start(bool isHandler); + private: State _state; CursorMgr *_cursorMgr; |