[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.17,1.18

Ludvig Strigeus strigeus at users.sourceforge.net
Thu Apr 18 01:36:03 CEST 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv32369/simon

Modified Files:
	simon.cpp 
Log Message:
Now uses proper directory for savegames.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** simon.cpp	17 Apr 2002 20:19:45 -0000	1.17
--- simon.cpp	18 Apr 2002 08:35:17 -0000	1.18
***************
*** 8081,8086 ****
  
  char *SimonState::gen_savename(int slot) {
! 	static char buf[128];
! 	sprintf(buf, "SAVE.%.3d", slot);
  	return buf;
  }
--- 8081,8092 ----
  
  char *SimonState::gen_savename(int slot) {
! 	static char buf[256];
! 	const char *dir;
! 
! 	/* perhaps getenv should be added to OSystem */
! 	dir = getenv("SCUMMVM_SAVEPATH");
! 	if (dir == NULL) dir = "";
! 
! 	sprintf(buf, "%sSAVE.%.3d", dir, slot);
  	return buf;
  }
***************
*** 8095,8099 ****
  	errno = 0;
  
! 	f = fopen_maybe_lowercase(gen_savename(slot));
  	if (f==NULL)
  		return false;
--- 8101,8105 ----
  	errno = 0;
  
! 	f = fopen(gen_savename(slot), "rb");
  	if (f==NULL)
  		return false;





More information about the Scummvm-git-logs mailing list