[Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.31,1.32
Pawel Kolodziejski
aquadran at users.sourceforge.net
Wed Jan 14 23:03:04 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm/imuse_digi
In directory sc8-pr-cvs1:/tmp/cvs-serv11485
Modified Files:
dimuse.cpp
Log Message:
song scene now works better
Index: dimuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- dimuse.cpp 15 Jan 2004 06:46:31 -0000 1.31
+++ dimuse.cpp 15 Jan 2004 07:02:29 -0000 1.32
@@ -639,7 +639,7 @@
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
_track[l].locked = true;
- if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC)) {
+ if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) {
soundId = _track[l].soundId;
}
_track[l].locked = false;
@@ -653,6 +653,7 @@
int32 msPos = getPosInMs(kTalkSoundID) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
+ debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d)", kTalkSoundID);
getLipSync(kTalkSoundID, 0, msPos, width, height);
return width;
}
@@ -661,23 +662,46 @@
int32 msPos = getPosInMs(kTalkSoundID) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
+ debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d)", kTalkSoundID);
getLipSync(kTalkSoundID, 0, msPos, width, height);
return height;
}
int32 IMuseDigital::getCurMusicLipSyncWidth(int syncId) {
- int32 msPos = getPosInMs(_curMusicSoundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
+ int soundId = -1;
+
+ for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
+ _track[l].locked = true;
+ if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) {
+ soundId = _track[l].soundId;
+ }
+ _track[l].locked = false;
+ }
+
+ int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
- getLipSync(_curMusicSoundId, syncId, msPos, width, height);
+ debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d)", soundId);
+ getLipSync(soundId, syncId, msPos, width, height);
return width;
}
int32 IMuseDigital::getCurMusicLipSyncHeight(int syncId) {
- int32 msPos = getPosInMs(_curMusicSoundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
+ int soundId = -1;
+
+ for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
+ _track[l].locked = true;
+ if ((_track[l].used) && (_track[l].soundGroup == IMUSE_MUSIC) && (!_track[l].volFadeUsed)) {
+ soundId = _track[l].soundId;
+ }
+ _track[l].locked = false;
+ }
+
+ int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
- getLipSync(_curMusicSoundId, syncId, msPos, width, height);
+ debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d)", soundId);
+ getLipSync(soundId, syncId, msPos, width, height);
return height;
}
More information about the Scummvm-git-logs
mailing list