aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2013-03-16 00:50:40 -0400
committerMatthew Hoops2013-04-16 21:53:13 -0400
commit5727b097b2b22db9c05afbd701a35a5f4af66334 (patch)
treebd21fad14cbf9079a8fcc6add8b77872d19bf589 /engines
parenta41457e224a1cc5fcde70fa9e75d1c82abd20fc9 (diff)
downloadscummvm-rg350-5727b097b2b22db9c05afbd701a35a5f4af66334.tar.gz
scummvm-rg350-5727b097b2b22db9c05afbd701a35a5f4af66334.tar.bz2
scummvm-rg350-5727b097b2b22db9c05afbd701a35a5f4af66334.zip
PEGASUS: Add the new demo theora videos
Diffstat (limited to 'engines')
-rw-r--r--engines/pegasus/pegasus.cpp33
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);
}