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();
|
||||
attributesOut.emplace_back();
|
||||
VertexAttributes& metrics = attributesOut.back();
|
||||
VertexAttributes& va = attributesOut.back();
|
||||
|
||||
metrics.pos = vaFlags.position();
|
||||
metrics.norm = vaFlags.normal();
|
||||
metrics.color0 = vaFlags.color0();
|
||||
metrics.color1 = vaFlags.color1();
|
||||
va.pos = vaFlags.position();
|
||||
va.norm = vaFlags.normal();
|
||||
va.color0 = vaFlags.color0();
|
||||
va.color1 = vaFlags.color1();
|
||||
|
||||
if ((metrics.uvs[0] = vaFlags.tex0()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[1] = vaFlags.tex1()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[2] = vaFlags.tex2()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[3] = vaFlags.tex3()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[4] = vaFlags.tex4()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[5] = vaFlags.tex5()))
|
||||
++metrics.uvCount;
|
||||
if ((metrics.uvs[6] = vaFlags.tex6()))
|
||||
++metrics.uvCount;
|
||||
if ((va.uvs[0] = vaFlags.tex0()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[1] = vaFlags.tex1()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[2] = vaFlags.tex2()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[3] = vaFlags.tex3()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[4] = vaFlags.tex4()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[5] = vaFlags.tex5()))
|
||||
++va.uvCount;
|
||||
if ((va.uvs[6] = vaFlags.tex6()))
|
||||
++va.uvCount;
|
||||
|
||||
metrics.pnMtxIdx = vaFlags.pnMatIdx();
|
||||
va.pnMtxIdx = vaFlags.pnMatIdx();
|
||||
|
||||
if ((metrics.texMtxIdx[0] = vaFlags.tex0MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[1] = vaFlags.tex1MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[2] = vaFlags.tex2MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[3] = vaFlags.tex3MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[4] = vaFlags.tex4MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[5] = vaFlags.tex5MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((metrics.texMtxIdx[6] = vaFlags.tex6MatIdx()))
|
||||
++metrics.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[0] = vaFlags.tex0MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[1] = vaFlags.tex1MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[2] = vaFlags.tex2MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[3] = vaFlags.tex3MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[4] = vaFlags.tex4MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[5] = vaFlags.tex5MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
if ((va.texMtxIdx[6] = vaFlags.tex6MatIdx()))
|
||||
++va.texMtxIdxCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -626,7 +626,7 @@ void _ConstructMaterial(Stream& out,
|
|||
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_ONE)
|
||||
out << "new_material.game_settings.alpha_blend = 'ADD'\n"
|
||||
"new_material.use_transparency = True\n"
|
||||
"new_material.transparency_method = 'RAYTRACE'\n"
|
||||
|
|
|
@ -36,7 +36,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
|||
mlvlName.read(rs);
|
||||
if (m_levelString.size())
|
||||
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;
|
||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||
areaName.read(rs);
|
||||
areaDeps.name = areaName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
||||
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||
}
|
||||
if (areaDeps.name.empty())
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
|||
mlvlName.read(rs);
|
||||
if (m_levelString.size())
|
||||
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;
|
||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||
areaName.read(rs);
|
||||
areaDeps.name = areaName.getSystemString(FourCC(SBIG('ENGL')), 0);
|
||||
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||
}
|
||||
if (areaDeps.name.empty())
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPar
|
|||
PAKEntryReadStream rs = nameEnt->beginReadStream(m_node);
|
||||
STRG mlvlName;
|
||||
mlvlName.read(rs);
|
||||
uniq.insert(mlvlName.getSystemString(FourCC(SBIG('ENGL')), 0));
|
||||
uniq.insert(mlvlName.getSystemString(FOURCC('ENGL'), 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue