diff options
-rw-r--r-- | engines/pink/actors/actor.h | 2 | ||||
-rw-r--r-- | engines/pink/actors/lead_actor.cpp | 14 | ||||
-rw-r--r-- | engines/pink/actors/lead_actor.h | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/engines/pink/actors/actor.h b/engines/pink/actors/actor.h index 54661bd48c..83f0d8e574 100644 --- a/engines/pink/actors/actor.h +++ b/engines/pink/actors/actor.h @@ -43,7 +43,7 @@ public: Sequencer *getSequencer(); GamePage *getPage() const; - void init(bool unk); + virtual void init(bool unk); void hide(); void endAction(); diff --git a/engines/pink/actors/lead_actor.cpp b/engines/pink/actors/lead_actor.cpp index 23c94eddc9..12187d61db 100644 --- a/engines/pink/actors/lead_actor.cpp +++ b/engines/pink/actors/lead_actor.cpp @@ -38,8 +38,18 @@ void LeadActor::deserialize(Archive &archive) { } void LeadActor::setNextExecutors(Common::String &nextModule, Common::String &nextPage) { - //TODO check for lead actor state - _page->getGame()->setNextExecutors(nextModule, nextPage); + if (_state == Ready || _state == Moving || _state == inDialog1 || _state == Inventory || _state == PDA) { + _state = PlayingVideo; + _page->getGame()->setNextExecutors(nextModule, nextPage); + } +} + +void LeadActor::init(bool unk) { + if (_state == unk_Loading){ + _state = Ready; + } + //TODO set actor ref to inv mgr + Actor::init(unk); } } // End of namespace Pink diff --git a/engines/pink/actors/lead_actor.h b/engines/pink/actors/lead_actor.h index 46fda52edf..3954df1180 100644 --- a/engines/pink/actors/lead_actor.h +++ b/engines/pink/actors/lead_actor.h @@ -47,7 +47,10 @@ public: virtual void deserialize(Archive &archive); void setNextExecutors (Common::String &nextModule, Common::String &nextPage); + virtual void init(bool unk); + private: + State _state; CursorMgr *_cursorMgr; WalkMgr *_walkMgr; Sequencer *_sequencer; |