[Scummvm-git-logs] scummvm master -> 612f453f1ba495bcd816562c04d67c68f29d5036
AndywinXp
noreply at scummvm.org
Sun May 22 21:27:44 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
612f453f1b SCUMM: LOOM: Fix game and music timers for the Steam variant
Commit: 612f453f1ba495bcd816562c04d67c68f29d5036
https://github.com/scummvm/scummvm/commit/612f453f1ba495bcd816562c04d67c68f29d5036
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-05-22T23:27:40+02:00
Commit Message:
SCUMM: LOOM: Fix game and music timers for the Steam variant
Changed paths:
engines/scumm/scumm.cpp
engines/scumm/scumm.h
engines/scumm/sound.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 736f75f2622..507459f2e03 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2223,7 +2223,7 @@ uint32 ScummEngine::getIntegralTime(double fMsecs) {
void ScummEngine::setTimerAndShakeFrequency() {
_shakeTimerRate = _timerFrequency = 240.0;
- if (_game.platform == Common::kPlatformDOS || _game.platform == Common::kPlatformUnknown) {
+ if (_game.platform == Common::kPlatformDOS || _game.platform == Common::kPlatformWindows || _game.platform == Common::kPlatformUnknown) {
switch (_game.version) {
case 1:
if (_game.id == GID_MANIAC) {
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 7c3400caa1b..5b4f6c5603f 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -332,6 +332,8 @@ class ResourceManager;
#define PIT_V7_SUBTIMER_INC 3977.0
#define PIT_V7_SUBTIMER_THRESH 4971.0
+#define LOOM_STEAM_CDDA_RATE 240.0
+
/**
* Amiga timing constants.
*
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index f511d493308..292202ca720 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1407,8 +1407,14 @@ void Sound::startCDTimer() {
// frequency rate is for the particular game and engine version being ran).
//
// Again as per the interpreters, VAR_MUSIC_TIMER is then updated inside the SCUMM main loop.
+ int32 interval = 1000000 / _vm->getTimerFrequency();
+
+ // LOOM Steam uses a fixed 240Hz rate
+ if (_isLoomSteam)
+ interval = 1000000 / LOOM_STEAM_CDDA_RATE;
+
_vm->getTimerManager()->removeTimerProc(&cdTimerHandler);
- _vm->getTimerManager()->installTimerProc(&cdTimerHandler, 1000000 / _vm->getTimerFrequency(), this, "scummCDtimer");
+ _vm->getTimerManager()->installTimerProc(&cdTimerHandler, interval, this, "scummCDtimer");
}
void Sound::stopCDTimer() {
More information about the Scummvm-git-logs
mailing list