Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#8019 closed patch

Cursor cosmetics

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

Description

This is in response to bug report #559174 ("LOOM: Wrong default cursor") and feature request #589750 ("ALL: crosshair cosmetic").

The patch slightly alters the shape of the cross-hair cursor, and hard-codes an arrow cursor for GID_LOOM256. (I don't know if the cursor was hard-coded for the original Loom, or if it's stored in the game's resources.)

Ticket imported from: #598121. Ticket imported from: patches/124.

Attachments (2)

cursor.diff (1.6 KB ) - added by eriktorbjorn 22 years ago.
Patch against an August 20 CVS snapshot
cursor2.diff (2.8 KB ) - added by eriktorbjorn 22 years ago.
Updated patch against a September 17 CVS snapshot

Download all attachments as: .zip

Change History (12)

by eriktorbjorn, 22 years ago

Attachment: cursor.diff added

Patch against an August 20 CVS snapshot

comment:1 by SF/ender, 22 years ago

SetCursor indeed changes the cursor image, but based on a resource in the engine binary, not the game data.

FYI, here are the values I've found: 0: Standard Cross 1: Hourglass 2: Arrow pointing to left 3: 'Hand' icon

Here's the data it uses, straight from the disassembly:

Cross: 0x00,0x80, 0x00,0x80, 0x00,0x80, 0x00,0x80, 0x00,0x80,0x00,0x80, 0x00,0x00, 0x7e,0x3f, 0x00,0x00, 0x00,0x80, 0x00,0x80,0x00,0x80, 0x00,0x80, 0x00,0x80, 0x00,0x80, 0x00,0x00 Hotspot: (8,7)

Hourglass: 0x00,0x00, 0x7f,0xfe, 0x60,0x06, 0x30,0x0c, 0x18,0x18,0x0c,0x30, 0x06,0x60, 0x03,0xc0, 0x06,0x60, 0x0c,0x30,0x19, 0x98,0x33,0xcc, 0x67,0xe6, 0x7f,0xfe, 0x00,0x00, 0x00,0x00 (Hotspot: 8,7)

Arrow: 0x00,0x00, 0x40,0x00, 0x60,0x00, 0x70,0x00, 0x78,0x00, 0x7c,0x00, 0x7e,0x00, 0x7f,0x00, 0x7f,0x80, 0x78,0xc0, 0x7c,0x00, 0x46,0x00, 0x06,0x00, 0x03,0x00, 0x03,0x00, 0x01,0x80, (Hotspot: 1,1)

Hand:
0x1e,0x00, 0x12,0x00, 0x12,0x00, 0x12,0x00, 0x12,0x00, 0x13,0xff, 0x12,0x49, 0x12,0x49, 0xf2,0x49, 0x90,0x01, 0x90,0x01, 0x90,0x01, 0x80,0x01, 0x80,0x01, 0x80,0x01, 0xff,0xff (Hotspot: 5,0).

They seem to all be 8x16, padded on each size by zero.

(eg: for (0..8) for (0..16) { *cursorimage++ = 0; *cursorimage++ = srcdata++; *cursorimage++ = srcdata++; *cursorimage++ = 0; } }

Feel free to rewrite your patch :)

comment:2 by eriktorbjorn, 22 years ago

Ok, here's how I think it should work. I don't see gdi._currentCursor being used for anything else, and it seems to be stored in savegames, so this seemed like a good variable to use.

But I *still* need to hack in the correct cursor for Loom, because the stock arrow cursor, apart from not being very pretty, is just plain wrong compared to what I see if I run Loom with its original interpreter.

I noticed the Loom script tries to call setCursorImg() twice before calling setCursor(), but ScummVM makes it a no-op. Any idea what the purpose of this script fragment should be doing?

[001C] (2C) InitCharset(1) [001F] (33) Unknown?? [0025] (2C) SetCursorImg(0,1) [0029] (2C) SetCursorHotspot(0,0,0) [002E] (2C) SetCursorImg(1,1) [0032] (2C) SetCursorHotspot(1,0,0) [0037] (2C) InitCursor(1)

My best idea so far is that it's trying to replace the stock cursor images, but with what? And why two of them?

by eriktorbjorn, 22 years ago

Attachment: cursor2.diff added

Updated patch against a September 17 CVS snapshot

comment:3 by Kirben, 22 years ago

Patch has been added to cvs

comment:4 by Kirben, 22 years ago

Status: newclosed

comment:5 by fingolfin, 22 years ago

Owner: set to Kirben
Status: closednew

comment:6 by fingolfin, 22 years ago

Uhm, but you didn't fix the exactly same cursor in gui/newgui.cpp. Now we have to slightly different cursors being used in the game, not nice.

Also when you accept patches, please assign the tracker items to you, to mark you as the person responsible for reviewing & accepting the patch, and thus also responsible for fixing regressions.

comment:7 by SF/ender, 22 years ago

Can this be closed yet?

comment:8 by fingolfin, 22 years ago

I modified the mouse cursor in NewGUI to look like the one in the game (I think).

comment:9 by fingolfin, 22 years ago

Status: newclosed

comment:10 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Loom
Note: See TracTickets for help on using tickets.