Bunch of fixes to get MP3 exports working on a basic level; lots of fixes still needed
This commit is contained in:
parent
68840e69f9
commit
5485d42b56
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GameInfo ArchiveVer="0" FileVer="0" Game="DKCR">
|
||||
<GameBuilds>
|
||||
<Build>
|
||||
<Version>74844</Version>
|
||||
<Region>NTSC</Region>
|
||||
<Name>Wii NTSC 0A-0</Name>
|
||||
</Build>
|
||||
<Build>
|
||||
<Version>74887</Version>
|
||||
<Region>PAL</Region>
|
||||
|
|
|
@ -63,7 +63,7 @@ TString CAssetID::ToString() const
|
|||
if (mLength == e32Bit)
|
||||
return TString::HexString(ToLong(), 8, false, true);
|
||||
else
|
||||
return TString::FromInt64(ToLongLong(), 8, 16).ToUpper();
|
||||
return TString::FromInt64(ToLongLong(), 16, 16).ToUpper();
|
||||
}
|
||||
|
||||
bool CAssetID::IsValid() const
|
||||
|
|
|
@ -227,7 +227,8 @@ HEADERS += \
|
|||
GameProject/AssetNameGeneration.h \
|
||||
GameProject/CGameInfo.h \
|
||||
Resource/CResTypeInfo.h \
|
||||
Resource/Cooker/CResourceCooker.h
|
||||
Resource/Cooker/CResourceCooker.h \
|
||||
Resource/CAudioMacro.h
|
||||
|
||||
# Source Files
|
||||
SOURCES += \
|
||||
|
|
|
@ -41,6 +41,7 @@ void ApplyGeneratedName(CResourceEntry *pEntry, const TWideString& rkDir, const
|
|||
|
||||
TWideString MakeWorldName(EGame Game, TWideString RawName)
|
||||
{
|
||||
// The raw world names are basically formatted differently in every single game...
|
||||
// MP1 demo - Remove ! from the beginning
|
||||
if (Game == ePrimeDemo)
|
||||
{
|
||||
|
@ -75,18 +76,8 @@ TWideString MakeWorldName(EGame Game, TWideString RawName)
|
|||
RawName = RawName.SubString(UnderscoreA + 1, UnderscoreB - UnderscoreA - 1);
|
||||
}
|
||||
|
||||
// MP3 proto - Remove ! from the beginning and all text after last underscore
|
||||
else if (Game == eCorruptionProto)
|
||||
{
|
||||
if (RawName.StartsWith(L'!'))
|
||||
RawName = RawName.ChopFront(1);
|
||||
|
||||
u32 LastUnderscore = RawName.LastIndexOf(L"_");
|
||||
RawName = RawName.ChopBack(RawName.Size() - LastUnderscore);
|
||||
}
|
||||
|
||||
// MP2/3 - Remove text before first underscore and after last underscore, strip remaining underscores (except multiplayer maps, which have one underscore)
|
||||
else if (Game == eEchoes || Game == eCorruption)
|
||||
// MP2 - Remove text before first underscore and after last underscore, strip remaining underscores (except multiplayer maps, which have one underscore)
|
||||
else if (Game == eEchoes)
|
||||
{
|
||||
u32 FirstUnderscore = RawName.IndexOf(L'_');
|
||||
u32 LastUnderscore = RawName.LastIndexOf(L"_");
|
||||
|
@ -99,6 +90,23 @@ TWideString MakeWorldName(EGame Game, TWideString RawName)
|
|||
}
|
||||
}
|
||||
|
||||
// MP3 proto - Remove ! from the beginning and all text after last underscore
|
||||
else if (Game == eCorruptionProto)
|
||||
{
|
||||
if (RawName.StartsWith(L'!'))
|
||||
RawName = RawName.ChopFront(1);
|
||||
|
||||
u32 LastUnderscore = RawName.LastIndexOf(L"_");
|
||||
RawName = RawName.ChopBack(RawName.Size() - LastUnderscore);
|
||||
}
|
||||
|
||||
// MP3 - Remove text after last underscore
|
||||
else if (Game == eCorruption)
|
||||
{
|
||||
u32 LastUnderscore = RawName.LastIndexOf(L"_");
|
||||
RawName = RawName.ChopBack(RawName.Size() - LastUnderscore);
|
||||
}
|
||||
|
||||
// DKCR - Remove text after second-to-last underscore
|
||||
else if (Game == eReturns)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ CResourceEntry::CResourceEntry(CResourceStore *pStore, const CAssetID& rkID,
|
|||
|
||||
mpDirectory = mpStore->GetVirtualDirectory(rkDir, Transient, true);
|
||||
if (mpDirectory) mpDirectory->AddChild(L"", this);
|
||||
mGame = ((Transient || !mpStore) ? eUnknownGame : mpStore->Game());
|
||||
}
|
||||
|
||||
CResourceEntry::~CResourceEntry()
|
||||
|
@ -74,6 +73,7 @@ void CResourceEntry::UpdateDependencies()
|
|||
if (!mpResource)
|
||||
{
|
||||
Log::Error("Unable to update cached dependencies; failed to load resource");
|
||||
mpDependencies = new CDependencyTree(ID());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ TString CResourceEntry::CookedAssetPath(bool Relative) const
|
|||
|
||||
CFourCC CResourceEntry::CookedExtension() const
|
||||
{
|
||||
return mpTypeInfo->CookedExtension(mGame);
|
||||
return mpTypeInfo->CookedExtension(Game());
|
||||
}
|
||||
|
||||
bool CResourceEntry::IsInDirectory(CVirtualDirectory *pDir) const
|
||||
|
@ -157,17 +157,6 @@ bool CResourceEntry::NeedsRecook() const
|
|||
return (FileUtil::LastModifiedTime(CookedAssetPath()) < FileUtil::LastModifiedTime(RawAssetPath()));
|
||||
}
|
||||
|
||||
void CResourceEntry::SetGame(EGame NewGame)
|
||||
{
|
||||
if (mGame != NewGame)
|
||||
{
|
||||
// todo: implement checks here. This needs work because we should trigger a recook and if the extension changes
|
||||
// we should delete the old file. Also a lot of resources can't evaluate this correctly due to file version
|
||||
// numbers being shared between games.
|
||||
mGame = NewGame;
|
||||
}
|
||||
}
|
||||
|
||||
bool CResourceEntry::Save(bool SkipCacheSave /*= false*/)
|
||||
{
|
||||
// SkipCacheSave argument tells us not to save the resource cache file. This is generally not advised because we don't
|
||||
|
@ -196,7 +185,7 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/)
|
|||
TString SerialName = mpTypeInfo->TypeName();
|
||||
SerialName.RemoveWhitespace();
|
||||
|
||||
CXMLWriter Writer(Path, SerialName, 0, mGame);
|
||||
CXMLWriter Writer(Path, SerialName, 0, Game());
|
||||
mpResource->Serialize(Writer);
|
||||
|
||||
if (!Writer.Save())
|
||||
|
@ -501,5 +490,10 @@ void CResourceEntry::RemoveFromProject()
|
|||
|
||||
CGameProject* CResourceEntry::Project() const
|
||||
{
|
||||
return mpStore->Project();
|
||||
return mpStore ? mpStore->Project() : nullptr;
|
||||
}
|
||||
|
||||
EGame CResourceEntry::Game() const
|
||||
{
|
||||
return mpStore ? mpStore->Game() : eUnknownGame;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ class CResourceEntry
|
|||
CResourceStore *mpStore;
|
||||
CDependencyTree *mpDependencies;
|
||||
CAssetID mID;
|
||||
EGame mGame;
|
||||
CVirtualDirectory *mpDirectory;
|
||||
TWideString mName;
|
||||
FResEntryFlags mFlags;
|
||||
|
@ -59,7 +58,6 @@ public:
|
|||
bool IsInDirectory(CVirtualDirectory *pDir) const;
|
||||
u64 Size() const;
|
||||
bool NeedsRecook() const;
|
||||
void SetGame(EGame NewGame);
|
||||
bool Save(bool SkipCacheSave = false);
|
||||
bool Cook();
|
||||
CResource* Load();
|
||||
|
@ -70,6 +68,7 @@ public:
|
|||
void AddToProject(const TWideString& rkDir, const TWideString& rkName);
|
||||
void RemoveFromProject();
|
||||
CGameProject* Project() const;
|
||||
EGame Game() const;
|
||||
|
||||
// Accessors
|
||||
void SetDirty() { mFlags.SetFlag(eREF_NeedsRecook); }
|
||||
|
@ -83,7 +82,6 @@ public:
|
|||
inline CResourceStore* ResourceStore() const { return mpStore; }
|
||||
inline CDependencyTree* Dependencies() const { return mpDependencies; }
|
||||
inline CAssetID ID() const { return mID; }
|
||||
inline EGame Game() const { return mGame; }
|
||||
inline CVirtualDirectory* Directory() const { return mpDirectory; }
|
||||
inline TWideString DirectoryPath() const { return mpDirectory->FullPath(); }
|
||||
inline TWideString Name() const { return mName; }
|
||||
|
|
|
@ -52,7 +52,6 @@ public:
|
|||
inline CAssetID ID() const { return mpEntry ? mpEntry->ID() : CAssetID::skInvalidID64; }
|
||||
inline EGame Game() const { return mpEntry ? mpEntry->Game() : eUnknownGame; }
|
||||
inline bool IsReferenced() const { return mRefCount > 0; }
|
||||
inline void SetGame(EGame Game) { if (mpEntry) mpEntry->SetGame(Game); }
|
||||
inline void Lock() { mRefCount++; }
|
||||
inline void Release() { mRefCount--; }
|
||||
};
|
||||
|
|
|
@ -76,6 +76,12 @@ public:
|
|||
// Font
|
||||
if (TagName == L"font")
|
||||
{
|
||||
if (Game() >= eCorruptionProto)
|
||||
{
|
||||
ASSERT(ParamString.StartsWith(L"0x"));
|
||||
ParamString = ParamString.ChopFront(2);
|
||||
}
|
||||
|
||||
ASSERT(ParamString.Size() == IDLength * 2);
|
||||
pTree->AddDependency( CAssetID::FromString(ParamString) );
|
||||
}
|
||||
|
@ -115,6 +121,13 @@ public:
|
|||
if (iParam >= TexturesStart)
|
||||
{
|
||||
TWideString Param = *Iter;
|
||||
|
||||
if (Game() >= eCorruptionProto)
|
||||
{
|
||||
ASSERT(Param.StartsWith(L"0x"));
|
||||
Param = Param.ChopFront(2);
|
||||
}
|
||||
|
||||
ASSERT(Param.Size() == IDLength * 2);
|
||||
pTree->AddDependency( CAssetID::FromString(Param) );
|
||||
}
|
||||
|
|
|
@ -301,7 +301,6 @@ CAnimSet* CAnimSetLoader::LoadANCS(IInputStream& rANCS, CResourceEntry *pEntry)
|
|||
if (iNode == 0 && Loader.mVersion == eUnknownGame)
|
||||
{
|
||||
Loader.mVersion = (Unknown1 == 0xA) ? eEchoes : ePrime; // Best version indicator we know of unfortunately
|
||||
Loader.pSet->SetGame(Loader.mVersion);
|
||||
}
|
||||
pChar->Name = rANCS.ReadString();
|
||||
pChar->pModel = gpResourceStore->LoadResource(rANCS.ReadLong(), "CMDL");
|
||||
|
@ -419,7 +418,6 @@ CAnimSet* CAnimSetLoader::LoadCHAR(IInputStream& rCHAR, CResourceEntry *pEntry)
|
|||
{
|
||||
Loader.mVersion = eCorruption;
|
||||
Loader.pSet = new CAnimSet(pEntry);
|
||||
Loader.pSet->SetGame(eCorruption);
|
||||
return Loader.LoadCorruptionCHAR(rCHAR);
|
||||
}
|
||||
|
||||
|
@ -427,7 +425,6 @@ CAnimSet* CAnimSetLoader::LoadCHAR(IInputStream& rCHAR, CResourceEntry *pEntry)
|
|||
{
|
||||
Loader.mVersion = eReturns;
|
||||
Loader.pSet = new CAnimSet(pEntry);
|
||||
Loader.pSet->SetGame(eReturns);
|
||||
return Loader.LoadReturnsCHAR(rCHAR);
|
||||
}
|
||||
|
||||
|
|
|
@ -76,10 +76,7 @@ void CAnimationLoader::ReadUncompressedANIM()
|
|||
}
|
||||
|
||||
if (mGame == eUnknownGame)
|
||||
{
|
||||
mGame = UncompressedCheckVersion();
|
||||
mpAnim->SetGame(mGame);
|
||||
}
|
||||
|
||||
// Echoes only - rotation channel indices
|
||||
std::vector<u8> RotationIndices;
|
||||
|
@ -212,10 +209,7 @@ void CAnimationLoader::ReadCompressedANIM()
|
|||
mpInput->Seek(0x4, SEEK_CUR); // Skip alloc size
|
||||
|
||||
if (mGame == eUnknownGame)
|
||||
{
|
||||
mGame = (mpInput->PeekShort() == 0x0101 ? eEchoes : ePrime);
|
||||
mpAnim->SetGame(mGame);
|
||||
}
|
||||
|
||||
if (mGame == ePrime)
|
||||
{
|
||||
|
@ -470,6 +464,10 @@ CQuaternion CAnimationLoader::DequantizeRotation(bool Sign, s16 X, s16 Y, s16 Z)
|
|||
// ************ STATIC ************
|
||||
CAnimation* CAnimationLoader::LoadANIM(IInputStream& rANIM, CResourceEntry *pEntry)
|
||||
{
|
||||
// MP3/DKCR unsupported
|
||||
if (pEntry->Game() > eEchoes)
|
||||
return nullptr;
|
||||
|
||||
u32 CompressionType = rANIM.ReadLong();
|
||||
|
||||
if (CompressionType != 0 && CompressionType != 2)
|
||||
|
|
|
@ -686,7 +686,6 @@ CGameArea* CAreaLoader::LoadMREA(IInputStream& MREA, CResourceEntry *pEntry)
|
|||
Loader.mpArea = new CGameArea(pEntry);
|
||||
u32 Version = MREA.ReadLong();
|
||||
Loader.mVersion = GetFormatVersion(Version);
|
||||
Loader.mpArea->SetGame(Loader.mVersion);
|
||||
Loader.mpMREA = &MREA;
|
||||
|
||||
switch (Loader.mVersion)
|
||||
|
|
|
@ -235,7 +235,6 @@ CCollisionMeshGroup* CCollisionLoader::LoadDCLN(IInputStream& rDCLN, CResourceEn
|
|||
|
||||
Loader.mpMesh = new CCollisionMesh;
|
||||
Loader.mpMesh->mOctreeLoaded = false;
|
||||
Loader.mpGroup->SetGame(Loader.mVersion);
|
||||
|
||||
if (Loader.mVersion == eReturns)
|
||||
Loader.mpMesh->mAABox = CAABox(rDCLN);
|
||||
|
|
|
@ -8,20 +8,24 @@ EGame CDependencyGroupLoader::VersionTest(IInputStream& rDGRP, u32 DepCount)
|
|||
rDGRP.Seek(DepCount * 8, SEEK_CUR);
|
||||
u32 Remaining = rDGRP.Size() - rDGRP.Tell();
|
||||
|
||||
EGame Game = ePrimeDemo;
|
||||
EGame Game = eCorruptionProto;
|
||||
|
||||
if (Remaining < 32)
|
||||
{
|
||||
bool IsEOF = true;
|
||||
|
||||
for (u32 iRem = 0; iRem < Remaining; iRem++)
|
||||
{
|
||||
u8 Byte = rDGRP.ReadByte();
|
||||
|
||||
if (Byte != 0xFF)
|
||||
{
|
||||
Game = eCorruptionProto;
|
||||
IsEOF = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsEOF) Game = ePrimeDemo;
|
||||
}
|
||||
|
||||
rDGRP.Seek(Start, SEEK_SET);
|
||||
|
@ -36,7 +40,6 @@ CDependencyGroup* CDependencyGroupLoader::LoadDGRP(IInputStream& rDGRP, CResourc
|
|||
EGame Game = VersionTest(rDGRP, NumDependencies);
|
||||
|
||||
CDependencyGroup *pGroup = new CDependencyGroup(pEntry);
|
||||
pGroup->SetGame(Game);
|
||||
|
||||
for (u32 iDep = 0; iDep < NumDependencies; iDep++)
|
||||
{
|
||||
|
|
|
@ -100,7 +100,6 @@ CFont* CFontLoader::LoadFONT(IInputStream& rFONT, CResourceEntry *pEntry)
|
|||
|
||||
CFontLoader Loader;
|
||||
Loader.mpFont = new CFont(pEntry);
|
||||
Loader.mpFont->SetGame(Version);
|
||||
Loader.mVersion = Version;
|
||||
return Loader.LoadFont(rFONT);
|
||||
}
|
||||
|
|
|
@ -396,6 +396,8 @@ CMaterial* CMaterialLoader::ReadCorruptionMaterial()
|
|||
case 6: // Model Matrix
|
||||
case 10: // Yet-to-be-named
|
||||
break;
|
||||
case 8: // Unknown/unsupported animation type
|
||||
break;
|
||||
default:
|
||||
Log::FileError(mpFile->GetSourceString(), mpFile->Tell() - 8, "Unsupported animation mode encountered: " + TString::HexString((u32) pPass->mAnimMode));
|
||||
break;
|
||||
|
|
|
@ -453,7 +453,6 @@ CModel* CModelLoader::LoadCMDL(IInputStream& rCMDL, CResourceEntry *pEntry)
|
|||
}
|
||||
|
||||
CModel *pModel = new CModel(pEntry);
|
||||
pModel->SetGame(Loader.mVersion);
|
||||
Loader.mpModel = pModel;
|
||||
Loader.mpSectionMgr = new CSectionMgrIn(BlockCount, &rCMDL);
|
||||
rCMDL.SeekToBoundary(32);
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
case eArea: return new CGameArea(pEntry);
|
||||
case eAudioGroup: return new CAudioGroup(pEntry);
|
||||
case eAudioLookupTable: return new CAudioLookupTable(pEntry);
|
||||
case eCharacter: return new CAnimSet(pEntry);
|
||||
case eDynamicCollision: return new CCollisionMeshGroup(pEntry);
|
||||
case eDependencyGroup: return new CDependencyGroup(pEntry);
|
||||
case eFont: return new CFont(pEntry);
|
||||
|
@ -66,11 +67,12 @@ public:
|
|||
{
|
||||
case eAnimation: pRes = CAnimationLoader::LoadANIM(rInput, pEntry); break;
|
||||
case eAnimEventData: pRes = CAnimEventLoader::LoadEVNT(rInput, pEntry); break;
|
||||
case eAnimSet: pRes = CAnimSetLoader::LoadANCSOrCHAR(rInput, pEntry); break;
|
||||
case eAnimSet: pRes = CAnimSetLoader::LoadANCS(rInput, pEntry); break;
|
||||
case eArea: pRes = CAreaLoader::LoadMREA(rInput, pEntry); break;
|
||||
case eAudioGroup: pRes = CAudioGroupLoader::LoadAGSC(rInput, pEntry); break;
|
||||
case eAudioLookupTable: pRes = CAudioGroupLoader::LoadATBL(rInput, pEntry); break;
|
||||
case eBinaryData: pRes = CUnsupportedFormatLoader::LoadDUMB(rInput, pEntry); break;
|
||||
case eCharacter: pRes = CAnimSetLoader::LoadCHAR(rInput, pEntry); break;
|
||||
case eDependencyGroup: pRes = CDependencyGroupLoader::LoadDGRP(rInput, pEntry); break;
|
||||
case eDynamicCollision: pRes = CCollisionLoader::LoadDCLN(rInput, pEntry); break;
|
||||
case eFont: pRes = CFontLoader::LoadFONT(rInput, pEntry); break;
|
||||
|
|
|
@ -21,7 +21,6 @@ CScan* CScanLoader::LoadScanMP1(IInputStream& rSCAN)
|
|||
rSCAN.Seek(0x18, SEEK_CUR);
|
||||
}
|
||||
|
||||
mpScan->SetGame(ePrime);
|
||||
return mpScan;
|
||||
}
|
||||
|
||||
|
@ -66,13 +65,11 @@ CScan* CScanLoader::LoadScanMP2(IInputStream& rSCAN)
|
|||
case 0x14:
|
||||
case 0xB:
|
||||
mpScan = new CScan(mpEntry);
|
||||
mpScan->SetGame(eEchoes);
|
||||
LoadParamsMP2(rSCAN, NumProperties);
|
||||
break;
|
||||
case 0x12:
|
||||
case 0x16:
|
||||
mpScan = new CScan(mpEntry);
|
||||
mpScan->SetGame(eCorruption);
|
||||
LoadParamsMP3(rSCAN, NumProperties);
|
||||
break;
|
||||
default:
|
||||
|
@ -80,7 +77,6 @@ CScan* CScanLoader::LoadScanMP2(IInputStream& rSCAN)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
mpScan->SetGame(eEchoes);
|
||||
return mpScan;
|
||||
}
|
||||
|
||||
|
@ -283,7 +279,6 @@ CScan* CScanLoader::LoadSCAN(IInputStream& rSCAN, CResourceEntry *pEntry)
|
|||
CScanLoader Loader;
|
||||
Loader.mVersion = ePrime;
|
||||
Loader.mpScan = new CScan(pEntry);
|
||||
Loader.mpScan->SetGame(ePrime);
|
||||
Loader.mpEntry = pEntry;
|
||||
return Loader.LoadScanMP1(rSCAN);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,6 @@ CSkeleton* CSkeletonLoader::LoadCINF(IInputStream& rCINF, CResourceEntry *pEntry
|
|||
{
|
||||
u32 Check = rCINF.PeekLong();
|
||||
Game = ((Check > 100 || Check == 0) ? eEchoes : ePrime);
|
||||
Loader.mpSkeleton->SetGame(Game);
|
||||
}
|
||||
if (Game == eEchoes)
|
||||
{
|
||||
|
|
|
@ -195,7 +195,6 @@ CStringTable* CStringLoader::LoadSTRG(IInputStream& rSTRG, CResourceEntry *pEntr
|
|||
// Valid; now we create the loader and call the function that reads the rest of the file
|
||||
CStringLoader Loader;
|
||||
Loader.mpStringTable = new CStringTable(pEntry);
|
||||
Loader.mpStringTable->SetGame(Version);
|
||||
Loader.mVersion = Version;
|
||||
|
||||
if (Version == ePrimeDemo) Loader.LoadPrimeDemoSTRG(rSTRG);
|
||||
|
|
|
@ -272,6 +272,11 @@ CDependencyGroup* CUnsupportedFormatLoader::LoadHIER(IInputStream& rHIER, CResou
|
|||
u32 NumNodes = rHIER.ReadLong();
|
||||
CDependencyGroup *pOut = new CDependencyGroup(pEntry);
|
||||
|
||||
// Note: For some reason this file still exists in MP3 and it's identical to MP2, including with 32-bit asset IDs.
|
||||
// Obviously we can't read 32-bit asset IDs in MP3, so this file should just be ignored.
|
||||
if (pEntry->Game() > eEchoes)
|
||||
return pOut;
|
||||
|
||||
for (u32 iNode = 0; iNode < NumNodes; iNode++)
|
||||
{
|
||||
// NOTE: The SCAN ID isn't considered a real dependency!
|
||||
|
|
|
@ -1389,20 +1389,23 @@ CDependencyGroup* CUnsupportedParticleLoader::LoadParticle(IInputStream& rFile,
|
|||
CUnsupportedParticleLoader Loader;
|
||||
Loader.mpGroup = new CDependencyGroup(pEntry);
|
||||
|
||||
if (pEntry->Game() >= eCorruptionProto)
|
||||
return Loader.mpGroup;
|
||||
|
||||
while (true)
|
||||
{
|
||||
bool ShouldContinue = false;
|
||||
|
||||
switch (Magic.ToLong())
|
||||
{
|
||||
case kGPSM: ShouldContinue = Loader.ParseParticleParameter(rFile); break;
|
||||
case kELSM: ShouldContinue = Loader.ParseElectricParameter(rFile); break;
|
||||
case kSRSM: ShouldContinue = Loader.ParseSortedParameter(rFile); break;
|
||||
case kSPSM: ShouldContinue = Loader.ParseSpawnParameter(rFile); break;
|
||||
case kSWSH: ShouldContinue = Loader.ParseSwooshParameter(rFile); break;
|
||||
case kDPSM: ShouldContinue = Loader.ParseDecalParameter(rFile); break;
|
||||
case kWPSM: ShouldContinue = Loader.ParseWeaponParameter(rFile); break;
|
||||
case kCRSM: ShouldContinue = Loader.ParseCollisionResponseParameter(rFile); break;
|
||||
case FOURCC('GPSM'): ShouldContinue = Loader.ParseParticleParameter(rFile); break;
|
||||
case FOURCC('ELSM'): ShouldContinue = Loader.ParseElectricParameter(rFile); break;
|
||||
case FOURCC('SRSM'): ShouldContinue = Loader.ParseSortedParameter(rFile); break;
|
||||
case FOURCC('SPSM'): ShouldContinue = Loader.ParseSpawnParameter(rFile); break;
|
||||
case FOURCC('SWSH'): ShouldContinue = Loader.ParseSwooshParameter(rFile); break;
|
||||
case FOURCC('DPSM'): ShouldContinue = Loader.ParseDecalParameter(rFile); break;
|
||||
case FOURCC('WPSM'): ShouldContinue = Loader.ParseWeaponParameter(rFile); break;
|
||||
case FOURCC('CRSM'): ShouldContinue = Loader.ParseCollisionResponseParameter(rFile); break;
|
||||
|
||||
default:
|
||||
Log::Error("Unrecognized particle system magic: " + Magic.ToString());
|
||||
|
|
|
@ -270,7 +270,6 @@ CWorld* CWorldLoader::LoadMLVL(IInputStream& rMLVL, CResourceEntry *pEntry)
|
|||
// Filestream is valid, magic+version are valid; everything seems good!
|
||||
CWorldLoader Loader;
|
||||
Loader.mpWorld = new CWorld(pEntry);
|
||||
Loader.mpWorld->SetGame(Version);
|
||||
Loader.mVersion = Version;
|
||||
|
||||
if (Version != eReturns)
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
</property>
|
||||
</properties>
|
||||
</struct>
|
||||
<property ID="0x8F1DED1B" type="asset" extensions="UNKN"/>
|
||||
<property ID="0x0B339FAC" type="asset" extensions="UNKN"/>
|
||||
<property ID="0x8F1DED1B" type="asset" extensions="PART"/>
|
||||
<property ID="0x0B339FAC" type="asset" extensions="CAUD"/>
|
||||
<property ID="0xF10EE8E2" type="float">
|
||||
<default>-1.0</default>
|
||||
</property>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<struct ID="0x7E397FED" template="Structs/ActorParameters.xml"/>
|
||||
<struct ID="0x6F3BB625" type="multi">
|
||||
<properties>
|
||||
<property ID="0x55744160" type="asset" extensions="AFSM"/>
|
||||
<property ID="0x55744160" type="asset" extensions="FSM2"/>
|
||||
<struct ID="0xCF90D15E" template="Structs/HealthInfo.xml">
|
||||
<properties>
|
||||
<property ID="0xF0668919">
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<property ID="0x2ED25F50" type="float">
|
||||
<default>5.0</default>
|
||||
</property>
|
||||
<property ID="0xE9C8E2BD" type="asset" extensions="PART"/>
|
||||
<property ID="0xE9C8E2BD" type="asset" extensions="PART,ELSC"/>
|
||||
<property ID="0x7E192395" type="float">
|
||||
<default>1.0</default>
|
||||
</property>
|
||||
|
@ -148,7 +148,7 @@
|
|||
<property ID="0x7C269EBC" type="float">
|
||||
<default>0.5</default>
|
||||
</property>
|
||||
<property ID="0xE9C8E2BD" type="asset" extensions="PART"/>
|
||||
<property ID="0xE9C8E2BD" type="asset" extensions="PART,ELSC"/>
|
||||
<property ID="0x7E192395" type="float">
|
||||
<default>1.0</default>
|
||||
</property>
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<struct ID="0xCF90D15E" template="Structs/HealthInfo.xml"/>
|
||||
<struct ID="0x7B71AE90" template="Structs/DamageVulnerability.xml"/>
|
||||
<property ID="0x71A5A198" type="character"/>
|
||||
<property ID="0x55744160" type="asset" extensions="AFSM"/>
|
||||
<property ID="0x55744160" type="asset" extensions="FSM2"/>
|
||||
<struct ID="0xA30EE999" template="Structs/ActorParameters.xml"/>
|
||||
<property ID="0xD8C6D15C" type="asset" extensions="PART"/>
|
||||
<property ID="0x9A094814" type="asset" extensions="CAUD"/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<struct ID="0x7E397FED" template="Structs/ActorParameters.xml"/>
|
||||
<struct ID="0x6F3BB625" type="multi">
|
||||
<properties>
|
||||
<property ID="0x55744160" type="asset" extensions="AFSM"/>
|
||||
<property ID="0x55744160" type="asset" extensions="FSM2"/>
|
||||
<struct ID="0xCF90D15E" template="Structs/HealthInfo.xml">
|
||||
<properties>
|
||||
<property ID="0xF0668919">
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<struct ID="0xCF90D15E" template="Structs/HealthInfo.xml"/>
|
||||
<struct ID="0x7B71AE90" template="Structs/DamageVulnerability.xml"/>
|
||||
<property ID="0x71A5A198" type="character"/>
|
||||
<property ID="0x55744160" type="asset" extensions="AFSM"/>
|
||||
<property ID="0x55744160" type="asset" extensions="FSM2"/>
|
||||
<struct ID="0xA30EE999" template="Structs/ActorParameters.xml"/>
|
||||
<property ID="0xD8C6D15C" type="asset" extensions="PART"/>
|
||||
<struct ID="0x337F9524" template="Structs/DamageInfo.xml"/>
|
||||
|
|
Loading…
Reference in New Issue