aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/actions
diff options
context:
space:
mode:
authorD G Turner2018-11-11 01:58:50 +0000
committerD G Turner2018-11-11 01:58:50 +0000
commit3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f (patch)
tree9af9670ced2d06bb622c914aa520eab19cae93fc /engines/pink/objects/actions
parent1adfcd91b72bef332b6c037de1f75158203e9b20 (diff)
downloadscummvm-rg350-3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f.tar.gz
scummvm-rg350-3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f.tar.bz2
scummvm-rg350-3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f.zip
PINK: Fix For Assertion When Looking Under Bed in Six House.
The action which triggers the assertion is CheckUnderBedDB. This changes ActionPlay::OnStart method to be similar to superclass implementation with regard to _startFrame to avoid this. However, the animation still glitches repeating several times, but this is a script bug in the original and should be addressed in a workaround in a future commit. This should fix the main issue in Trac bug #10800.
Diffstat (limited to 'engines/pink/objects/actions')
-rw-r--r--engines/pink/objects/actions/action_play.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp
index fb4f05f0cb..9551f13424 100644
--- a/engines/pink/objects/actions/action_play.cpp
+++ b/engines/pink/objects/actions/action_play.cpp
@@ -64,7 +64,10 @@ void ActionPlay::onStart() {
int frameCount = _decoder.getFrameCount();
if (_stopFrame == -1 || _stopFrame >= frameCount)
_stopFrame = frameCount - 1;
- assert(_startFrame < _decoder.getFrameCount());
+
+ if (_startFrame >= _decoder.getFrameCount())
+ _startFrame = 0;
+
ActionCEL::setFrame(_startFrame);
// doesn't need to decode startFrame here. Update method will decode
}