Opened 16 years ago

Closed 16 years ago

Last modified 7 months ago

#8239 closed patch

Experimental V2 mouseover stuff

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

Description

This is just an experiment to explore one way to get
the V2 inventory, verbs and sentence to change colour
on mouseovers. It should not be applied yet.

As far as I can understand, these colour changes are
hard-wired in the interpreter, rather than scripted, so
I guess that's what ScummVM will have to do as well.

Verbs are simple. We can just set hicolor to 14 and let
the existing code take care of it. Perhaps the
inventory could be handled the same way (is it possible
to set up "dummy" verbs that do nothing except react to
mouseovers?), but I haven't explored this yet.

Instead I added some code to check for mouseovers in a
list of pre-defined rectangles where I know the
inventory, arrows and sentence line are going to be. It
seemed to work acceptably when I tried it.

Ticket imported from: #745986. Ticket imported from: patches/344.

Attachments (1)

v2_mouseover.diff (5.0 KB) - added by eriktorbjorn 16 years ago.
Patch against a May 29 CVS snapshot

Download all attachments as: .zip

Change History (6)

Changed 16 years ago by eriktorbjorn

Attachment: v2_mouseover.diff added

Patch against a May 29 CVS snapshot

comment:1 Changed 16 years ago by fingolfin

The vs->hicolor bit of course is trivially sound :-)

For the rest, doesn't look bad; maybe using fake verbs would be cleaner/
easier, but maybe it would just be a messy hack just as long as your current
patch :-) Not sure if it would be worth it (although I had the exact same idea,
too).

As for the v2_mouseover_boxes: it would seem logical to modify
checkV2Inventory and redrawV2Inventory to make use of them, too (and use
some nice enum for the array indices). THis way, it would be guranteed that
the drawn arrow corresponds exactly to the click rect, and also to the
highlight rect (right now they could get easily out of sync).

comment:2 Changed 16 years ago by fingolfin

Oh and v2_mouseover_boxes / v2_mouseover_box shouldn't be static vars,
rather they should be members of class Scumm. Well actually Scumm_v2
would be nicest, but then you have to trick a little to be able to call a
Scumm_v2 method from within a Scumm method (e.g. typecast this or so)...

comment:3 Changed 16 years ago by fingolfin

Modified version of this is in CVS now.

comment:4 Changed 16 years ago by fingolfin

Owner: set to fingolfin
Status: newclosed

comment:5 Changed 7 months ago by digitall

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