Erik Hofman wrote:
> BTW. Does Nasal work like PSL, int that one has to initiate each step?
>
> I've done a script manager for PSL that I've laying around somewhere
> that would allow multiple scripts to work simultaneously and can
> expand over multiple frames (instead of needing to run the whole
> script in one frame timespan).

It's a bytecode interpreter, and by design it doesn't use the
processor stack for recursion.  So in principle you could instruct it
to run for some number of "cycles" and then return to be called later.
I would just need to add a counter inside the intereter loop that
returned early, and define a return value for naCall() to indicate
"not finished yet".

There are limits to this, obviously.  If you call the interpreter, and
the script calls a C function which enters the interpreter again, then
this won't work.  There's no way (short of user-space context
switching voodoo) to return to the top-level stack frame without
trashing the frame of the recursive call.

Andy


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to