| 9 | |
| 10 | #if WITH_GRANNY |
| 11 | void GetVertexPositionOffsetAndType( granny_mesh* grannyMesh, unsigned int& positionOffset, Tr2VertexDefinition::DataType& positionType ) |
| 12 | { |
| 13 | positionOffset = 0; |
| 14 | positionType = Tr2VertexDefinition::DT_UNKNOWN_TYPE; |
| 15 | |
| 16 | if( !grannyMesh ) |
| 17 | { |
| 18 | return; |
| 19 | } |
| 20 | |
| 21 | granny_data_type_definition* grannyVertexDecl = grannyMesh->PrimaryVertexData->VertexType; |
| 22 | |
| 23 | if( !grannyVertexDecl ) |
| 24 | { |
| 25 | return; |
| 26 | } |
| 27 | |
| 28 | while( grannyVertexDecl->Type != GrannyEndMember ) |
| 29 | { |
| 30 | if( !strcmp( grannyVertexDecl->Name, GrannyVertexPositionName ) ) |
| 31 | { |
| 32 | positionType = ConvertGrannyTypeToDataType( *grannyVertexDecl ); |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | positionOffset += GrannyGetTotalTypeSize( grannyVertexDecl ); |
| 37 | grannyVertexDecl++; |
| 38 | } |
| 39 | |
| 40 | positionOffset = 0; |
| 41 | } |
| 42 | #endif |
| 43 | |
| 44 | void ConvertShort4ToVector3( const void* ptr, Vector3* dest ) |
no test coverage detected