aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pink/actors/actor.cpp19
-rw-r--r--engines/pink/actors/actor.h9
2 files changed, 26 insertions, 2 deletions
diff --git a/engines/pink/actors/actor.cpp b/engines/pink/actors/actor.cpp
index c4c9b78a23..d9363b6ea6 100644
--- a/engines/pink/actors/actor.cpp
+++ b/engines/pink/actors/actor.cpp
@@ -51,4 +51,23 @@ GamePage *Actor::getPage() const {
return _page;
}
+void Actor::setIdleAction(bool unk) {
+ assert(_action == nullptr);
+
+ uint i;
+ for (i = 0; i < _actions.size(); ++i) {
+ if (_action[i].getName() == "Idle") {
+ _action = _actions[i];
+ break;
+ }
+ }
+ if (!_action) {
+ _isActionEnd = 1;
+ }
+ else {
+ _isActionEnd = 0;
+ //call action virt method
+ }
+}
+
} // End of namespace Pink
diff --git a/engines/pink/actors/actor.h b/engines/pink/actors/actor.h
index 1db59cf287..fd9c25b813 100644
--- a/engines/pink/actors/actor.h
+++ b/engines/pink/actors/actor.h
@@ -34,7 +34,10 @@ class Sequencer;
class Actor : public NamedObject {
public:
- Actor() {};
+ Actor()
+ : _page(nullptr), _action(nullptr),
+ _isActionEnd(1)
+ {};
virtual void deserialize(Archive &archive);
Action *findAction(Common::String &name);
@@ -42,11 +45,13 @@ public:
Sequencer *getSequencer();
GamePage *getPage() const;
+ void setIdleAction(bool unk);
+
protected:
GamePage *_page;
- //int possibly_isActionNotExist;
Action *_action;
Common::Array<Action*> _actions;
+ bool _isActionEnd;
};
} // End of namespace Pink