aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/animation.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-01-16 20:27:36 -0500
committerWillem Jan Palenstijn2012-02-23 22:48:18 +0100
commita352c3cc000fb13f0dae32e84a859a8fb5cb5966 (patch)
tree2dda398697465429fb97cf9090d97066dbdc4f34 /engines/sword1/animation.cpp
parent8fea4968909eb5f3d154ae7f2964afba20033c50 (diff)
downloadscummvm-rg350-a352c3cc000fb13f0dae32e84a859a8fb5cb5966.tar.gz
scummvm-rg350-a352c3cc000fb13f0dae32e84a859a8fb5cb5966.tar.bz2
scummvm-rg350-a352c3cc000fb13f0dae32e84a859a8fb5cb5966.zip
SWORD1: Add support for the PSX demo videos
Diffstat (limited to 'engines/sword1/animation.cpp')
-rw-r--r--engines/sword1/animation.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index a1ace0f331..e25b986d40 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -88,8 +88,8 @@ static const char *const sequenceListPSX[20] = {
"candle1",
"geodrop1",
"vulture1",
- "",
- "" // no credits?
+ "", // not present
+ "" // credits are not a video
};
///////////////////////////////////////////////////////////////////////////////
@@ -173,7 +173,7 @@ bool MoviePlayer::load(uint32 id) {
filename = Common::String::format("%s.smk", sequenceList[id]);
break;
case kVideoDecoderPSX:
- filename = Common::String::format("%s.str", sequenceListPSX[id]);
+ filename = Common::String::format("%s.str", (_vm->_systemVars.isDemo) ? sequenceList[id] : sequenceListPSX[id]);
// Need to switch to true color
initGraphics(g_system->getWidth(), g_system->getHeight(), true, 0);
@@ -406,7 +406,8 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
// For the PSX version, we'll try the PlayStation stream files
if (vm->isPsx()) {
- filename = Common::String(sequenceListPSX[id]) + ".str";
+ // The demo uses the normal file names
+ filename = ((vm->_systemVars.isDemo) ? Common::String(sequenceList[id]) : Common::String(sequenceListPSX[id])) + ".str";
if (Common::File::exists(filename)) {
#ifdef USE_RGB_COLOR
@@ -450,9 +451,11 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
return NULL;
}
- Common::String buf = Common::String::format(_("Cutscene '%s' not found"), sequenceList[id]);
- GUI::MessageDialog dialog(buf, _("OK"));
- dialog.runModal();
+ if (!vm->isPsx() || scumm_stricmp(sequenceList[id], "enddemo") != 0) {
+ Common::String buf = Common::String::format(_("Cutscene '%s' not found"), sequenceList[id]);
+ GUI::MessageDialog dialog(buf, _("OK"));
+ dialog.runModal();
+ }
return NULL;
}