From 8fb73dd2c39396dcd1a5c1049011f277a83b177a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 18 Mar 2013 15:07:44 -0400 Subject: PEGASUS: Clean up DVD demo Theora playback --- engines/pegasus/pegasus.cpp | 15 +++++++++------ 1 file 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 { -- cgit v1.2.3