1
0
Fork 0
Commit graph

19 commits

Author SHA1 Message Date
curt
71d0001f3d Add a directory listing command to nasal. Given a directory name, return
the file list as an array.
2006-01-09 03:48:14 +00:00
ehofman
0e16419f0d Stuart Buchanan:
- Provide a Nasal interface to display simple text messages on the screen
  like the ATC display. In fact, I copied the code from the ATCDisplay.cxx
  and simply shifted it further down the screen.


Erik:

TODO: Integrate the two pieces of code.
2006-01-06 09:50:58 +00:00
mfranz
96c0a7bbc1 add _setlistener() function, so that slow property polling loops can be
replaced with efficient listener callbacks. One use is the new FPS display.
This is reviewed and OK'ed by Andy, relatively trivial and separated from
the rest of Nasal, so problems are quite unlikely and confined to users of
this function.

The callback is executed whenever the property is written to -- even if
the value didn't change. The triggering Node is available via cmdarg().

Examples:  _setlistener("/sim/crashed", func {print("haha!")});
           _setlistener("/foo/bar", func { print(cmdarg().getPath() ~ " changed")})
2005-12-16 19:11:03 +00:00
andy
14c3bc5932 Architectural fix allowing the "tip" popups (FOV, view name, etc...)
to pop themselves down while the simulator is paused.

The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored.  Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.

Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
2005-11-09 20:34:46 +00:00
andy
0f704b0a6e Changes to support the new naCall API in SimGear. NOTE: these changes
are *not* backwards compatible, and require current SimGear to
compile.
2005-09-20 21:09:52 +00:00
mfranz
d977c07908 - output property path in error messages 2005-06-20 18:53:00 +00:00
mfranz
ece07db538 - rename initModule() to createModule() (as suggested by Andy)
- make it public
- enable handleCommand() to execute a binding (or other nasal code defined
  in a property system subtree) in a particular namespace (-> "module" child)
2005-06-19 17:09:03 +00:00
andy
568d53875e Make readScriptFile() public, and rename it to loadModule(), so that external
code can have access to the facility for loading modules from files.

Also includes a cast-int-to-pointer fix that causes a warning on 64 bit
systems.
2005-06-14 19:57:24 +00:00
andy
3a6bc316ed Same bug, different place. Don't treat a length of zero as "please
strlen() it", because real files and properties can have lengths of
zero.
2005-04-26 20:57:06 +00:00
andy
239077599c Don't try to strlen() the input buffer if the length is zero. That
was probably my idea of a feature, but if the input buffer actually
does has a length of zero (as Melchior discovered for the case of a
zero-length .nas file) then there will be no null.
2005-04-26 17:18:00 +00:00
andy
142854d3d1 Upgrade to Nasal 1.0 test candidate 2005-04-18 19:49:13 +00:00
curt
ecfaa79b9e Permit a single nasal module to reference any number of files which are all
loaded into that single nasal name space.
2005-03-16 21:36:55 +00:00
andy
d43d10046b Melchior caught a missing return value that is now an error on newer gcc versions 2004-11-15 18:15:33 +00:00
andy
e590737451 Fix a bug where the interpreter could read a garbage buffer from the stack. 2004-05-15 21:40:58 +00:00
andy
3ddfd77781 Forgot to handle "unspecified" properties in getprop(). Treat them
as strings.
2004-03-24 19:06:54 +00:00
andy
b3ce2c3cfe Failed timers should log errors rather than silently eating them. 2004-03-24 18:37:58 +00:00
andy
eb3f52c340 Turn the __timers garbage collector cache into a more generic "gcsave"
interface, and use it to cache FGNasalScript objects returned from
a new parseScript() method.

Added a rand() function.

Added an interpolate() function interface to the new SGInterpolator
subsystem.
2003-12-05 01:54:39 +00:00
ehofman
79e48829da Add Nasal Vs. 1.5 2003-12-01 14:35:49 +00:00
curt
d3181fb437 Andy Ross:
A set of changes to impliment Nasal support in FlightGear.  The nasal
interpreter is now part of SimGear.
2003-11-25 21:08:36 +00:00