Just taking a quick peek, found out the meaning of a few things.
unk35 = FileSize lol not that useful but its something for now
I'm not used to converting maxscript into C++ (for 010 Editor templates)
Anyways here's my current progress on converting it to C++. I'll work on it more tomorrow.
Code: Select all
//--------------------------------------
//--- 010 Editor v3.1 Binary Template
//
// File: MODELTemplate.bt
// Author:
// Revision:
// Purpose:
//--------------------------------------
struct Matrix3
{
float m11, m12, m13, m14; // Row 1
float m21, m22, m23, m24; // Row 2
float m31, m32, m33, m34; // Row 3
float m41, m42, m43, m44; // Row 4
};
struct Bone_t
{
float A[2];
int B[2];
Matrix3 tfm;
Matrix3 tfm2;
float C[3];
int D;
float E[3];
int BoneParentID;
};
struct MeshInfo_t
{
int A[6];
int NumBoneIds;
int B[14];
float C[3];
};
BigEndian(); // Say the file is in big-endian format
char FileIdent[8]; // File Identifier
int unk01; // Probably Version Major?
int unk02; // Probably Version Minor?
int unk03;
int unk04;
int BoneCount;
int BoneOff;
int BoneIDTableCount;
int BoneIDTableOffset;
int MeshInfoCount;
int MeshInfoOffset;
int T20SectCount;
int T20SectOffset;
int TNullSectCount;
int TNullSectOffset;
int T60SectCount;
int T60SectOffset;
int TA0SectCount;
int TA0SectOffset;
int T50SectCount;
int T50SectOffset;
int unk21;
int unk22; // Is a offset
int unk23; // Is a offset
int unk24;
int unk25;
int unk26; // Is a offset
int unk27; // Is a offset
int unk28;
int TMeshSectOffset;
int TMeshSectCount;
int unk31; // Is a offset
int unk32;
int unk33;
int unk34; // Is a offset
int FileSize;
int unk36;
FSeek(BoneOff);
Bone_t BNArr[BoneCount];
FSeek(MeshInfoOffset);
MeshInfo_t NumBoneIds_array[MeshInfoCount];
FSeek(BoneIDTableOffset);
local int test<hidden=true> = 0, test2<hidden=true> = 0, a<hidden=true>;
local int Boneid2_array[MeshInfoCount];
for (a = 0; a < MeshInfoCount; a++)
{
if (NumBoneIds_array[a].NumBoneIds != test) {
test2 = FTell();
FSeek(FTell() + (NumBoneIds_array[a].NumBoneIds * 2));
}
if (NumBoneIds_array[a].NumBoneIds == test)
test2 = FTell() - (NumBoneIds_array[a].NumBoneIds * 2);
Boneid2_array[a] = test2;
test = NumBoneIds_array[a].NumBoneIds;
}