Opened 4 months ago

Closed 8 days ago

#15293 closed defect (fixed)

AGI: LSL1: When the same message is repeated, it's not obvious that they're individual messages

Reported by: eriktorbjorn Owned by: sluicebox
Priority: normal Component: Engine: AGI
Version: Keywords:
Cc: Game: Leisure Suit Larry 1

Description

When you give the whiskey to the drunk, the message "...my only posshhess... hhic!" is repeated three times.

Unless you're in on the joke, you may think the game has locked up because nothing seems to happen when you press Enter to dismiss the text box. This is similar to the lottery messages in LSL2. The problem was fixed there, so maybe it can be fixed here as well even though it's a different engine?

The quick-and-dirty fix might be something like this:

diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 06773598849..eefbdc263cc 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -558,6 +558,8 @@ void TextMgr::closeWindow() {
                const int16 x = _messageState.backgroundPos_x;
                const int16 y = MAX<int16>(0, _messageState.backgroundPos_y);
                _gfx->render_Block(x, y, _messageState.backgroundSize_Width, _messageState.backgroundSize_Height);
+               _gfx->updateScreen();
+               _vm->_system->delayMillis(50);
        }
        _messageState.dialogue_Open = false;
        _messageState.window_Active = false;

With some appropriate comment, of course. But maybe there's a better way?

(I just felt a tiny disturbance in the Force, as if a small handful of speedrunners suddenly cried out in terror and were suddenly silenced.)

Attachments (1)

lsl1.011 (3.1 KB ) - added by eriktorbjorn 4 months ago.

Download all attachments as: .zip

Change History (5)

by eriktorbjorn, 4 months ago

Attachment: lsl1.011 added

comment:1 by eriktorbjorn, 4 months ago

Simplified version of the patch:

diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 06773598849..2342ca6dd13 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -558,6 +558,7 @@ void TextMgr::closeWindow() {
                const int16 x = _messageState.backgroundPos_x;
                const int16 y = MAX<int16>(0, _messageState.backgroundPos_y);
                _gfx->render_Block(x, y, _messageState.backgroundSize_Width, _messageState.backgroundSize_Height);
+               _vm->wait(50, false);
        }
        _messageState.dialogue_Open = false;
        _messageState.window_Active = false;

comment:2 by eriktorbjorn, 4 months ago

Summary: AGI: LSL1: Insufficient feedback when the same text box is repeatedAGI: LSL1: When the same message is repeated, it's not obvious that they're individual messages

comment:3 by sluicebox <22204938+sluicebox@…>, 8 days ago

In 1b5f759f:

AGI: Add workaround for LSL1 repeating message

Fixes bug #15293

comment:4 by sluicebox, 8 days ago

Owner: set to sluicebox
Resolution: fixed
Status: newclosed

I've limited this to a workaround for this one message for now. If more instances are discovered then we can look into expanding it.

I've scanned all the AGI bytecode I have (practically all) and this is the only instance of two print commands immediately following each other with the same message. That's not conclusive, but it's plausible that the issue of a message box appearing unresponsive only occurs here.

Verified that this workaround correctly applies to all LSL1 versions/platforms; they all use the same room and message numbers for this scene.

Note: See TracTickets for help on using tickets.