diff options
author | Einar Johan Trøan Sømåen | 2012-06-14 00:12:15 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-14 00:12:15 +0200 |
commit | 076ed07e9277ea0fd8b49c9dd8734de8d13145b1 (patch) | |
tree | ecbbfda6c4f66a47e459457628b8f25314ac5b3b /engines | |
parent | 84837f4bae998d8067f809531533e4f5afeb28be (diff) | |
download | scummvm-rg350-076ed07e9277ea0fd8b49c9dd8734de8d13145b1.tar.gz scummvm-rg350-076ed07e9277ea0fd8b49c9dd8734de8d13145b1.tar.bz2 scummvm-rg350-076ed07e9277ea0fd8b49c9dd8734de8d13145b1.zip |
WINTERMUTE: Fix theora-playback with the new Rendering-changes.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 5 | ||||
-rw-r--r-- | engines/wintermute/Base/BSurfaceSDL.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/video/VidTheoraPlayer.cpp | 11 |
3 files changed, 13 insertions, 9 deletions
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index f5ac836624..15510ec6d5 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -1449,15 +1449,14 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS // PlayTheora
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "PlayTheora") == 0) {
- Stack->CorrectParams(0);
+/* Stack->CorrectParams(0);
Stack->PushBool(false);
- return S_OK;
+ return S_OK;*/
// TODO: ADDVIDEO
Stack->CorrectParams(7);
const char* Filename = Stack->Pop()->GetString();
- warning("PlayTheora: %s - not implemented yet", Filename);
CScValue* valType = Stack->Pop();
int Type;
if (valType->IsNULL())
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp index 5c4e6952d7..8c8c6d4fb9 100644 --- a/engines/wintermute/Base/BSurfaceSDL.cpp +++ b/engines/wintermute/Base/BSurfaceSDL.cpp @@ -416,6 +416,12 @@ bool CBSurfaceSDL::isTransparentAtLite(int x, int y) { //////////////////////////////////////////////////////////////////////////
HRESULT CBSurfaceSDL::startPixelOp() {
//SDL_LockTexture(_texture, NULL, &_lockPixels, &_lockPitch);
+ // Any pixel-op makes the caching useless:
+ if (_scaledSurface) {
+ _scaledSurface->free();
+ delete _scaledSurface;
+ _scaledSurface = NULL;
+ }
return S_OK;
}
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp index 9877a67bdc..ca01b51d6f 100644 --- a/engines/wintermute/video/VidTheoraPlayer.cpp +++ b/engines/wintermute/video/VidTheoraPlayer.cpp @@ -458,10 +458,9 @@ HRESULT CVidTheoraPlayer::update() { if (_state == THEORA_STATE_PLAYING) { if (_theoraDecoder->getTimeToNextFrame() == 0) { _surface.copyFrom(*_theoraDecoder->decodeNextFrame()); - _videoFrameReady = true; - } - if (_texture && _videoFrameReady) { - WriteVideo(); + if (_texture) { + WriteVideo(); + } } return S_OK; } @@ -600,7 +599,7 @@ HRESULT CVidTheoraPlayer::WriteVideo() { //RenderFrame(_texture, &yuv); _texture->endPixelOp(); - + _videoFrameReady = true; return S_OK; } @@ -626,7 +625,7 @@ HRESULT CVidTheoraPlayer::display(uint32 Alpha) { RECT rc; HRESULT Res; - if (_texture) { + if (_texture && _videoFrameReady) { CBPlatform::SetRect(&rc, 0, 0, _texture->getWidth(), _texture->getHeight()); if (_playZoom == 100.0f) Res = _texture->displayTrans(_posX, _posY, rc, Alpha); else Res = _texture->displayTransZoom(_posX, _posY, rc, _playZoom, _playZoom, Alpha); |