1
0
Fork 0

Merge branch 'next' of gitorious.org:fg/flightgear into next

This commit is contained in:
Curtis L. Olson 2011-05-21 11:15:06 -05:00
commit df796a4899
2 changed files with 3 additions and 6 deletions

View file

@ -390,7 +390,6 @@ FGRenderer::FGRenderer()
jpgRenderFrame = FGRenderer::update;
#endif
eventHandler = new FGEventHandler;
_splash_screen_active = true;
}
FGRenderer::~FGRenderer()
@ -428,6 +427,7 @@ FGRenderer::init( void )
_xsize = fgGetNode("/sim/startup/xsize", true);
_ysize = fgGetNode("/sim/startup/ysize", true);
_splash_alpha = fgGetNode("/sim/startup/splash-alpha", true);
_skyblend = fgGetNode("/sim/rendering/skyblend", true);
_point_sprites = fgGetNode("/sim/rendering/point-sprites", true);
@ -599,12 +599,11 @@ FGRenderer::update( bool refresh_camera_settings ) {
{
// alas, first "update" is being called before "init"...
fgSetDouble("/sim/startup/splash-alpha", 1.0);
_splash_screen_active = true;
return;
}
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
if (_splash_screen_active)
if (_splash_alpha->getDoubleValue()>0.0)
{
// Fade out the splash screen
const double fade_time = 0.8;
@ -615,7 +614,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
double sAlpha = fgGetDouble("/sim/startup/splash-alpha", 1.0);
sAlpha -= SGMiscd::max(0.0,delay_time/fade_time);
FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0);
_splash_screen_active = (sAlpha > 0.0);
fgSetDouble("/sim/startup/splash-alpha", sAlpha);
}

View file

@ -79,7 +79,7 @@ protected:
osg::ref_ptr<osgViewer::Viewer> viewer;
osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
SGPropertyNode_ptr _scenery_loaded,_scenery_override;
SGPropertyNode_ptr _skyblend;
SGPropertyNode_ptr _skyblend, _splash_alpha;
SGPropertyNode_ptr _point_sprites, _enhanced_lighting, _distance_attenuation;
SGPropertyNode_ptr _textures;
SGPropertyNode_ptr _cloud_status, _visibility_m;
@ -87,7 +87,6 @@ protected:
SGPropertyNode_ptr _panel_hotspots, _sim_delta_sec, _horizon_effect, _altitude_ft;
SGPropertyNode_ptr _virtual_cockpit;
SGTimeStamp _splash_time;
bool _splash_screen_active;
};
bool fgDumpSceneGraphToFile(const char* filename);