]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Stopped using Account pointers, and removed general difficulty setting (difficulty...
[lugaru.git] / Source / GameInitDispose.cpp
index b20c1966c963bb34ee91e6effefd169b7af55d72..c070d293872a430e7b922908e5adb8cedcec805e 100644 (file)
@@ -23,6 +23,7 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #include "Animation/Animation.h"
 #include "Texture.h"
 #include "Utils/Folders.h"
+#include "Menu.h"
 
 extern float screenwidth, screenheight;
 extern float viewdistance;
@@ -56,7 +57,6 @@ extern float flashamount, flashr, flashg, flashb;
 extern int flashdelay;
 extern int whichjointstartarray[26];
 extern int whichjointendarray[26];
-extern int difficulty;
 extern float slomospeed;
 extern bool gamestarted;
 
@@ -78,11 +78,11 @@ void Dispose()
     LOGFUNC;
 
     if (Game::endgame == 2) {
-        Game::accountactive->endGame();
+        Account::active().endGame();
         Game::endgame = 0;
     }
 
-    Account::saveFile(Folders::getUserDataPath()+"/users", Game::accountactive);
+    Account::saveFile(Folders::getUserDataPath()+"/users");
 
     //textures.clear();
 
@@ -457,7 +457,7 @@ void Game::InitGame()
 
     numchallengelevels = 14;
 
-    accountactive = Account::loadFile(Folders::getUserDataPath()+"/users");
+    Account::loadFile(Folders::getUserDataPath()+"/users");
 
     whichjointstartarray[0] = righthip;
     whichjointendarray[0] = rightfoot;
@@ -627,7 +627,7 @@ void Game::InitGame()
     newscreenwidth = screenwidth;
     newscreenheight = screenheight;
 
-    LoadMenu();
+    Menu::Load();
 
     Animation::loadAll();
 }