Ignore:
Timestamp:
08/11/13 18:06:12 (12 years ago)
Author:
epyon
Message:
  • compilation and warning fixes
File:
1 edited

Legend:

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

    r198 r200  
    88
    99#include <glm/gtc/constants.hpp>
    10 #include <glm/gtx/string_cast.hpp>
    1110#include "nv/logging.hh"
    1211#include "nv/io/std_stream.hh"
     
    194193                vert.tangent  = glm::vec3(0);
    195194
    196                 for ( int j = 0; j < vert.weight_count; ++j )
     195                for ( size_t j = 0; j < vert.weight_count; ++j )
    197196                {
    198197                        md5_weight& weight = mesh.weights[vert.start_weight + j];
     
    246245        }
    247246
    248         for ( unsigned int i = 0; i < mesh.verts.size(); ++i )
     247        for ( size_t i = 0; i < mesh.verts.size(); ++i )
    249248        {
    250249                md5_vertex& vert = mesh.verts[i];
     
    258257                vert.tangent = glm::vec3(0);
    259258
    260                 for ( int j = 0; j < vert.weight_count; ++j )
     259                for ( size_t j = 0; j < vert.weight_count; ++j )
    261260                {
    262261                        const md5_weight& weight = mesh.weights[vert.start_weight + j];
     
    455454
    456455        float frame_num = m_anim_time * (float)m_frame_rate;
    457         int frame0 = (int)floorf( frame_num );
    458         int frame1 = (int)ceilf( frame_num );
     456        size_t frame0 = (size_t)floorf( frame_num );
     457        size_t frame1 = (size_t)ceilf( frame_num );
    459458        frame0 = frame0 % m_num_frames;
    460459        frame1 = frame1 % m_num_frames;
     
    489488                if ( animated_joint.parent >= 0 ) // Has a parent joint
    490489                {
    491                         md5_skeleton_joint& pjoint = skeleton.joints[animated_joint.parent];
     490                        md5_skeleton_joint& pjoint = skeleton.joints[static_cast< size_t >( animated_joint.parent ) ];
    492491                        glm::vec3 rot_pos = pjoint.orient * animated_joint.pos;
    493492
     
    553552                tangent = glm::vec3(0);
    554553
    555                 for ( int j = 0; j < vert.weight_count; ++j )
     554                for ( size_t j = 0; j < vert.weight_count; ++j )
    556555                {
    557556                        const md5_weight& weight = mesh.weights[vert.start_weight + j];
Note: See TracChangeset for help on using the changeset viewer.