[Scummvm-tracker] [ScummVM :: Bugs] #15303: SCI: LSL5: Timed message skipped during LSL5 coffee scene
ScummVM :: Bugs
trac at scummvm.org
Thu Aug 1 10:29:04 UTC 2024
#15303: SCI: LSL5: Timed message skipped during LSL5 coffee scene
-------------------------+-----------------------------------
Reporter: eriktorbjorn | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCI
Version: | Resolution:
Keywords: | Game: Leisure Suit Larry 5
-------------------------+-----------------------------------
Comment (by eriktorbjorn):
> And in your case yes it's even more weird because it's a cracked game.
How can a cracked game be a valid copy that is accepted for speed running?
Getting off-topic, but the excuse I've heard is that since it's sold that
way it means it ''is'' an official release, and meant to be that way. (My
interpretation is... different, with lots of name-calling.)
> It's a classic overflow.
I think you're right, and I've been barking up the wrong tree. I've been
looking at `doit` in `Script`, when I ''should'' have been looking at
`doit` in `Talker`.
In `Script`, `ticks` is a countdown that's never particularly large. But
in `Talker`... First `startText` calculates a delay based on string length
and a global variable that's I assume is the text speed setting, or
something like that:
{{{
(= ticks (Max 180 (/ (* global155 (StrLen @temp0)) 2)))
}}}
But then `say` goes and adds the current time, plus another 60 ticks for
good measure.
{{{
(+= ticks (+ 60 (GetTime)))
}}}
Which `doit` then compares against `GetTime` to see if it's time to auto-
dismiss the dialog.
At least that's how I read it. At the point where the text box skips,
`GetTime` is still below 32,767, but the calculated delay is enough to
push it beyond. From what I understand, arithmetics on reg_t are signed,
but even if they weren't the problem would probably remain once `ticks`
gets pushed past 65,535.
And from a quick-and-naive search, that `(+= ticks (+ 60 (GetTime)))` line
is present in a ''lot'' of games, supporting the theory I expressed on
Discord earlier: @sluicebox is either going to love me or hate me for
this.
(Though I also wouldn't be the least surprised if he was already perfectly
aware of it.)
--
Ticket URL: <https://bugs.scummvm.org/ticket/15303#comment:15>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list