]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Fixing some warnings of cppcheck
[lugaru.git] / Source / GameInitDispose.cpp
index 5e6ce040c9d95e197e7cd79186f10398e8b18105..73673ee9678e0c7cb11ebb194ed19b0d8784343c 100644 (file)
@@ -174,6 +174,10 @@ GLvoid Game::ReSizeGLScene(float fov, float pnear)
 
 void Game::LoadingScreen()
 {
+    if (!visibleloading) {
+        return;
+    }
+
     static float loadprogress;
     static AbsoluteTime frametime = {0, 0};
     AbsoluteTime currTime = UpTime ();
@@ -652,9 +656,9 @@ void Game::LoadStuff()
 
     stillloading = 1;
 
-    visibleloading = 0; //don't use loadscreentexture yet
+    visibleloading = false; //don't use loadscreentexture yet
     loadscreentexture.load("Textures/Fire.jpg", 1);
-    visibleloading = 1;
+    visibleloading = true;
 
     temptexdetail = texdetail;
     texdetail = 1;
@@ -853,11 +857,6 @@ void Game::LoadStuff()
         }
     }
 
-    LoadingScreen();
-    temptexdetail = texdetail;
-    texdetail = 1;
-    texdetail = temptexdetail;
-
     LoadingScreen();
 
     if (!screentexture) {
@@ -872,6 +871,6 @@ void Game::LoadStuff()
     loading = 0;
     changedelay = 1;
 
-    visibleloading = 0;
+    visibleloading = false;
 }