1
0
Fork 0

Merge branch 'next' of D:\Git_New\flightgear into next

This commit is contained in:
Vivian Meazza 2011-05-21 17:10:47 +01:00
commit 2268041799
3 changed files with 5 additions and 8 deletions

View file

@ -583,7 +583,7 @@ if test "x$ac_cv_header_simgear_version_h" != "xyes"; then
exit
fi
AC_MSG_CHECKING([for SimGear 2.2.0 or newer])
AC_MSG_CHECKING([for SimGear 2.3.0 or newer])
AC_TRY_RUN([
#include <stdio.h>
@ -593,7 +593,7 @@ AC_TRY_RUN([
#define XSTRINGIFY(X) #X
#define MIN_MAJOR 2
#define MIN_MINOR 2
#define MIN_MINOR 3
#define MIN_MICRO 0
int main() {

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);