Menu

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

Loom Floppy
closed-fixed
5
2012-12-14
2012-11-17
No

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.

Discussion

  • Torbjörn Andersson

    Possible patch against current Git snapshot

     
  • Torbjörn Andersson

    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.

     
  • Torbjörn Andersson

    Script from DOS EGA Loom

     
  • Torbjörn Andersson

    Script from Mac Loom

     
  • Torbjörn Andersson

    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.

     
  • Torbjörn Andersson

    Slightly more elaborate (perhaps unnecessarily so?) patch

     
  • Filippos Karapetis

    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)

     
  • Torbjörn Andersson

    • assigned_to: nobody --> eriktorbjorn
    • status: open --> closed-fixed
     
  • Torbjörn Andersson

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

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.