- remove the OSX_BUNDLE crap *I* introduced years ago - we're always a a bun
dle on Mac now.
- fix up the default fg-root on Mac to be FlightGear.app/Contents/Resources/
data - i.e the location used by the macflightgear.org distro, and indeed the obv
ious 'correct' location. Not sure why I didn't use that in the first place, back
in the day.
- remove the CPSForegroundEnable hack. For one thing, we're a bundle and don
't need it, and for another, osgViewer on Mac does the same logic using a newer,
public API rather than a hack into the OS.
- remove the strange logic for doing fgOSInit 'early' (in bootstrap rather t
han main) when running from the command line on Mac; again this is obsolete, and
no one seems to know why it was ever necessary. I guess it was an interaction w
ith SDL when running without a bundle.
- (not Mac related) remove obsolete code bracketed by ENABLE_PLIB_JOYSTICK a
nd USE_GLIDE (neither of which are ever set, even from config.h that I can see)
in main.cxx
* change a number of function parameters to const where appropriate
* fix a problem where the wrong node-name length was returned
* xmlgrep now also works when only the -e options is specified
* fix xmlgrep to show the correct node-name (it reported the parent
node-name in the previous version)
* fix __xmlSkipComment to properly find the end of comment tag.
* add the xmlGetNodeName and xmlCopyNodeName functions
* add the xmlCopyString function
* clean up some code
Change the low level internals of the xml library to reflect the following;
* rewrite the code to always recursively walk the node tree when searching
for a particular node. this is required for cases where a node with a
particular name is located deeper in a node with the same name;
for example -r /configuration/device/reference/device would fail in the
previous verion
* rename xmlGetElement to xmlGetNodeNum and add the possibility to request
the nth node with this name
* rename xmlGetNumElements to xmlGetNumNodes
The drawback is that this is approach slows down processing the files a bit,
but at least it can now find any xml node in any xml file.
Also, no more function changes are planned from now on.
ignore SIGPIPE. If we pipe our output to another application, let's say
to kst, and kst is closed, this does *not* mean that we want FlightGear
to "abort".
Initial attempt to establish a better integration between AI and ATC code.
Various other patches that have been lingering around for a while:
* Moved trafficcontrol.[ch]xx from the Airports directory to ATC, where
it really belongs.
* AI aircraft will request startup clearance, and ground control will
approve.
* Starting AI Aircraft will be pushed back to a predefined holding point
on the ground network, and wait a while before taxiing out to the runway
- Added the ATC directory again, in it's new incarnation as the storage
location for general purpose ATC functions, meant to be compatible with
the AIModels code.
use same path validation process for fgcommands "load", "save",
"loadxml", ans "savexml" as is used for io.open(). This is still
Nasal based for now. See $FG_ROOT/Nasal/io.nas.
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.)