Skip to content

Commit

Permalink
PINK: implemented init of LeadActor and checking for state in LeadAct…
Browse files Browse the repository at this point in the history
…or method
  • Loading branch information
whitertandrek authored and sev- committed Jun 28, 2018
1 parent 2e3e07b commit ac0ed1d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engines/pink/actors/actor.h
Expand Up @@ -43,7 +43,7 @@ class Actor : public NamedObject {
Sequencer *getSequencer();
GamePage *getPage() const;

void init(bool unk);
virtual void init(bool unk);
void hide();
void endAction();

Expand Down
14 changes: 12 additions & 2 deletions engines/pink/actors/lead_actor.cpp
Expand Up @@ -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
3 changes: 3 additions & 0 deletions engines/pink/actors/lead_actor.h
Expand Up @@ -47,7 +47,10 @@ class LeadActor : public Actor {
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;
Expand Down

0 comments on commit ac0ed1d

Please sign in to comment.