aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/core
diff options
context:
space:
mode:
authorFilippos Karapetis2014-12-25 21:17:47 +0200
committerFilippos Karapetis2014-12-25 21:17:47 +0200
commitdbbcf641874ace35b871226664370413de176c37 (patch)
tree313d8ceb142a2ec3cad20fd2c09212bb685f15a8 /engines/zvision/core
parent06fbca1e8109bdd3d1fdf72fc1056cbf658659e5 (diff)
downloadscummvm-rg350-dbbcf641874ace35b871226664370413de176c37.tar.gz
scummvm-rg350-dbbcf641874ace35b871226664370413de176c37.tar.bz2
scummvm-rg350-dbbcf641874ace35b871226664370413de176c37.zip
ZVISION: Use the search manager to open files in console commands
Diffstat (limited to 'engines/zvision/core')
-rw-r--r--engines/zvision/core/console.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index 07d3114ec8..c7592c8d9d 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -79,12 +79,14 @@ bool Console::cmdLoadSound(int argc, const char **argv) {
Audio::AudioStream *soundStream = makeRawZorkStream(argv[1], _engine);
Audio::SoundHandle handle;
_engine->_mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, soundStream, -1, 100, 0, DisposeAfterUse::YES, false, false);
-
} else if (argc == 4) {
int isStereo = atoi(argv[3]);
Common::File *file = new Common::File();
- file->open(argv[1]);
+ if (!_engine->getSearchManager()->openFile(*file, argv[1])) {
+ warning("File not found: %s", argv[1]);
+ return true;
+ }
Audio::AudioStream *soundStream = makeRawZorkStream(file, atoi(argv[2]), isStereo == 0 ? false : true);
Audio::SoundHandle handle;
@@ -104,8 +106,10 @@ bool Console::cmdRawToWav(int argc, const char **argv) {
}
Common::File file;
- if (!file.open(argv[1]))
+ if (!_engine->getSearchManager()->openFile(file, argv[1])) {
+ warning("File not found: %s", argv[1]);
return true;
+ }
Audio::AudioStream *audioStream = makeRawZorkStream(argv[1], _engine);