[Scummvm-cvs-logs] CVS: scummvm/sky/music musicbase.cpp,1.7,1.8 musicbase.h,1.7,1.8
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Tue Jul 8 16:26:25 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky/music
In directory sc8-pr-cvs1:/tmp/cvs-serv10719/sky/music
Modified Files:
musicbase.cpp musicbase.h
Log Message:
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.
Index: musicbase.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/music/musicbase.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- musicbase.cpp 7 Jul 2003 16:40:27 -0000 1.7
+++ musicbase.cpp 8 Jul 2003 23:25:51 -0000 1.8
@@ -45,6 +45,7 @@
_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 @@
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 @@
loadNewMusic();
_aktTime += _tempo;
+ _playTime++;
for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++) {
newTempo = _channels[cnt]->process((uint16)(_aktTime >> 16));
Index: musicbase.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/music/musicbase.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- musicbase.h 7 Jul 2003 16:40:27 -0000 1.7
+++ musicbase.h 8 Jul 2003 23:25:51 -0000 1.8
@@ -69,6 +69,7 @@
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;
More information about the Scummvm-git-logs
mailing list