LauriFriberg

omega: fixed a bug in file.c, //lock for the high score file

Jun 8th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.71 KB | None | 0 0
  1. //I fixed a bug in file.c in the omega-rpg source, the C source code.
  2. /* Writes a new high-score file, with the nominated npc as whatever it is */
  3. /* in this particular game, but the others as they appear in the file. */
  4. void save_hiscore_npc(int npc)
  5. {
  6.   FILE *infile, *outfile;
  7.   char buffer[80];
  8.   int i;
  9.  
  10.   if (gamestatusp(CHEATED))
  11.       return;
  12.   //lock_score_file(); lock that prevented the high score from being saved, I commented it out :-) 8.6.2018: L.K.F.
  13.   strcpy(Str1,Omegavar);
  14.   strcat(Str1,"omega.hi");
  15.   infile = checkfopen(Str1,"rb");
  16.   strcpy(Str2,Omegavar);
  17. #ifdef MSDOS
  18.   strcat(Str2,"omegahi.new");   /* stupid 8.3 msdos filename limit */
  19. #else
  20.   strcat(Str2,"omega.hi.new");
  21. #endif
Advertisement
Add Comment
Please, Sign In to add comment