#include "globals.h"
#include "mapdoc.h"
-
static const uint8_t fileHeader[8] = { 0xC7, 0x55, 0xC5, 0x6D, 0xE1, 0x70, 0x83, 0x0D };
//
{
}
-
uint8_t FileReader::byte()
{
return fgetc(ar);
}
-
uint16_t FileReader::word()
{
uint16_t b1 = fgetc(ar);
return (b2 << 8) | b1;
}
-
uint32_t FileReader::dword()
{
uint32_t dword = 0;
return dword;
}
-
void FileReader::str(string & s)
{
StrIdx len;
s.erase();
}
-
bool FileReader::boolean()
{
return bool(byte());
}
-
//
// Skip to the beginning of a record:
//
}
}
-
//
// Find out what type the next record is:
//
return b;
}
-
//
// Skip an unrecognized field:
//
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);
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();
fwrite(s.c_str(), 1, len, fp);
}
-
//
// Current GUEmap file version is 5; can read 2 thru 4 too
//
return true;
}
-
//
// Write a GUEmap v5 file
//
return true;
}
-