aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actors
diff options
context:
space:
mode:
authorwhiterandrek2018-06-12 21:12:30 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitcf8971ae453562dcdf2aa0016d1c458e321b8e79 (patch)
tree33857479fd4f0d1d6f481484348f05629fa2f05b /engines/pink/objects/actors
parent2c4336cd8c21da30fd7204ec3fc6205ad449c4c6 (diff)
downloadscummvm-rg350-cf8971ae453562dcdf2aa0016d1c458e321b8e79.tar.gz
scummvm-rg350-cf8971ae453562dcdf2aa0016d1c458e321b8e79.tar.bz2
scummvm-rg350-cf8971ae453562dcdf2aa0016d1c458e321b8e79.zip
PINK: implemented skipping of walk
Diffstat (limited to 'engines/pink/objects/actors')
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp11
-rw-r--r--engines/pink/objects/actors/lead_actor.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 4d09281d29..0c59c2e842 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -177,10 +177,10 @@ void LeadActor::onKeyboardButtonClick(Common::KeyCode code) {
case kMoving:
switch (code) {
case Common::KEYCODE_ESCAPE:
- // set unk variables
+ setReadyAfterWalk();
// Fall Through intended
case Common::KEYCODE_SPACE:
- //skip walking animation
+ _walkMgr->skip();
default:
break;
}
@@ -280,7 +280,7 @@ void LeadActor::onInventoryClosed(bool isItemClicked) {
forceUpdateCursor();
}
-void LeadActor::onWalkEnd() {
+void LeadActor::onWalkEnd(const Common::String &stopName) {
State oldNextState = _nextState;
_state = kReady;
_nextState = kUnk_Loading;
@@ -290,6 +290,11 @@ void LeadActor::onWalkEnd() {
else
sendLeftClickMessage(_recipient);
}
+ else {
+ Action *action = findAction(stopName);
+ assert(action);
+ setAction(action);
+ }
}
void LeadActor::onPDAClose() {
diff --git a/engines/pink/objects/actors/lead_actor.h b/engines/pink/objects/actors/lead_actor.h
index 9e1f8cb4ea..e632e7ba05 100644
--- a/engines/pink/objects/actors/lead_actor.h
+++ b/engines/pink/objects/actors/lead_actor.h
@@ -79,7 +79,7 @@ public:
virtual void onClick();
virtual void onVariableSet() {}
void onInventoryClosed(bool isItemClicked);
- void onWalkEnd();
+ void onWalkEnd(const Common::String &stopName);
void onPDAClose();
bool isInteractingWith(Actor *actor);