Decouple <cstdint>

This commit is contained in:
Martin Natano
2023-04-20 12:34:12 +02:00
parent bcea05dd67
commit aa87f85eef
167 changed files with 1533 additions and 1307 deletions
+9 -7
View File
@@ -5,6 +5,8 @@
#include "RageMath.h"
#include "RageDisplay.h"
#include <cstdint>
#define MS_MAX_NAME 32
RageModelGeometry::RageModelGeometry ()
@@ -29,7 +31,7 @@ void RageModelGeometry::OptimizeBones()
// check to see if all vertices have the same bone index
bool bAllVertsUseSameBone = true;
char iBoneIndex = mesh.Vertices[0].bone;
for (unsigned j = 1; j < mesh.Vertices.size(); j++)
@@ -69,8 +71,8 @@ void RageModelGeometry::MergeMeshes( int iFromIndex, int iToIndex )
{
for( int j=0; j<3; j++ )
{
uint16_t &iIndex = meshTo.Triangles[i].nVertexIndices[j];
iIndex = uint16_t(iIndex + iShiftTriangleVertexIndicesBy);
std::uint16_t &iIndex = meshTo.Triangles[i].nVertexIndices[j];
iIndex = std::uint16_t(iIndex + iShiftTriangleVertexIndicesBy);
}
}
}
@@ -147,7 +149,7 @@ void RageModelGeometry::LoadMilkshapeAscii( const RString& _sPath, bool bNeedsNo
mesh.sName = szName;
// mesh.nFlags = nFlags;
mesh.nMaterialIndex = (uint8_t) nIndex;
mesh.nMaterialIndex = (std::uint8_t) nIndex;
mesh.m_iBoneIndex = -1;
@@ -190,7 +192,7 @@ void RageModelGeometry::LoadMilkshapeAscii( const RString& _sPath, bool bNeedsNo
v.t[0] = v.p[0] / v.t[0];
v.t[1] = v.p[1] / v.t[1];
}
v.bone = (uint8_t) nIndex;
v.bone = (std::uint8_t) nIndex;
RageVec3AddToBounds( v.p, m_vMins, m_vMaxs );
}
@@ -237,8 +239,8 @@ void RageModelGeometry::LoadMilkshapeAscii( const RString& _sPath, bool bNeedsNo
if( f.GetLine( sLine ) <= 0 )
THROW;
uint16_t nIndices[3];
uint16_t nNormalIndices[3];
std::uint16_t nIndices[3];
std::uint16_t nNormalIndices[3];
if( sscanf (sLine, "%d %hu %hu %hu %hu %hu %hu %d",
&nFlags,
&nIndices[0], &nIndices[1], &nIndices[2],