Ignore:
Timestamp:
10/23/15 19:35:39 (10 years ago)
Author:
epyon
Message:
  • resource handling rewrite
  • skeletal_mesh/mesh_data updates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/resource_system.cc

    r474 r477  
    99#include "nv/lua/lua_nova.hh"
    1010
    11 void nv::resource_manager_base::initialize( lua::state* a_lua_state )
     11void nv::lua_resource_manager_base::initialize( lua::state* a_lua_state )
    1212{
    1313        m_lua = a_lua_state;
     
    1616}
    1717
    18 nv::res_id nv::resource_manager_base::load_resource( const string_view& id )
     18bool nv::lua_resource_manager_base::load_resource( const string_view& id )
    1919{
    2020        lua::table_guard table( m_lua, lua::path( get_storage_name(), id ) );
    21         res_id rid = load_resource( table );
    22         if ( rid != 0 ) m_names[ id ] = rid;
    23         return rid;
     21        load_resource( table, id );
     22        return true;
    2423}
    2524
    26 void nv::resource_manager_base::load_all()
     25void nv::lua_resource_manager_base::load_all()
    2726{
    2827        clear();
     
    3130        for ( auto i : range( count ) )
    3231        {
    33                 lua::table_guard sub_table( table, i+1 );
    34                 res_id rid = load_resource( sub_table );
    35                 if ( rid != 0 ) m_names[ sub_table.get_string_hash_64("id") ] = rid;
     32                lua::table_guard sub_table( table, i + 1 );
     33                load_resource( sub_table, sub_table.get_string_hash_64( "id" ) );
    3634        }
    3735}
     36
Note: See TracChangeset for help on using the changeset viewer.