diff options
| -rw-r--r-- | engines/pegasus/pegasus.cpp | 33 | 
1 files changed, 31 insertions, 2 deletions
| diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 2dae8f4f60..1441ff4f3c 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -37,6 +37,7 @@  #include "base/plugins.h"  #include "base/version.h"  #include "gui/saveload.h" +#include "video/theora_decoder.h"  #include "video/qt_decoder.h"  #include "pegasus/console.h" @@ -1362,8 +1363,14 @@ bool PegasusEngine::playMovieScaled(Video::VideoDecoder *video, uint16 x, uint16  		if (video->needsUpdate()) {  			const Graphics::Surface *frame = video->decodeNextFrame(); -			if (frame) -				drawScaledFrame(frame, x, y); +			if (frame) { +				if (frame->w <= 320 && frame->h <= 240) { +					drawScaledFrame(frame, x, y); +				} else { +					_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); +					_system->updateScreen(); +				} +			}  		}  		Input input; @@ -1387,6 +1394,18 @@ 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) { +		Video::TheoraDecoder decoder; + +		if (decoder.loadFile("Images/Demo TSA/DemoClosing.ogg")) { +			decoder.start(); +			playMovieScaled(&decoder, 0, 0); +		} +	} +#endif +  	_gfx->doFadeOutSync();  	throwAwayEverything();  	useMenu(new DeathMenu(_deathReason)); @@ -1591,6 +1610,16 @@ void PegasusEngine::startNewGame() {  		GameState.setPrehistoricSeenFlyer2(false);  		GameState.setPrehistoricSeenBridgeZoom(false);  		GameState.setPrehistoricBreakerThrown(false); + +#ifdef USE_THEORADEC +		// 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); +		} +#endif  	} else {  		jumpToNewEnvironment(kCaldoriaID, kCaldoria00, kEast);  	} | 
