#8239 closed patch
Experimental V2 mouseover stuff
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | 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)
Change History (6)
by , 21 years ago
Attachment: | v2_mouseover.diff added |
---|
comment:1 by , 21 years ago
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 by , 21 years ago
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:4 by , 21 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:5 by , 6 years ago
Component: | → Engine: SCUMM |
---|
Patch against a May 29 CVS snapshot