Ignore:
Timestamp:
07/20/15 13:25:20 (10 years ago)
Author:
epyon
Message:
  • cleanup of mesh_node_data
File:
1 edited

Legend:

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

    r425 r427  
    420420        uint32 node_count = uint32( md3->header.num_tags );
    421421        if ( node_count == 0 ) return nullptr;
    422         mesh_node_data* nodes = new mesh_node_data[ node_count ];
     422        mesh_nodes_data* result = new mesh_nodes_data( m_strings ? m_strings->insert( "tags" ) : 0 );
    423423        for ( uint32 i = 0; i < node_count; ++i )
    424424        {
    425425                const md3_tag_t& rtag = md3->tags[i];
    426426                string_view name( reinterpret_cast< const char* >(rtag.name) );
    427                 nodes[i].data      = data_channel_set_creator::create_set( 1 );
    428                 data_channel_set_creator access( nodes[i].data );
     427                data_channel_set* set = data_channel_set_creator::create_set( 1 );
     428                data_channel_set_creator access( set );
    429429                access.set_name( make_name( name ) );
    430430                load_tags( access.add_channel<md3_key>( uint32( md3->header.num_frames ) ).channel(), name );
    431         }
    432         return new mesh_nodes_data( m_strings ? m_strings->insert( "tags" ) : 0, node_count, nodes );
     431                result->push_back( set );
     432        }
     433        return result;
    433434}
    434435
Note: See TracChangeset for help on using the changeset viewer.