Jump to: navigation, search

Howto:Extend Nasal

60 bytes removed, 16:24, 10 April 2012
replace old CVS withs, and link to gitorious now
All Nasal related articles can be found in the [ Nasal category].
'''Note:''' FlightGear's version of the Nasal interpreter is maintained in the [ SimGear] CVS git repository, inside the [ sourcenext/simgear/nasal] folder, the most important header file detailing the internal Nasal API is "[ nasal.h]", you will want to check this out for the latest changes and information.
You will probably also want to check out the [ sourcenext/simgear/nasal] folder for specific examples on using the various Nasal APIs that are not yet covered here completely.
'''Important:''' As of 05/2009, this article is work in progress, and none of the examples have so far been tested/compiled.
= Intro =
In FlightGear, the simplest way to add new extension functions is to look at the existing functions in [ NasalSys.cxx $FG_SRC/Scripting]/NasalSys.cxx (src/Scripting/NasalSys.cxx).
There is a static table of function pointers (named funcs[]) referencing extension functions, along with their corresponding names in Nasal.

Navigation menu