PINK: implemented init of LeadActor and checking for state in LeadActor method

This commit is contained in:
whitertandrek 2018-03-20 17:33:56 +02:00 committed by Eugene Sandulenko
parent 2e3e07b858
commit ac0ed1dbdd
3 changed files with 16 additions and 3 deletions

View File

@ -43,7 +43,7 @@ public:
Sequencer *getSequencer();
GamePage *getPage() const;
void init(bool unk);
virtual void init(bool unk);
void hide();
void endAction();

View File

@ -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

View File

@ -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;