Skip to main content

plan

Function plan 

Source
pub fn plan<V: ClipVariant, S, D>(
    dialogue: &DialogueTable<D>,
    voiced: &BTreeSet<String>,
    cast: &Cast<S>,
    clips: &[VoiceClip<V>],
    variants: impl Fn(&str, &str) -> &'static [V],
    spoken: impl Fn(&str, V) -> Option<String>,
    voice_changed: impl Fn(&VoiceClip<V>, &CastVoice<S>) -> Option<String>,
) -> VoicePlan<V>
Expand description

Plans dialogue’s clips: the lines of the scenes in voiced need a clip for each variant variants(speaker, text) names, saying spoken(text, variant) (a variant whose words are None needs none). clips are the manifest’s. A generated clip whose voice is still the cast’s is made again if voice_changed(clip, cast voice) gives a reason.