aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Ad
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-02 18:38:20 +0200
committerEinar Johan Trøan Sømåen2012-06-02 18:46:17 +0200
commitcafdcd1c8a68fb23dd6e2841b427fb69f29dd62c (patch)
tree8a065b7ab2f0dd630c9912ffd3ece6c5007cee67 /engines/wintermute/Ad
parent74ff79e90bb2862e8c84867ff50f56675c1b4c7e (diff)
downloadscummvm-rg350-cafdcd1c8a68fb23dd6e2841b427fb69f29dd62c.tar.gz
scummvm-rg350-cafdcd1c8a68fb23dd6e2841b427fb69f29dd62c.tar.bz2
scummvm-rg350-cafdcd1c8a68fb23dd6e2841b427fb69f29dd62c.zip
WINTERMUTE: Add in more of the missing Video-pieces, also, copy over the TheoraPlayer from SWORD25
Diffstat (limited to 'engines/wintermute/Ad')
-rw-r--r--engines/wintermute/Ad/AdGame.cpp64
1 files changed, 42 insertions, 22 deletions
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp
index 584504b7c6..9c6c9f4174 100644
--- a/engines/wintermute/Ad/AdGame.cpp
+++ b/engines/wintermute/Ad/AdGame.cpp
@@ -57,6 +57,8 @@
#include "engines/wintermute/Base/BSprite.h"
#include "engines/wintermute/Base/BFileManager.h"
#include "engines/wintermute/utils/utils.h"
+#include "engines/wintermute/video/VidPlayer.h"
+#include "engines/wintermute/video/VidTheoraPlayer.h"
#include "common/str.h"
namespace WinterMute {
@@ -1689,40 +1691,58 @@ HRESULT CAdGame::DisplayContent(bool Update, bool DisplayAll) {
// fill black
_renderer->Fill(0, 0, 0);
if (!_editorMode) _renderer->SetScreenViewport();
+
+ // playing exclusive video?
+ if(_videoPlayer->isPlaying())
+ {
+ if(Update) _videoPlayer->update();
+ _videoPlayer->display();
+ }
+ else if(_theoraPlayer)
+ {
+ if(_theoraPlayer->isPlaying()) {
+ if(Update) _theoraPlayer->update();
+ _theoraPlayer->display();
+ }
+ if(_theoraPlayer->IsFinished()) {
+ delete _theoraPlayer;
+ _theoraPlayer = NULL;
+ }
+ } else {
- // process scripts
- if (Update) _scEngine->Tick();
+ // process scripts
+ if (Update) _scEngine->Tick();
- POINT p;
- GetMousePos(&p);
+ POINT p;
+ GetMousePos(&p);
- _scene->Update();
- _scene->Display();
+ _scene->Update();
+ _scene->Display();
- // display in-game windows
- DisplayWindows(true);
- if (_inventoryBox) _inventoryBox->Display();
- if (_stateEx == GAME_WAITING_RESPONSE) _responseBox->Display();
- if (_indicatorDisplay) DisplayIndicator();
+ // display in-game windows
+ DisplayWindows(true);
+ if (_inventoryBox) _inventoryBox->Display();
+ if (_stateEx == GAME_WAITING_RESPONSE) _responseBox->Display();
+ if (_indicatorDisplay) DisplayIndicator();
- if (Update || DisplayAll) {
- // display normal windows
- DisplayWindows(false);
+ if (Update || DisplayAll) {
+ // display normal windows
+ DisplayWindows(false);
- SetActiveObject(Game->_renderer->GetObjectAt(p.x, p.y));
+ SetActiveObject(Game->_renderer->GetObjectAt(p.x, p.y));
- // textual info
- DisplaySentences(_state == GAME_FROZEN);
+ // textual info
+ DisplaySentences(_state == GAME_FROZEN);
- ShowCursor();
-
- if (_fader) _fader->Display();
- _transMgr->Update();
- }
+ ShowCursor();
+ if (_fader) _fader->Display();
+ _transMgr->Update();
+ }
+ }
if (_loadingIcon) {
_loadingIcon->Display(_loadingIconX, _loadingIconY);
if (!_loadingIconPersistent) {