mirror of
https://github.com/AxioDL/LibCommon.git
synced 2026-03-30 11:47:23 -07:00
ba45c04716
These are general assignments.
27 lines
608 B
C++
27 lines
608 B
C++
#include "CSerialVersion.h"
|
|
|
|
#include "Common/CFourCC.h"
|
|
#include "Common/FileIO/IInputStream.h"
|
|
#include "Common/FileIO/IOutputStream.h"
|
|
|
|
CSerialVersion::CSerialVersion(IInputStream& rInput)
|
|
{
|
|
Read(rInput);
|
|
}
|
|
|
|
void CSerialVersion::Read(IInputStream& rInput)
|
|
{
|
|
mArchiveVersion = rInput.ReadU16();
|
|
mFileVersion = rInput.ReadU16();
|
|
CFourCC GameID(rInput);
|
|
mGame = GameFrom4CC(GameID);
|
|
}
|
|
|
|
void CSerialVersion::Write(IOutputStream& rOutput) const
|
|
{
|
|
rOutput.WriteU16(mArchiveVersion);
|
|
rOutput.WriteU16(mFileVersion);
|
|
CFourCC GameID = GameTo4CC(mGame);
|
|
GameID.Write(rOutput);
|
|
}
|