2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

setGlobalProject now called in cook transactions

This commit is contained in:
Jack Andersen
2016-07-06 18:23:36 -10:00
parent 1079c23417
commit 6ac518d99e
6 changed files with 11 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ public:
id = TranslatePakIdToPath(id);
}
static void setGlobalProject(hecl::Database::Project& project)
static void setThreadProject(hecl::Database::Project& project)
{
s_Project.reset(&project);
}

View File

@@ -37,7 +37,7 @@ SpecBase::SpecBase(const hecl::Database::DataSpecEntry* specEntry, hecl::Databas
: hecl::Database::IDataSpec(specEntry), m_project(project), m_pc(pc),
m_masterShader(project.getProjectWorkingPath(), ".hecl/RetroMasterShader.blend")
{
DataSpec::UniqueIDBridge::setGlobalProject(m_project);
DataSpec::UniqueIDBridge::setThreadProject(m_project);
}
static const hecl::SystemString regNONE = _S("");
@@ -45,6 +45,11 @@ static const hecl::SystemString regE = _S("NTSC");
static const hecl::SystemString regJ = _S("NTSC-J");
static const hecl::SystemString regP = _S("PAL");
void SpecBase::setThreadProject()
{
UniqueIDBridge::setThreadProject(m_project);
}
bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps)
{
m_disc = nod::OpenDiscFromImage(info.srcpath.c_str(), m_isWii);

View File

@@ -13,6 +13,7 @@ namespace DataSpec
struct SpecBase : hecl::Database::IDataSpec
{
/* HECL Adaptors */
void setThreadProject();
bool canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps);
void doExtract(const ExtractPassInfo& info, FProgress progress);

View File

@@ -281,6 +281,7 @@ void ProjectResourceFactoryBase::BackgroundIndexProc()
athena::io::YAMLDocWriter nameWriter(nullptr);
BackgroundIndexRecursiveProc(specRoot, cacheWriter, nameWriter, 0);
tagCachePath.makeDirChain(false);
FILE* cacheFile = hecl::Fopen(tagCachePath.getAbsolutePath().c_str(), _S("w"));
yaml_emitter_set_output_file(cacheWriter.getEmitter(), cacheFile);
cacheWriter.finish();

2
amuse

Submodule amuse updated: 1be5d6e821...83a2bf0b4e

2
hecl

Submodule hecl updated: b76a72a8e0...f3d6091cf7