[Scummvm-cvs-logs] SF.net SVN: scummvm:[55418] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sat Jan 22 12:39:03 CET 2011
Revision: 55418
http://scummvm.svn.sourceforge.net/scummvm/?rev=55418&view=rev
Author: drmccoy
Date: 2011-01-22 11:39:03 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
GOB: Actually, startFrame == -2 seems to be the only live video flag
Modified Paths:
--------------
scummvm/trunk/engines/gob/inter_v6.cpp
scummvm/trunk/engines/gob/videoplayer.cpp
scummvm/trunk/engines/gob/videoplayer.h
Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp 2011-01-22 11:37:37 UTC (rev 55417)
+++ scummvm/trunk/engines/gob/inter_v6.cpp 2011-01-22 11:39:03 UTC (rev 55418)
@@ -167,11 +167,11 @@
if (props.startFrame == -2) {
props.startFrame = 0;
- props.lastFrame = -1;
- props.flags &= ~0x1000;
+ props.lastFrame = -1;
+ props.noBlock = true;
}
- _vm->_vidPlayer->evaluateFlags(props, true);
+ _vm->_vidPlayer->evaluateFlags(props);
int slot = 0;
if ((fileName[0] != 0) && ((slot = _vm->_vidPlayer->openVideo(true, fileName, props)) < 0)) {
@@ -182,7 +182,7 @@
if (props.startFrame >= 0)
_vm->_vidPlayer->play(slot, props);
- if (close && !(props.flags & VideoPlayer::kFlagNonBlocking)) {
+ if (close && !props.noBlock) {
if ((props.flags & VideoPlayer::kFlagNoVideo) && (!props.canceled))
_vm->_util->longDelay(500);
Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp 2011-01-22 11:37:37 UTC (rev 55417)
+++ scummvm/trunk/engines/gob/videoplayer.cpp 2011-01-22 11:39:03 UTC (rev 55418)
@@ -40,7 +40,7 @@
x(-1), y(-1), width(-1), height(-1), flags(kFlagFrontSurface), switchColorMode(false),
startFrame(-1), lastFrame(-1), endFrame(-1), forceSeek(false),
breakKey(kShortKeyEscape), palCmd(8), palStart(0), palEnd(255), palFrame(-1),
- loop(false), fade(false), waitEndFrame(true), canceled(false) {
+ noBlock(false), loop(false), fade(false), waitEndFrame(true), canceled(false) {
}
@@ -74,7 +74,7 @@
_videoSlots[i].close();
}
-void VideoPlayer::evaluateFlags(Properties &properties, bool allowNonBlock) {
+void VideoPlayer::evaluateFlags(Properties &properties) {
if (properties.flags & kFlagFrontSurface) {
properties.sprite = Draw::kFrontSurface;
} else if (properties.flags & kFlagOtherSurface) {
@@ -87,14 +87,6 @@
} else {
properties.sprite = Draw::kBackSurface;
}
-
- if (allowNonBlock) {
- if(!(properties.flags & 0x1000) && !(properties.flags & kFlagNoVideo))
- properties.flags |= kFlagNonBlocking;
- else
- properties.flags &= ~0x1000;
- } else
- properties.flags &= ~0x1000;
}
int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties &properties) {
@@ -255,7 +247,7 @@
properties.canceled = false;
- if (primary && (properties.flags & kFlagNonBlocking)) {
+ if (primary && properties.noBlock) {
video->live = true;
properties.waitEndFrame = false;
_liveProperties = properties;
@@ -263,9 +255,9 @@
return true;
}
- if (_vm->getGameType() != kGameTypeUrban)
+ if ((_vm->getGameType() != kGameTypeUrban) && (_vm->getGameType() != kGameTypeBambou))
// NOTE: For testing (and comfort?) purposes, we enable aborting of all videos.
- // Except for Urban Runner, where it leads to glitches
+ // Except for Urban Runner and Bambou, where it leads to glitches
properties.breakKey = kShortKeyEscape;
while ((properties.startFrame != properties.lastFrame) &&
Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h 2011-01-22 11:37:37 UTC (rev 55417)
+++ scummvm/trunk/engines/gob/videoplayer.h 2011-01-22 11:39:03 UTC (rev 55418)
@@ -50,7 +50,6 @@
kFlagFrontSurface = 0x000080, ///< Draw directly into the front surface.
kFlagNoVideo = 0x000100, ///< Only sound.
kFlagOtherSurface = 0x000800, ///< Draw into a specific sprite.
- kFlagNonBlocking = 0x001000, ///< "Live" video playing while scripts continue.
kFlagScreenSurface = 0x400000 ///< Draw into a newly created sprite of screen dimensions.
};
@@ -90,6 +89,8 @@
int16 palEnd; ///< Palette entry to end at.
int32 palFrame; ///< Frame to apply the palette command at.
+ bool noBlock; ///< Non-blocking "live" video?
+
bool loop; ///< Loop the video?
bool fade; ///< Fade in?
@@ -103,7 +104,7 @@
VideoPlayer(GobEngine *vm);
~VideoPlayer();
- void evaluateFlags(Properties &properties, bool allowNonBlock = false);
+ void evaluateFlags(Properties &properties);
int openVideo(bool primary, const Common::String &file, Properties &properties);
bool closeVideo(int slot = 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list