[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.37,2.38
Jamieson Christian
jamieson630 at users.sourceforge.net
Fri May 16 15:39:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv29282/scummvm/scumm
Modified Files:
imuse.cpp
Log Message:
Redesigned -t option
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.37
retrieving revision 2.38
diff -u -d -r2.37 -r2.38
--- imuse.cpp 16 May 2003 22:00:32 -0000 2.37
+++ imuse.cpp 16 May 2003 22:28:33 -0000 2.38
@@ -301,6 +301,8 @@
bool _initialized;
byte _volume_fader_counter;
+ int _tempoFactor;
+
uint _queue_end, _queue_pos, _queue_sound;
byte _queue_adding;
@@ -1643,11 +1645,11 @@
uint32 IMuseInternal::property(int prop, uint32 value) {
switch (prop) {
case IMuse::PROP_TEMPO_BASE:
- // Jamieson630: This used to specify a low-level microsecond
- // timing override for the MIDI drivers, based on the -t
- // option. It hasn't worked for a while, but may come back
- // later as a more user-friendly adjustment option.
-// _game_tempo = value;
+ // This is a specified as a percentage of normal
+ // music speed. The number must be an integer
+ // ranging from 50 to 200 (for 50% to 200% normal speed).
+ if (value >= 50 && value <= 200)
+ _tempoFactor = value;
break;
}
return 0;
@@ -1671,6 +1673,7 @@
if (native_midi)
initMidiDriver (_midi_native);
+ if (!_tempoFactor) _tempoFactor = 100;
_master_volume = 255;
if (_music_volume < 1)
_music_volume = kDefaultMusicVolume;
@@ -1854,6 +1857,7 @@
i = _midi->getBaseTempo();
j = _tempo = b;
+ j = j * 100 / _se->_tempoFactor;
while (i & 0xFFFF0000 || j & 0xFFFF0000) {
i >>= 1;
More information about the Scummvm-git-logs
mailing list