aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
authorSven Hesse2011-01-22 04:39:39 +0000
committerSven Hesse2011-01-22 04:39:39 +0000
commitd99ca6e58c6e3f4d409edac08b9b703557cd2b61 (patch)
tree43aaf68e2c6904ebd3432dc018ecec554b10b82a /engines/gob/videoplayer.cpp
parente7006f2cf171c108de1825a7c50e9523c7340e96 (diff)
downloadscummvm-rg350-d99ca6e58c6e3f4d409edac08b9b703557cd2b61.tar.gz
scummvm-rg350-d99ca6e58c6e3f4d409edac08b9b703557cd2b61.tar.bz2
scummvm-rg350-d99ca6e58c6e3f4d409edac08b9b703557cd2b61.zip
GOB: Don't mess with the break key in Urban Runner
To be able ESC videos, you need to switch on ESC in the settings in the right part of the menu, because the scripts needs to trigger the drawing of the last frame of the ESC'd video. Otherwise, the graphics e.g. stops mid-frame during a turn. svn-id: r55407
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 4c1f724609..63d751b13e 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -263,8 +263,10 @@ bool VideoPlayer::play(int slot, Properties &properties) {
return true;
}
- // NOTE: For testing (and comfort?) purposes, we enable aborting of all videos)
- properties.breakKey = kShortKeyEscape;
+ if (_vm->getGameType() != kGameTypeUrban)
+ // NOTE: For testing (and comfort?) purposes, we enable aborting of all videos.
+ // Except for Urban Runner, where it leads to glitches
+ properties.breakKey = kShortKeyEscape;
while ((properties.startFrame != properties.lastFrame) &&
(properties.startFrame < (int32)(video->decoder->getFrameCount() - 1))) {
@@ -495,7 +497,21 @@ void VideoPlayer::checkAbort(Video &video, Properties &properties) {
&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons);
_vm->_inter->storeKey(_vm->_util->checkKey());
- if (VAR(0) == (unsigned) properties.breakKey) {
+
+ // Check for that specific key
+ bool pressedBreak = (VAR(0) == (unsigned)properties.breakKey);
+
+ // Mouse buttons
+ if (properties.breakKey < 4)
+ if (_vm->_game->_mouseButtons & properties.breakKey)
+ pressedBreak = true;
+
+ // Any key
+ if (properties.breakKey == 4)
+ if (VAR(0) != 0)
+ pressedBreak = true;
+
+ if (pressedBreak) {
video.decoder->disableSound();
// Seek to the last frame. Some scripts depend on that.