DIRECTOR: fix empty cast slot error and immediate sprite drag in D4+#7563
Merged
Conversation
…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+
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)