Changeset 383 for trunk/src/formats/md3_loader.cc
- Timestamp:
- 06/02/15 20:56:15 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/md3_loader.cc
r376 r383 198 198 md3->tags = new md3_tag_t [ md3->header.num_tags * md3->header.num_frames ]; 199 199 md3->surfaces = new md3_surface_t[ md3->header.num_surfaces ]; 200 std::memset( md3->surfaces, 0, static_cast< nv::size_t >( md3->header.num_surfaces ) * sizeof( md3_surface_t) );200 nv::raw_zero_n( md3->surfaces, static_cast< nv::size_t >( md3->header.num_surfaces ) ); 201 201 202 202 source.seek( md3->header.ofs_frames, origin::SET ); … … 285 285 } 286 286 287 nv::key_raw_channel* nv::md3_loader::load_tags( const st d::string& tag )287 nv::key_raw_channel* nv::md3_loader::load_tags( const string_ref& tag ) 288 288 { 289 289 md3_t* md3 = (md3_t*)m_md3; … … 295 295 { 296 296 const md3_tag_t& rtag = md3->tags[i + md3->header.num_tags * f]; 297 st d::stringrname((char*)(rtag.name));297 string_ref rname((char*)(rtag.name)); 298 298 if (rname == tag) 299 299 { … … 421 421 md3_t* md3 = (md3_t*)m_md3; 422 422 uint32 node_count = (uint32)md3->header.num_tags; 423 if ( node_count == 0 ) return nullptr; ;423 if ( node_count == 0 ) return nullptr; 424 424 mesh_node_data* nodes = new mesh_node_data[ node_count ]; 425 425 for ( uint32 i = 0; i < node_count; ++i ) 426 426 { 427 427 const md3_tag_t& rtag = md3->tags[i]; 428 st d::stringname( (char*)(rtag.name) );428 string_ref name( (char*)(rtag.name) ); 429 429 430 430 nodes[i].transform = mat4(); 431 nodes[i].name = name ;431 nodes[i].name = name.to_string(); 432 432 nodes[i].parent_id = -1; 433 433 nodes[i].target_id = -1;
Note: See TracChangeset
for help on using the changeset viewer.