static int idle_state = 0;
static long global_multi_loop;
-// forward declaration
-void fgReshape( int width, int height );
-
// fog constants. I'm a little nervous about putting actual code out
// here but it seems to work (?)
static const double m_log01 = -log( 0.01 );
if ( fgPanelVisible() ) {
GLfloat height = fgGetInt("/sim/startup/ysize");
GLfloat view_h =
- (current_panel->getViewHeight() - current_panel->getYOffset())
+ (globals->get_current_panel()->getViewHeight() - globals->get_current_panel()->getYOffset())
* (height / 768.0) + 1;
glTranslatef( 0.0, view_h, 0.0 );
}
// Use the hud_and_panel ssgSimpleState for rendering the ATC output
// This only works properly if called before the panel call
- globals->get_ATC_display()->update(delta_time_sec);
+ if((fgGetBool("/sim/ATC/enabled")) || (fgGetBool("/sim/ai-traffic/enabled")))
+ globals->get_ATC_display()->update(delta_time_sec);
// update the panel subsystem
- if ( current_panel != NULL ) {
- current_panel->update(delta_time_sec);
+ if ( globals->get_current_panel() != NULL ) {
+ globals->get_current_panel()->update(delta_time_sec);
}
fgUpdate3DPanels();
#endif
// Run ATC subsystem
- globals->get_ATC_mgr()->update(delta_time_sec);
+ if (fgGetBool("/sim/ATC/enabled"))
+ globals->get_ATC_mgr()->update(delta_time_sec);
// Run the AI subsystem
if (fgGetBool("/sim/ai-traffic/enabled"))
// setup OpenGL view parameters
fgInitVisuals();
+ // Read the list of available aircrafts
+ fgReadAircraft();
+
idle_state++;
} else if ( idle_state == 5 ) {
if ( (!fgGetBool("/sim/virtual-cockpit"))
&& fgPanelVisible() && idle_state == 1000 ) {
- view_h = (int)(height * (current_panel->getViewHeight() -
- current_panel->getYOffset()) / 768.0);
+ view_h = (int)(height * (globals->get_current_panel()->getViewHeight() -
+ globals->get_current_panel()->getYOffset()) / 768.0);
} else {
view_h = height;
}
#endif
// set default log levels
- sglog().setLogLevels( SG_ALL, SG_WARN );
+ sglog().setLogLevels( SG_ALL, SG_INFO );
string version;
#ifdef FLIGHTGEAR_VERSION
// fonts !!!
guiInit();
+ // Read the list of available aircrafts
+ fgReadAircraft();
+
#ifdef GL_EXT_texture_lod_bias
glTexEnvf( GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, -0.5 ) ;
#endif