diff --git a/source/blood/src/misc.cpp b/source/blood/src/misc.cpp index d494fc415..835f8328b 100644 --- a/source/blood/src/misc.cpp +++ b/source/blood/src/misc.cpp @@ -68,40 +68,6 @@ void *ResReadLine(char *buffer, unsigned int nBytes, void **pRes) return *pRes; } -bool FileRead(FILE *handle, void *buffer, unsigned int size) -{ - return fread(buffer, 1, size, handle) == size; -} - -bool FileWrite(FILE *handle, void *buffer, unsigned int size) -{ - return fwrite(buffer, 1, size, handle) == size; -} - -bool FileLoad(const char *name, void *buffer, unsigned int size) -{ - dassert(buffer != NULL); - - FILE *handle = fopen(name, "rb"); - if (!handle) - return false; - - unsigned int nread = fread(buffer, 1, size, handle); - fclose(handle); - return nread == size; -} - -int FileLength(FILE *handle) -{ - if (!handle) - return 0; - int nPos = ftell(handle); - fseek(handle, 0, SEEK_END); - int nLength = ftell(handle); - fseek(handle, nPos, SEEK_SET); - return nLength; -} - unsigned int randSeed = 1; unsigned int qrand(void) diff --git a/source/blood/src/misc.h b/source/blood/src/misc.h index 3763d4c7d..9d1c4985e 100644 --- a/source/blood/src/misc.h +++ b/source/blood/src/misc.h @@ -25,10 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS void *ResReadLine(char *buffer, unsigned int nBytes, void **pRes); -bool FileRead(FILE *, void *, unsigned int); -bool FileWrite(FILE *, void *, unsigned int); -bool FileLoad(const char *, void *, unsigned int); -int FileLength(FILE *); unsigned int qrand(void); int wrand(void); void wsrand(int);