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);
texdetail = 1;
text->LoadFontTexture("Textures/Font.png");
text->BuildFont();
+ textmono->LoadFontTexture("Textures/FontMono.png");
+ textmono->BuildFont();
texdetail = temptexdetail;
FadeLoadingScreen(10);
mainmenu = 1;
stillloading = 0;
- firstload = 0;
+ firstLoadDone = false;
newdetail = detail;
newscreenwidth = screenwidth;
}
//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;
texdetail = 1;
text->LoadFontTexture("Textures/Font.png");
text->BuildFont();
+ textmono->LoadFontTexture("Textures/FontMono.png");
+ textmono->BuildFont();
texdetail = temptexdetail;
viewdistdetail = 2;
gameon = 1;
mainmenu = 0;
- firstload = 0;
-
//Fix knife stab, too lazy to do it manually
XYZ moveamount;
moveamount = 0;
changedelay = 1;
visibleloading = false;
+ firstLoadDone = true;
}