don't run the help browser from a property that a user could have
changed to something evil, but rather make sure that the browser
string can be trusted. (TODO: change system() to vfork()/execvp() ?)
remove depreciated gui_local.[ch]xx:
- drop unused parts (MouseQuat/GuiQuat)
- move "old-reinit-dialog" fgcommand to fg_command.cxx under new name
"reset" for now. (May later get merged with fgcommand "reinit".)
- move reInit() to fg_init.cxx: This was used by Shift-Esc and
Menu->File-Reset (via fgcommand "old-reinit-dialog"). We have already
a similar function fgReInitSubsystems() in fg_init.cxx, so these two
functions will probably get merged later.)
rename attributes write/read to writable/readable (The original names
where chosen to match the SGPropertyNode::WRITE/READ symbol names and
should make it more consistent, but this isn't really something that
should be exposed to the Nasal developer.)
* reorganize the code to be able to skip comment sections
* depreciate __xmlFindNextElement and use __xmlGetNode instead
* xmlGetNextElement now returns char* instead of void* for furute use
* add preliminary support for wildcards in the search path ('*' and '?')
* fix a problem caused by removing the last unnecessary alloc
* strip leading-, and trailing spaces from the string before comparing
* fix a problem where trailing spaces weren't removed
mfranz [Mon, 30 Jun 2008 14:02:26 +0000 (14:02 +0000)]
move[1] icons to source dir, from where the respective installers can copy
them to the final place depending on OS and Desktop Environment (just
like man pages and binaries). Otherwise the installer would need access to
$FG_ROOT only for the icons, which is an undesirable dependency.
[1] there's a lock on the $FG_ROOT/icons/ dir, so I'll remove
them later from the old place.
mfranz [Thu, 19 Jun 2008 17:18:42 +0000 (17:18 +0000)]
while abort() is really only useful for listeners (in all other cases
we know the stack trace), it's better to use a separate function for
it, as this can be used conditionally, as in:
setlistener("/the/property", func(n) {
if (n.getValue() < 0) # who's writing negative numbers to /the/property?!
abort(); # let's check the backtrace ...
});
mfranz [Thu, 19 Jun 2008 10:39:12 +0000 (10:39 +0000)]
make fgfs abort() after a listener with runtime arg == -1 was triggered
and its function called. This is useful for debugging purposes, to get
a core dump which unveils which C++ code was writing to the property.
This isn't any more of a security problem as other Nasal code that
makes fgfs crash, such as: var x = func call(x); x(); The difference
is that the listener doesn't use up all memory before and is much quicker.
mfranz [Fri, 13 Jun 2008 10:52:47 +0000 (10:52 +0000)]
- allow users to set fg-home dir via FG_HOME environment variable, but
- don't allow to do that from any XML file. This is to prevent malign
code from writing a new fg-home in ~/.fgfs/autosave.xml or other files
in ~/.fgfs/.
mfranz [Sat, 7 Jun 2008 17:21:47 +0000 (17:21 +0000)]
vim syntax files for *.ac and *.nas files. See nasal.vim for how to use them.
Note that for XML embedded Nasal you can type :set ft=nasal and back to
XML with :set ft=xml (ft ... filetype)
timoore [Fri, 6 Jun 2008 19:02:17 +0000 (19:02 +0000)]
Fix GUI and HUD text rendering problems.
After the changes that moved the GUI and HUD to a slave camera, the
texture-based fonts wouldn't display. The main fixes here are making
sure that the TXF textures are all loaded into the font cache early,
and explicitly setting the active texture unit in the GUI / HUD
drawImplementation.
mfranz [Mon, 2 Jun 2008 09:32:37 +0000 (09:32 +0000)]
- export font properties to the property tree again
- don't keep oodles of class member variables public (eek!)
- use ::hasValue() instead of ::getType() != SGPropertyNode::NONE
- consistency fixes and cosmetics
timoore [Mon, 19 May 2008 21:21:03 +0000 (21:21 +0000)]
Clean up OSG camera setup and interface to plib PUI
Switch to defining PU_USE_NONE and providing our own callback
functions to pui for "get window" and "get window size." A new
WindowSystemAdapter class assigns ID numbers to windows for the
purpose of identifying them to plib; the window size can be extracted
from the osg::GraphicsContext class in all the different
implementations (osgViewer, glut, sdl).
Implement a GraphicsContextOperation that runs code in a particular
graphics context, perhaps in another thread, and provides an
isFinished() method to test if the operation has finished. This allows
us to initialize plib PUI properly if there are multiple graphics
contexts without using fgMakeCurrent(). fgMakeCurrent() can't work in
multi-threaded OSG configurations.
Eliminate fgMakeCurrent() and all its uses, either by using
GraphicsContextOperation or by seeing that it is not necessary.
Attach the GUI camera as a slave camera.
Don't manipulate the OSG state in the drawImplementation() functions
for SGHUDAndPanelDrawable and SGPuDrawable; it's not needed.
durk [Mon, 12 May 2008 10:38:04 +0000 (10:38 +0000)]
Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
the original ATC directory for generic ATC functions.
durk [Mon, 12 May 2008 10:07:41 +0000 (10:07 +0000)]
Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
the original ATC directory for generic ATC functions.
durk [Thu, 8 May 2008 06:11:43 +0000 (06:11 +0000)]
- Add some DEBUG level log messages to help users in getting traffic files
to work.
- Add the possibility to load only proportion of traffic in order to
reduce some of the workload, in case of a slower computer.
mfranz [Fri, 2 May 2008 21:31:30 +0000 (21:31 +0000)]
read runway start offset from /sim/airport/runways/start-offset-m
(Defaults to 5.0, which was hard-coded before. /sim/airport/runways/
does already exist and contains the runway search parameters.)
Attached patch adds support for multiple FIXes with the same name.
Applies to both branches.
New functionality is in query_and_offset, which now returns the FIX
closest to the passed in location.
Updated route manager to take advantage of this.
Otherwise, query functions return an unspecified member from the set
of identically named FIXes. (This was previously the one occurring
last in the database file, but I don't think anybody counted on that.)
move sgVec3Slider dialog to the Attic/:
- it's unused
- it's hardcoded (we already got rid of all other hardcoded dialogs)
- we'll have to consider switching to osgWidget, which is planned to
get imported into osg. It's unlikely that we add *more* of PLIB
in the meantime.
"the [...] patch (for fg) increases the time before invisible geometry (i.e.
geometry not inside the view frustrum) gets deleted. default was 10 seconds
which i am increasing to 2 minutes."
- make online stats mode directly settable, rather than just in steps
- cosmetics: put each argument list member in a separate line, so that
one doesn't have to break lines again whenever one inserts a new
member
- let the OSG on-screen-statistics function no longer be hard-coded
on the '*'-key, but allow to cycle it by setting
/sim/rendering/on-screen-statistics to "true"
- move that function to the Debug menu (no more key assigned!)
- add "print-statistics" menu entry
Small patch that prevents displaying a "local echo" of one's own aircraft
under some circumstances. The history of this patch is somewhat unclear,
but was brought to my attention by Martin Spott, while preparing for the
Lelystad FSWeekend show. See also my posting on FlightGear devel, on
November 22, 2007 "(Multiplayer Local Echo Patch)", but wasn't committed
then because I/we assumed that had been superseded by other code
modifications. The local echo problem still persists, however, albeit
under specific circumstances. The current patch reportedly prevents this
from happening.
Added autopilot target values to communications link.
Pass autopilot target values to LFSGlass display so they can be properly
displayed.
Fix a gps status display bug.
Some tweaks and finetuning made possible by the multihreaded modelloader
and the pushback code:
- Traffic manager starts modelload requests immediately upon program
loading
- Only create legs 1 (push back) or five (cruise) of AI traffic.
- AIAircraft's rather obsessive behavior to circle around a waypoint is
largely resolved
- More realistic ground steering for AI aircraft.