]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Removed unused members in Model class
[lugaru.git] / Source / GameInitDispose.cpp
index 37593a1ab524adfe2eae7ac6ec6ef4bafdf4df37..2922eaf29e312c4b989eb3580d522f1790cb4397 100644 (file)
@@ -105,15 +105,15 @@ void Dispose()
 void Game::newGame()
 {
     text = new Text();
+    textmono = new Text();
     skybox = new SkyBox();
 }
 
 void Game::deleteGame()
 {
-    if (skybox)
-        delete skybox;
-    if (text)
-        delete text;
+    delete skybox;
+    delete text;
+    delete textmono;
 
     glDeleteTextures(1, &screentexture);
     glDeleteTextures(1, &screentexture2);
@@ -538,6 +538,8 @@ void Game::InitGame()
     texdetail = 1;
     text->LoadFontTexture("Textures/Font.png");
     text->BuildFont();
+    textmono->LoadFontTexture("Textures/FontMono.png");
+    textmono->BuildFont();
     texdetail = temptexdetail;
 
     FadeLoadingScreen(10);
@@ -588,7 +590,7 @@ void Game::InitGame()
     mainmenu = 1;
 
     stillloading = 0;
-    firstload = 0;
+    firstLoadDone = false;
 
     newdetail = detail;
     newscreenwidth = screenwidth;
@@ -618,10 +620,11 @@ void Game::LoadScreenTexture()
 }
 
 //TODO: move LoadStuff() closer to GameTick.cpp to get rid of various vars shared in Game.hpp
+/* Loads models and textures which only needs to be loaded once */
 void Game::LoadStuff()
 {
-    static float temptexdetail;
-    static float viewdistdetail;
+    float temptexdetail;
+    float viewdistdetail;
     float megascale = 1;
 
     LOGFUNC;
@@ -638,6 +641,8 @@ void Game::LoadStuff()
     texdetail = 1;
     text->LoadFontTexture("Textures/Font.png");
     text->BuildFont();
+    textmono->LoadFontTexture("Textures/FontMono.png");
+    textmono->BuildFont();
     texdetail = temptexdetail;
 
     viewdistdetail = 2;
@@ -773,8 +778,6 @@ void Game::LoadStuff()
     gameon = 1;
     mainmenu = 0;
 
-    firstload = 0;
-
     //Fix knife stab, too lazy to do it manually
     XYZ moveamount;
     moveamount = 0;
@@ -846,5 +849,6 @@ void Game::LoadStuff()
     changedelay = 1;
 
     visibleloading = false;
+    firstLoadDone = true;
 }