Changeset 510 for trunk/src


Ignore:
Timestamp:
07/27/16 19:06:49 (9 years ago)
Author:
epyon
Message:
  • choice a enum instead of boolean - pattern support
Location:
trunk/src/engine
Files:
2 edited

Legend:

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

    r509 r510  
    6161        m_lua->register_enum( "EASING_SINE",    static_cast<int>( easing_type::SINE ) );
    6262
     63        m_lua->register_enum( "CHOICE_ALL", static_cast<int>( model_node_choice::ALL ) );
     64        m_lua->register_enum( "CHOICE_WEIGHTED", static_cast<int>( model_node_choice::WEIGHTED ) );
     65        m_lua->register_enum( "CHOICE_PATTERN_CHECKER", static_cast<int>( model_node_choice::PATTERN_CHECKER ) );
     66
    6367        m_materials->initialize( lua );
    6468        m_programs->initialize( lua );
  • trunk/src/engine/model_manager.cc

    r509 r510  
    104104
    105105        node->force     = table.get_boolean( "force", false );
    106         node->choice    = table.get_boolean( "choice", false );
     106        node->choice    = model_node_choice( table.get_unsigned( "choice", false ) );
    107107        node->chance    = table.get_float( "chance", 1.0f );
    108108        node->weight    = table.get_unsigned( "weight", 1 );
Note: See TracChangeset for help on using the changeset viewer.