diff options
Diffstat (limited to 'devtools/create_supernova/file.cpp')
-rw-r--r-- | devtools/create_supernova/file.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/devtools/create_supernova/file.cpp b/devtools/create_supernova/file.cpp index 5fb842aff6..d54258d5a4 100644 --- a/devtools/create_supernova/file.cpp +++ b/devtools/create_supernova/file.cpp @@ -21,6 +21,10 @@ void File::write(const void *buffer, int len) { fwrite(buffer, 1, len, f); } +bool File::eof() { + return feof(f) != 0; +} + byte File::readByte() { byte v; read(&v, sizeof(byte)); @@ -39,16 +43,6 @@ uint32 File::readLong() { return FROM_LE_32(v); } -void File::readString(char* string, int bufferLength) { - int i = 0; - while (i < bufferLength - 1 && fread(string + i, 1, 1, f) == 1) { - if (string[i] == '\n' || string[i] == 0) - break; - ++ i; - } - string[i] = 0; -} - void File::writeByte(byte v) { write(&v, sizeof(byte)); } |