[Scummvm-cvs-logs] CVS: scummvm/bs2 resman.cpp,1.1,1.2 router.cpp,1.1,1.2 speech.cpp,1.1,1.2 sword2.cpp,1.1,1.2 tony_gsdk.cpp,1.1,1.2 tony_gsdk.h,1.1,1.2 walker.cpp,1.1,1.2

Max Horn fingolfin at users.sourceforge.net
Sun Jul 27 19:38:13 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv8925

Modified Files:
	resman.cpp router.cpp speech.cpp sword2.cpp tony_gsdk.cpp 
	tony_gsdk.h walker.cpp 
Log Message:
fixed yet more warnings

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- resman.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ resman.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -17,7 +17,6 @@
  * $Header$
  */
 
-#include <process.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -111,7 +110,8 @@
 	temp = Twalloc(end, MEM_locked, UID_temp);	//get some space for the incoming resource file - soon to be trashed
 
 	file.seek(0, SEEK_SET );
-	if	(file.read( temp->ad, end )==-1)
+	file.read( temp->ad, end );
+	if	(file.ioFailed())
 	{
 		file.close();
 		Zdebug("InitResMan cannot *READ* resource.inf");
@@ -163,7 +163,8 @@
 //table seems ok so malloc some space
 	res_conv_table = (uint16 *) malloc( end );
 
-	if	(file.read( res_conv_table, end )==-1)
+	file.read( res_conv_table, end );
+	if	(file.ioFailed())
 	{
 		file.close();
 		Zdebug("InitResMan cannot *READ* resource.tab");
@@ -302,8 +303,6 @@
 
 	uint32	table_offset;
 
-	int	first=0;
-
 
 #ifdef _DEBUG
 	if	(res>=total_res_files)
@@ -985,8 +984,6 @@
 
 void resMan::CacheNewCluster(uint32 newCluster)
 {
-	uint8 black[4]={0,0,0,0};
-
 	//----------------------------------------------------------------------------------------
 	// Stop any music from streaming off the CD before we start the cluster-copy!
 	// - eg. the looping restore-panel music will still be playing if we restored a game
@@ -1466,9 +1463,6 @@
 			done = TRUE;
 		else
 		{
-			char	sCDName[_MAX_PATH];
-			DWORD   dwMaxCompLength, dwFSFlags;
-
 			index = 0;
 			while((cdDrives[index] != 0) && (!done) && (index<24))
 			{

Index: router.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/router.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- router.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ router.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -289,8 +289,8 @@
 //--------------------------------------------------------------------------------------
 uint8 CheckForCollision(void)
 {
-	static uint32 player_pc;
-	static uint32 non_player_pc;
+//	static uint32 player_pc;
+//	static uint32 non_player_pc;
 
 
 	uint8 collision=0;

Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/speech.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- speech.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ speech.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -18,8 +18,7 @@
  */
 
 //------------------------------------------------------------------------------------
-#include <io.h>		// for access()
-#include <stdio.h>
+#include "stdafx.h"
 
 //#include "src\driver96.h"
 #include "anims.h"

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sword2.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ sword2.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -47,8 +47,6 @@
 
 #define MAX_PATH 260
 
-void Start_game(void);
-
 int  RunningFromCd();
 
 uint8 quitGame = 0;
@@ -80,9 +78,6 @@
 uint8 stepOneCycle=0;	// for use while game paused
 
 //------------------------------------------------------------------------------------
-void PauseGame(void);			// James17jun97
-void UnpauseGame(void);			// James17jun97
-//------------------------------------------------------------------------------------
 
 static const VersionSettings bs2_settings[] = {
 	/* Broken Sword 2 */
@@ -238,8 +233,6 @@
 	uint32 rv;
 	uint8  breakOut = 0;
 	char	c;
-	int	j=100;
-	uint32	pc=0;
 
 //	Zdebug("[%s]", lpCmdLine);
 
@@ -457,10 +450,10 @@
 //------------------------------------------------------------------------------------
 int RunningFromCd()
 {
+/*
    char  sCDName[MAX_PATH];
    char  sRoot[MAX_PATH];
    DWORD dwMaxCompLength, dwFSFlags;
-/*
    GetModuleFileName(NULL , sRoot, _MAX_PATH);
    *(strchr(sRoot,'\\')+1) = '\0';
 

Index: tony_gsdk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/tony_gsdk.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tony_gsdk.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ tony_gsdk.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -26,7 +26,6 @@
 
 //general odds and ends
 
-#include <sys/type.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 //#include <io.h>
@@ -48,7 +47,7 @@
 
 //-----------------------------------------------------------------------------------------------------------------------
 //-----------------------------------------------------------------------------------------------------------------------
-uint32	Read_file(char	*name,	mem	**membloc, uint32	uid)	//Tony25Apr96
+uint32	Read_file(const char	*name,	mem	**membloc, uint32	uid)	//Tony25Apr96
 {
 //read the file in and place into an allocated MEM_float block
 //used for non resources manager files - stuff like fonts, etc.
@@ -74,7 +73,7 @@
 	
 	fseek( fh, 0, SEEK_SET );	//back to beginning of file
 
-	if	(fread( (*membloc)->ad, sizeof(char), end,fh)==-1)
+	if	(fread( (*membloc)->ad, sizeof(char), end,fh) < end)
 	{	Zdebug("Read_file read fail %d", name);
 		return(0);
 	}
@@ -84,7 +83,7 @@
 	return(end);	//ok, done it - return bytes read
 }
 //-----------------------------------------------------------------------------------------------------------------------
-int32	Direct_read_file(char	*name,	char	*ad)	//Tony1May96
+int32	Direct_read_file(const char	*name,	char	*ad)	//Tony1May96
 {
 //load the file directly into the memory location passed
 //memory must be pre-allocated
@@ -105,7 +104,7 @@
    end = ftell(fh);	//finally got the end
 	fseek( fh, 0, SEEK_SET );	//back to beginning of file
 
-	if	(fread( ad, sizeof(char), end,fh)==-1)
+	if	(fread( ad, sizeof(char), end,fh) < end)
 	{	Zdebug("Direct_read_file read fail %d", name);
 		return(0);
 	}
@@ -116,7 +115,7 @@
 	return(end);	//ok, done it - return bytes read
 }
 //-----------------------------------------------------------------------------------------------------------------------
-int32	Direct_write_file(char	*name,	char	*ad, uint32 total_bytes)	//Tony1May96
+int32	Direct_write_file(const char	*name,	char	*ad, uint32 total_bytes)	//Tony1May96
 {
 //load the file directly into the memory location passed
 	int	fh;

Index: tony_gsdk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/tony_gsdk.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tony_gsdk.h	28 Jul 2003 01:44:38 -0000	1.1
+++ tony_gsdk.h	28 Jul 2003 02:37:47 -0000	1.2
@@ -25,9 +25,9 @@
 
 
 
-uint32	Read_file(char	*name,	mem	**membloc, uint32 uid);
-int32	Direct_read_file(char	*name,	char	*ad);
-int32	Direct_write_file(char	*name,	char	*ad, uint32 total_bytes);
+uint32	Read_file(const char	*name,	mem	**membloc, uint32 uid);
+int32	Direct_read_file(const char	*name,	char	*ad);
+int32	Direct_write_file(const char	*name,	char	*ad, uint32 total_bytes);
 
 
 #endif

Index: walker.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/walker.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- walker.cpp	28 Jul 2003 01:44:38 -0000	1.1
+++ walker.cpp	28 Jul 2003 02:37:47 -0000	1.2
@@ -112,7 +112,6 @@
 	int8			route;
 	int32			walk_pc;
 	_walkData		*walkAnim;
-	uint8			colliding=0;	// set to 1 when collision avoided
 
 	//----------------------------------------------------------------------------------------
 	// get the parameters





More information about the Scummvm-git-logs mailing list