restoreInitialState methods to FGGlobals, as well as the two-stage
commit described above for loading saved files. fgInit now takes a
snapshot of the initial state before handing off to the main loop, and
the GUI reInit function restores that state explicitly before calling
fgReInit.
The FlightGear patches also modify fg_props.hxx to add optional
useDefault arguments to all of the fgTie functions -- that lets you
choose whether you want to pick up any default value in the property
tree when you tie the property (the default is true).
FGOptions is history, and the modules are (starting) to use the property
manager directly. Let me know if I left any files out.
Inevitably, there will be some problems with broken options, etc.,
that I haven't found in my tests, but I'll try to fix them quickly.
We also need to stress that the property names currently in use are
not stable -- we need to reorganize them a bit for clarity.
FlightGear subsystems -- it isolates some of the config and #ifdef
stuff in a single place.
2. Added a new FGSubsystem interface, defined in fgfs.hxx; so far,
only FGControls implements it, but if that works, we can start letting
it propagate through the system and simplify the code in main.cxx and
fg_init.cxx (which is terrifyingly complex for anyone new to the
project).
3. Added new src/Main/fgfs_props.[hc]xx files with convenience
functions for tying properties under FlightGear.
4. Experimentally modified src/Controls/controls.cxx to tie properties
directly (rather than tying to BFI functions). I'd appreciate it if
you could get this into CVS as soon as possible, so we can see if the
template stuff causes trouble for any other platforms before I add
properties to the other subsystems.
5. Miscellaneous superficial modifications to other files.
In addition, I've made a couple of further changes:
6. Modified BFI to add support for setting the view axes (i.e. with a
joystick hat).
7. Cleaned up bfi.cxx and removed all cout statements.
Save/restore seems to be working now, thanks to a couple of
unspeakable kludges:
1. Every time the altitude changes, pause the flight simulator for
five frames and then change it a second time.
2. Every time the latitude or longitude changes, wait five frames,
then invoke fgUpdateSkyAndLightingParams() a second time.
- removed Toggle Clouds menu item
src/Main/options.cxx:
- (minor) added some code to sync up options with properties
src/Main/bfi.[ch]xx:
- removed (get|set)Clouds(ASL)?
- removed setSpeedNorth, setSpeedEast, and setSpeedDown -- these are
all read-only now
- added setAirspeed (for calibrated kt)
- extensive rewrite to support Tony's FDM changes
- rearranged everything in bfi.hxx to mess up Curt's ediff examination
- added properties for setting initial panel position
src/Main/save.cxx:
- reinit the tile cache after restore