diff options
author | Max Horn | 2007-04-28 09:03:11 +0000 |
---|---|---|
committer | Max Horn | 2007-04-28 09:03:11 +0000 |
commit | 246e83753a1585ca24e9629940df973be611a91b (patch) | |
tree | 25ac63ee4f58f71aeee656f81175b3e1f2b6a1e0 /engines | |
parent | ded4907836c2abdab4fa0f4ff1c983722a7ebbae (diff) | |
download | scummvm-rg350-246e83753a1585ca24e9629940df973be611a91b.tar.gz scummvm-rg350-246e83753a1585ca24e9629940df973be611a91b.tar.bz2 scummvm-rg350-246e83753a1585ca24e9629940df973be611a91b.zip |
Some minor cleanup (but we need to get rid of fopen/fread use here)
svn-id: r26647
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cruise/stack.h | 2 | ||||
-rw-r--r-- | engines/cruise/stringSupport.cpp | 4 | ||||
-rw-r--r-- | engines/cruise/stringSupport.h | 3 | ||||
-rw-r--r-- | engines/cruise/volume.cpp | 15 | ||||
-rw-r--r-- | engines/cruise/volume.h | 1 |
5 files changed, 5 insertions, 20 deletions
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); |