mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Implemented binary serializer classes
This commit is contained in:
@@ -33,13 +33,10 @@ public:
|
||||
|
||||
inline void Serialize(IArchive& rArc)
|
||||
{
|
||||
bool IsReader = rArc.IsReader();
|
||||
EGame ActiveGame = gpResourceStore->ActiveProject()->Game();
|
||||
|
||||
CAssetID ID = (mpRes && !IsReader ? mpRes->ID() : (ActiveGame <= eEchoes ? CAssetID::skInvalidID32 : CAssetID::skInvalidID64));
|
||||
CAssetID ID = (mpRes && !rArc.IsReader() ? mpRes->ID() : CAssetID::InvalidID(rArc.Game()));
|
||||
rArc.SerializePrimitive(ID);
|
||||
|
||||
if (IsReader)
|
||||
if (rArc.IsReader())
|
||||
{
|
||||
CResourceEntry *pEntry = gpResourceStore->FindEntry(ID);
|
||||
*this = (pEntry ? pEntry->Load() : nullptr);
|
||||
|
||||
Reference in New Issue
Block a user