FRME and AGSC cooking fixes

This commit is contained in:
Jack Andersen 2017-01-20 16:38:34 -10:00
parent 04452ad919
commit 00247ca53e
3 changed files with 32 additions and 2 deletions

View File

@ -13,6 +13,7 @@
#include "DNAMP1/ANCS.hpp"
#include "DNAMP1/AGSC.hpp"
#include "DNAMP1/CSNG.hpp"
#include "DNACommon/ATBL.hpp"
#include "DNACommon/FONT.hpp"
#include "DNACommon/PART.hpp"
#include "DNACommon/SWHC.hpp"
@ -384,6 +385,20 @@ struct SpecMP1 : SpecBase
return {SBIG('CSKR'), path.hash().val32()};
else if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _S(".ANIM")))
return {SBIG('ANIM'), path.hash().val32()};
else if (const hecl::SystemChar* ext = path.getLastComponentExt())
{
if (ext[0] == _S('*') || !hecl::StrCmp(ext, _S("proj")))
{
if (path.getWithExtension(_S(".proj"), true).isFile() &&
path.getWithExtension(_S(".pool"), true).isFile() &&
path.getWithExtension(_S(".sdir"), true).isFile() &&
path.getWithExtension(_S(".samp"), true).isFile())
{
hecl::ProjectPath glob = path.getWithExtension(_S(".*"), true);
return {SBIG('AGSC'), glob.hash().val32()};
}
}
}
hecl::ProjectPath asBlend;
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
@ -515,6 +530,11 @@ struct SpecMP1 : SpecBase
resTag.type = SBIG('HINT');
return true;
}
else if (!strcmp(className, "ATBL"))
{
resTag.type = SBIG('ATBL');
return true;
}
return false;
}))
@ -713,6 +733,10 @@ struct SpecMP1 : SpecBase
{
DNAMP1::HINT::Cook(in, out);
}
else if (!classStr.compare("ATBL"))
{
DNAAudio::ATBL::Cook(in, out);
}
}
progress(_S("Done"));
}

View File

@ -239,6 +239,12 @@ bool ProjectResourceFactoryBase::AddFileToIndex(const hecl::ProjectPath& path,
DumpCacheAdd(pathTag, subPath);
#endif
}
else if (pathTag.type == SBIG('AGSC'))
{
/* Transform tag to glob */
pathTag = {SBIG('AGSC'), asGlob.hash().val32()};
useGlob = true;
}
/* Cache in-memory */
const hecl::ProjectPath& usePath = useGlob ? asGlob : path;
@ -357,7 +363,7 @@ void ProjectResourceFactoryBase::BackgroundIndexProc()
std::string chLower = child.first;
std::transform(chLower.cbegin(), chLower.cend(), chLower.begin(), tolower);
m_catalogNameToTag[chLower] = search->first;
WriteNameTag(nameWriter, search->first, chLower);
WriteNameTag(nameWriter, search->first, child.first);
}
}
}

2
hecl

@ -1 +1 @@
Subproject commit 92be7073997f5a4ea4a040b893a11eed3dca5b70
Subproject commit 2f606a03a98bd5c2d06410bcfb597fbedede4a81