diff options
author | Robert Göffringmann | 2003-07-08 23:25:51 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-08 23:25:51 +0000 |
commit | 6c66bf2ee453a79f8d59b3c7eb495cf58b2a4220 (patch) | |
tree | 60014171c41f04b2356b759f6ff6e5423fbb73a4 /sky/music | |
parent | 42f3887bac57befd7e2b84a0ecc2d8d7de49b39f (diff) | |
download | scummvm-rg350-6c66bf2ee453a79f8d59b3c7eb495cf58b2a4220.tar.gz scummvm-rg350-6c66bf2ee453a79f8d59b3c7eb495cf58b2a4220.tar.bz2 scummvm-rg350-6c66bf2ee453a79f8d59b3c7eb495cf58b2a4220.zip |
this is for letting BASS wait for the end of the ending theme before starting the next song. It's kinda hacky to put it into the music code, but I can't think of another way to do it while keeping the engine running like usual.
svn-id: r8873
Diffstat (limited to 'sky/music')
-rw-r--r-- | sky/music/musicbase.cpp | 8 | ||||
-rw-r--r-- | sky/music/musicbase.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sky/music/musicbase.cpp b/sky/music/musicbase.cpp index 327e216c3e..cec29d7e29 100644 --- a/sky/music/musicbase.cpp +++ b/sky/music/musicbase.cpp @@ -45,6 +45,7 @@ void SkyMusicBase::loadSection(uint8 pSection) _currentSection = pSection; _musicData = _skyDisk->loadFile(_driverFileBase + FILES_PER_SECTION * pSection, NULL); _allowedCommands = 0; + _playTime = 0; _musicTempo0 = 0x78; // init constants taken from idb file, area ~0x1060 _musicTempo1 = 0xC0; _onNextPoll.doReInit = false; @@ -136,6 +137,12 @@ void SkyMusicBase::loadNewMusic(void) error("Music %d requested but doesn't exist in file.\n", _onNextPoll.musicToProcess); return; } + + if ((_onNextPoll.musicToProcess == 6) && (_currentSection == 5) && (_playTime < 3456)) + return ; + + _playTime = 0; + if (_currentMusic != 0) stopMusic(); @@ -165,6 +172,7 @@ void SkyMusicBase::pollMusic(void) loadNewMusic(); _aktTime += _tempo; + _playTime++; for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++) { newTempo = _channels[cnt]->process((uint16)(_aktTime >> 16)); diff --git a/sky/music/musicbase.h b/sky/music/musicbase.h index db69647f5d..657de9d5b0 100644 --- a/sky/music/musicbase.h +++ b/sky/music/musicbase.h @@ -69,6 +69,7 @@ protected: uint8 _musicTempo1; // given once per music uint32 _tempo; // calculated from musicTempo0 and musicTempo1 uint32 _aktTime; + uint32 _playTime; Actions _onNextPoll; SkyChannelBase *_channels[10]; OSystem::MutexRef _mutex; |