[Scummvm-cvs-logs] CVS: scummvm/dc selector.cpp,1.6,1.7

Marcus Comstedt marcus_c at users.sourceforge.net
Wed Feb 27 10:33:16 CET 2002


Update of /cvsroot/scummvm/scummvm/dc
In directory usw-pr-cvs1:/tmp/cvs-serv24080

Modified Files:
	selector.cpp 
Log Message:
Generally recognize LFL games...

Index: selector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/dc/selector.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** selector.cpp	18 Feb 2002 19:55:37 -0000	1.6
--- selector.cpp	27 Feb 2002 18:32:53 -0000	1.7
***************
*** 152,157 ****
      return true;
    }
!   if(!strcasecmp(fn, "ZAK.EXP")) {
!     strcpy(base, "ZAK256");
      return true;
    }
--- 152,158 ----
      return true;
    }
!   if(!strcasecmp(fn, "00.LFL") ||
!      !strcasecmp(fn, "000.LFL")) {
!     *base = '\0';
      return true;
    }
***************
*** 228,231 ****
--- 229,244 ----
  	     isGame(entry->d_name, games[curr_game].filename_base)) {
  	    strcpy(games[curr_game].dir, dirs[curr_dir-1].name);
+ 	    if(!*games[curr_game].filename_base) {
+ 	      int i;
+ 	      for(i=strlen(games[curr_game].dir)-1; --i>=0; )
+ 		if(games[curr_game].dir[i]=='/')
+ 		  break;
+ 	      if(i>=0) {
+ 		games[curr_game].dir[strlen(games[curr_game].dir)-1]='\0';
+ 		strcpy(games[curr_game].filename_base,
+ 		       games[curr_game].dir+i+1);
+ 		games[curr_game].dir[i+1]='\0';
+ 	      }
+ 	    }
  	    checkName(s, games[curr_game]);
  	    curr_game++;





More information about the Scummvm-git-logs mailing list