worked on getting assimpl compiled on BE

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@201 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
alil
2008-10-28 23:18:06 +00:00
parent e9dc280739
commit ef3cd69ae6
10 changed files with 80 additions and 75 deletions

View File

@@ -241,9 +241,11 @@ void MDRImporter::InternReadFile( const std::string& pFile,
// get a pointer to the next vertex
v = (LE_NCONST MDR::Vertex*)((uint8_t*)(v+1) + v->numWeights*sizeof(MDR::Weight));
#ifndef AI_BUILD_BIG_ENDIAN
AI_SWAP4(v->numWeights);
AI_SWAP4(v->normal.x);AI_SWAP4(v->normal.y);AI_SWAP4(v->normal.z);
AI_SWAP4(v->texCoords.x);AI_SWAP4(v->texCoords.y);
#endif
VertexInfo& vert = mVertices[m];
vert.uv.x = v->texCoords.x; vert.uv.y = v->texCoords.y;
@@ -263,7 +265,9 @@ void MDRImporter::InternReadFile( const std::string& pFile,
{
for (unsigned int o = 0; o < 3;++o)
{
#ifndef AI_BUILD_BIG_ENDIAN
AI_SWAP4(tri->indexes[o]);
#endif
register unsigned int temp = tri->indexes[o];
if (temp >= surf->numVerts)
throw new ImportErrorException("MDR: Vertex index is out of range");