diff options
Diffstat (limited to 'games/seabattle/files/patch-ac')
-rw-r--r-- | games/seabattle/files/patch-ac | 86 |
1 files changed, 31 insertions, 55 deletions
diff --git a/games/seabattle/files/patch-ac b/games/seabattle/files/patch-ac index d10e66458e99..65c6ab62ed7c 100644 --- a/games/seabattle/files/patch-ac +++ b/games/seabattle/files/patch-ac @@ -1,55 +1,31 @@ -*** bdb.c Tue May 13 19:49:59 1997 ---- /home/andy/tmp/wrk/bdb.c Mon Jun 30 14:41:23 1997 -*************** -*** 325,332 **** - char names[10][100],text[100]; - int ch,scores[10],i; - /* If not there, create one */ -! if( (fff=fopen("hiscore.sea","r+"))==NULL ){ -! if ( (fff=fopen("hiscore.sea","a+"))!=NULL) { - fprintf(fff,"Vince\n50\nMarie\n55\nJohn\n56\n"); - fprintf(fff,"Gus\n57\nLizann\n58\nKevin\n59\n"); - fprintf(fff,"Hal\n60\nHairold\n61\nChipper\n62\nBob\n63\n"); ---- 325,332 ---- - char names[10][100],text[100]; - int ch,scores[10],i; - /* If not there, create one */ -! if( (fff=fopen(PREFIX "/share/seabattle/hiscore.sea","r+"))==NULL ){ -! if ( (fff=fopen(PREFIX "/share/seabattle/hiscore.sea","a+"))!=NULL) { - fprintf(fff,"Vince\n50\nMarie\n55\nJohn\n56\n"); - fprintf(fff,"Gus\n57\nLizann\n58\nKevin\n59\n"); - fprintf(fff,"Hal\n60\nHairold\n61\nChipper\n62\nBob\n63\n"); -*************** -*** 335,341 **** - } - else fclose(fff); - -! if ( (fff=fopen("hiscore.sea","r"))!=NULL) { - for(i=0;i<10;i++) - fscanf(fff,"%s%i",names[i],&scores[i]); - fclose(fff); ---- 335,341 ---- - } - else fclose(fff); - -! if ( (fff=fopen(PREFIX "/share/seabattle/hiscore.sea","r"))!=NULL) { - for(i=0;i<10;i++) - fscanf(fff,"%s%i",names[i],&scores[i]); - fclose(fff); -*************** -*** 355,361 **** - set_color(C_WHITE,C_BOLD); - sprintf(text,"%s got a new High Score, #%i",name,i+1); - printxy(20,1,text); -! if ( (fff=fopen("hiscore.sea","w+"))!=NULL) { - for(i=0;i<10;i++) fprintf(fff,"%s\n%i",names[i],scores[i]); - fclose(fff); - } ---- 355,361 ---- - set_color(C_WHITE,C_BOLD); - sprintf(text,"%s got a new High Score, #%i",name,i+1); - printxy(20,1,text); -! if ( (fff=fopen(PREFIX "/share/seabattle/hiscore.sea","w+"))!=NULL) { - for(i=0;i<10;i++) fprintf(fff,"%s\n%i",names[i],scores[i]); - fclose(fff); - } +--- bdb.c.orig Wed May 14 04:49:59 1997 ++++ bdb.c Fri Feb 2 04:22:00 2001 +@@ -325,8 +325,8 @@ + char names[10][100],text[100]; + int ch,scores[10],i; + /* If not there, create one */ +- if( (fff=fopen("hiscore.sea","r+"))==NULL ){ +- if ( (fff=fopen("hiscore.sea","a+"))!=NULL) { ++ if( (fff=fopen(DATADIR "/hiscore.sea","r+"))==NULL ){ ++ if ( (fff=fopen(DATADIR "/hiscore.sea","a+"))!=NULL) { + fprintf(fff,"Vince\n50\nMarie\n55\nJohn\n56\n"); + fprintf(fff,"Gus\n57\nLizann\n58\nKevin\n59\n"); + fprintf(fff,"Hal\n60\nHairold\n61\nChipper\n62\nBob\n63\n"); +@@ -335,7 +335,7 @@ + } + else fclose(fff); + +- if ( (fff=fopen("hiscore.sea","r"))!=NULL) { ++ if ( (fff=fopen(DATADIR "/hiscore.sea","r"))!=NULL) { + for(i=0;i<10;i++) + fscanf(fff,"%s%i",names[i],&scores[i]); + fclose(fff); +@@ -355,7 +355,7 @@ + set_color(C_WHITE,C_BOLD); + sprintf(text,"%s got a new High Score, #%i",name,i+1); + printxy(20,1,text); +- if ( (fff=fopen("hiscore.sea","w+"))!=NULL) { ++ if ( (fff=fopen(DATADIR "/hiscore.sea","w+"))!=NULL) { + for(i=0;i<10;i++) fprintf(fff,"%s\n%i",names[i],scores[i]); + fclose(fff); + } |