aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Ad
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-11 16:11:16 +0200
committerEinar Johan Trøan Sømåen2012-06-11 16:11:16 +0200
commita522aa5f6c6ec0e87f038cda9e6e50f13df41f8e (patch)
tree9b292146b66a9949d93ab9d3699ee6b1af2b8542 /engines/wintermute/Ad
parent63efd7619221f4c4591c65c2ca3419006586ccbc (diff)
downloadscummvm-rg350-a522aa5f6c6ec0e87f038cda9e6e50f13df41f8e.tar.gz
scummvm-rg350-a522aa5f6c6ec0e87f038cda9e6e50f13df41f8e.tar.bz2
scummvm-rg350-a522aa5f6c6ec0e87f038cda9e6e50f13df41f8e.zip
WINTERMUTE: Make AdEntity-Theora videos work properly.
Diffstat (limited to 'engines/wintermute/Ad')
-rw-r--r--engines/wintermute/Ad/AdEntity.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp
index 827209b120..ccd520a543 100644
--- a/engines/wintermute/Ad/AdEntity.cpp
+++ b/engines/wintermute/Ad/AdEntity.cpp
@@ -507,7 +507,10 @@ HRESULT CAdEntity::Display() {
}
DisplaySpriteAttachments(true);
- if (_currentSprite) {
+ if(_theora && (_theora->isPlaying() || _theora->isPaused()))
+ {
+ _theora->display(Alpha);
+ } else if (_currentSprite) {
_currentSprite->Display(_posX,
_posY,
(Reg || _editorAlwaysRegister) ? _registerAlias : NULL,
@@ -599,6 +602,20 @@ HRESULT CAdEntity::Update() {
UpdateBlockRegion();
_ready = (_state == STATE_READY);
+ if(_theora)
+ {
+ int OffsetX, OffsetY;
+ Game->GetOffset(&OffsetX, &OffsetY);
+ _theora->_posX = _posX - OffsetX;
+ _theora->_posY = _posY - OffsetY;
+
+ _theora->update();
+ if(_theora->isFinished())
+ {
+ _theora->stop();
+ delete _theora;
+ }
+ }
UpdatePartEmitter();
UpdateSpriteAttachments();