public override GenericRCOLResource.ChunkEntry Export( IDictionary<ulong, string> nameMap, bool exportAllNames) { System.IO.Stream s = null; int i; TGIBlock tgi = new TGIBlock(0, null, "ITG", ResourceType, 0, 0); JazzPlayAnimationNode jpan = new JazzPlayAnimationNode(0, null, s); jpan.ClipResource = string.IsNullOrEmpty(this.mClipPattern) ? this.mClipKey : DummyKey; jpan.TkmkResource = this.mTrackMaskKey; if (this.mSlotSetup.ActorSlotCount > 0) { JazzPlayAnimationNode.ActorSlot jslot; JazzPlayAnimationNode.ActorSlotList jslots = jpan.ActorSlots; SlotSetupBuilder.ActorSlot slot; SlotSetupBuilder.ActorSlot[] slots = this.mSlotSetup.ActorSlotArray; for (i = 0; i < slots.Length; i++) { slot = slots[i]; jslot = new JazzPlayAnimationNode.ActorSlot(0, null, slot.ChainId, slot.SlotId, slot.ActorNameHash, slot.SlotNameHash); jslots.Add(jslot); } } if (this.mSlotSetup.ActorSuffixCount > 0) { JazzPlayAnimationNode.ActorSuffix jsuffix; JazzPlayAnimationNode.ActorSuffixList jsuffixes = jpan.ActorSuffixes; SlotSetupBuilder.ActorSuffix suffix; SlotSetupBuilder.ActorSuffix[] suffixes = this.mSlotSetup.ActorSuffixArray; for (i = 0; i < suffixes.Length; i++) { suffix = suffixes[i]; jsuffix = new JazzPlayAnimationNode.ActorSuffix(0, null); jsuffix.ActorNameHash = suffix.Actor == null ? 0 : suffix.Actor.NameHash; jsuffix.SuffixHash = suffix.Param == null ? 0 : suffix.Param.NameHash; jsuffixes.Add(jsuffix); } } jpan.AdditiveClipResource = string.IsNullOrEmpty(this.mAdditiveClipPattern) ? this.mAdditiveClipKey : DummyKey; jpan.Animation = this.mClipPattern ?? ""; jpan.AdditiveAnimation = this.mAdditiveClipPattern ?? ""; jpan.AnimationNodeFlags = this.Flags; jpan.AnimationPriority1 = this.Priority; jpan.BlendInTime = this.BlendInTime; jpan.BlendOutTime = this.BlendOutTime; jpan.Speed = this.Speed; ActorDefinition actor = this.Actor; jpan.ActorDefinitionIndex = actor == null ? NullCRef : actor.ChunkReference; jpan.TimingPriority = this.TimingPriority; if (this.TargetCount > 0) { JazzChunk.ChunkReferenceList dgi = jpan.DecisionGraphIndexes; DecisionGraphNode[] targets = this.Targets; Array.Sort(targets, 0, targets.Length, AChunkObject.InstantiationComparer.Instance); for (i = 0; i < targets.Length; i++) { dgi.Add(targets[i] == null ? NullCRef : targets[i].ChunkReference); } } return new GenericRCOLResource.ChunkEntry(0, null, tgi, jpan); }
public override GenericRCOLResource.ChunkEntry Export( IDictionary <ulong, string> nameMap, bool exportAllNames) { System.IO.Stream s = null; int i; TGIBlock tgi = new TGIBlock(0, null, "ITG", ResourceType, 0, 0); JazzPlayAnimationNode jpan = new JazzPlayAnimationNode(0, null, s); jpan.ClipResource = string.IsNullOrEmpty(this.mClipPattern) ? this.mClipKey : DummyKey; jpan.TkmkResource = this.mTrackMaskKey; if (this.mSlotSetup.ActorSlotCount > 0) { JazzPlayAnimationNode.ActorSlot jslot; JazzPlayAnimationNode.ActorSlotList jslots = jpan.ActorSlots; SlotSetupBuilder.ActorSlot slot; SlotSetupBuilder.ActorSlot[] slots = this.mSlotSetup.ActorSlotArray; for (i = 0; i < slots.Length; i++) { slot = slots[i]; jslot = new JazzPlayAnimationNode.ActorSlot(0, null, slot.ChainId, slot.SlotId, slot.ActorNameHash, slot.SlotNameHash); jslots.Add(jslot); } } if (this.mSlotSetup.ActorSuffixCount > 0) { JazzPlayAnimationNode.ActorSuffix jsuffix; JazzPlayAnimationNode.ActorSuffixList jsuffixes = jpan.ActorSuffixes; SlotSetupBuilder.ActorSuffix suffix; SlotSetupBuilder.ActorSuffix[] suffixes = this.mSlotSetup.ActorSuffixArray; for (i = 0; i < suffixes.Length; i++) { suffix = suffixes[i]; jsuffix = new JazzPlayAnimationNode.ActorSuffix(0, null); jsuffix.ActorNameHash = suffix.Actor == null ? 0 : suffix.Actor.NameHash; jsuffix.SuffixHash = suffix.Param == null ? 0 : suffix.Param.NameHash; jsuffixes.Add(jsuffix); } } jpan.AdditiveClipResource = string.IsNullOrEmpty(this.mAdditiveClipPattern) ? this.mAdditiveClipKey : DummyKey; jpan.Animation = this.mClipPattern ?? ""; jpan.AdditiveAnimation = this.mAdditiveClipPattern ?? ""; jpan.AnimationNodeFlags = this.Flags; jpan.AnimationPriority1 = this.Priority; jpan.BlendInTime = this.BlendInTime; jpan.BlendOutTime = this.BlendOutTime; jpan.Speed = this.Speed; ActorDefinition actor = this.Actor; jpan.ActorDefinitionIndex = actor == null ? NullCRef : actor.ChunkReference; jpan.TimingPriority = this.TimingPriority; if (this.TargetCount > 0) { JazzChunk.ChunkReferenceList dgi = jpan.DecisionGraphIndexes; DecisionGraphNode[] targets = this.Targets; Array.Sort(targets, 0, targets.Length, AChunkObject.InstantiationComparer.Instance); for (i = 0; i < targets.Length; i++) { dgi.Add(targets[i] == null ? NullCRef : targets[i].ChunkReference); } } return(new GenericRCOLResource.ChunkEntry(0, null, tgi, jpan)); }