Jeck - Profile loading fix, minor options menu improvements, minor cleanup.

This commit is contained in:
wagic.jeck
2009-09-09 11:11:17 +00:00
parent 4993cc5dea
commit 91a9387e33
8 changed files with 1277 additions and 1248 deletions

View File

@@ -290,6 +290,7 @@ void GameStateMenu::Update(float dt)
mReadConf = 1;
}
if (!nextDirectory(RESPATH"/sets/","_cards.dat")){
//Force default, if necessary.
if(options[Options::ACTIVE_PROFILE].str == "")
options[Options::ACTIVE_PROFILE].str = "Default";
@@ -300,15 +301,8 @@ void GameStateMenu::Update(float dt)
file.close();
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
}else{
//check for first time player!
file.open(options.profileFile(PLAYER_COLLECTION,"",false).c_str());
if(file){
file.close();
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
}else{
currentState = MENU_STATE_MAJOR_FIRST_TIME | MENU_STATE_MINOR_NONE;
}
}
currentState = MENU_STATE_MAJOR_FIRST_TIME | MENU_STATE_MINOR_NONE;
}
//List active profile and database size.
PlayerData * playerdata = NEW PlayerData(mParent->collection);
@@ -321,8 +315,8 @@ void GameStateMenu::Update(float dt)
}
break;
case MENU_STATE_MAJOR_FIRST_TIME :
options.checkProfile();
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_NONE;
options.checkProfile(); //Handles building a new deck, if needed.
break;
case MENU_STATE_MAJOR_MAINMENU :
if (!scrollerSet) fillScroller();