Changeset 439 for trunk/src/engine
- Timestamp:
- 07/23/15 18:14:48 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/engine/particle_engine.cc
r433 r439 302 302 void nv::particle_engine::load( lua::table_guard& table ) 303 303 { 304 s td::string id = table.get_std_string( "id" );305 if ( id == "")304 shash64 id = table.get_string_hash_64( "id" ); 305 if ( !id.valid() ) 306 306 { 307 307 NV_LOG_ERROR( "Bad table passed to particle_engine!" ) … … 355 355 { 356 356 lua::table_guard element( table, i+1 ); 357 const_string type = element.get_string( "type");358 std::string sub_type = element.get_std_string("sub_type");357 const_string type = element.get_string( "type" ); 358 const_string sub_type = element.get_string( "sub_type" ); 359 359 if ( type == "emmiter" ) 360 360 { … … 370 370 { 371 371 edata.emmiter_func = nv_particle_emmiter_point; 372 NV_LOG_WARNING( "Unknown emmiter type in particle system! (", sub_type .c_str(), ")" );372 NV_LOG_WARNING( "Unknown emmiter type in particle system! (", sub_type, ")" ); 373 373 } 374 374 … … 435 435 { 436 436 data.affector_count--; 437 NV_LOG_WARNING( "Bad data passed to ", s tring_view( sub_type.c_str(), sub_type.size() ), " affector in particle system!" );437 NV_LOG_WARNING( "Bad data passed to ", sub_type, " affector in particle system!" ); 438 438 } 439 439 } … … 441 441 { 442 442 data.affector_count--; 443 NV_LOG_WARNING( "Unknown affector type in particle system! (", s tring_view( sub_type.c_str(), sub_type.size() ), ")" );443 NV_LOG_WARNING( "Unknown affector type in particle system! (", sub_type, ")" ); 444 444 } 445 445 } … … 469 469 } 470 470 471 nv::particle_system nv::particle_engine::create_system( const st d::string& id )471 nv::particle_system nv::particle_engine::create_system( const string_view& id ) 472 472 { 473 473 auto it = m_names.find( id ); … … 823 823 } 824 824 825 void nv::particle_engine::register_emmiter_type( const st d::string& name, particle_emmiter_func func )825 void nv::particle_engine::register_emmiter_type( const string_view& name, particle_emmiter_func func ) 826 826 { 827 827 m_emmiters[ name ] = func; … … 842 842 } 843 843 844 void nv::particle_engine::register_affector_type( const st d::string& name, particle_affector_init_func init, particle_affector_func process )844 void nv::particle_engine::register_affector_type( const string_view& name, particle_affector_init_func init, particle_affector_func process ) 845 845 { 846 846 m_affectors[ name ].init = init;
Note: See TracChangeset
for help on using the changeset viewer.