diff options
author | Eugene Sandulenko | 2016-06-17 10:51:24 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 57e092ab8f4212b5fa3e549dcf45e8bd2f3237d9 (patch) | |
tree | 8904c76a867629b9959283dbfbb06b3cbd2e3828 | |
parent | 612a480f9b1342820d88fc66f513dc00f768f5d9 (diff) | |
download | scummvm-rg350-57e092ab8f4212b5fa3e549dcf45e8bd2f3237d9.tar.gz scummvm-rg350-57e092ab8f4212b5fa3e549dcf45e8bd2f3237d9.tar.bz2 scummvm-rg350-57e092ab8f4212b5fa3e549dcf45e8bd2f3237d9.zip |
DIRECTOR: Fix indentation
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index ee640dea4c..4ff11a313b 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -116,35 +116,42 @@ int Lingo::func_mci(Common::String *s) { state = kMCITokenNone; break; } - } switch (command) { - case kMCITokenOpen: { - warning("MCI open file: %s, type: %s, alias: %s buffer: %s", params[0].c_str(), params[1].c_str(), params[2].c_str(), params[3].c_str()); - Common::File *file = new Common::File(); - if (!file->open(params[0])) { - warning("Failed to open %s", params[0].c_str()); - delete file; - return 0; - } - if (params[1] == "waveaudio") { - Audio::AudioStream *sound = Audio::makeWAVStream(file, DisposeAfterUse::YES); - _audioAliases[params[2]] = sound; - } - else - warning("Unhandled audio type %s", params[2].c_str()); + case kMCITokenOpen: + { + warning("MCI open file: %s, type: %s, alias: %s buffer: %s", params[0].c_str(), params[1].c_str(), params[2].c_str(), params[3].c_str()); + + Common::File *file = new Common::File(); + + if (!file->open(params[0])) { + warning("Failed to open %s", params[0].c_str()); + delete file; + return 0; + } + + if (params[1] == "waveaudio") { + Audio::AudioStream *sound = Audio::makeWAVStream(file, DisposeAfterUse::YES); + _audioAliases[params[2]] = sound; + } else { + warning("Unhandled audio type %s", params[2].c_str()); + } } break; - case kMCITokenPlay: { - warning("MCI play file: %s, from: %s, to: %s, repeat: %s", params[0].c_str(), params[1].c_str(), params[2].c_str(), params[3].c_str()); - if (!_audioAliases.contains(params[0])) { - warning("Unknown alias %s", params[0].c_str()); - return 0; - } - uint32 from = strtol(params[1].c_str(), 0, 10); - uint32 to = strtol(params[2].c_str(), 0, 10); - _vm->getSoundManager()->playMCI(*_audioAliases[params[0]], from, to); + case kMCITokenPlay: + { + warning("MCI play file: %s, from: %s, to: %s, repeat: %s", params[0].c_str(), params[1].c_str(), params[2].c_str(), params[3].c_str()); + + if (!_audioAliases.contains(params[0])) { + warning("Unknown alias %s", params[0].c_str()); + return 0; + } + + uint32 from = strtol(params[1].c_str(), 0, 10); + uint32 to = strtol(params[2].c_str(), 0, 10); + + _vm->getSoundManager()->playMCI(*_audioAliases[params[0]], from, to); } break; default: |