Merge pull request #28 from Gawaboumga/master
Consistency update Former-commit-id: 1c31be9c967cf2e7d9d5d89d46444bfaed11a142
This commit is contained in:
commit
73ba06ac1c
|
|
@ -62,7 +62,7 @@ NzVector3f NzAudio::GetListenerPosition()
|
|||
|
||||
NzQuaternionf NzAudio::GetListenerRotation()
|
||||
{
|
||||
float orientation[6];
|
||||
ALfloat orientation[6];
|
||||
alGetListenerfv(AL_ORIENTATION, orientation);
|
||||
|
||||
NzVector3f forward(orientation[0], orientation[1], orientation[2]);
|
||||
|
|
|
|||
|
|
@ -169,8 +169,6 @@ NzByteArray& NzByteArray::Insert(int pos, const void* buffer, unsigned int size)
|
|||
}
|
||||
|
||||
return *this;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
NzByteArray& NzByteArray::Insert(int pos, const NzByteArray& array)
|
||||
|
|
@ -464,9 +462,9 @@ void NzByteArray::EnsureOwnership()
|
|||
}
|
||||
}
|
||||
|
||||
bool NzByteArray::FillHash(NzAbstractHash* hazh) const
|
||||
bool NzByteArray::FillHash(NzAbstractHash* hash) const
|
||||
{
|
||||
hazh->Append(m_sharedArray->buffer, m_sharedArray->size);
|
||||
hash->Append(m_sharedArray->buffer, m_sharedArray->size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,14 @@ float NzCamera::GetZNear() const
|
|||
|
||||
void NzCamera::SetFOV(float fov)
|
||||
{
|
||||
#if NAZARA_GRAPHICS_SAFE
|
||||
if (NzNumberEquals(fov, 0.f))
|
||||
{
|
||||
NazaraError("Fov is null.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_fov = fov;
|
||||
|
||||
m_frustumUpdated = false;
|
||||
|
|
@ -183,6 +191,14 @@ void NzCamera::SetViewport(const NzRecti& viewport)
|
|||
|
||||
void NzCamera::SetZFar(float zFar)
|
||||
{
|
||||
#if NAZARA_GRAPHICS_SAFE
|
||||
if (m_zNear > zFar)
|
||||
{
|
||||
NazaraError("zNear is greater than zFar.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_zFar = zFar;
|
||||
|
||||
m_frustumUpdated = false;
|
||||
|
|
@ -191,6 +207,14 @@ void NzCamera::SetZFar(float zFar)
|
|||
|
||||
void NzCamera::SetZNear(float zNear)
|
||||
{
|
||||
#if NAZARA_GRAPHICS_SAFE
|
||||
if (zNear < 0.f || NzNumberEquals(zNear, 0.f))
|
||||
{
|
||||
NazaraError("zNear is less than/equals 0.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_zNear = zNear;
|
||||
|
||||
m_frustumUpdated = false;
|
||||
|
|
|
|||
|
|
@ -632,19 +632,19 @@ bool NzMD5MeshParser::ParseMesh()
|
|||
}
|
||||
}
|
||||
|
||||
if (m_meshes[m_meshIndex].triangles.size() == 0)
|
||||
if (m_meshes[m_meshIndex].triangles.empty())
|
||||
{
|
||||
NazaraError("Mesh has no triangles");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_meshes[m_meshIndex].vertices.size() == 0)
|
||||
if (m_meshes[m_meshIndex].vertices.empty())
|
||||
{
|
||||
NazaraError("Mesh has no vertices");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_meshes[m_meshIndex].weights.size() == 0)
|
||||
if (m_meshes[m_meshIndex].weights.empty())
|
||||
{
|
||||
NazaraError("Mesh has no weights");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ bool NzVertexDeclaration::IsTypeSupported(nzComponentType type)
|
|||
case nzComponentType_Int2:
|
||||
case nzComponentType_Int3:
|
||||
case nzComponentType_Int4:
|
||||
case nzComponentType_Quaternion:
|
||||
return true;
|
||||
|
||||
case nzComponentType_Quaternion:
|
||||
|
|
|
|||
Loading…
Reference in New Issue