chore: update t6 xmodel part classifications

This commit is contained in:
Jan
2024-08-10 23:41:37 +02:00
parent dfd8d1dbe9
commit 01c284fb37
5 changed files with 70 additions and 192 deletions

View File

@ -30,14 +30,35 @@ namespace fs = std::filesystem;
namespace
{
const char* HITLOC_NAMES[]{
"none", "helmet", "head", "neck", "torso_upper", "torso_middle", "torso_lower", "right_arm_upper",
"left_arm_upper", "right_arm_lower", "left_arm_lower", "right_hand", "left_hand", "right_leg_upper", "left_leg_upper", "right_leg_lower",
"left_leg_lower", "right_foot", "left_foot", "gun", "shield",
// clang-format off
"none",
"helmet",
"head",
"neck",
"torso_upper",
"torso_middle",
"torso_lower",
"right_arm_upper",
"left_arm_upper",
"right_arm_lower",
"left_arm_lower",
"right_hand",
"left_hand",
"right_leg_upper",
"left_leg_upper",
"right_leg_lower",
"left_leg_lower",
"right_foot",
"left_foot",
"gun",
"shield",
// clang-format on
};
static_assert(std::extent_v<decltype(HITLOC_NAMES)> == HITLOC_COUNT);
class PartClassificationState final : public IZoneAssetLoaderState
{
// TODO: Use MP part classifications when building an mp fastfile
static constexpr auto PART_CLASSIFICATION_FILE = "partclassification.csv";
public:

View File

@ -133,15 +133,6 @@ namespace
bone.scale[1] = 1.0f;
bone.scale[2] = 1.0f;
if (model->partClassification[boneNum])
{
if (boneNum < model->numRootBones
|| model->partClassification[boneNum - model->parentList[boneNum - model->numRootBones]] != model->partClassification[boneNum])
{
std::cerr << std::format("Part: {:02} = {}\n", model->partClassification[boneNum], bone.name);
}
}
const auto& baseMat = model->baseMat[boneNum];
bone.globalOffset[0] = baseMat.trans.x;
bone.globalOffset[1] = baseMat.trans.y;