Hey again,
I've been doing a bit more experimenting with SCUMM - specifically i was
looking to make a verb disc, like one can see in Full Throttle or COMI.
After looking at how it works in COMI, i can ascertain the following:
- When the LMB is pressed, the verb disc is shown with its center at the
mouse position after a short delay.
- Three verbs which correspond to "Use", "Talk to", and "Look at" are
shown on the coin
- All normal input is ignored when the verb disc is active (i.e. you can
only interact with the displayed verbs)
- When the LMB is released, the verb disc is hidden (or removed). If the
mouse is over a verb, the verb is activated.
When you compare this logic to the road example, it doesn't quite seem
to fit in with the existing code - meaning i will likely have to rewrite
everything in order to get a verb coin to work. Though that doesn't
sound like a bad idea as the current code isn't well explained (sorry
Alban). :)
So far i have determined i need to invoke a script which includes a call
to "delay" or "delaySeconds" in order to emulate the short delay which
occurs as observed in COMI. Then i need to display the back of the verb
coin at the mouse position, and show each verb around it. So far this is
what i've got.
// e.g. showVerbDisc(1, objectUnderMousePos);
script showVerbDisc(int show, int obj)
{
int* vrb;
int i;
int tx;
int ty;
verbDiscActivate = 1;
if(!!show == verbDiscOn) return;
vrb[0] = [ Use, LookAt, TalkTo ];
if (show)
{
// Delay
delaySeconds(1);
// Grab pos of intended victim
tx = getObjectX(obj);
ty = getObjectY(obj);
// Show coin and verbs
stampObject(verbDisc, tx, ty, 3); // darn! doesn't seem to work
for(i = 0 ; i < 3 ; i++)
{
setCurrentVerb(vrb[i]);
// TODO: position verb at the right pos on screen?
setVerbOn();
redrawVerb();
}
verbDiscObj = obj;
verbDiscOn = 1;
}
else
{
// Hide the coin and the verbs
// TODO
for(i = 0 ; i < 3 ; i++)
{
setCurrentVerb(vrb[i]);
setVerbOff();
redrawVerb();
}
verbDiscOn = 0;
verbDiscActivate = 0;
}
undim(vrb);
}
(Use, LookAt, and TalkTo verbs have an associated image via setVerbObject())
As one can see, this doesn't really work yet. But i'm slowly figuring
out how all of the SCUMM functions fit together, so i expect to figure
it out eventually.
Of course, if anyone knows anything which could be of help to me, i
would appreciate it if it was mentioned. :)
Regards,
James S Urquhart
_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general