On 28 Nov 2006, at 01:47, Alban Bedel wrote:
I tried implementing a working example of my conversation script
idea. I was able to hide all of the normal verbs (as mentioned
previously), but I had a little problem when restoring them after
exiting the conversation. Seems I forgot the range needed to include
the added conversation verbs for them to be killed. Though this
problem could be solved by making another call to restoreVerbs with
the additional range:
restoreVerbs(1, Conv1, Conv3);
Though a cleaner solution would perhaps be to order the verbs
accordingly so one can wipe out all the conversation verbs in one go,
along with restoring the normal verbs. Or you could just call
deleteVerbs() instead.
Is this still valid with the right argument order ?
According to the other e-mail i sent, no. Be sure to change
everything to :
(start, end, saveID);
Also, i noticed that i specified the main verb's in the wrong range.
The correct range should be:
Give, SntcLine
There should probably be another call to hide the inventory items too.
To get this to work, just look at the river. The screen should enter
into a conversation mode. If you want to exit, just choose the third
option.
I still haven't decided upon how to handle scrolling conversation
items, or items which disappear after you have clicked on them. I
could either shift the positions of the verbs, or hide the last verb
and shift the text up. Or perhaps i could make use of additional
scumm functionality i haven't discovered yet. Decisions,
Decisions....
There is nothing in the engine for scrolling the verbs. It must be
done
"by hands". The best way is probably to first load the strings in
arrays, and have an array wich list all these string array and a
variable
for the current offset. Then make a script that read the "list" array
starting at the given offset and use the setVerbNameString() function
to set the verb's text.
I noticed that, yes. In fact, I decided to have a look at how DOTT
was messing about with the verb's, so i placed a few breakpoints in
the debugger (I'm a bit too lazy to fish around using the script de-
compiler), and watched where the major verb functions were being
called. It went something like this:
<Conversation Started>
everything hidden with saveVerbs() // several calls i might add,
including odd ones like "0,0" and "100,100"
Conversation verbs initialized[9] // i.e. its called 9 times
Conversation_Start:
For each conversation verb:
Set to Disabled (setVerbOff())
<Conversation piece goes here,
Conversation stopped if conditions met>
For each active conversation item:
Name Loaded (setVerbName())
Set to Active (setVerbOn())
<If option selected, go back to Conversatipn_Start>
everything restored with restoreVerbs()
all conversation items hidden, etc.
<Conversation Ended>
(conversation verbs do not seem to be killed, unless i missed a case)
Sadly, i didn't find any cases of conversation scrolling in DOTT - i
don't think there are any! Though then again scrolling conversation
options just complicate game-play anyway :)
I also checked out the inventory scrolling. It seemed rather simple,
as all that happens when you select the scroll up/down is :
For each verb in the inventory view:
Set to Disabled (setVerbOff())
For each verb in the inventory view with an according inventory item:
Set image (setVerbObject())
Set to Active (setVerbOn())
(of course, the up/down verbs are also altered, but i was just
looking at the general flow, so i didn't catch them)
The only other scumm v6 game i have handy is samnmax, which of course
uses those boxes which pop up instead of conversation items, so i
can't really check what that does as it wouldn't be applicable to the
conversation interface I'm looking to recreate.
Of course, i could check the v5 game opcodes, I've got a lot more v5
games to experiment with :)
-SJU
_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general