1
0
Fork 0

Add support for an aircraft specific splash screen

This commit is contained in:
ehofman 2003-12-22 21:49:11 +00:00
parent 5a6858609d
commit 465d13b045
3 changed files with 14 additions and 11 deletions

View file

@ -1237,7 +1237,7 @@ static void fgIdleFunction ( void ) {
if ( idle_state == 0 ) {
// Initialize the splash screen right away
if ( fgGetBool("/sim/startup/splash-screen") ) {
fgSplashInit();
fgSplashInit(fgGetString("/sim/startup/splash-texture"));
}
idle_state++;

View file

@ -52,20 +52,23 @@ static SGTexture splash;
// Initialize the splash screen
void fgSplashInit ( void ) {
void fgSplashInit ( const char *splash_texture ) {
SG_LOG( SG_GENERAL, SG_INFO, "Initializing splash screen" );
splash.bind();
// load in the texture data
int num = (int)(sg_random() * 5.0 + 1.0);
char num_str[256];
sprintf(num_str, "%d", num);
SGPath tpath( globals->get_fg_root() );
tpath.append( "Textures/Splash" );
tpath.concat( num_str );
tpath.concat( ".rgb" );
if (splash_texture == NULL) {
// load in the texture data
int num = (int)(sg_random() * 5.0 + 1.0);
char num_str[256];
sprintf(num_str, "%d", num);
tpath.append( "Textures/Splash" );
tpath.concat( num_str );
tpath.concat( ".rgb" );
} else
tpath.append( splash_texture );
splash.read_rgb_texture(tpath.c_str());
if (!splash.usable())

View file

@ -32,7 +32,7 @@
// Initialize the splash screen
void fgSplashInit ( void );
void fgSplashInit ( const char *splash_texture );
// Update the splash screen with progress specified from 0.0 to 1.0
void fgSplashUpdate ( double progress, float alpha );