Utility: First code cleaning pass

Former-commit-id: a73d38ce2db2e780ad5b02cdae1c590606081650 [formerly 3d21c0fa44481bf91418a15012fa187a210fc9ad] [formerly b80263df8e91b85f3fd091724c54dec7f05bc535 [formerly 7dcaabaabf74fbdf840289bfc435fdd8e88969d7]]
Former-commit-id: a669a933edd2364d9ee487c7d1bb38e28ad87a2d [formerly b8c5c09df10ce2f831635f460393216799d44056]
Former-commit-id: 6bbd5af22e30cc7fd4b4478162ae89e69b3d274e
This commit is contained in:
Lynix
2016-09-04 20:39:34 +02:00
parent 560825fa8e
commit 68d67cc9da
22 changed files with 276 additions and 489 deletions

View File

@@ -53,15 +53,15 @@ namespace Nz
const MD5MeshParser::Joint* joints = parser.GetJoints();
const MD5MeshParser::Mesh* meshes = parser.GetMeshes();
std::size_t jointCount = parser.GetJointCount();
std::size_t meshCount = parser.GetMeshCount();
UInt32 jointCount = parser.GetJointCount();
UInt32 meshCount = parser.GetMeshCount();
if (parameters.animated)
{
mesh->CreateSkeletal(jointCount);
Skeleton* skeleton = mesh->GetSkeleton();
for (std::size_t i = 0; i < jointCount; ++i)
for (UInt32 i = 0; i < jointCount; ++i)
{
Joint* joint = skeleton->GetJoint(i);
@@ -82,7 +82,7 @@ namespace Nz
}
mesh->SetMaterialCount(meshCount);
for (std::size_t i = 0; i < meshCount; ++i)
for (UInt32 i = 0; i < meshCount; ++i)
{
const MD5MeshParser::Mesh& md5Mesh = meshes[i];
@@ -100,7 +100,7 @@ namespace Nz
// Le format définit un set de triangles nous permettant de retrouver facilement les indices
// Cependant les sommets des triangles ne sont pas spécifiés dans le même ordre que ceux du moteur
// (On parle ici de winding)
unsigned int index = 0;
UInt32 index = 0;
for (const MD5MeshParser::Triangle& triangle : md5Mesh.triangles)
{
// On les respécifie dans le bon ordre (inversion du winding)
@@ -227,7 +227,7 @@ namespace Nz
}
mesh->SetMaterialCount(meshCount);
for (std::size_t i = 0; i < meshCount; ++i)
for (UInt32 i = 0; i < meshCount; ++i)
{
const MD5MeshParser::Mesh& md5Mesh = meshes[i];
std::size_t indexCount = md5Mesh.triangles.size()*3;