]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/splash.cxx
Added a <solve-weight> subtag of the approach/cruise parameters that can
[flightgear.git] / src / Main / splash.cxx
index 12e7bb6eb4ca562abe3e83f182453ae000c7c77c..e83506fb7223acf8d30a538c66ff1e241cf5ccb6 100644 (file)
@@ -34,7 +34,7 @@
 #  include <windows.h>
 #endif
 
-#include GLUT_H
+#include FG_GLUT_H
 
 #include <string.h>
 
@@ -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 || !strcmp(splash_texture, "")) {
+        // load in the texture data
+        int num = (int)(sg_random() * 5.0 + 1.0);
+        char num_str[5];
+        snprintf(num_str, 4, "%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())