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

Nicolas Bacca arisme at users.sourceforge.net
Thu Apr 18 23:33:27 CEST 2002


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

Modified Files:
	simon.cpp 
Log Message:
Update minimalist (and broken) WinCE port

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** simon.cpp	18 Apr 2002 08:35:17 -0000	1.18
--- simon.cpp	19 Apr 2002 06:23:49 -0000	1.19
***************
*** 28,32 ****
--- 28,34 ----
  
  
+ #ifndef _WIN32_WCE
  #include <errno.h>
+ #endif
  #include <time.h>
  #ifdef WIN32
***************
*** 602,606 ****
  	if (_tbl_list == NULL)
  		error("Out of memory for strip table list");
! 	rewind(in);
  	fread(_tbl_list, file_size, 1, in);
  	fclose(in);
--- 604,608 ----
  	if (_tbl_list == NULL)
  		error("Out of memory for strip table list");
! 	fseek(in, 0, SEEK_SET);
  	fread(_tbl_list, file_size, 1, in);
  	fclose(in);
***************
*** 620,624 ****
  	if (_stripped_txt_mem == NULL)
  		error("Out of memory for strip text list");
! 	rewind(in);
  	fread(_stripped_txt_mem, file_size, 1, in);
  	fclose(in);
--- 622,626 ----
  	if (_stripped_txt_mem == NULL)
  		error("Out of memory for strip text list");
! 	fseek(in, 0, SEEK_SET);
  	fread(_stripped_txt_mem, file_size, 1, in);
  	fclose(in);
***************
*** 2243,2247 ****
  	fseek(fo, 0, SEEK_END);
  	size = ftell(fo);
! 	rewind(fo);
  
  	if (fread(dst, size,1, fo) != 1)
--- 2245,2249 ----
  	fseek(fo, 0, SEEK_END);
  	size = ftell(fo);
! 	fseek(fo, 0, SEEK_SET);
  
  	if (fread(dst, size,1, fo) != 1)
***************
*** 3186,3190 ****
  		error("Out of icon memory");
  
! 	rewind(in);
  
  	fread(_icon_file_ptr, size, 1, in);
--- 3188,3192 ----
  		error("Out of icon memory");
  
! 	fseek(in, 0, SEEK_SET);
  
  	fread(_icon_file_ptr, size, 1, in);
***************
*** 6897,6901 ****
  		size = ftell(in);
  
! 		rewind(in);
  		
  		/* stop all sounds */
--- 6899,6903 ----
  		size = ftell(in);
  
! 		fseek(in, 0, SEEK_SET);
  		
  		/* stop all sounds */
***************
*** 7632,7636 ****
  		fseek(in, 0, SEEK_END);
  		size = ftell(in);
! 		rewind(in);
  
  		if (fread(_vga_buffer_pointers[11].vgaFile2, size, 1, in) != 1)
--- 7634,7638 ----
  		fseek(in, 0, SEEK_END);
  		size = ftell(in);
! 		fseek(in, 0, SEEK_SET);
  
  		if (fread(_vga_buffer_pointers[11].vgaFile2, size, 1, in) != 1)
***************
*** 7661,7665 ****
  		fseek(in, 0, SEEK_END);
  		size = ftell(in);
! 		rewind(in);
  
  		dst = setup_vga_destination(size);
--- 7663,7667 ----
  		fseek(in, 0, SEEK_END);
  		size = ftell(in);
! 		fseek(in, 0, SEEK_SET);
  
  		dst = setup_vga_destination(size);
***************
*** 7993,7997 ****
--- 7995,8001 ----
  	_lock_word |= 0x100;
  	
+ #ifndef _WIN32_WCE
  	errno = 0;
+ #endif
  	
  	f = fopen(gen_savename(slot), "wb");
***************
*** 8085,8090 ****
--- 8089,8098 ----
  
  	/* perhaps getenv should be added to OSystem */
+ #ifndef _WIN32_WCE
  	dir = getenv("SCUMMVM_SAVEPATH");
  	if (dir == NULL) dir = "";
+ #else
+ 	dir = _game_path;
+ #endif
  
  	sprintf(buf, "%sSAVE.%.3d", dir, slot);
***************
*** 8099,8103 ****
--- 8107,8113 ----
  	_lock_word |= 0x100;
  
+ #ifndef _WIN32_WCE
  	errno = 0;
+ #endif
  
  	f = fopen(gen_savename(slot), "rb");
***************
*** 8201,8206 ****
--- 8211,8218 ----
  	_lock_word &= ~0x100;
  
+ #ifndef _WIN32_WCE
  	if (errno != 0)
  		error("load failed");
+ #endif
  
  	return true;





More information about the Scummvm-git-logs mailing list