diff options
author | Max Horn | 2003-07-28 02:37:47 +0000 |
---|---|---|
committer | Max Horn | 2003-07-28 02:37:47 +0000 |
commit | 544168e96b04bbcf0015e9a853702f89fa31a40f (patch) | |
tree | bbde3dcb07025cc7c5bd0ce6eb2d2f54ab31ea71 /sword2 | |
parent | 44048d2434a18295c7981e676e4a0520720f992c (diff) | |
download | scummvm-rg350-544168e96b04bbcf0015e9a853702f89fa31a40f.tar.gz scummvm-rg350-544168e96b04bbcf0015e9a853702f89fa31a40f.tar.bz2 scummvm-rg350-544168e96b04bbcf0015e9a853702f89fa31a40f.zip |
fixed yet more warnings
svn-id: r9220
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/driver/_console.cpp | 4 | ||||
-rw-r--r-- | sword2/driver/d_draw.cpp | 6 | ||||
-rw-r--r-- | sword2/driver/keyboard.cpp | 2 | ||||
-rw-r--r-- | sword2/resman.cpp | 14 | ||||
-rw-r--r-- | sword2/router.cpp | 4 | ||||
-rw-r--r-- | sword2/speech.cpp | 3 | ||||
-rw-r--r-- | sword2/sword2.cpp | 9 | ||||
-rw-r--r-- | sword2/tony_gsdk.cpp | 11 | ||||
-rw-r--r-- | sword2/tony_gsdk.h | 6 | ||||
-rw-r--r-- | sword2/walker.cpp | 1 |
10 files changed, 21 insertions, 39 deletions
diff --git a/sword2/driver/_console.cpp b/sword2/driver/_console.cpp index fe9bb69cd1..544f90685c 100644 --- a/sword2/driver/_console.cpp +++ b/sword2/driver/_console.cpp @@ -64,8 +64,8 @@ uint8 consoleStatus = 0; // 1 - console display -static uint16 consoley = 0; -static uint32 consoleSize; +//static uint16 consoley = 0; +//static uint32 consoleSize; static uint8 *consoleSprite = NULL; diff --git a/sword2/driver/d_draw.cpp b/sword2/driver/d_draw.cpp index 30baabeb2d..3d31118e71 100644 --- a/sword2/driver/d_draw.cpp +++ b/sword2/driver/d_draw.cpp @@ -89,7 +89,7 @@ int32 dxHelCaps = 0; //DDCOLORKEY blackColorKey; -static int32 platformIsNT = 0; +//static int32 platformIsNT = 0; //---------------------------------------------------------------------------------------------------------------- @@ -120,11 +120,11 @@ int32 PlotDots(int16 x, int16 y, int16 count) { + warning("stub PlotDots( %d, %d, %d )", x, y, count); +/* int16 i; uint8 *dst; - warning("stub PlotDots( %d, %d, %d )", x, y, count); -/* DDSURFACEDESC ddDescription; HRESULT hr; diff --git a/sword2/driver/keyboard.cpp b/sword2/driver/keyboard.cpp index 6f9d51c997..db21de4395 100644 --- a/sword2/driver/keyboard.cpp +++ b/sword2/driver/keyboard.cpp @@ -67,8 +67,6 @@ #include "driver96.h" -#define MAX_KEY_BUFFER 23 - uint8 keyBacklog = 0; // The number of key presses waiting to be processed. uint8 keyPointer = 0; // Index of the next key to read from the buffer. char keyBuffer[MAX_KEY_BUFFER]; // The keyboard buffer diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 37afab5a4d..57ab6366c5 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -17,7 +17,6 @@ * $Header$ */ -#include <process.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -111,7 +110,8 @@ void resMan::InitResMan(void) //Tony29May96 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 @@ void resMan::InitResMan(void) //Tony29May96 //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 @@ uint8 *resMan::Res_open( uint32 res ) //BHTony30May96 uint32 table_offset; - int first=0; - #ifdef _DEBUG if (res>=total_res_files) @@ -985,8 +984,6 @@ void resMan::Kill_all_objects(uint8 wantInfo) // James17jan97 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 @@ void resMan::GetCd(int cd) done = TRUE; else { - char sCDName[_MAX_PATH]; - DWORD dwMaxCompLength, dwFSFlags; - index = 0; while((cdDrives[index] != 0) && (!done) && (index<24)) { diff --git a/sword2/router.cpp b/sword2/router.cpp index cf81c45670..2fb498c79d 100644 --- a/sword2/router.cpp +++ b/sword2/router.cpp @@ -289,8 +289,8 @@ int32 frame; //-------------------------------------------------------------------------------------- uint8 CheckForCollision(void) { - static uint32 player_pc; - static uint32 non_player_pc; +// static uint32 player_pc; +// static uint32 non_player_pc; uint8 collision=0; diff --git a/sword2/speech.cpp b/sword2/speech.cpp index b7101c2c0b..69de909ed5 100644 --- a/sword2/speech.cpp +++ b/sword2/speech.cpp @@ -18,8 +18,7 @@ */ //------------------------------------------------------------------------------------ -#include <io.h> // for access() -#include <stdio.h> +#include "stdafx.h" //#include "src\driver96.h" #include "anims.h" diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp index c12d7bb09f..0dd41af420 100644 --- a/sword2/sword2.cpp +++ b/sword2/sword2.cpp @@ -47,8 +47,6 @@ #define MAX_PATH 260 -void Start_game(void); - int RunningFromCd(); uint8 quitGame = 0; @@ -80,9 +78,6 @@ uint8 graphics_level_fudged=0; // James10july97 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 @@ void BS2State::go() uint32 rv; uint8 breakOut = 0; char c; - int j=100; - uint32 pc=0; // Zdebug("[%s]", lpCmdLine); @@ -457,10 +450,10 @@ void BS2State::go() //------------------------------------------------------------------------------------ int RunningFromCd() { +/* char sCDName[MAX_PATH]; char sRoot[MAX_PATH]; DWORD dwMaxCompLength, dwFSFlags; -/* GetModuleFileName(NULL , sRoot, _MAX_PATH); *(strchr(sRoot,'\\')+1) = '\0'; diff --git a/sword2/tony_gsdk.cpp b/sword2/tony_gsdk.cpp index ea39086166..6c6bb661c5 100644 --- a/sword2/tony_gsdk.cpp +++ b/sword2/tony_gsdk.cpp @@ -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 @@ uint32 Read_file(char *name, mem **membloc, uint32 uid) //Tony25Apr96 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 @@ uint32 Read_file(char *name, mem **membloc, uint32 uid) //Tony25Apr96 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 @@ int32 Direct_read_file(char *name, char *ad) //Tony1May96 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 @@ int32 Direct_read_file(char *name, char *ad) //Tony1May96 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; diff --git a/sword2/tony_gsdk.h b/sword2/tony_gsdk.h index b5b9cf3f65..b6079b4804 100644 --- a/sword2/tony_gsdk.h +++ b/sword2/tony_gsdk.h @@ -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 diff --git a/sword2/walker.cpp b/sword2/walker.cpp index 9ae5c5e0fe..62b0624f93 100644 --- a/sword2/walker.cpp +++ b/sword2/walker.cpp @@ -112,7 +112,6 @@ int32 FN_walk(int32 *params) // James (14nov96) int8 route; int32 walk_pc; _walkData *walkAnim; - uint8 colliding=0; // set to 1 when collision avoided //---------------------------------------------------------------------------------------- // get the parameters |