mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-15 08:06:10 +00:00
Bunch of fixes to get MP3 exports working on a basic level; lots of fixes still needed
This commit is contained in:
@@ -100,12 +100,27 @@ void CGameProject::GetWorldList(std::list<CAssetID>& rOut) const
|
||||
{
|
||||
CPackage *pPkg = mPackages[iPkg];
|
||||
|
||||
// Little workaround to fix some of Retro's paks having worlds listed in the wrong order...
|
||||
// Construct a sorted list of worlds in this package
|
||||
std::list<const SNamedResource*> PackageWorlds;
|
||||
|
||||
for (u32 iRes = 0; iRes < pPkg->NumNamedResources(); iRes++)
|
||||
{
|
||||
const SNamedResource& rkRes = pPkg->NamedResourceByIndex(iRes);
|
||||
|
||||
if (rkRes.Type == "MLVL" && !rkRes.Name.EndsWith("NODEPEND"))
|
||||
rOut.push_back(rkRes.ID);
|
||||
PackageWorlds.push_back(&rkRes);
|
||||
}
|
||||
|
||||
PackageWorlds.sort([](const SNamedResource *pkLeft, const SNamedResource *pkRight) -> bool {
|
||||
return pkLeft->Name.ToUpper() < pkRight->Name.ToUpper();
|
||||
});
|
||||
|
||||
// Add sorted worlds to the output world list
|
||||
for (auto Iter = PackageWorlds.begin(); Iter != PackageWorlds.end(); Iter++)
|
||||
{
|
||||
const SNamedResource *pkRes = *Iter;
|
||||
rOut.push_back(pkRes->ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user