diff options
author | Johannes Schickel | 2014-01-22 00:53:21 +0100 |
---|---|---|
committer | Johannes Schickel | 2014-01-22 00:53:21 +0100 |
commit | 047df69407fabf19385012bf8e2ebb55906ba228 (patch) | |
tree | b41d62b19936b3623e2bda611482cb3f2eaedd99 /engines/agos/animation.cpp | |
parent | 1cee8439e70e26427ac5ff04f559016db99bf66b (diff) | |
download | scummvm-rg350-047df69407fabf19385012bf8e2ebb55906ba228.tar.gz scummvm-rg350-047df69407fabf19385012bf8e2ebb55906ba228.tar.bz2 scummvm-rg350-047df69407fabf19385012bf8e2ebb55906ba228.zip |
AGOS: Use Common::File instead of SearchMan.
This makes sure the hack from Common::File for filenames with a trailing dot
is used as expected.
Diffstat (limited to 'engines/agos/animation.cpp')
-rw-r--r-- | engines/agos/animation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index b8467873f1..d438de049a 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -251,8 +251,8 @@ bool MoviePlayerDXA::load() { } Common::String videoName = Common::String::format("%s.dxa", baseName); - Common::SeekableReadStream *videoStream = SearchMan.createReadStreamForMember(videoName); - if (!videoStream) + Common::File *videoStream = new Common::File(); + if (!videoStream->open(videoName)) error("Failed to load video file %s", videoName.c_str()); if (!loadStream(videoStream)) error("Failed to load video stream from file %s", videoName.c_str()); @@ -421,8 +421,8 @@ MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name) bool MoviePlayerSMK::load() { Common::String videoName = Common::String::format("%s.smk", baseName); - Common::SeekableReadStream *videoStream = SearchMan.createReadStreamForMember(videoName); - if (!videoStream) + Common::File *videoStream = new Common::File(); + if (!videoStream->open(videoName)) error("Failed to load video file %s", videoName.c_str()); if (!loadStream(videoStream)) error("Failed to load video stream from file %s", videoName.c_str()); @@ -532,25 +532,25 @@ MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) { memcpy(shortName, baseName, 6); sprintf(filename, "%s~1.dxa", shortName); - if (SearchMan.hasFile(filename)) { + if (Common::File::exists(filename)) { memset(baseName, 0, sizeof(baseName)); memcpy(baseName, filename, 8); } sprintf(filename, "%s~1.smk", shortName); - if (SearchMan.hasFile(filename)) { + if (Common::File::exists(filename)) { memset(baseName, 0, sizeof(baseName)); memcpy(baseName, filename, 8); } } sprintf(filename, "%s.dxa", baseName); - if (SearchMan.hasFile(filename)) { + if (Common::File::exists(filename)) { return new MoviePlayerDXA(vm, baseName); } sprintf(filename, "%s.smk", baseName); - if (SearchMan.hasFile(filename)) { + if (Common::File::exists(filename)) { return new MoviePlayerSMK(vm, baseName); } |