Added versioning support to the serializer; began restructuring CWorld and getting world cooking/serialization working for other games; gave CAssetID an alternate input stream constructor that takes an EGame instead of an EIDLength

This commit is contained in:
parax0
2016-08-14 04:56:51 -06:00
parent ba438383b4
commit 8f2b39469a
41 changed files with 304 additions and 200 deletions

View File

@@ -244,7 +244,7 @@ bool CResourceEntry::Save()
TString Dir = Path.GetFileDirectory();
FileUtil::CreateDirectory(Dir.ToUTF16());
CXMLWriter Writer(GetResourceSerialName(ResourceType()), Path);
CXMLWriter Writer(Path, GetResourceSerialName(ResourceType()), 0, mGame);
mpResource->Serialize(Writer);
}

View File

@@ -234,6 +234,8 @@ public:
// For PlayerActor animsets we want to include only the empty suit (char 5) in the dependency list. This is to
// accomodate the dynamic loading the game does for PlayerActors to avoid having assets for suits the player
// doesn't have in memory. We want common assets (animations, etc) in the list but not per-character assets.
// The reason to include empty suit is to make sure resources that are stored as per-character data but are
// actually common to every character, such as particle effects, are still included in the list.
ASSERT(pEntry->ResourceType() == eAnimSet);
CAnimSetDependencyTree *pTree = static_cast<CAnimSetDependencyTree*>(pEntry->Dependencies());
mLayerUsedAssets.insert(pTree->ID());