mirror of https://github.com/AxioDL/metaforce.git
Minor fixes and cleanups
This commit is contained in:
parent
99bb5df7f3
commit
2c6d83b0c7
|
@ -70,44 +70,44 @@ void GetVertexAttributes(const MaterialSet& matSet,
|
||||||
{
|
{
|
||||||
const typename MaterialSet::Material::VAFlags& vaFlags = mat.getVAFlags();
|
const typename MaterialSet::Material::VAFlags& vaFlags = mat.getVAFlags();
|
||||||
attributesOut.emplace_back();
|
attributesOut.emplace_back();
|
||||||
VertexAttributes& metrics = attributesOut.back();
|
VertexAttributes& va = attributesOut.back();
|
||||||
|
|
||||||
metrics.pos = vaFlags.position();
|
va.pos = vaFlags.position();
|
||||||
metrics.norm = vaFlags.normal();
|
va.norm = vaFlags.normal();
|
||||||
metrics.color0 = vaFlags.color0();
|
va.color0 = vaFlags.color0();
|
||||||
metrics.color1 = vaFlags.color1();
|
va.color1 = vaFlags.color1();
|
||||||
|
|
||||||
if ((metrics.uvs[0] = vaFlags.tex0()))
|
if ((va.uvs[0] = vaFlags.tex0()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[1] = vaFlags.tex1()))
|
if ((va.uvs[1] = vaFlags.tex1()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[2] = vaFlags.tex2()))
|
if ((va.uvs[2] = vaFlags.tex2()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[3] = vaFlags.tex3()))
|
if ((va.uvs[3] = vaFlags.tex3()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[4] = vaFlags.tex4()))
|
if ((va.uvs[4] = vaFlags.tex4()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[5] = vaFlags.tex5()))
|
if ((va.uvs[5] = vaFlags.tex5()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
if ((metrics.uvs[6] = vaFlags.tex6()))
|
if ((va.uvs[6] = vaFlags.tex6()))
|
||||||
++metrics.uvCount;
|
++va.uvCount;
|
||||||
|
|
||||||
metrics.pnMtxIdx = vaFlags.pnMatIdx();
|
va.pnMtxIdx = vaFlags.pnMatIdx();
|
||||||
|
|
||||||
if ((metrics.texMtxIdx[0] = vaFlags.tex0MatIdx()))
|
if ((va.texMtxIdx[0] = vaFlags.tex0MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[1] = vaFlags.tex1MatIdx()))
|
if ((va.texMtxIdx[1] = vaFlags.tex1MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[2] = vaFlags.tex2MatIdx()))
|
if ((va.texMtxIdx[2] = vaFlags.tex2MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[3] = vaFlags.tex3MatIdx()))
|
if ((va.texMtxIdx[3] = vaFlags.tex3MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[4] = vaFlags.tex4MatIdx()))
|
if ((va.texMtxIdx[4] = vaFlags.tex4MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[5] = vaFlags.tex5MatIdx()))
|
if ((va.texMtxIdx[5] = vaFlags.tex5MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
if ((metrics.texMtxIdx[6] = vaFlags.tex6MatIdx()))
|
if ((va.texMtxIdx[6] = vaFlags.tex6MatIdx()))
|
||||||
++metrics.texMtxIdxCount;
|
++va.texMtxIdxCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -626,7 +626,7 @@ void _ConstructMaterial(Stream& out,
|
||||||
using BlendFactor = MaterialSet::Material::BlendFactor;
|
using BlendFactor = MaterialSet::Material::BlendFactor;
|
||||||
if (material.blendDestFactor() != BlendFactor::GX_BL_ZERO)
|
if (material.blendDestFactor() != BlendFactor::GX_BL_ZERO)
|
||||||
{
|
{
|
||||||
if (material.blendDestFactor() == BlendFactor::GX_BL_ZERO)
|
if (material.blendDestFactor() == BlendFactor::GX_BL_ONE)
|
||||||
out << "new_material.game_settings.alpha_blend = 'ADD'\n"
|
out << "new_material.game_settings.alpha_blend = 'ADD'\n"
|
||||||
"new_material.use_transparency = True\n"
|
"new_material.use_transparency = True\n"
|
||||||
"new_material.transparency_method = 'RAYTRACE'\n"
|
"new_material.transparency_method = 'RAYTRACE'\n"
|
||||||
|
|
|
@ -36,7 +36,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
||||||
mlvlName.read(rs);
|
mlvlName.read(rs);
|
||||||
if (m_levelString.size())
|
if (m_levelString.size())
|
||||||
m_levelString += _S(", ");
|
m_levelString += _S(", ");
|
||||||
m_levelString += mlvlName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
m_levelString += mlvlName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ void PAKBridge::build()
|
||||||
STRG areaName;
|
STRG areaName;
|
||||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||||
areaName.read(rs);
|
areaName.read(rs);
|
||||||
areaDeps.name = areaName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
}
|
}
|
||||||
if (areaDeps.name.empty())
|
if (areaDeps.name.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
||||||
mlvlName.read(rs);
|
mlvlName.read(rs);
|
||||||
if (m_levelString.size())
|
if (m_levelString.size())
|
||||||
m_levelString += _S(", ");
|
m_levelString += _S(", ");
|
||||||
m_levelString += mlvlName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
m_levelString += mlvlName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ void PAKBridge::build()
|
||||||
STRG areaName;
|
STRG areaName;
|
||||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||||
areaName.read(rs);
|
areaName.read(rs);
|
||||||
areaDeps.name = areaName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
}
|
}
|
||||||
if (areaDeps.name.empty())
|
if (areaDeps.name.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
||||||
PAKEntryReadStream rs = nameEnt->beginReadStream(m_node);
|
PAKEntryReadStream rs = nameEnt->beginReadStream(m_node);
|
||||||
STRG mlvlName;
|
STRG mlvlName;
|
||||||
mlvlName.read(rs);
|
mlvlName.read(rs);
|
||||||
uniq.insert(mlvlName.getSystemString(FourCC(SBIG('ENGL')), 0));
|
uniq.insert(mlvlName.getSystemString(FOURCC('ENGL'), 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue