public override void Save(HSDWriter Writer) { Writer.AddObject(Vertices); foreach (var v in Vertices) { v.Save(Writer); } foreach (var v in Links) { v.Save(Writer); } foreach (var v in AreaTables) { v.Save(Writer); } Writer.AddObject(this); Writer.WritePointer(Vertices.Count == 0 ? null : Vertices); Writer.Write(Vertices.Count); Writer.WritePointer(Links.Count == 0 ? null : Links[0]); Writer.Write(Links.Count); Writer.Write(Unknown1); Writer.Write(Unknown2); Writer.Write(Unknown3); Writer.Write(Unknown4); Writer.Write(Unknown5); Writer.Write(Unknown6); Writer.Write(Unknown7); Writer.WritePointer(AreaTables.Count == 0 ? null : AreaTables[0]); Writer.Write(AreaTables.Count); Writer.Write(Unknown8); }
public void WriteObject(HSDWriter Writer) { Writer.AddObject(this); Writer.Write(Type); Writer.Write((ushort)Points.Count); Writer.Write(Tension); Writer.WritePointer(Points); Writer.Write(TotalLength); Writer.WritePointer(SegmentLengths); Writer.Write(0); }
public override void Save(HSDWriter Writer) { foreach (KAR_GrViewRegion Unk1_1 in ViewRegion.Elements) { Writer.AddObject(Unk1_1.DOBJIndices); foreach (var v in Unk1_1.DOBJIndices) { Writer.Write(v); } Writer.Align(4); } foreach (KAR_GrModel_ModelUnk1_2 Unk1_2 in GroupsUnk1_2.Elements) { Writer.AddObject(Unk1_2.DOBJIndices); foreach (var v in Unk1_2.DOBJIndices) { Writer.Write(v); } Writer.Align(4); } ViewRegion.Save(Writer); Writer.Align(4); GroupsUnk1_2.Save(Writer); Writer.Align(4); GroupsUnk1_3.Save(Writer); Writer.Align(4); Writer.AddObject(DOBJIndices); foreach (var v in DOBJIndices) { Writer.Write(v); } Writer.Align(4); Writer.AddObject(this); Writer.WritePointer(ViewRegion.Size > 0 ? ViewRegion.Elements[0] : null); Writer.Write((ushort)ViewRegion.Size); Writer.Write((ushort)0); Writer.WritePointer(GroupsUnk1_2.Size > 0 ? GroupsUnk1_2.Elements[0] : null); Writer.Write((ushort)GroupsUnk1_2.Size); Writer.Write((ushort)0); Writer.WritePointer(GroupsUnk1_3.Size > 0 ? GroupsUnk1_3.Elements[0] : null); Writer.Write((ushort)GroupsUnk1_3.Size); Writer.Write((ushort)0); Writer.WritePointer(DOBJIndices); Writer.Write((ushort)DOBJIndices.Count); Writer.Write((ushort)0); }
public override void Save(HSDWriter Writer) { if (MatAnimJoint == null) { Writer.WriteObject(MatAnimJoint); } foreach (HSD_AnimNode node in Nodes) { foreach (HSD_Track t in node.Tracks) { t.Save(Writer); } } object array = new object(); Writer.AddObject(array); HSD_Track FirstTrack = null; foreach (HSD_AnimNode node in Nodes) { Writer.Write((byte)node.Tracks.Count); foreach (HSD_Track t in node.Tracks) { if (FirstTrack == null) { FirstTrack = t; } } } Writer.Write((byte)0xFF); Writer.Align(4); Writer.AddObject(this); Writer.Write(MatAnimJoint == null ? 1 : -1); if (MatAnimJoint == null) { Writer.Write(0); } else { Writer.WritePointer(MatAnimJoint); } Writer.Write(FrameCount); Writer.WritePointer(array); Writer.WritePointer(FirstTrack); }
public override void Save(HSDWriter Writer) { foreach (KAR_GrUnk2_1Model Unk2_1 in GroupsUnk2_1.Elements) { foreach (KAR_GrUnk2_1DModel Unk2_1D in Unk2_1.GroupsUnk2_1D.Elements) { Writer.AddObject(Unk2_1D.DOBJIndices); foreach (var v in Unk2_1D.DOBJIndices) { Writer.Write(v); } Writer.Align(4); } } foreach (KAR_GrUnk2_1Model Unk2_1 in GroupsUnk2_1.Elements) { Unk2_1.GroupsUnk2_1D.Save(Writer); } GroupsUnk2_1.Save(Writer); Writer.AddObject(this); Writer.WritePointer(GroupsUnk2_1.Size > 0 ? GroupsUnk2_1.Elements[0] : null); Writer.Write((ushort)GroupsUnk2_1.Size); Writer.Write((ushort)0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(this); Writer.WritePointer(DOBJIndices); Writer.Write((ushort)DOBJIndices.Count); Writer.Write((ushort)0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(this); Writer.Write(ID); Writer.Write((ushort)0); Writer.WritePointer(GroupsUnk2_1D.Size > 0 ? GroupsUnk2_1D.Elements[0] : null); Writer.Write((ushort)GroupsUnk2_1D.Size); Writer.Write((ushort)0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(this); for (int i = 0; i < JOBJs.Count; i++) { Writer.WritePointer(JOBJs[i]); Writer.Write(Weights[i]); } Writer.Write(0); Writer.Write(0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(Tables); foreach (var v in Tables) { v.Save(Writer); } Writer.WriteObject(RootNode); Writer.AddObject(this); Writer.WritePointer(RootNode); if (Tables.Count > 0) { Writer.WritePointer(Tables); } else { Writer.Write(0); } Writer.Write(Tables.Count); }
public override void Save(HSDWriter Writer) { if (BoneIDs.Count > 0) { Writer.AddObject(BoneIDs); foreach (var b in BoneIDs) { Writer.Write(b); } } if (Matrices.Count > 0) { Writer.AddObject(Matrices); foreach (var m in Matrices) { m.Save(Writer); } } Writer.AddObject(this); if (BoneIDs.Count > 0) { Writer.WritePointer(BoneIDs); } else { Writer.Write(0); } if (Matrices.Count > 0) { Writer.WritePointer(Matrices); } else { Writer.Write(0); } Writer.Write(Math.Max(Matrices.Count, BoneIDs.Count)); }
public override void Save(HSDWriter Writer) { foreach (var p in Paths) { p.Save(Writer); } Writer.AddObject(Paths); foreach (var p in Paths) { Writer.WritePointer(p); } if (Paths.Count == 0) { Writer.Write(0); } Writer.AddObject(this); Writer.WritePointer(Paths); Writer.Write(Paths.Count == 0 ? 1 : Paths.Count); }
public override void Save(HSDWriter Writer) { if (Data != null) { Writer.WriteTexture(Data); } Writer.AddObject(this); Writer.WritePointer(Data); Writer.Write(Width); Writer.Write(Height); Writer.Write((uint)Format); }
public override void Save(HSDWriter Writer) { if (Next != null) { Next.Save(Writer); } Writer.WriteObject(VertexAttributes); Writer.WriteBuffer(DisplayListBuffer); if (BindGroups != null) { Writer.WriteObject(BindGroups); } Writer.AddObject(this); Writer.Write(0); if (Next != null) { Writer.WritePointer(Next); } else { Writer.Write(0); } Writer.WritePointer(VertexAttributes); Writer.Write((ushort)Flags); if (DisplayListBuffer == null) { Writer.Write((ushort)0); } else { Writer.Write((ushort)(DisplayListBuffer.Length / 32)); } Writer.WritePointer(DisplayListBuffer); Writer.WritePointer(BindGroups); }
public override void Save(HSDWriter Writer) { foreach (var v in Lights) { v.Save(Writer); } Writer.AddObject(this); foreach (var v in Lights) { Writer.WritePointer(v); } Writer.Write(0); }
public override void Save(HSDWriter Writer) { if (Data != null) { Writer.WriteTexture(Data); } Writer.AddObject(this); Writer.WritePointer(Data); Writer.Write((uint)Format); Writer.Write(GXTlut); Writer.Write(ColorCount); Writer.Write((ushort)0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(FogRegions); foreach (var v in FogRegions) { v.Save(Writer); } Writer.AddObject(this); Writer.WritePointer(FogRegions); Writer.Write(FogRegions.Count); Writer.Write(-1); Writer.Write(-1); }
public override void Save(HSDWriter Writer) { Writer.AddObject(Vertices); foreach (var v in Vertices) { Writer.Write(v.X); Writer.Write(v.Y); Writer.Write(v.Z); } Writer.AddObject(Faces); foreach (var v in Faces) { Writer.WriteObject(v); } Writer.AddObject(Joints); foreach (var v in Joints) { Writer.WriteObject(v); } Writer.AddObject(ZoneVertices); foreach (var v in ZoneVertices) { Writer.Write(v.X); Writer.Write(v.Y); Writer.Write(v.Z); } Writer.AddObject(ZoneFaces); foreach (var v in ZoneFaces) { Writer.WriteObject(v); } Writer.AddObject(ZoneJoints); foreach (var v in ZoneJoints) { Writer.WriteObject(v); } Writer.AddObject(this); Writer.WritePointer(Vertices); Writer.Write(Vertices.Count); Writer.WritePointer(Faces); Writer.Write(Faces.Count); Writer.WritePointer(Joints); Writer.Write(Joints.Count); Writer.WritePointer(ZoneVertices); Writer.Write(ZoneVertices.Count); Writer.WritePointer(ZoneFaces); Writer.Write(ZoneFaces.Count); Writer.WritePointer(ZoneJoints); Writer.Write(ZoneJoints.Count); }
public override void Save(HSDWriter Writer) { Writer.AddObject(this); Writer.WritePointer(DOBJIndices); Writer.Write((ushort)DOBJIndices.Count); Writer.Write((ushort)0); Writer.Write(UnkFloat1); Writer.Write(UnkFloat2); Writer.Write(UnkFloat3); Writer.Write(UnkFloat4); Writer.Write(UnkFloat5); Writer.Write(UnkFloat6); Writer.Write(UnkUInt7); }
public override void Save(HSDWriter Writer) { if (DataBuffer != null) { Writer.WriteBuffer(DataBuffer); } Writer.AddObject(this); Writer.Write((uint)Name); Writer.Write((uint)AttributeType); Writer.Write((uint)CompCount); Writer.Write((uint)CompType); Writer.Write(Scale); Writer.Write((byte)0); Writer.Write(Stride); Writer.WritePointer(DataBuffer); }
public override void Save(HSDWriter Writer) { foreach (var p in Splines) { p.WriteData(Writer); } Writer.AddObject(Splines); foreach (var p in Splines) { p.Save(Writer); } Writer.AddObject(this); Writer.WritePointer(Splines); Writer.Write(Splines.Count == 0 ? 1 : Splines.Count); Writer.Write(0); }
public override void Save(HSDWriter Writer) { if (Elements == null) { return; } foreach (IHSDNode node in Elements) { Writer.WriteObject(node); } Writer.AddObject(this); foreach (IHSDNode node in Elements) { Writer.WritePointer(node); } Writer.Write(0); }
public override void Save(HSDWriter Writer) { Writer.AddObject(Partitions); foreach (var p in Partitions) { Writer.WritePointer(p); } foreach (var p in Partitions) { p.Save(Writer); } Writer.AddObject(CollidableTriangles); foreach (var v in CollidableTriangles) { Writer.Write(v); } Writer.Align(4); Writer.AddObject(UnknownIndices); foreach (var v in UnknownIndices) { Writer.Write(v); } Writer.Align(4); Writer.AddObject(UnknownIndices2); foreach (var v in UnknownIndices2) { Writer.Write(v); } Writer.Align(4); Writer.AddObject(CollidableTrianglesBits); Writer.Write(new byte[(CollidableTriangles.Count / 8) + 5]); Writer.Align(4); Writer.AddObject(this); Writer.WritePointer(Partitions); Writer.Write((short)Partitions.Count); Writer.Write((short)0); Writer.Write(0x05000000); Writer.WritePointer(CollidableTriangles); Writer.Write((short)CollidableTriangles.Count); Writer.Write((short)0); Writer.Write(0x05000000); Writer.WritePointer(UnknownIndices); Writer.Write((short)UnknownIndices.Count); Writer.Write((short)0); Writer.Write(0x05000000); Writer.WritePointer(UnknownIndices2); Writer.Write((short)UnknownIndices2.Count); Writer.Write((short)0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0); Writer.Write(0x00000003); Writer.WritePointer(CollidableTrianglesBits); Writer.Write((short)CollidableTriangles.Count); Writer.Write((short)0); }
public void WriteObject(HSDWriter Writer) { Writer.AddObject(this); Writer.WritePointer(Indices); Writer.Write(Indices.Count); }
public override void Save(HSDWriter Writer) { foreach (var v in YakuData) { v.Save(Writer); } foreach (var v in YakuStaticData) { v.Save(Writer); } Writer.AddObject(YakuData); foreach (var v in YakuData) { Writer.WritePointer(v); } Writer.AddObject(YakuStaticData); foreach (var v in YakuStaticData) { Writer.WritePointer(v); } Writer.AddObject(YakuCommonData); foreach (var v in YakuCommonData) { v.Save(Writer); } Writer.AddObject(this); if (YakuData.Count == 0) { Writer.Write(0); } else { Writer.WritePointer(YakuData); } Writer.Write(YakuData.Count); if (YakuStaticData.Count == 0) { Writer.Write(0); } else { Writer.WritePointer(YakuStaticData); } Writer.Write(YakuStaticData.Count); if (YakuCommonData.Count == 0) { Writer.Write(0); } else { Writer.WritePointer(YakuCommonData); } Writer.Write(YakuCommonData.Count); }