diff options
author | whitertandrek | 2018-03-20 17:33:56 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | ac0ed1dbdd420e2a2c7b5118d29bdb47715b5a14 (patch) | |
tree | 1c0d4416ec4584f1a4ef9369b13c14d9cff2f504 | |
parent | 2e3e07b8582a6d4bc54e263b334d3d26e8caa994 (diff) | |
download | scummvm-rg350-ac0ed1dbdd420e2a2c7b5118d29bdb47715b5a14.tar.gz scummvm-rg350-ac0ed1dbdd420e2a2c7b5118d29bdb47715b5a14.tar.bz2 scummvm-rg350-ac0ed1dbdd420e2a2c7b5118d29bdb47715b5a14.zip |
PINK: implemented init of LeadActor and checking for state in LeadActor method
-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; |