Ignore:
Timestamp:
08/26/14 04:03:10 (11 years ago)
Author:
epyon
Message:
  • nova now compiles again under all three compilers with -Winsane and no warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/formats/assimp_loader.cc

    r302 r323  
    1414using namespace nv;
    1515
    16 const int MAX_BONES = 64;
     16const unsigned MAX_BONES = 64;
    1717
    1818struct assimp_plain_vtx
     
    9090        m_mesh_count = 0;
    9191        NV_LOG( nv::LOG_NOTICE, "AssImp loading file..." );
    92         int size = (int)source.size();
     92        size_t size = source.size();
    9393        char* data  = new char[ size ];
    9494        source.read( data, size, 1 );
     
    159159                                        if ( v.boneweight[i] <= 0.0f )
    160160                                        {
    161                                                 v.boneindex[i] = m;
     161                                                v.boneindex[i]  = (int)m;
    162162                                                v.boneweight[i] = bone->mWeights[w].mWeight;
    163163                                                found = true;
     
    289289        for ( unsigned int m = 0; m < m_mesh_count; ++m )
    290290        {
    291                 sint16 translate[MAX_BONES];
     291                uint16 translate[MAX_BONES];
    292292                std::vector< mesh_node_data > bones;
    293293                const aiMesh*  mesh  = scene->mMeshes[ m ];
     
    304304                                {
    305305                                        NV_ASSERT( final_bones.size() < MAX_BONES, "Too many bones to merge!" );
    306                                         sint16 index = (sint16)final_bones.size();
     306                                        uint16 index = (uint16)final_bones.size();
    307307                                        final_bones.push_back( bone );
    308308                                        names[ bone.name ] = index;
     
    311311                                else
    312312                                {
    313                                         translate[b] = (sint16)iname->second;
     313                                        translate[b] = iname->second;
    314314                                }
    315315                        }
     
    326326                                                if ( vertex.boneweight[i] > 0.0f )
    327327                                                {
    328                                                         vertex.boneindex[i] = translate[vertex.boneindex[i]];
     328                                                        vertex.boneindex[i] = (int)translate[vertex.boneindex[i]];
    329329                                                }
    330330                                        }
Note: See TracChangeset for help on using the changeset viewer.