//----------------------------------------------------------------------------- // Writes out a new actbusy file //----------------------------------------------------------------------------- bool CImportActBusy::Serialize( CUtlBuffer &buf, CDmElement *pRoot ) { SerializeHeader( buf ); buf.Printf( "\"ActBusy.txt\"\n" ); buf.Printf( "{\n" ); CDmAttribute *pChildren = pRoot->GetAttribute( "children" ); if ( !pChildren || pChildren->GetType() != AT_ELEMENT_ARRAY ) return NULL; CDmrElementArray<> children( pChildren ); int nCount = children.Count(); buf.PushTab(); for ( int i = 0; i < nCount; ++i ) { CDmElement *pChild = children[i]; buf.Printf( "\"%s\"\n", pChild->GetName() ); buf.Printf( "{\n" ); buf.PushTab(); PrintStringAttribute( pChild, buf, "busy_anim", true ); PrintStringAttribute( pChild, buf, "entry_anim", true ); PrintStringAttribute( pChild, buf, "exit_anim", true ); PrintStringAttribute( pChild, buf, "busy_sequence", true ); PrintStringAttribute( pChild, buf, "entry_sequence", true ); PrintStringAttribute( pChild, buf, "exit_sequence", true ); PrintFloatAttribute( pChild, buf, "min_time" ); PrintFloatAttribute( pChild, buf, "max_time" ); PrintStringAttribute( pChild, buf, "interrupts" ); buf.PopTab(); buf.Printf( "}\n" ); } buf.PopTab(); buf.Printf( "}\n" ); return true; }