]> Shamusworld >> Repos - guemap/blobdiff - src/file.cpp
Fix room adding to work properly, misc. small changes.
[guemap] / src / file.cpp
index 38ac4b5d7e0bbca69e64db2e79cc2acac6fcac09..036ee80d73ec0e957ebb556c6e33990fde29e088 100644 (file)
@@ -20,7 +20,6 @@
 #include "globals.h"
 #include "mapdoc.h"
 
-
 static const uint8_t fileHeader[8] = { 0xC7, 0x55, 0xC5, 0x6D, 0xE1, 0x70, 0x83, 0x0D };
 
 //
@@ -43,13 +42,11 @@ FileReader::FileReader(FILE * archive): ar(archive), rcCache(-1)
 {
 }
 
-
 uint8_t FileReader::byte()
 {
        return fgetc(ar);
 }
 
-
 uint16_t FileReader::word()
 {
        uint16_t b1 = fgetc(ar);
@@ -58,7 +55,6 @@ uint16_t FileReader::word()
        return (b2 << 8) | b1;
 }
 
-
 uint32_t FileReader::dword()
 {
        uint32_t dword = 0;
@@ -69,7 +65,6 @@ uint32_t FileReader::dword()
        return dword;
 }
 
-
 void FileReader::str(string & s)
 {
        StrIdx len;
@@ -101,13 +96,11 @@ void FileReader::str(string & s)
                s.erase();
 }
 
-
 bool FileReader::boolean()
 {
        return bool(byte());
 }
 
-
 //
 // Skip to the beginning of a record:
 //
@@ -163,7 +156,6 @@ void FileReader::findRecord(uint8_t type)
        }
 }
 
-
 //
 // Find out what type the next record is:
 //
@@ -216,7 +208,6 @@ uint8_t FileReader::peekNextRecord()
        return b;
 }
 
-
 //
 // Skip an unrecognized field:
 //
@@ -269,20 +260,17 @@ void FileReader::skipField(uint8_t fieldCode)
                fgetc(ar);
 }
 
-
 void WriteByte(FILE * fp, uint8_t b)
 {
        fputc(b, fp);
 }
 
-
 void WriteWord(FILE * fp, uint16_t w)
 {
        fputc(w & 0xFF, fp);
        fputc(w >> 8, fp);
 }
 
-
 void WriteDWord(FILE * fp, uint32_t dw)
 {
        fputc((dw >> 0) & 0xFF, fp);
@@ -291,13 +279,11 @@ void WriteDWord(FILE * fp, uint32_t dw)
        fputc((dw >> 24) & 0xFF, fp);
 }
 
-
 void WriteBool(FILE * fp, bool b)
 {
        fputc((b ? 1 : 0), fp);
 }
 
-
 void WriteString(FILE * fp, std::string s)
 {
        const int len = s.length();
@@ -321,7 +307,6 @@ void WriteString(FILE * fp, std::string s)
                fwrite(s.c_str(), 1, len, fp);
 }
 
-
 //
 // Current GUEmap file version is 5; can read 2 thru 4 too
 //
@@ -521,7 +506,6 @@ printf("ReadFile: Version # is %i\n", version);
        return true;
 }
 
-
 //
 // Write a GUEmap v5 file
 //
@@ -662,4 +646,3 @@ bool WriteFile(MapDoc * doc, const char * name)
 
        return true;
 }
-