Skip to content

DIRECTOR: fix empty cast slot error and immediate sprite drag in D4+#7563

Merged
sev- merged 3 commits into
scummvm:masterfrom
ramyak-sharma:gustown-ufo-bug-fix
Jun 7, 2026
Merged

DIRECTOR: fix empty cast slot error and immediate sprite drag in D4+#7563
sev- merged 3 commits into
scummvm:masterfrom
ramyak-sharma:gustown-ufo-bug-fix

Conversation

@ramyak-sharma

Copy link
Copy Markdown
Contributor

Fix two behavioral differences from original Director 4:

  • Empty cast slots within a valid range now fail silently instead of throwing an error, matching original Director behavior where slots between 1 and the last populated member are valid but empty

  • Fix sprite dragging on immediate sprites in D4+: when immediate is set, both mouseDown and mouseUp should fire on press, which was not happening. Fixed by queuing both events on press and suppressing the physical mouseUp to prevent double-firing

This PR fixes 2 bugs in gustown (Gus Goes to Cybertown)

…n bounds

In the original Director, setting a property on a non-existent cast member whose ID
is within the range [1, maxCastID] fails silently. Only IDs above the highest allocated
slot produce an error. Match that behavior by checking both the movie cast and shared
cast bounds before raising a lingoError.
Encapsulate shared cast presence and querying in Movie::getMaxCastID()
instead of handling it directly in Lingo::setTheCast.
…ediate sprites

In Director 3+, when a sprite has the immediate flag set, both mouseDown and mouseUp handlers
should fire on mouse press rather than waiting for release. Previously ScummVM fired them on
release, causing the stillDown loop inside drag handlers to exit immediately. Fix by queuing
both mouseDown and mouseUp events (sprite and cast handler levels) when a mouseDown event is
received for an immediate sprite in D3+
@sev-

sev- commented Jun 7, 2026

Copy link
Copy Markdown
Member

Thank you!

@sev- sev- merged commit ef0550f into scummvm:master Jun 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants