From 246e83753a1585ca24e9629940df973be611a91b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Apr 2007 09:03:11 +0000 Subject: Some minor cleanup (but we need to get rid of fopen/fread use here) svn-id: r26647 --- engines/cruise/stack.h | 2 ++ engines/cruise/stringSupport.cpp | 4 ---- engines/cruise/stringSupport.h | 3 ++- engines/cruise/volume.cpp | 15 +-------------- engines/cruise/volume.h | 1 - 5 files changed, 5 insertions(+), 20 deletions(-) (limited to 'engines') diff --git a/engines/cruise/stack.h b/engines/cruise/stack.h index e3973b8e74..1ddcac85da 100644 --- a/engines/cruise/stack.h +++ b/engines/cruise/stack.h @@ -27,6 +27,8 @@ namespace Cruise { +// TODO: Replace this with Common::Stack + #define SIZE_STACK 0x200 enum stackElementTypeEnum { diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp index b618d16f55..1343ba146d 100644 --- a/engines/cruise/stringSupport.cpp +++ b/engines/cruise/stringSupport.cpp @@ -38,8 +38,4 @@ uint8 strcmpuint8(const void *string1, const void *string2) { return strcmp((char *)string1, (char *)string2); } -FILE *fopenuint8(void *name, const void *param) { - return fopen((char *)name, (const char *)param); -} - } // End of namespace Cruise diff --git a/engines/cruise/stringSupport.h b/engines/cruise/stringSupport.h index d685940233..bd4c66fff1 100644 --- a/engines/cruise/stringSupport.h +++ b/engines/cruise/stringSupport.h @@ -27,10 +27,11 @@ namespace Cruise { +// TODO: Get rid of these and this file (either use strcpy directly, or switch to Common::String) + void strcpyuint8(void *dest, const void *source); void strcatuint8(void *dest, const void *source); uint8 strcmpuint8(const void *string1, const void *string2); -FILE *fopenuint8(void *name, const void *param); } // End of namespace Cruise diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp index a31178a0cd..be8c0e926e 100644 --- a/engines/cruise/volume.cpp +++ b/engines/cruise/volume.cpp @@ -175,19 +175,6 @@ void strToUpper(uint8 *fileName) { } while (character); } -int16 fileExist(uint8 *fileName) { - FILE *fHandle; - - fHandle = fopenuint8(fileName, "rb"); - - if (fHandle) { - fclose(fHandle); - return (0); - } - - return (1); -} - void freeDisk(void) { if (currentVolumeFile.isOpen()) { currentVolumeFile.close(); @@ -243,7 +230,7 @@ void askDisk(int16 discNumber) { strcatuint8(string, diskNumberString); strcatuint8(string, " EN "); -// while(fileExist(fileName)) + //while (Common::File::exists((const char*)fileName)) { if (!messageDrawn) { drawMsgString(string); diff --git a/engines/cruise/volume.h b/engines/cruise/volume.h index c5e536fda6..1399bc46ab 100644 --- a/engines/cruise/volume.h +++ b/engines/cruise/volume.h @@ -29,7 +29,6 @@ namespace Cruise { int16 readVolCnf(void); int16 findFileInDisks(uint8 * fileName); -int16 fileExist(uint8 * fileName); void freeDisk(void); int16 findFileInList(uint8 * fileName); -- cgit v1.2.3