mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-15 14:05:06 -05:00
26 lines
498 B
C++
26 lines
498 B
C++
|
#include "BlobFactory.h"
|
||
|
|
||
|
namespace Ship
|
||
|
{
|
||
|
Blob* BlobFactory::ReadBlob(BinaryReader* reader)
|
||
|
{
|
||
|
Blob* blob = new Blob();
|
||
|
|
||
|
Version version = (Version)reader->ReadUInt32();
|
||
|
|
||
|
switch (version)
|
||
|
{
|
||
|
case Version::Deckard:
|
||
|
{
|
||
|
BlobV0 blobFac = BlobV0();
|
||
|
blobFac.ParseFileBinary(reader, blob);
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
// VERSION NOT SUPPORTED
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return blob;
|
||
|
}
|
||
|
}
|