aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2013-03-18 15:07:44 -0400
committerMatthew Hoops2013-04-16 21:53:34 -0400
commit8fb73dd2c39396dcd1a5c1049011f277a83b177a (patch)
tree2d1fac3775cac6bf6837b175824ec3a5c0868154
parent06cd644a9e1a697fb5ab36e80f53f8417aa35455 (diff)
downloadscummvm-rg350-8fb73dd2c39396dcd1a5c1049011f277a83b177a.tar.gz
scummvm-rg350-8fb73dd2c39396dcd1a5c1049011f277a83b177a.tar.bz2
scummvm-rg350-8fb73dd2c39396dcd1a5c1049011f277a83b177a.zip
PEGASUS: Clean up DVD demo Theora playback
-rw-r--r--engines/pegasus/pegasus.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 1441ff4f3c..463e81e52e 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -1396,10 +1396,11 @@ void PegasusEngine::die(const DeathReason reason) {
void PegasusEngine::doDeath() {
#ifdef USE_THEORADEC
// The updated demo has a new Theora video for the closing
- if (isDemo() && _deathReason == kPlayerWonGame) {
+ if (isDVDDemo() && _deathReason == kPlayerWonGame) {
Video::TheoraDecoder decoder;
if (decoder.loadFile("Images/Demo TSA/DemoClosing.ogg")) {
+ throwAwayEverything();
decoder.start();
playMovieScaled(&decoder, 0, 0);
}
@@ -1612,12 +1613,14 @@ void PegasusEngine::startNewGame() {
GameState.setPrehistoricBreakerThrown(false);
#ifdef USE_THEORADEC
- // The updated demo has a new Theora video for the closing
- Video::TheoraDecoder decoder;
+ if (isDVD()) {
+ // The updated demo has a new Theora video for the closing
+ Video::TheoraDecoder decoder;
- if (decoder.loadFile("Images/Demo TSA/DemoOpening.ogg")) {
- decoder.start();
- playMovieScaled(&decoder, 0, 0);
+ if (decoder.loadFile("Images/Demo TSA/DemoOpening.ogg")) {
+ decoder.start();
+ playMovieScaled(&decoder, 0, 0);
+ }
}
#endif
} else {