Changes

Jump to: navigation, search

Howto:Extend Nasal

60 bytes removed, 16:24, 10 April 2012
m
replace old CVS withs, and link to gitorious now
All Nasal related articles can be found in the [http://wiki.flightgear.org/index.php/Category:Nasal Nasal category].
'''Note:''' FlightGear's version of the Nasal interpreter is maintained in the [http://www.simgear.org SimGear] CVS git repository, inside the [http://cvs.flightgeargitorious.org/viewvc/sourcefg/simgear/nasaltrees/?root=SimGear sourcenext/simgear/nasal] folder, the most important header file detailing the internal Nasal API is "[http://simgear.org/doxygen/nasal_8h-source.html nasal.h]", you will want to check this out for the latest changes and information.
You will probably also want to check out the [http://cvs.flightgeargitorious.org/viewvc/sourcefg/simgear/nasaltrees/?root=SimGear 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 [http://cvs.flightgeargitorious.org/viewvcfg/sourceflightgear/blobs/next/src/Scripting/ 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.
18,603
edits

Navigation menu