]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Account.cpp
Remove some extra declarations of "channels"
[lugaru.git] / Source / Account.cpp
index 31e99af8c54efcaecdcbdf601e2476dfac870321..d601c4ac64a4ded51ea548d0c95a611fd7120cc1 100644 (file)
@@ -37,15 +37,15 @@ Account::Account(string n) {
        difficulty = 0;
        progress = 0;
        points = 0;
-       for(int i=0;i<50;highscore[i++] = 0);
-       for(int i=0;i<50;fasttime[i++] = 0);
-       for(int i=0;i<60;unlocked[i++] = 0);
+       memset(highscore, 0, sizeof(highscore));
+       memset(fasttime, 0, sizeof(fasttime));
+       memset(unlocked, 0, sizeof(unlocked));
        campaignhighscore = 0;
        campaignfasttime = 0;
        campaignscore = 0;
        campaigntime = 0;
        campaignchoicesmade = 0;
-       for(int i=0;i<5000;campaignchoices[i++] = 0);
+       memset(campaignchoices, 0, sizeof(campaignchoices));
 }
 
 Account* Account::add(string name) {
@@ -169,7 +169,7 @@ void Account::saveFile(string filename, Account* accountactive) {
        int numaccounts;
        int j;
        
-       tfile=fopen(ConvertFileName(filename.c_str()), "wb" );
+       tfile=fopen(ConvertFileName(filename.c_str(), "wb"), "wb" );
        if(tfile)
        {
                printf("writing %d accounts :\n",getNbAccounts());