mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-14 02:45:52 +00:00
Cook path directory creation
This commit is contained in:
parent
8e6ec6ecac
commit
6638463198
@ -78,9 +78,14 @@ private:
|
|||||||
return hecl::Format("colorReg%u", idx);
|
return hecl::Format("colorReg%u", idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EmitLighting() const
|
std::string EmitLightingRGB() const
|
||||||
{
|
{
|
||||||
return std::string("lighting");
|
return std::string("lighting.rgb");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string EmitLightingAlpha() const
|
||||||
|
{
|
||||||
|
return std::string("lighting.a");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string EmitVec3(const atVec4f& vec) const=0;
|
virtual std::string EmitVec3(const atVec4f& vec) const=0;
|
||||||
|
@ -1109,6 +1109,25 @@ public:
|
|||||||
*/
|
*/
|
||||||
void makeDir() const {MakeDir(m_absPath.c_str());}
|
void makeDir() const {MakeDir(m_absPath.c_str());}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Create directory chain leading up to path
|
||||||
|
* @param includeLastComp if set, the ProjectPath is assumed to be a
|
||||||
|
* directory, creating the final component
|
||||||
|
*/
|
||||||
|
void makeDirChain(bool includeLastComp) const
|
||||||
|
{
|
||||||
|
std::vector<hecl::SystemString> comps = getPathComponents();
|
||||||
|
auto end = comps.cend();
|
||||||
|
if (end != comps.cbegin() && !includeLastComp)
|
||||||
|
--end;
|
||||||
|
ProjectPath compPath(*m_proj, _S("."));
|
||||||
|
for (auto it=comps.cbegin() ; it != end ; ++it)
|
||||||
|
{
|
||||||
|
compPath = ProjectPath(compPath, *it);
|
||||||
|
compPath.makeDir();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Fetch project that contains path
|
* @brief Fetch project that contains path
|
||||||
* @return Project
|
* @return Project
|
||||||
|
@ -105,7 +105,7 @@ std::string ProgrammableCommon::RecursiveTraceColor(const IR& ir, Diagnostics& d
|
|||||||
else if (!name.compare("Lighting"))
|
else if (!name.compare("Lighting"))
|
||||||
{
|
{
|
||||||
m_lighting = true;
|
m_lighting = true;
|
||||||
return EmitLighting();
|
return EmitLightingRGB();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
diag.reportBackendErr(inst.m_loc, "unable to interpret '%s'", name.c_str());
|
diag.reportBackendErr(inst.m_loc, "unable to interpret '%s'", name.c_str());
|
||||||
@ -190,7 +190,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
|
|||||||
else if (!name.compare("Lighting"))
|
else if (!name.compare("Lighting"))
|
||||||
{
|
{
|
||||||
m_lighting = true;
|
m_lighting = true;
|
||||||
return EmitLighting();
|
return EmitLightingAlpha();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
diag.reportBackendErr(inst.m_loc, "unable to interpret '%s'", name.c_str());
|
diag.reportBackendErr(inst.m_loc, "unable to interpret '%s'", name.c_str());
|
||||||
|
@ -108,6 +108,7 @@ bool ClientProcess::syncCook(const hecl::ProjectPath& path, Database::IDataSpec*
|
|||||||
if (specEnt)
|
if (specEnt)
|
||||||
{
|
{
|
||||||
hecl::ProjectPath cooked = path.getCookedPath(*specEnt);
|
hecl::ProjectPath cooked = path.getCookedPath(*specEnt);
|
||||||
|
cooked.makeDirChain(false);
|
||||||
spec->doCook(path, cooked, false, btok, [](const SystemChar*) {});
|
spec->doCook(path, cooked, false, btok, [](const SystemChar*) {});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user