Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 10: Line 10:


All Nasal related articles can be found in the [http://wiki.flightgear.org/index.php/Category:Nasal Nasal category].
All Nasal related articles can be found in the [http://wiki.flightgear.org/index.php/Category:Nasal Nasal category].
'''Note:''' FlightGear's version of Nasal is maintained in the [http://www.simgear.org SimGear] CVS repository, inside the [http://cvs.flightgear.org/viewvc/source/simgear/nasal/?root=SimGear source/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 out this for the latest changes.


= Intro =
= Intro =
Line 43: Line 45:
You will need to add your new extension function to this list of static functions, preferably following the existing naming convention (i.e. "f_" prefix).
You will need to add your new extension function to this list of static functions, preferably following the existing naming convention (i.e. "f_" prefix).


If functions are likely to be fairly low level, and will thus be provided with a more abstract wrapper in Nasal space, these functions should use a prepended undercore ("_"), such as the _fgcommand, _setlistener, _cmdarg and _interpolate functions.
If your extension functions are likely to be fairly low level, and will thus be provided with a more abstract wrapper in Nasal space, these functions should use a prepended undercore ("_"), such as the _fgcommand, _setlistener, _cmdarg and _interpolate functions.


= Extension Function Signature =
= Extension Function Signature =
2,561

edits

Navigation menu