Skip to content

Commit

Permalink
SHERLOCK: adjust music play code (file extension)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kiewitz committed Jun 8, 2015
1 parent dc17067 commit 91d4b8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions engines/sherlock/music.cpp
Expand Up @@ -295,7 +295,7 @@ bool Music::loadSong(int songNumber) {
if((songNumber > NUM_SONGS) || (songNumber < 1))
return false;

Common::String songName = Common::String(SONG_NAMES[songNumber - 1]) + ".MUS";
Common::String songName = Common::String(SONG_NAMES[songNumber - 1]);

freeSong(); // free any song that is currently loaded

Expand Down Expand Up @@ -327,7 +327,8 @@ bool Music::playMusic(const Common::String &name) {
if (!_midiDriver)
return false;

Common::SeekableReadStream *stream = _vm->_res->load(name, "MUSIC.LIB");
Common::String midiMusicName = name + ".MUS";
Common::SeekableReadStream *stream = _vm->_res->load(midiMusicName, "MUSIC.LIB");

byte *data = new byte[stream->size()];
int32 dataSize = stream->size();
Expand Down
8 changes: 4 additions & 4 deletions engines/sherlock/scalpel/scalpel.cpp
Expand Up @@ -277,7 +277,7 @@ bool ScalpelEngine::showCityCutscene() {
Common::fill(&greyPalette[0], &greyPalette[PALETTE_SIZE], 142);
_screen->fadeIn((const byte *)greyPalette, 3);

_music->playMusic("prolog1.mus");
_music->playMusic("prolog1");
_animation->_gfxLibraryFilename = "title.lib";
_animation->_soundLibraryFilename = "title.snd";
bool finished = _animation->play("26open1", true, 1, 255, true, 2);
Expand Down Expand Up @@ -350,7 +350,7 @@ bool ScalpelEngine::showCityCutscene() {

bool ScalpelEngine::showAlleyCutscene() {
byte palette[PALETTE_SIZE];
_music->playMusic("prolog2.mus");
_music->playMusic("prolog2");

_animation->_gfxLibraryFilename = "TITLE.LIB";
_animation->_soundLibraryFilename = "TITLE.SND";
Expand Down Expand Up @@ -416,7 +416,7 @@ bool ScalpelEngine::showStreetCutscene() {
_animation->_gfxLibraryFilename = "TITLE.LIB";
_animation->_soundLibraryFilename = "TITLE.SND";

_music->playMusic("PROLOG3.MUS");
_music->playMusic("prolog3");

// wait a bit
bool finished = _events->delay(500);
Expand Down Expand Up @@ -483,7 +483,7 @@ bool ScalpelEngine::scrollCredits() {
}

bool ScalpelEngine::showOfficeCutscene() {
_music->playMusic("PROLOG4.MUS");
_music->playMusic("prolog4");
_animation->_gfxLibraryFilename = "TITLE2.LIB";
_animation->_soundLibraryFilename = "TITLE.SND";

Expand Down

0 comments on commit 91d4b8d

Please sign in to comment.