SHERLOCK: RT: Removal of redundant music code

This commit is contained in:
Paul Gilbert 2015-08-13 20:01:35 -04:00
parent 3e718ad31f
commit 3ce7aaa6d9
3 changed files with 5 additions and 30 deletions

View File

@ -412,15 +412,6 @@ bool Music::playMusic(const Common::String &name) {
stream->read(midiMusicData, midiMusicDataSize);
delete stream;
// for dumping the music tracks
#if 0
Common::DumpFile outFile;
outFile.open(name + ".RAW");
outFile.write(data, stream->size());
outFile.flush();
outFile.close();
#endif
if (midiMusicDataSize < 14) {
warning("Music: not enough data in music file");
delete[] midiMusicData;
@ -502,6 +493,8 @@ bool Music::playMusic(const Common::String &name) {
}
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_digitalMusicHandle, musicStream);
}
_musicPlaying = true;
return true;
}
@ -510,12 +503,7 @@ void Music::stopMusic() {
}
void Music::startSong() {
if (!_musicOn)
return;
// TODO
warning("TODO: Sound::startSong");
_musicPlaying = true;
// No implementation needed for ScummVM
}
void Music::freeSong() {
@ -530,11 +518,6 @@ void Music::freeSong() {
_musicPlaying = false;
}
void Music::waitTimerRoland(uint time) {
// TODO
warning("TODO: Sound::waitTimerRoland");
}
bool Music::isPlaying() {
if (!IS_3DO) {
// MIDI based

View File

@ -112,8 +112,6 @@ public:
*/
void stopMusic();
void waitTimerRoland(uint time);
bool isPlaying();
uint32 getCurrentPosition();

View File

@ -382,10 +382,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
int idx = 0;
events.clearEvents();
if (music._musicOn)
music.waitTimerRoland(10);
else
events.delay(100);
events.delay(100);
// Display loop
do {
@ -410,10 +407,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
screen.slamArea(pt.x + idx, pt.y, 1, 8);
}
if (music._musicOn) {
if (!(idx % 3))
music.waitTimerRoland(1);
} else if (!(idx % 8))
if (!(idx % 8))
events.wait(1);
++idx;