diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index 10a989a636..b9afd1edf8 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -488,11 +488,11 @@ void Model::DrawMesh( int i ) const const msMesh *pMesh = &m_pGeometry->m_Meshes[i]; // apply mesh-specific bone (if any) - if( pMesh->nBoneIndex != -1 ) + if( pMesh->m_iBoneIndex != -1 ) { DISPLAY->PushMatrix(); - const RageMatrix &mat = m_vpBones[pMesh->nBoneIndex].m_Final; + const RageMatrix &mat = m_vpBones[pMesh->m_iBoneIndex].m_Final; DISPLAY->PreMultMatrix( mat ); } @@ -500,7 +500,7 @@ void Model::DrawMesh( int i ) const const RageCompiledGeometry* TempGeometry = m_pTempGeometry ? m_pTempGeometry : m_pGeometry->m_pCompiledGeometry; DISPLAY->DrawCompiledGeometry( TempGeometry, i, m_pGeometry->m_Meshes ); - if( pMesh->nBoneIndex != -1 ) + if( pMesh->m_iBoneIndex != -1 ) DISPLAY->PopMatrix(); } @@ -561,7 +561,7 @@ void Model::PlayAnimation( const RString &sAniName, float fPlayRate ) vector &Vertices = pMesh->Vertices; for( unsigned j = 0; j < Vertices.size(); j++ ) { -// int nBoneIndex = (pMesh->nBoneIndex!=-1) ? pMesh->nBoneIndex : bone; +// int iBoneIndex = (pMesh->m_iBoneIndex!=-1) ? pMesh->m_iBoneIndex : bone; RageVector3 &pos = Vertices[j].p; int8_t bone = Vertices[j].bone; if( bone != -1 ) diff --git a/stepmania/src/ModelTypes.h b/stepmania/src/ModelTypes.h index 4111a675d9..b6c640d439 100644 --- a/stepmania/src/ModelTypes.h +++ b/stepmania/src/ModelTypes.h @@ -21,7 +21,7 @@ struct msMesh // OPTIMIZATION: If all verts in a mesh are transformed by the same bone, // then send the transform to the graphics card for the whole mesh instead // of transforming each vertex on the CPU; - char nBoneIndex; // -1 = no bone + char m_iBoneIndex; // -1 = no bone vector Triangles; }; diff --git a/stepmania/src/RageModelGeometry.cpp b/stepmania/src/RageModelGeometry.cpp index 3e90e8acd6..09a61af9e2 100644 --- a/stepmania/src/RageModelGeometry.cpp +++ b/stepmania/src/RageModelGeometry.cpp @@ -30,11 +30,11 @@ void RageModelGeometry::OptimizeBones() // check to see if all vertices have the same bone index bool bAllVertsUseSameBone = true; - char nBoneIndex = mesh.Vertices[0].bone; + char iBoneIndex = mesh.Vertices[0].bone; for (unsigned j = 1; j < mesh.Vertices.size(); j++) { - if( mesh.Vertices[j].bone != nBoneIndex ) + if( mesh.Vertices[j].bone != iBoneIndex ) { bAllVertsUseSameBone = false; break; @@ -43,7 +43,7 @@ void RageModelGeometry::OptimizeBones() if( bAllVertsUseSameBone ) { - mesh.nBoneIndex = nBoneIndex; + mesh.m_iBoneIndex = iBoneIndex; // clear all vertex/bone associations; for (unsigned j = 0; j < mesh.Vertices.size(); j++) @@ -149,7 +149,7 @@ void RageModelGeometry::LoadMilkshapeAscii( const RString& _sPath, bool bNeedsNo // mesh.nFlags = nFlags; mesh.nMaterialIndex = (uint8_t) nIndex; - mesh.nBoneIndex = -1; + mesh.m_iBoneIndex = -1; // // vertices