Fix a shitload of warnings in 64 bits mode

Former-commit-id: c7792a7d5b1f85ab934da25324831b9daa3f47ff [formerly 3469974c48432be1f65808bff0ea39d9e22f5b50]
Former-commit-id: 5080815e9e1a3aebe237ff9a291b908ce0292eca
This commit is contained in:
Lynix
2016-06-13 21:09:55 +02:00
parent f36eec7346
commit 819b46f5fc
39 changed files with 191 additions and 188 deletions

View File

@@ -37,10 +37,10 @@ namespace Nz
}
const MD5AnimParser::Frame* frames = parser.GetFrames();
unsigned int frameCount = parser.GetFrameCount();
unsigned int frameRate = parser.GetFrameRate();
std::size_t frameCount = parser.GetFrameCount();
std::size_t frameRate = parser.GetFrameRate();
const MD5AnimParser::Joint* joints = parser.GetJoints();
unsigned int jointCount = parser.GetJointCount();
std::size_t jointCount = parser.GetJointCount();
// À ce stade, nous sommes censés avoir assez d'informations pour créer l'animation
animation->CreateSkeletal(frameCount, jointCount);
@@ -59,10 +59,10 @@ namespace Nz
Quaternionf rotationQuat = Quaternionf::RotationBetween(Vector3f::UnitX(), Vector3f::Forward()) *
Quaternionf::RotationBetween(Vector3f::UnitZ(), Vector3f::Up());
for (unsigned int i = 0; i < jointCount; ++i)
for (std::size_t i = 0; i < jointCount; ++i)
{
int parent = joints[i].parent;
for (unsigned int j = 0; j < frameCount; ++j)
for (std::size_t j = 0; j < frameCount; ++j)
{
SequenceJoint& sequenceJoint = sequenceJoints[j*jointCount + i];

View File

@@ -48,7 +48,7 @@ namespace Nz
return Ternary_False;
}
unsigned int MD5AnimParser::GetAnimatedComponentCount() const
std::size_t MD5AnimParser::GetAnimatedComponentCount() const
{
return m_animatedComponents.size();
}
@@ -58,12 +58,12 @@ namespace Nz
return m_frames.data();
}
unsigned int MD5AnimParser::GetFrameCount() const
std::size_t MD5AnimParser::GetFrameCount() const
{
return m_frames.size();
}
unsigned int MD5AnimParser::GetFrameRate() const
std::size_t MD5AnimParser::GetFrameRate() const
{
return m_frameRate;
}
@@ -73,7 +73,7 @@ namespace Nz
return m_joints.data();
}
unsigned int MD5AnimParser::GetJointCount() const
std::size_t MD5AnimParser::GetJointCount() const
{
return m_joints.size();
}

View File

@@ -53,15 +53,15 @@ namespace Nz
const MD5MeshParser::Joint* joints = parser.GetJoints();
const MD5MeshParser::Mesh* meshes = parser.GetMeshes();
unsigned int jointCount = parser.GetJointCount();
unsigned int meshCount = parser.GetMeshCount();
std::size_t jointCount = parser.GetJointCount();
std::size_t meshCount = parser.GetMeshCount();
if (parameters.animated)
{
mesh->CreateSkeletal(jointCount);
Skeleton* skeleton = mesh->GetSkeleton();
for (unsigned int i = 0; i < jointCount; ++i)
for (std::size_t i = 0; i < jointCount; ++i)
{
Joint* joint = skeleton->GetJoint(i);
@@ -82,12 +82,12 @@ namespace Nz
}
mesh->SetMaterialCount(meshCount);
for (unsigned int i = 0; i < meshCount; ++i)
for (std::size_t i = 0; i < meshCount; ++i)
{
const MD5MeshParser::Mesh& md5Mesh = meshes[i];
unsigned int indexCount = md5Mesh.triangles.size()*3;
unsigned int vertexCount = md5Mesh.vertices.size();
std::size_t indexCount = md5Mesh.triangles.size()*3;
std::size_t vertexCount = md5Mesh.vertices.size();
bool largeIndices = (vertexCount > std::numeric_limits<UInt16>::max());
@@ -227,11 +227,11 @@ namespace Nz
}
mesh->SetMaterialCount(meshCount);
for (unsigned int i = 0; i < meshCount; ++i)
for (std::size_t i = 0; i < meshCount; ++i)
{
const MD5MeshParser::Mesh& md5Mesh = meshes[i];
unsigned int indexCount = md5Mesh.triangles.size()*3;
unsigned int vertexCount = md5Mesh.vertices.size();
std::size_t indexCount = md5Mesh.triangles.size()*3;
std::size_t vertexCount = md5Mesh.vertices.size();
// Index buffer
bool largeIndices = (vertexCount > std::numeric_limits<UInt16>::max());

View File

@@ -58,7 +58,7 @@ namespace Nz
return m_joints.data();
}
unsigned int MD5MeshParser::GetJointCount() const
std::size_t MD5MeshParser::GetJointCount() const
{
return m_joints.size();
}
@@ -68,7 +68,7 @@ namespace Nz
return m_meshes.data();
}
unsigned int MD5MeshParser::GetMeshCount() const
std::size_t MD5MeshParser::GetMeshCount() const
{
return m_meshes.size();
}