Changeset 200 for trunk/src/formats
- Timestamp:
- 08/11/13 18:06:12 (12 years ago)
- Location:
- trunk/src/formats
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/md2_loader.cc
r198 r200 8 8 9 9 #include <glm/gtc/constants.hpp> 10 #include <glm/gtx/string_cast.hpp>11 10 #include "nv/logging.hh" 12 11 #include <cstring> -
trunk/src/formats/md3_loader.cc
r198 r200 8 8 9 9 #include <glm/gtc/constants.hpp> 10 #include <glm/gtx/string_cast.hpp>11 10 #include "nv/logging.hh" 12 11 #include <cstring> … … 457 456 { 458 457 const md3_surface_t& surface = md3->surfaces[i]; 459 const sint32 vcount = surface.header.num_verts;458 const uint32 vcount = static_cast< uint32 >( surface.header.num_verts ); 460 459 t.reserve( t.size() + vcount ); 461 for ( sint32 j = 0; j < vcount; ++j )460 for (uint32 j = 0; j < vcount; ++j ) 462 461 { 463 462 t.push_back( md3_texcoord( surface.st[j] ) ); -
trunk/src/formats/md5_loader.cc
r198 r200 8 8 9 9 #include <glm/gtc/constants.hpp> 10 #include <glm/gtx/string_cast.hpp>11 10 #include "nv/logging.hh" 12 11 #include "nv/io/std_stream.hh" … … 194 193 vert.tangent = glm::vec3(0); 195 194 196 for ( int j = 0; j < vert.weight_count; ++j )195 for ( size_t j = 0; j < vert.weight_count; ++j ) 197 196 { 198 197 md5_weight& weight = mesh.weights[vert.start_weight + j]; … … 246 245 } 247 246 248 for ( unsigned int i = 0; i < mesh.verts.size(); ++i )247 for ( size_t i = 0; i < mesh.verts.size(); ++i ) 249 248 { 250 249 md5_vertex& vert = mesh.verts[i]; … … 258 257 vert.tangent = glm::vec3(0); 259 258 260 for ( int j = 0; j < vert.weight_count; ++j )259 for ( size_t j = 0; j < vert.weight_count; ++j ) 261 260 { 262 261 const md5_weight& weight = mesh.weights[vert.start_weight + j]; … … 455 454 456 455 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 ); 459 458 frame0 = frame0 % m_num_frames; 460 459 frame1 = frame1 % m_num_frames; … … 489 488 if ( animated_joint.parent >= 0 ) // Has a parent joint 490 489 { 491 md5_skeleton_joint& pjoint = skeleton.joints[ animated_joint.parent];490 md5_skeleton_joint& pjoint = skeleton.joints[static_cast< size_t >( animated_joint.parent ) ]; 492 491 glm::vec3 rot_pos = pjoint.orient * animated_joint.pos; 493 492 … … 553 552 tangent = glm::vec3(0); 554 553 555 for ( int j = 0; j < vert.weight_count; ++j )554 for ( size_t j = 0; j < vert.weight_count; ++j ) 556 555 { 557 556 const md5_weight& weight = mesh.weights[vert.start_weight + j];
Note: See TracChangeset
for help on using the changeset viewer.