diff options
author | Travis Howell | 2006-06-03 13:24:59 +0000 |
---|---|---|
committer | Travis Howell | 2006-06-03 13:24:59 +0000 |
commit | 7d5d40774b5100dc58b73c7666ac7e1aec295ef8 (patch) | |
tree | 82a4cb2b1f1936ef3443bef6129c7d6e10a34dd5 | |
parent | 75af002bd33348d7a8f891fc5e679ed1abae835c (diff) | |
download | scummvm-rg350-7d5d40774b5100dc58b73c7666ac7e1aec295ef8.tar.gz scummvm-rg350-7d5d40774b5100dc58b73c7666ac7e1aec295ef8.tar.bz2 scummvm-rg350-7d5d40774b5100dc58b73c7666ac7e1aec295ef8.zip |
Add work around for bug in a German Windows 2CD version of FF. Trigger error if video file not found, since they are required by several part of FF
svn-id: r22869
-rw-r--r-- | engines/simon/animation.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/engines/simon/animation.cpp b/engines/simon/animation.cpp index 776947cded..5be3b6c852 100644 --- a/engines/simon/animation.cpp +++ b/engines/simon/animation.cpp @@ -73,7 +73,7 @@ MoviePlayer::~MoviePlayer() { } bool MoviePlayer::load(const char *filename) { - char filename2[100]; + char videoName[20]; uint32 tag; int32 frameRate; uint i; @@ -83,16 +83,28 @@ bool MoviePlayer::load(const char *filename) { memcpy(baseName, filename, baseLen); // Change file extension to dxa - strcpy(filename2, filename); - filename2[baseLen + 1] = 'd'; - filename2[baseLen + 2] = 'x'; - filename2[baseLen + 3] = 'a'; + sprintf(videoName, "%s.dxa", baseName); - if (_fd.open(filename2) == false) { - warning("Failed to load video file %s", filename2); - return false; - } - debug(0, "Playing video %s", filename2); + if (_fd.open(videoName) == false) { + // Check short filename to work around + // bug in a German Windows 2CD version. + if (baseLen >= 8) { + char shortName[20]; + memset(shortName, 0, sizeof(shortName)); + memcpy(shortName, filename, 6); + sprintf(shortName, "%s~1.dxa", shortName); + + if (_fd.open(shortName) == false) { + error("Failed to load video file %s or %s", videoName, shortName); + } else { + debug(0, "Playing video %s", shortName); + } + } else { + error("Failed to load video file %s", videoName); + } + } else { + debug(0, "Playing video %s", videoName); + } CursorMan.showMouse(false); @@ -100,7 +112,7 @@ bool MoviePlayer::load(const char *filename) { _vm->_language != Common::EN_ANY) { _sequenceNum = 0; for (i = 0; i < 90; i++) { - if (!scumm_stricmp(filename2, _sequenceList[i])) + if (!scumm_stricmp(videoName, _sequenceList[i])) _sequenceNum = i; } } @@ -155,7 +167,7 @@ void MoviePlayer::playOmniTV() { } void MoviePlayer::play() { - if (_vm->getBitFlag(40)) { + if (_vm->getPlatform() == Common::kPlatformWindows && _vm->getBitFlag(40)) { playOmniTV(); return; } |