Changes to event manager from Bernie Bright.
This commit is contained in:
parent
f801b0ed1e
commit
fa1a9ad190
2 changed files with 23 additions and 14 deletions
|
@ -63,7 +63,7 @@
|
||||||
// Force an update of the sky and lighting parameters
|
// Force an update of the sky and lighting parameters
|
||||||
static void local_update_sky_and_lighting_params( void ) {
|
static void local_update_sky_and_lighting_params( void ) {
|
||||||
fgSunInit();
|
fgSunInit();
|
||||||
fgLightUpdate();
|
cur_light_params.Update();
|
||||||
fgSkyColorsInit();
|
fgSkyColorsInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,11 +345,14 @@ void GLUTspecialkey(int k, int x, int y) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.20 1998/08/24 20:11:12 curt
|
/* Revision 1.21 1998/08/29 13:09:25 curt
|
||||||
/* Added i/I to toggle full vs. minimal HUD.
|
/* Changes to event manager from Bernie Bright.
|
||||||
/* Added a --hud-tris vs --hud-culled option.
|
|
||||||
/* Moved options accessor funtions to options.hxx.
|
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.20 1998/08/24 20:11:12 curt
|
||||||
|
* Added i/I to toggle full vs. minimal HUD.
|
||||||
|
* Added a --hud-tris vs --hud-culled option.
|
||||||
|
* Moved options accessor funtions to options.hxx.
|
||||||
|
*
|
||||||
* Revision 1.19 1998/08/05 00:19:33 curt
|
* Revision 1.19 1998/08/05 00:19:33 curt
|
||||||
* Added a local routine to update lighting params every frame when time is
|
* Added a local routine to update lighting params every frame when time is
|
||||||
* accelerated.
|
* accelerated.
|
||||||
|
|
|
@ -108,7 +108,6 @@ int fgInitPosition( void ) {
|
||||||
FG_Longitude = current_options.get_lon() * DEG_TO_RAD;
|
FG_Longitude = current_options.get_lon() * DEG_TO_RAD;
|
||||||
FG_Latitude = current_options.get_lat() * DEG_TO_RAD;
|
FG_Latitude = current_options.get_lat() * DEG_TO_RAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("starting altitude is = %.2f\n", current_options.get_altitude());
|
printf("starting altitude is = %.2f\n", current_options.get_altitude());
|
||||||
|
|
||||||
FG_Altitude = current_options.get_altitude() * METER_TO_FEET;
|
FG_Altitude = current_options.get_altitude() * METER_TO_FEET;
|
||||||
|
@ -289,8 +288,10 @@ int fgInitSubsystems( void ) {
|
||||||
global_events.Init();
|
global_events.Init();
|
||||||
|
|
||||||
// Output event stats every 60 seconds
|
// Output event stats every 60 seconds
|
||||||
global_events.Register( "fgEventPrintStats()", fgEventPrintStats,
|
global_events.Register( "fgEVENT_MGR::PrintStats()",
|
||||||
FG_EVENT_READY, 60000 );
|
fgMethodCallback<fgEVENT_MGR>( &global_events,
|
||||||
|
&fgEVENT_MGR::PrintStats),
|
||||||
|
fgEVENT::FG_EVENT_READY, 60000 );
|
||||||
|
|
||||||
// Initialize the time dependent variables
|
// Initialize the time dependent variables
|
||||||
fgTimeInit(t);
|
fgTimeInit(t);
|
||||||
|
@ -313,15 +314,15 @@ int fgInitSubsystems( void ) {
|
||||||
|
|
||||||
// Initialize the planetary subsystem
|
// Initialize the planetary subsystem
|
||||||
global_events.Register( "fgPlanetsInit()", fgPlanetsInit,
|
global_events.Register( "fgPlanetsInit()", fgPlanetsInit,
|
||||||
FG_EVENT_READY, 600000);
|
fgEVENT::FG_EVENT_READY, 600000);
|
||||||
|
|
||||||
// Initialize the sun's position
|
// Initialize the sun's position
|
||||||
global_events.Register( "fgSunInit()", fgSunInit,
|
global_events.Register( "fgSunInit()", fgSunInit,
|
||||||
FG_EVENT_READY, 30000 );
|
fgEVENT::FG_EVENT_READY, 30000 );
|
||||||
|
|
||||||
// Intialize the moon's position
|
// Intialize the moon's position
|
||||||
global_events.Register( "fgMoonInit()", fgMoonInit,
|
global_events.Register( "fgMoonInit()", fgMoonInit,
|
||||||
FG_EVENT_READY, 600000 );
|
fgEVENT::FG_EVENT_READY, 600000 );
|
||||||
|
|
||||||
// fgUpdateSunPos() needs a few position and view parameters set
|
// fgUpdateSunPos() needs a few position and view parameters set
|
||||||
// so it can calculate local relative sun angle and a few other
|
// so it can calculate local relative sun angle and a few other
|
||||||
|
@ -332,15 +333,17 @@ int fgInitSubsystems( void ) {
|
||||||
l->Init();
|
l->Init();
|
||||||
|
|
||||||
// update the lighting parameters (based on sun angle)
|
// update the lighting parameters (based on sun angle)
|
||||||
global_events.Register( "fgLightUpdate()", fgLightUpdate,
|
global_events.Register( "fgLight::Update()",
|
||||||
FG_EVENT_READY, 30000 );
|
fgMethodCallback<fgLIGHT>( &cur_light_params,
|
||||||
|
&fgLIGHT::Update),
|
||||||
|
fgEVENT::FG_EVENT_READY, 30000 );
|
||||||
|
|
||||||
// Initialize the weather modeling subsystem
|
// Initialize the weather modeling subsystem
|
||||||
fgWeatherInit();
|
fgWeatherInit();
|
||||||
|
|
||||||
// update the weather for our current position
|
// update the weather for our current position
|
||||||
global_events.Register( "fgWeatherUpdate()", fgWeatherUpdate,
|
global_events.Register( "fgWeatherUpdate()", fgWeatherUpdate,
|
||||||
FG_EVENT_READY, 120000 );
|
fgEVENT::FG_EVENT_READY, 120000 );
|
||||||
|
|
||||||
// Initialize the Cockpit subsystem
|
// Initialize the Cockpit subsystem
|
||||||
if( fgCockpitInit( ¤t_aircraft )) {
|
if( fgCockpitInit( ¤t_aircraft )) {
|
||||||
|
@ -389,6 +392,9 @@ int fgInitSubsystems( void ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.35 1998/08/29 13:09:26 curt
|
||||||
|
// Changes to event manager from Bernie Bright.
|
||||||
|
//
|
||||||
// Revision 1.34 1998/08/27 17:02:06 curt
|
// Revision 1.34 1998/08/27 17:02:06 curt
|
||||||
// Contributions from Bernie Bright <bbright@c031.aone.net.au>
|
// Contributions from Bernie Bright <bbright@c031.aone.net.au>
|
||||||
// - use strings for fg_root and airport_id and added methods to return
|
// - use strings for fg_root and airport_id and added methods to return
|
||||||
|
|
Loading…
Add table
Reference in a new issue