I've created some new classes to enable pointers-to-functions and
pointers-to-class-methods to be treated like objects. These objects
can be registered with fgEVENT_MGR.
File "Include/fg_callback.hxx" contains the callback class defns.
Modified fgEVENT and fgEVENT_MGR to use the callback classes. Also
some minor tweaks to STL usage.
Added file "Include/fg_stl_config.h" to deal with STL portability
issues. I've added an initial config for egcs (and probably gcc-2.8.x).
I don't have access to Visual C++ so I've left that for someone else.
This file is influenced by the stl_config.h file delivered with egcs.
Added "Include/auto_ptr.hxx" which contains an implementation of the
STL auto_ptr class which is not provided in all STL implementations
and is needed to use the callback classes.
Deleted fgLightUpdate() which was just a wrapper to call
fgLIGHT::Update().
Modified fg_init.cxx to register two method callbacks in place of the
old wrapper functions.
- use strings for fg_root and airport_id and added methods to return
them as strings,
- inlined all access methods,
- made the parsing functions private methods,
- deleted some unused functions.
- propogated some of these changes out a bit further.
but seems to be triggering a bug.
light.cxx: Added code to adjust fog color based on sunrise/sunset effects
and view orientation. This is an attempt to match the fog color to the
sky color in the center of the screen. You see discrepancies at the
edges, but what else can be done?
sunpos.cxx: Caculate local direction to sun here. (what compass direction
do we need to face to point directly at sun)
Declare memmove/memset for Sloaris.
Rewrote fg_time.c routine to get LST start seconds to better handle
Solaris, and be easier to port, and understand the GMT vs. local
timezone issues.
on a wider variety of platforms.
Added the declaration of memmove needed by the stl which apparently
solaris only defines for cc compilations and not for c++ (__STDC__)
and run queue this removes the arbitrary list sizes and makes things much
more dynamic. Because this is C++-classified we can now have multiple
event_tables if we'd ever want them.
one place this functions arguments were defined as ( void ) while in another
place they were defined as ( int ). The correct answer was ( int ).
Prepairing for C++ integration.
there was a bug in timesum() which calculated a new time stamp based on
the current time stamp + offset. This hosed the periodic event processing
logic because you'd never arrive at the time the event was scheduled for.
Sky updates and lighting changes are handled via this event mechanism so
they never changed ... it is fixed now.