Opened 21 years ago

Closed 21 years ago

Last modified 6 years ago

#8234 closed patch

ALL: Storing mouse cursor info in savegames

Reported by: eriktorbjorn Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Sam and Max

Description

When loading savegames in some games, e.g. Sam & Max, the mouse cursor is usually wrong directly afterwards. One particularly noticeable example is if you save on the U.S. map screen - where the cursor is a simple cross-hair thingy - and then go somewhere else and turn the mouse cursor into an inventory object, such as the dollar bills, before reloading the savegame.

Not only will the mouse cursor be the wrong image, but the palette will be wrong for it as well.

This patch simply stores some more cursor information than we used to do. Of course, that means a new savegame version. I don't know if it's worth doing that just for this change. The downside, of course, is that it will add another 8 KB to the savegame size.

Ticket imported from: #743228. Ticket imported from: patches/339.

Attachments (1)

cursor-saveload.diff (1.8 KB ) - added by eriktorbjorn 21 years ago.
Patch against a May 24 CVS snapshot

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 21 years ago

Attachment: cursor-saveload.diff added

Patch against a May 24 CVS snapshot

comment:1 by fingolfin, 21 years ago

Owner: set to fingolfin

comment:2 by fingolfin, 21 years ago

It would be nice to store the information where the cursor data came from, and then use that info to restore it - only a few bytes as compared to a few kilo bytes. This is helped by the fact that AFAIK, LOOM and V6+ games are the only ones with custom mouse cursors, so it shouldn't be *that* hard.

Anyway, I do have some other savegame changes up the sleeve, which should be coordinated, so please nobody apply this before talking back with me :-)

comment:3 by eriktorbjorn, 21 years ago

It would be nice, yes, but is it really always possible to store that information? I mean, with grabCursor() you could grab a cursor image from anywhere on the screen. It wouldn't necessarily have to correspond directly to any one thing in the resource files.

Of course, it's unlikely to ever be used that way, but...

comment:4 by fingolfin, 21 years ago

Good point, didn't think of grabCursor(). OK, so from that POV it seems this patch is the best we can do..

Applied, together with an increase of the script slots.

comment:5 by fingolfin, 21 years ago

Status: newclosed

comment:6 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Sam and Max
Note: See TracTickets for help on using tickets.