Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 27: Line 27:


= Intro =
= Intro =
In FlightGear, the simplest way to add new extension functions is to look at the existing functions in [http://gitorious.org/fg/flightgear/blobs/next/src/Scripting/NasalSys.cxx $FG_SRC/Scripting]/NasalSys.cxx (src/Scripting/NasalSys.cxx).
In FlightGear, the simplest way to add new extension functions is to look at the existing functions in [http://gitorious.org/fg/flightgear/blobs/next/src/Scripting/NasalSys.cxx#line482 $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.  
There is a static table of function pointers (named funcs[]) referencing extension functions, along with their corresponding names in Nasal: http://gitorious.org/fg/flightgear/blobs/next/src/Scripting/NasalSys.cxx#line482
The following is a copy of the extension function list, taken in 05/2009:
The following is a copy of the extension function list, taken in 05/2009:


Navigation menu