diff options
-rw-r--r-- | scumm/script_v2.cpp | 10 | ||||
-rw-r--r-- | scumm/smush/scumm_renderer.cpp | 7 | ||||
-rw-r--r-- | scumm/smush/scumm_renderer.h | 3 | ||||
-rw-r--r-- | scumm/sound.cpp | 2 | ||||
-rw-r--r-- | sound/mixer.cpp | 4 |
5 files changed, 19 insertions, 7 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index a9ae800685..19315bce23 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -2709,8 +2709,13 @@ void Scumm::o6_miscOps() case 4: grabCursor(args[1], args[2], args[3], args[4]); break; - case 6: { - ScummRenderer sr(this); + case 6: { + uint32 speed; + if (strcmp((char*)getStringAddressVar(VAR_VIDEONAME), "sq3.san") == 0) + speed = 71; + else + speed = 1000 / _insaneFlag; + ScummRenderer sr(this, speed); SmushPlayer sp(&sr); char filename[512]; strcpy(filename, _gameDataPath); @@ -2718,6 +2723,7 @@ void Scumm::o6_miscOps() strcat(filename, (char*)getStringAddressVar(VAR_VIDEONAME)); sp.play(filename); } + break; case 7: warning("o6_miscOps: stub7()"); break; diff --git a/scumm/smush/scumm_renderer.cpp b/scumm/smush/scumm_renderer.cpp index cbb4ed31f5..e6b9454801 100644 --- a/scumm/smush/scumm_renderer.cpp +++ b/scumm/smush/scumm_renderer.cpp @@ -188,7 +188,10 @@ bool scumm_mixer::stop() { return true; } -ScummRenderer::ScummRenderer(Scumm * scumm) : _scumm(scumm), _smixer(0) { +ScummRenderer::ScummRenderer(Scumm * scumm, uint32 speed) : + _scumm(scumm), + _smixer(0), + _insaneSpeed(speed) { } static ScummRenderer * s_renderer; @@ -203,7 +206,7 @@ Mixer * ScummRenderer::getMixer() { _smixer = new scumm_mixer(_scumm->_mixer); if(!_smixer) error("unable to allocate a smush mixer"); s_renderer = this; - _scumm->_timer->installProcedure(&smush_handler, 83); + _scumm->_timer->installProcedure(&smush_handler, _insaneSpeed); } return _smixer; } diff --git a/scumm/smush/scumm_renderer.h b/scumm/smush/scumm_renderer.h index 31dbd8af6e..d77e86da0a 100644 --- a/scumm/smush/scumm_renderer.h +++ b/scumm/smush/scumm_renderer.h @@ -44,9 +44,10 @@ class ScummRenderer : public BaseRenderer { private: Scumm * _scumm; scumm_mixer * _smixer; + uint32 _insaneSpeed; volatile bool _wait; public: - ScummRenderer(Scumm * scumm); + ScummRenderer(Scumm * scumm, uint32 speed); virtual ~ScummRenderer(); virtual bool wait(int32 ms); bool update(); diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 6a50f4d8b5..12032485ed 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -105,7 +105,7 @@ void Sound::processSoundQues() { #endif if ((_scumm->_gameId == GID_DIG) && (data[0] == 4096)){ - playBundleMusic(data[1] - 1); +// playBundleMusic(data[1] - 1); } if (!(_scumm->_features & GF_AFTER_V7)) { diff --git a/sound/mixer.cpp b/sound/mixer.cpp index b3ae2f591e..0e1dc90761 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -656,11 +656,13 @@ void SoundMixer::ChannelStream::mix(int16 * data, uint len) { } else { mixer_helper_table[_flags & 0x07] (data, &len, &_pos, &fp_pos, fp_speed, vol_tab, _endOfBuffer); if (len != 0) { + //FIXME: what is wrong ? + warning("bad play sound in stream(wrap around)"); _pos = _ptr; mixer_helper_table[_flags & 0x07] (data, &len, &_pos, &fp_pos, fp_speed, vol_tab, end_of_data); } } - _timeOut = 2; + _timeOut = 3; _fpPos = fp_pos; } |