[Scummvm-cvs-logs] SF.net SVN: scummvm:[46651] scummvm/trunk/engines/sci/sfx
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sun Dec 27 16:41:31 CET 2009
Revision: 46651
http://scummvm.svn.sourceforge.net/scummvm/?rev=46651&view=rev
Author: m_kiewitz
Date: 2009-12-27 15:41:31 +0000 (Sun, 27 Dec 2009)
Log Message:
-----------
SCI/newmusic: Fixed fading (fixes intro of castle of brain)
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/music.cpp
scummvm/trunk/engines/sci/sfx/music.h
Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp 2009-12-27 15:24:33 UTC (rev 46650)
+++ scummvm/trunk/engines/sci/sfx/music.cpp 2009-12-27 15:41:31 UTC (rev 46651)
@@ -370,20 +370,18 @@
pSnd->fadeTicker--;
else {
pSnd->fadeTicker = pSnd->fadeTickerStep;
- if (pSnd->volume + pSnd->fadeStep > pSnd->fadeTo) {
+ pSnd->volume += pSnd->fadeStep;
+ if (((pSnd->fadeStep > 0) && (pSnd->volume >= pSnd->fadeTo)) || ((pSnd->fadeStep < 0) && (pSnd->volume <= pSnd->fadeTo))) {
pSnd->volume = pSnd->fadeTo;
pSnd->fadeStep = 0;
- } else {
- pSnd->volume += pSnd->fadeStep;
}
pSnd->pMidiParser->setVolume(pSnd->volume);
if (pSnd->fadeStep == 0) {
// Signal the engine scripts that the sound is done fading
- // FIXME: is this correct?
- //SegManager *segMan = ((SciEngine *)g_engine)->getEngineState()->_segMan; // HACK
- //PUT_SEL32V(segMan, pSnd->soundObj, signal, SIGNAL_OFFSET);
+ SegManager *segMan = ((SciEngine *)g_engine)->getEngineState()->_segMan; // HACK
+ PUT_SEL32V(segMan, pSnd->soundObj, signal, SIGNAL_OFFSET);
}
}
}
Modified: scummvm/trunk/engines/sci/sfx/music.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.h 2009-12-27 15:24:33 UTC (rev 46650)
+++ scummvm/trunk/engines/sci/sfx/music.h 2009-12-27 15:41:31 UTC (rev 46651)
@@ -71,7 +71,7 @@
uint16 ticker;
byte prio;
byte loop;
- byte volume;
+ int16 volume;
byte fadeTo;
short fadeStep;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list