[Scummvm-git-logs] scummvm master -> da8e500bd7ad6c7b72d1b7de68bf2908a5555344

eriktorbjorn noreply at scummvm.org
Mon May 13 16:45:27 UTC 2024


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:
da8e500bd7 AGI: Fix duration of timed text boxes


Commit: da8e500bd7ad6c7b72d1b7de68bf2908a5555344
    https://github.com/scummvm/scummvm/commit/da8e500bd7ad6c7b72d1b7de68bf2908a5555344
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2024-05-13T18:43:35+02:00

Commit Message:
AGI: Fix duration of timed text boxes

The messageBox() function assumed 20 cycles per second, but that was
changed to 40 cycles per second years ago. This made the King's Quest
III intro hard to read. There are probably other cases as well, but
that's the one that was asked about on the forum.

Changed paths:
    engines/agi/global.cpp
    engines/agi/text.cpp


diff --git a/engines/agi/global.cpp b/engines/agi/global.cpp
index 550d9e85039..b604de950f5 100644
--- a/engines/agi/global.cpp
+++ b/engines/agi/global.cpp
@@ -205,7 +205,7 @@ void AgiEngine::setVarSecondsTrigger(byte newSeconds) {
 
 // This is called, when one of the timer variables is read
 // We calculate the latest variables, according to current official playtime
-// This is also called in the main loop, because the game needs to be sync'd to 20 cycles per second
+// This is also called in the main loop, because the game needs to be sync'd to 40 cycles per second
 void AgiEngine::inGameTimerUpdate() {
 	uint32 curPlayTimeMilliseconds = inGameTimerGet();
 	uint32 curPlayTimeCycles = curPlayTimeMilliseconds / 25;
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index d21ed26b5f6..ec0c9d6cb2f 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -387,7 +387,7 @@ bool TextMgr::messageBox(const char *textPtr) {
 	uint32 windowTimer = _vm->getVar(VM_VAR_WINDOW_AUTO_CLOSE_TIMER);
 	debugC(3, kDebugLevelText, "blocking window v21=%d", windowTimer);
 
-	windowTimer = windowTimer * 10; // 1 = 0.5 seconds
+	windowTimer = windowTimer * 20; // 1 = 0.5 seconds (20 cycles)
 	_messageBoxCancelled = false;
 
 	_vm->inGameTimerResetPassedCycles();




More information about the Scummvm-git-logs mailing list