Opened 4 months ago

Last modified 3 months ago

#15303 new defect

SCI: LSL5: Timed message skipped during LSL5 coffee scene — at Version 5

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game: Leisure Suit Larry 5

Description (last modified by m-kiewitz)

This one was a fluke...

I made a savegame at the beginning of Leisure Suit Larry 5 (English), right after the end of the intro. When bringing coffee to Silas, the game was supposed to print the message

"Yes, I know" you offer proudly, "I'm the Chief Tape Rewinder and Sterilizer on this project!"

But that message was only shown for a split second, before skipping to the next message. I think what's going on here is some sort of integer overflow. This is how the message is displayed:

			(
				(Say larryTalker "\"Yes, I know,\" you offer proudly,
					\"I'm the Chief Tape Rewinder and Sterilizer
					on this project!\""
			  		#dispose:
					#caller:		self
				)
			)
			(
				(= ticks 30)
			)

I think that means the message is supposed to stay up for 30 "ticks". Though that seems awfully short, so maybe it's 30 additional ticks?

If you load the attached savegame, and let the messages time out on their own (don't click to speed it up!), the skipped message happens at a point when KGETTIME_TICKS in the kGetTime() function comes (dangerously?) close to 32,767. Could that somehow cause the timeout to trigger prematurely?

Change History (6)

by eriktorbjorn, 4 months ago

Attachment: lsl5.003 added

comment:1 by eriktorbjorn, 4 months ago

Description: modified (diff)

comment:2 by eriktorbjorn, 4 months ago

Description: modified (diff)

comment:3 by eriktorbjorn, 4 months ago

Description: modified (diff)

comment:4 by eriktorbjorn, 4 months ago

The 30 cycles may be the delay between two messages. But I still think it's possible that it uses ticks for the message timeout?

The actual timeout handler is probably this piece of code in System.sc. But that's probably as far as my debugging goes.

			((and ticks (<= (-= ticks (Abs (- gGameTime lastTicks))) 0))
				(= ticks 0)
				(self cue:)
			)

comment:5 by m-kiewitz, 4 months ago

Description: modified (diff)

30 ticks really means 30 ticks
And it seems these 30 ticks are actually the duration between dialog boxes, so it's actually part of the NEXT state that follows after the message box has been removed.

Can you please check what the original interpreter is doing?
Also that's not just the follow-up dialog when you bring coffee, but it's like the 30th dialog box. Please also include which script you are posting from.

This is script 150, sCartoon::changeState, and the state number would be useful too.
I just checked my multilingual Larry 5 copy. I skipped the dialog boxes, but this specific text stays on screen for seconds.

I think I read something that there indeed is a time overflow problem with ticks, but it happens not that often.

Last edited 4 months ago by m-kiewitz (previous) (diff)
Note: See TracTickets for help on using tickets.