Fixed build warnings on MSVC14 x64 in the Quake 3 format sources.

This commit is contained in:
Jared Mulconry
2016-11-20 13:30:20 +11:00
parent 98aea657ff
commit 655a470fc9
2 changed files with 11 additions and 11 deletions

View File

@@ -330,14 +330,14 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p
}
}
pParent->mNumChildren = MeshArray.size();
pParent->mNumChildren = static_cast<unsigned int>(MeshArray.size());
pParent->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren ];
for ( size_t i=0; i<NodeArray.size(); i++ )
{
aiNode *pNode = NodeArray[ i ];
pNode->mParent = pParent;
pParent->mChildren[ i ] = pNode;
pParent->mChildren[ i ]->mMeshes[ 0 ] = i;
pParent->mChildren[ i ]->mMeshes[ 0 ] = static_cast<unsigned int>(i);
}
}
@@ -364,9 +364,9 @@ aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel,
pMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
pMesh->mFaces = new aiFace[ numTriangles ];
pMesh->mNumFaces = numTriangles;
pMesh->mNumFaces = static_cast<unsigned int>(numTriangles);
pMesh->mNumVertices = numVerts;
pMesh->mNumVertices = static_cast<unsigned int>(numVerts);
pMesh->mVertices = new aiVector3D[ numVerts ];
pMesh->mNormals = new aiVector3D[ numVerts ];
pMesh->mTextureCoords[ 0 ] = new aiVector3D[ numVerts ];
@@ -515,7 +515,7 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
pScene->mMaterials[ pScene->mNumMaterials ] = pMatHelper;
pScene->mNumMaterials++;
}
pScene->mNumTextures = mTextures.size();
pScene->mNumTextures = static_cast<unsigned int>(mTextures.size());
pScene->mTextures = new aiTexture*[ pScene->mNumTextures ];
std::copy( mTextures.begin(), mTextures.end(), pScene->mTextures );
}
@@ -649,7 +649,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
size_t texSize = pTextureStream->FileSize();
aiTexture *pTexture = new aiTexture;
pTexture->mHeight = 0;
pTexture->mWidth = texSize;
pTexture->mWidth = static_cast<unsigned int>(texSize);
unsigned char *pData = new unsigned char[ pTexture->mWidth ];
size_t readSize = pTextureStream->Read( pData, sizeof( unsigned char ), pTexture->mWidth );
(void)readSize;
@@ -663,7 +663,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
aiString name;
name.data[ 0 ] = '*';
name.length = 1 + ASSIMP_itoa10( name.data + 1, MAXLEN-1, mTextures.size() );
name.length = 1 + ASSIMP_itoa10( name.data + 1, static_cast<unsigned int>(MAXLEN-1), static_cast<int32_t>(mTextures.size()) );
pArchive->Close( pTextureStream );
@@ -721,7 +721,7 @@ bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene
aiString name;
name.data[ 0 ] = '*';
name.length = 1 + ASSIMP_itoa10( name.data + 1, MAXLEN-1, mTextures.size() );
name.length = 1 + ASSIMP_itoa10( name.data + 1, static_cast<unsigned int>(MAXLEN-1), static_cast<int32_t>(mTextures.size()) );
pMatHelper->AddProperty( &name,AI_MATKEY_TEXTURE_LIGHTMAP( 1 ) );
mTextures.push_back( pTexture );