Example #1
0
// ----------------------------------------------------------------------------
//
void VenueReader::readDObject( TiXmlElement* self, DObject* dobject, LPCSTR number_name )
{
    dobject->m_uid = (UID)read_dword_attribute( self, "uid" );
    dobject->m_number = (SceneNumber)read_word_attribute( self, number_name );
    dobject->m_name = read_text_element( self, "name" );
    dobject->m_description = read_text_element( self, "description" );
}
Example #2
0
// ----------------------------------------------------------------------------
//
AnimationSignal* VenueReader::read( TiXmlElement* self, AnimationSignal *signal ) {

    signal = new AnimationSignal();

    signal->m_sample_rate_ms = (DWORD)read_dword_attribute( self, "sample_rate_ms" );
    signal->m_sample_decay_ms = (DWORD)read_dword_attribute( self, "sample_decay_ms" );
    signal->m_input_type = (AnimationSignalInput)read_int_attribute( self, "input_type" );
    signal->m_input_low = read_unsigned_attribute( self, "input_low" );
    signal->m_input_high = read_unsigned_attribute( self, "input_high" );
    signal->m_scale_factor = read_unsigned_attribute( self, "scale_factor" );
    signal->m_max_threshold = read_unsigned_attribute( self, "max_threshold" );
    signal->m_apply_to = (ApplySignal)read_word_attribute( self, "apply_to" );

    return signal;
}
Example #3
0
// ----------------------------------------------------------------------------
//
ChannelAnimation* VenueReader::read( TiXmlElement* self, ChannelAnimation* channel_animation )
{
    channel_animation = new ChannelAnimation();

    channel_animation->m_actor_uid = (UID)read_dword_attribute( self, "actor_uid" );
    channel_animation->m_channel = (channel_t)read_word_attribute( self, "channel"  );
    channel_animation->m_animation_style = (ChannelAnimationStyle)read_int_attribute( self, "style" );

    TiXmlElement * values = self->FirstChildElement( "channel_values" );
    if ( values ) {
        TiXmlElement* element = values->FirstChildElement( "channel_value" );
        while ( element ) {
            BYTE value = (BYTE)read_int_attribute( element, "value" );
            channel_animation->m_value_list.push_back( value );
            element = element->NextSiblingElement();
        }
    }

    return channel_animation;
}