Jeck - Daily build, deck renaming, small keypad bugfix, profileFile() fix, proposed new iconspsp.png.
* Decks now support naming and renaming. Also added a "Switch decks without saving" option. * Removed unused static const char * menuTexts, from old 6-deck limited system * Keypad didn't display correctly when not given a title, and was never destructed. Fixed. * profileFile() default behavior was to fall back to RESPATH/player. Fixed. * New iconspsp.png, updated look to seem like PSP buttons, added some extra (unused) button icons.
This commit is contained in:
@@ -203,6 +203,7 @@ GameSettings::~GameSettings(){
|
||||
SAFE_DELETE(globalOptions);
|
||||
SAFE_DELETE(profileOptions);
|
||||
SAFE_DELETE(themeOptions);
|
||||
SAFE_DELETE(keypad);
|
||||
}
|
||||
|
||||
GameOption& GameSettings::operator[](string option_name){
|
||||
@@ -223,11 +224,11 @@ int GameSettings::save(){
|
||||
if(profileOptions){
|
||||
//Force our directories to exist.
|
||||
MAKEDIR(RESPATH"/profiles");
|
||||
string temp = profileFile("","",false,false);
|
||||
string temp = profileFile();
|
||||
MAKEDIR(temp.c_str());
|
||||
temp+="/stats";
|
||||
MAKEDIR(temp.c_str());
|
||||
temp = profileFile(PLAYER_SETTINGS,"",false);
|
||||
temp = profileFile(PLAYER_SETTINGS);
|
||||
|
||||
profileOptions->save();
|
||||
}
|
||||
@@ -289,7 +290,7 @@ void GameSettings::checkProfile(){
|
||||
|
||||
//If it doesn't exist, load current profile.
|
||||
if(!profileOptions)
|
||||
profileOptions = NEW GameOptions(profileFile(PLAYER_SETTINGS,"",false));
|
||||
profileOptions = NEW GameOptions(profileFile(PLAYER_SETTINGS));
|
||||
|
||||
//Load theme options
|
||||
if(!themeOptions){
|
||||
@@ -343,7 +344,7 @@ void GameSettings::createUsersFirstDeck(int setId){
|
||||
if(theGame == NULL || theGame->collection == NULL)
|
||||
return;
|
||||
|
||||
MTGDeck *mCollection = NEW MTGDeck(options.profileFile(PLAYER_COLLECTION,"",false).c_str(), theGame->collection);
|
||||
MTGDeck *mCollection = NEW MTGDeck(options.profileFile(PLAYER_COLLECTION).c_str(), theGame->collection);
|
||||
//10 lands of each
|
||||
int sets[] = {setId};
|
||||
if (!mCollection->addRandomCards(10, sets,1, Constants::RARITY_L,"Forest")){
|
||||
|
||||
Reference in New Issue
Block a user