diff options
author | Strangerke | 2015-05-24 01:20:42 +0200 |
---|---|---|
committer | Strangerke | 2015-05-24 01:20:42 +0200 |
commit | 5407d996b448ab6b81fe19100a0b8f2728211487 (patch) | |
tree | b69665cd21c12133cd7dc723b8fd746fadf369cf /engines/sherlock/scalpel | |
parent | 1e58f3d9258ee6c98e48b3f246b922c786d1b14c (diff) | |
download | scummvm-rg350-5407d996b448ab6b81fe19100a0b8f2728211487.tar.gz scummvm-rg350-5407d996b448ab6b81fe19100a0b8f2728211487.tar.bz2 scummvm-rg350-5407d996b448ab6b81fe19100a0b8f2728211487.zip |
SHERLOCK: Split sound class in two, add WIP music player
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r-- | engines/sherlock/scalpel/darts.cpp | 10 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 23 |
2 files changed, 17 insertions, 16 deletions
diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp index b567d58ab4..8d78335a55 100644 --- a/engines/sherlock/scalpel/darts.cpp +++ b/engines/sherlock/scalpel/darts.cpp @@ -377,13 +377,13 @@ void Darts::erasePowerBars() { int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool isVertical) { Events &events = *_vm->_events; Screen &screen = *_vm->_screen; - Sound &sound = *_vm->_sound; + Music &music = *_vm->_music; bool done; int idx = 0; events.clearEvents(); - if (sound._musicOn) - sound.waitTimerRoland(10); + if (music._musicOn) + music.waitTimerRoland(10); else events.delay(100); @@ -410,9 +410,9 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i screen.slamArea(pt.x + idx, pt.y, 1, 8); } - if (sound._musicOn) { + if (music._musicOn) { if (!(idx % 3)) - sound.waitTimerRoland(1); + music.waitTimerRoland(1); } else if (!(idx % 8)) events.wait(1); diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index 8354b22c2a..bee44bfb7d 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -22,6 +22,7 @@ #include "sherlock/scalpel/scalpel.h" #include "sherlock/sherlock.h" +#include "sherlock/music.h" #include "sherlock/animation.h" namespace Sherlock { @@ -428,13 +429,13 @@ void ScalpelEngine::showOpening() { return; _events->clearEvents(); - _sound->stopMusic(); + _music->stopMusic(); } bool ScalpelEngine::showCityCutscene() { byte palette[PALETTE_SIZE]; - _sound->playMusic("prolog1.mus"); + _music->playMusic("prolog1.mus"); _animation->_gfxLibraryFilename = "title.lib"; _animation->_soundLibraryFilename = "title.snd"; bool finished = _animation->play("26open1", 1, 255, true, 2); @@ -505,7 +506,7 @@ bool ScalpelEngine::showCityCutscene() { bool ScalpelEngine::showAlleyCutscene() { byte palette[PALETTE_SIZE]; - _sound->playMusic("prolog2.mus"); + _music->playMusic("prolog2.mus"); _animation->_gfxLibraryFilename = "TITLE.LIB"; _animation->_soundLibraryFilename = "TITLE.SND"; @@ -544,7 +545,7 @@ bool ScalpelEngine::showStreetCutscene() { _animation->_gfxLibraryFilename = "TITLE.LIB"; _animation->_soundLibraryFilename = "TITLE.SND"; - _sound->playMusic("PROLOG3.MUS"); + _music->playMusic("PROLOG3.MUS"); bool finished = _animation->play("14KICK", 1, 3, true, 2); @@ -590,7 +591,7 @@ bool ScalpelEngine::scrollCredits() { } bool ScalpelEngine::showOfficeCutscene() { - _sound->playMusic("PROLOG4.MUS"); + _music->playMusic("PROLOG4.MUS"); _animation->_gfxLibraryFilename = "TITLE2.LIB"; _animation->_soundLibraryFilename = "TITLE.SND"; @@ -668,12 +669,12 @@ void ScalpelEngine::showLBV(const Common::String &filename) { void ScalpelEngine::startScene() { if (_scene->_goToScene == OVERHEAD_MAP || _scene->_goToScene == OVERHEAD_MAP2) { // Show the map - if (_sound->_musicOn && _sound->loadSong(100)) - _sound->startSong(); + if (_music->_musicOn && _music->loadSong(100)) + _music->startSong(); _scene->_goToScene = _map->show(); - _sound->freeSong(); + _music->freeSong(); _people->_hSavedPos = Common::Point(-1, -1); _people->_hSavedFacing = -1; } @@ -689,8 +690,8 @@ void ScalpelEngine::startScene() { case RESCUE_ANNA: case MOOREHEAD_DEATH: case BRUMWELL_SUICIDE: - if (_sound->_musicOn && _sound->loadSong(_scene->_goToScene)) - _sound->startSong(); + if (_music->_musicOn && _music->loadSong(_scene->_goToScene)) + _music->startSong(); switch (_scene->_goToScene) { case BLACKWOOD_CAPTURE: @@ -790,7 +791,7 @@ void ScalpelEngine::startScene() { } // Free any song from the previous scene - _sound->freeSong(); + _music->freeSong(); break; case EXIT_GAME: |