aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-05-01 09:17:10 -0400
committerPaul Gilbert2014-05-01 09:17:10 -0400
commit88cf2c7caab3ce74460a980640b9fe832f4fba5f (patch)
tree8824bf0dc61a5bfc7b868e47887f37110504bc92 /engines
parent57bf0673d70311da7b2bddda91f4a0566c51c340 (diff)
downloadscummvm-rg350-88cf2c7caab3ce74460a980640b9fe832f4fba5f.tar.gz
scummvm-rg350-88cf2c7caab3ce74460a980640b9fe832f4fba5f.tar.bz2
scummvm-rg350-88cf2c7caab3ce74460a980640b9fe832f4fba5f.zip
MADS: Fix actions being triggered at the end of animation sequences
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/animation.cpp8
-rw-r--r--engines/mads/animation.h2
-rw-r--r--engines/mads/scene.cpp4
-rw-r--r--engines/mads/scene.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 874ce69301..bfcbe16e28 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -318,7 +318,7 @@ void Animation::preLoad(const Common::String &resName, int level) {
// doesn't need to be preloaded
}
-void Animation::startAnimation(int abortTimers) {
+void Animation::startAnimation(int endTrigger) {
_messageCtr = 0;
_skipLoad = true;
@@ -338,9 +338,9 @@ void Animation::startAnimation(int abortTimers) {
_currentFrame = 0;
_oldFrameEntry = 0;
_nextFrameTimer = _vm->_game->_scene._frameStartTime;
- _trigger = abortTimers;
+ _trigger = endTrigger;
_triggerMode = _vm->_game->_triggerSetupMode;
- _vm->_game->_scene._action._activeAction = _actionDetails;
+ _actionDetails = _vm->_game->_scene._action._activeAction;
for (int idx = 0; idx < _header._messagesCount; ++idx) {
_messages[idx]._kernelMsgIndex = -1;
@@ -559,7 +559,7 @@ void Animation::update() {
if (_triggerMode != SEQUENCE_TRIGGER_DAEMON) {
// Copy the noun list
- scene._action._action = _actionDetails;
+ scene._action._activeAction = _actionDetails;
}
}
}
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index 894fbaecb2..aab1743b42 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -202,7 +202,7 @@ public:
/**
* Setups up a loaded animation for playback
*/
- void startAnimation(int abortTimers);
+ void startAnimation(int endTrigger);
/**
* Update the animation
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index f4b2cb1ec8..5c86e4590e 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -594,7 +594,7 @@ void Scene::checkKeyboard() {
}
}
-void Scene::loadAnimation(const Common::String &resName, int abortTimers) {
+void Scene::loadAnimation(const Common::String &resName, int trigger) {
assert(_activeAnimation == nullptr);
MSurface depthSurface;
UserInterface interfaceSurface(_vm);
@@ -602,7 +602,7 @@ void Scene::loadAnimation(const Common::String &resName, int abortTimers) {
_activeAnimation = Animation::init(_vm, this);
_activeAnimation->load(interfaceSurface, depthSurface, resName,
_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
- _activeAnimation->startAnimation(abortTimers);
+ _activeAnimation->startAnimation(trigger);
}
void Scene::updateCursor() {
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 48b01b2acb..3661bd6502 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -204,7 +204,7 @@ public:
/**
* Load an animation
*/
- void loadAnimation(const Common::String &resName, int abortTimers = 0);
+ void loadAnimation(const Common::String &resName, int trigger = 0);
/**
* Returns a vocab entry