aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJamieson Christian2003-05-16 22:28:33 +0000
committerJamieson Christian2003-05-16 22:28:33 +0000
commit48f73469e02bba652b60e912cffae0946252b8d8 (patch)
treeb20829ddcf486d3ffe38b9a982073fee4428ca39 /scumm
parent64d9c75c2d53715645178b18624248c365f13d06 (diff)
downloadscummvm-rg350-48f73469e02bba652b60e912cffae0946252b8d8.tar.gz
scummvm-rg350-48f73469e02bba652b60e912cffae0946252b8d8.tar.bz2
scummvm-rg350-48f73469e02bba652b60e912cffae0946252b8d8.zip
Redesigned -t option
svn-id: r7584
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index c79350c60f..044b3ab9a9 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -301,6 +301,8 @@ private:
bool _initialized;
byte _volume_fader_counter;
+ int _tempoFactor;
+
uint _queue_end, _queue_pos, _queue_sound;
byte _queue_adding;
@@ -1643,11 +1645,11 @@ int IMuseInternal::get_volchan_entry(uint a) {
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 @@ int IMuseInternal::initialize(OSystem *syst, MidiDriver *native_midi) {
if (native_midi)
initMidiDriver (_midi_native);
+ if (!_tempoFactor) _tempoFactor = 100;
_master_volume = 255;
if (_music_volume < 1)
_music_volume = kDefaultMusicVolume;
@@ -1854,6 +1857,7 @@ void Player::set_tempo(uint32 b) {
i = _midi->getBaseTempo();
j = _tempo = b;
+ j = j * 100 / _se->_tempoFactor;
while (i & 0xFFFF0000 || j & 0xFFFF0000) {
i >>= 1;