Opened 12 years ago

Closed 12 years ago

#6186 closed defect (fixed)

LOOM: Double-clicking doesn't work in Macintosh version

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Loom

Description

In the Macintosh version of Loom, double-clicking an object (the leaf, the tapestries, the loom, etc) does not work, unlike in the other versions that I have tried. It just makes the object active, it doesn't do anything with it. (This is not a game-breaking problem, since you can still click on the object picture in the lower right corner, but it's annoying.) I've tried the game in a Macintosh emulator, and double-clicking works there so it seems to be a ScummVM bug.

I've scratched my head over the verb script for some time, and it looks like it *might* be that variable 52 is supposed to be set to non-zero to indicate that the user is double-clicking. We already have a special case for signaling double-clicks in the Mac version of Indiana Jones and the Last Crusade, so it doesn't seem completely implausible that it's the interpreter's job to do that.

I'm attaching a possible patch, but I don't want to commit it without feedback.

Ticket imported from: #3588164. Ticket imported from: bugs/6186.

Attachments (4)

loom-doubleclick.diff (658 bytes ) - added by eriktorbjorn 12 years ago.
Possible patch against current Git snapshot
script-6.dmp.txt (3.7 KB ) - added by eriktorbjorn 12 years ago.
Script from DOS EGA Loom
script-6.dmp.2.txt (2.7 KB ) - added by eriktorbjorn 12 years ago.
Script from Mac Loom
loom-doubleclick2.diff (3.0 KB ) - added by eriktorbjorn 12 years ago.
Slightly more elaborate (perhaps unnecessarily so?) patch

Download all attachments as: .zip

Change History (9)

by eriktorbjorn, 12 years ago

Attachment: loom-doubleclick.diff added

Possible patch against current Git snapshot

comment:1 by eriktorbjorn, 12 years ago

I'll to to clarify my reasoning a bit after looking at script-6 from both the Mac and the Loom version. I *think* that in both cases, script-7 is called with the object and an action as input parameters. It's when the action is 54 that you actually try to do something with the object. This is the condition for that in Mac Loom:

[0086] (A8) if (Var[52]) { [008B] (1A) Var[52] = 0; [0090] (0A) startScript(7,[Local[2],54]); [0099] (**) }

And in DOS EGA Loom:

[0100] (A8) if (Local[1]) { [0105] (1A) Local[1] = 0; [010A] (0A) startScript(7,[Local[2],54]); [0113] (**) }

In DOS EGA Loom, there's a block of code at the beginning of the script that, I think, checks if you click in approximately the same spot twice within a limited amount of time, and sets Local[1] to 1 if you do. (Otherwise, it's 0.) I couldn't find any obvious place where the scripts set Var[52] to 1 in Mac Loom.

by eriktorbjorn, 12 years ago

Attachment: script-6.dmp.txt added

Script from DOS EGA Loom

by eriktorbjorn, 12 years ago

Attachment: script-6.dmp.2.txt added

Script from Mac Loom

comment:2 by eriktorbjorn, 12 years ago

As an aside, I guess our handling for double-clicking in the Mac versions of Indiana Jones and the Last Crusade and (possibly) Loom only checks the frequency of the clicks, not that you click in the same spot.

by eriktorbjorn, 12 years ago

Attachment: loom-doubleclick2.diff added

Slightly more elaborate (perhaps unnecessarily so?) patch

comment:3 by bluegr, 12 years ago

Just tried the "small" patch, double clicking works fine with it (tried the first 5-6 scenes or so), so the patch for this looks OK to me (if setting this variable it broke something, it would be immediately apparent in the first scenes)

comment:4 by eriktorbjorn, 12 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:5 by eriktorbjorn, 12 years ago

I've gone with the simpler patch. The other felt needlessly complicated for such a small difference.

Note: See TracTickets for help on using tickets.