Ignore:
Timestamp:
07/16/15 19:24:30 (10 years ago)
Author:
epyon
Message:
  • removal of several strings, string hashes used
  • WIP some data lost - see explicit warnings
  • name_hash to name
  • more nmd updates
  • animation names as hashes
File:
1 edited

Legend:

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

    r421 r423  
    112112                        assert( m_nodes == nullptr );
    113113                        nodes = new mesh_node_data[ num_joints ];
    114                         m_nodes = new mesh_nodes_data( "md5_bones", num_joints, nodes );
     114                        int name_; //"md5_bones"
     115                        m_nodes = new mesh_nodes_data( 0, num_joints, nodes );
    115116                        discard( sstream, "{" );
    116117                        for ( size_t i = 0; i < m_nodes->get_count(); ++i )
     
    128129                                remove_quotes( name );
    129130//                              nodes[i].name = name;
    130                                 nodes[i].name_hash = hash_string< uint64 >( name.c_str() );
     131                                nodes[i].name = hash_string< uint64 >( name.c_str() );
    131132//                              nodes[i].target_id       = -1;
    132133                                nodes[i].parent_id       = -1;
     
    242243                        assert( nodes == nullptr );
    243244                        nodes = new mesh_node_data[ num_joints ];
    244                         m_nodes = new mesh_nodes_data( "md5_animation", num_joints, nodes, static_cast< nv::uint16 >( frame_rate ), static_cast< float >( num_frames ), true );
     245                        int name_;
     246                        m_nodes = new mesh_nodes_data( 0/*"md5_animation"*/, num_joints, nodes, static_cast< nv::uint16 >( frame_rate ), static_cast< float >( num_frames ), true );
    245247                        joint_infos.resize( num_joints );
    246248
     
    252254                                remove_quotes( name );
    253255//                              nodes[i].name = name;
    254                                 nodes[i].name_hash = hash_string< uint64 >( name.c_str() );
     256                                nodes[i].name = hash_string< uint64 >( name.c_str() );
    255257                                nodes[i].transform = mat4();
    256258                                nodes[i].data = data_channel_set_creator::create( 1 );
Note: See TracChangeset for help on using the changeset viewer.