Removed audio groups array from CWorld
This commit is contained in:
parent
2e44e5b119
commit
ed446ccbec
|
@ -33,12 +33,6 @@ CDependencyTree* CWorld::BuildDependencyTree() const
|
||||||
pTree->AddDependency(mpDefaultSkybox);
|
pTree->AddDependency(mpDefaultSkybox);
|
||||||
pTree->AddDependency(mpMapWorld);
|
pTree->AddDependency(mpMapWorld);
|
||||||
|
|
||||||
if (Game() <= ePrime)
|
|
||||||
{
|
|
||||||
for (u32 iGrp = 0; iGrp < mAudioGrps.size(); iGrp++)
|
|
||||||
pTree->AddDependency(mAudioGrps[iGrp].ResID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pTree;
|
return pTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,9 +73,6 @@ void CWorld::Serialize(IArchive& rArc)
|
||||||
rArc << SERIAL_CONTAINER("MemoryRelays", mMemoryRelays, "MemoryRelay");
|
rArc << SERIAL_CONTAINER("MemoryRelays", mMemoryRelays, "MemoryRelay");
|
||||||
|
|
||||||
rArc << SERIAL_CONTAINER("Areas", mAreas, "Area");
|
rArc << SERIAL_CONTAINER("Areas", mAreas, "Area");
|
||||||
|
|
||||||
if (rArc.Game() <= ePrime)
|
|
||||||
rArc << SERIAL_CONTAINER("AudioGroups", mAudioGrps, "AudioGroup");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Serialize(IArchive& rArc, CWorld::SMemoryRelay& rMemRelay)
|
void Serialize(IArchive& rArc, CWorld::SMemoryRelay& rMemRelay)
|
||||||
|
|
|
@ -161,30 +161,6 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||||
// Audio Groups
|
// Audio Groups
|
||||||
if (Game <= ePrime)
|
if (Game <= ePrime)
|
||||||
{
|
{
|
||||||
// Debug: make sure our generated list matches the original, no missing or extra audio groups
|
|
||||||
std::set<CAssetID> OriginalGroups;
|
|
||||||
|
|
||||||
for (u32 iGrp = 0; iGrp < pWorld->mAudioGrps.size(); iGrp++)
|
|
||||||
{
|
|
||||||
CWorld::SAudioGrp& rAudioGroup = pWorld->mAudioGrps[iGrp];
|
|
||||||
OriginalGroups.insert(rAudioGroup.ResID);
|
|
||||||
|
|
||||||
if (AudioGroups.find(rAudioGroup.ResID) == AudioGroups.end())
|
|
||||||
{
|
|
||||||
CResourceEntry *pEntry = gpResourceStore->FindEntry(rAudioGroup.ResID);
|
|
||||||
Log::Error("Missing audio group: " + pEntry->Name().ToUTF8());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto It = AudioGroups.begin(); It != AudioGroups.end(); It++)
|
|
||||||
{
|
|
||||||
if (OriginalGroups.find(*It) == OriginalGroups.end())
|
|
||||||
{
|
|
||||||
CResourceEntry *pEntry = gpResourceStore->FindEntry(*It);
|
|
||||||
Log::Error("Extra audio group: " + pEntry->Name().ToUTF8());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create sorted list of audio groups (sort by group ID)
|
// Create sorted list of audio groups (sort by group ID)
|
||||||
std::vector<CAudioGroup*> SortedAudioGroups;
|
std::vector<CAudioGroup*> SortedAudioGroups;
|
||||||
|
|
||||||
|
@ -209,17 +185,6 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||||
pGroup->ID().Write(rMLVL);
|
pGroup->ID().Write(rMLVL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
rMLVL.WriteLong(pWorld->mAudioGrps.size());
|
|
||||||
|
|
||||||
for (u32 iGrp = 0; iGrp < pWorld->mAudioGrps.size(); iGrp++)
|
|
||||||
{
|
|
||||||
CWorld::SAudioGrp& rAudioGroup = pWorld->mAudioGrps[iGrp];
|
|
||||||
rMLVL.WriteLong(rAudioGroup.GroupID);
|
|
||||||
rAudioGroup.ResID.Write(rMLVL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rMLVL.WriteByte(0);
|
rMLVL.WriteByte(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,20 +136,11 @@ void CWorldLoader::LoadPrimeMLVL(IInputStream& rMLVL)
|
||||||
mpWorld->mpMapWorld = gpResourceStore->LoadResource( CAssetID(rMLVL, mVersion), "MAPW" );
|
mpWorld->mpMapWorld = gpResourceStore->LoadResource( CAssetID(rMLVL, mVersion), "MAPW" );
|
||||||
rMLVL.Seek(0x5, SEEK_CUR); // Unknown values which are always 0
|
rMLVL.Seek(0x5, SEEK_CUR); // Unknown values which are always 0
|
||||||
|
|
||||||
// AudioGrps
|
// Audio Groups - we don't need this info as we regenerate it on cook
|
||||||
if (mVersion == ePrime)
|
if (mVersion == ePrime)
|
||||||
{
|
{
|
||||||
u32 NumAudioGrps = rMLVL.ReadLong();
|
u32 NumAudioGrps = rMLVL.ReadLong();
|
||||||
mpWorld->mAudioGrps.reserve(NumAudioGrps);
|
rMLVL.Seek(0x8 * NumAudioGrps, SEEK_CUR);
|
||||||
|
|
||||||
for (u32 iGrp = 0; iGrp < NumAudioGrps; iGrp++)
|
|
||||||
{
|
|
||||||
CWorld::SAudioGrp AudioGrp;
|
|
||||||
AudioGrp.GroupID = rMLVL.ReadLong();
|
|
||||||
AudioGrp.ResID = rMLVL.ReadLong() & 0xFFFFFFFF;
|
|
||||||
mpWorld->mAudioGrps.push_back(AudioGrp);
|
|
||||||
}
|
|
||||||
|
|
||||||
rMLVL.Seek(0x1, SEEK_CUR); // Unknown values which are always 0
|
rMLVL.Seek(0x1, SEEK_CUR); // Unknown values which are always 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue