public override void Deserialize(BSReader reader) { base.Deserialize(reader); // Check working set var soundSetCount = reader.ReadInt32(); if (soundSetCount <= 0) { return; } // Continue reading this.UnkUInt06 = reader.ReadUInt32(); this.UnkUInt07 = reader.ReadUInt32(); this.UnkUInt08 = reader.ReadUInt32(); this.UnkFloat02 = reader.ReadSingle(); this.UnkFloat03 = reader.ReadSingle(); this.UnkUInt09 = reader.ReadUInt32(); this.UnkUInt10 = reader.ReadUInt32(); this.UnkUInt11 = reader.ReadUInt32(); this.UnkUInt12 = reader.ReadUInt32(); this.UnkUInt13 = reader.ReadUInt32(); this.UnkUInt14 = reader.ReadUInt32(); for (int i = 0; i < soundSetCount; i++) { this.SoundSet.Add(reader.Deserialize <ModDataSoundSet>()); } }
public void Deserialize(BSReader reader) { this.Time = reader.ReadInt32(); this.Type = reader.ReadInt32(); this.Param01 = reader.ReadInt32(); this.Param02 = reader.ReadInt32(); }
public override void Deserialize(BSReader reader) { base.Deserialize(reader); this.UnkUInt06 = reader.ReadUInt32(); this.UnkUInt07 = reader.ReadUInt32(); this.UnkUInt08 = reader.ReadUInt32(); var gradientKeyCount = reader.ReadInt32(); for (int i = 0; i < gradientKeyCount; i++) { this.GradientKeys.Add(reader.Deserialize <GradientKey>()); } if ((this.UnkUInt07 & 4) != 0) { var curveKeyCount = reader.ReadInt32(); for (int i = 0; i < curveKeyCount; i++) { this.CurveKeys.Add(reader.Deserialize <CurveKey>()); } } this.UnkUInt09 = reader.ReadUInt32(); this.UnkUInt10 = reader.ReadUInt32(); // 1 this.UnkUInt11 = reader.ReadUInt32(); // 1 this.UnkUInt12 = reader.ReadUInt32(); this.UnkUInt13 = reader.ReadUInt32(); // 262661 ? this.UnkUInt14 = reader.ReadUInt32(); // 33686530 ? this.UnkUInt15 = reader.ReadUInt32(); // 3361998720 ? this.UnkUInt16 = reader.ReadUInt32(); // 1065353216 ? this.UnkUInt17 = reader.ReadUInt32(); // 1 }
public void Deserialize(BSReader reader, params object[] param) { var objectInfoType = (ObjectGeneralType)param[0]; // This could change if other file than JMXVRES use this class if (objectInfoType == ObjectGeneralType.Character || objectInfoType == ObjectGeneralType.Item) { UnkUInt01 = reader.ReadUInt32(); UnkUInt02 = reader.ReadUInt32(); AttachMethod = reader.ReadUInt32(); var count = reader.ReadInt32(); for (int i = 0; i < count; i++) { Slots.Add(new Slot() { Type = (SlotType)reader.ReadUInt32(), MeshSetIndex = reader.ReadUInt32(), }); } if (objectInfoType == ObjectGeneralType.Character) { nComboNum = reader.ReadUInt32(); } } }
public void Deserialize(BSReader reader) { this.Type = (ObjectGeneralType)reader.ReadInt16(); this.Category = (ObjectGeneralCategory)reader.ReadInt16(); this.Name = reader.ReadString(); this.Int01 = reader.ReadInt32(); this.Int02 = reader.ReadInt32(); }
public override void Deserialize(BSReader reader) { base.Deserialize(reader); this.UnkUInt06 = reader.ReadUInt32(); this.Path = reader.ReadString(); this.UnkUInt07 = reader.ReadUInt32(); }
public void Deserialize(BSReader reader, params object[] param) { var flag = (int)param[0]; this.Path = reader.ReadString(); if ((flag & 1) != 0) { this.Int01 = reader.ReadInt32(); } }
public void Deserialize(BSReader reader) { this.Name = reader.ReadString(); var meshCount = reader.ReadInt32(); for (int i = 0; i < meshCount; i++) { this.MeshIndices.Add(reader.ReadInt32()); } }
public void Deserialize(BSReader reader) { this.Name = reader.ReadString(); var aniTypeDataCount = reader.ReadInt32(); for (int i = 0; i < aniTypeDataCount; i++) { this.AniTypeDataList.Add(reader.Deserialize <PrimAniTypeData>()); } }
public override void Deserialize(BSReader reader) { base.Deserialize(reader); var particleCount = reader.ReadInt32(); for (int i = 0; i < particleCount; i++) { this.Particles.Add(reader.Deserialize <ModDataParticleConfig>()); } }
public override void Deserialize(BSReader reader) { base.Deserialize(reader); this.UnkUInt06 = reader.ReadUInt32(); this.UnkUInt07 = reader.ReadUInt32(); this.UnkUInt08 = reader.ReadUInt32(); this.UnkUInt09 = reader.ReadUInt32(); this.UnkUInt10 = reader.ReadUInt32(); this.Matrix = reader.ReadMatrix4x4(); }
public virtual void Deserialize(BSReader reader) { this.UnkFloat01 = reader.ReadSingle(); this.UnkUInt01 = reader.ReadUInt32(); this.UnkUInt02 = reader.ReadUInt32(); this.UnkUInt03 = reader.ReadUInt32(); this.UnkUInt04 = reader.ReadUInt32(); this.UnkUInt05 = reader.ReadUInt32(); this.UnkByte01 = reader.ReadByte(); this.UnkByte02 = reader.ReadByte(); this.UnkByte03 = reader.ReadByte(); this.UnkByte04 = reader.ReadByte(); }
public void Deserialize(BSReader reader) { this.Name = reader.ReadString(); var trackCount = reader.ReadInt32(); for (int i = 0; i < trackCount; i++) { if (reader.ReadUInt32() == 0) { continue; } this.Tracks.Add(reader.Deserialize <ModDataSoundTrack>()); } }
public void Deserialize(BSReader reader) { this.IsEnabled = reader.ReadInt32() != 0; this.Path = reader.ReadString(); this.BoneRelative = reader.ReadString(); this.Position = reader.ReadVector3(); this.BirthTime = reader.ReadUInt32(); this.UnkByte01 = reader.ReadByte(); this.UnkByte02 = reader.ReadByte(); this.UnkByte03 = reader.ReadByte(); this.UnkByte04 = reader.ReadByte(); if (this.UnkByte04 == 1) { this.UnkVector01 = reader.ReadVector3(); } }
public void Deserialize(BSReader reader) { this.Type = reader.ReadInt32(); this.AnimationType = (PrimAnimationType)reader.ReadInt32(); this.Name = reader.ReadString(); var dataCount = reader.ReadInt32(); this.ModData.Capacity = dataCount; for (int i = 0; i < dataCount; i++) { var data = ModDataFactory.Create((ModDataType)reader.ReadInt32()); data.Deserialize(reader); this.ModData.Add(data); } }
public void Deserialize(BSReader reader) { this.Name = reader.ReadString(); this.Diffuse = reader.ReadColor4(); this.Ambient = reader.ReadColor4(); this.Specular = reader.ReadColor4(); this.Emissive = reader.ReadColor4(); this.UnkFloat01 = reader.ReadSingle(); this.Flags = reader.ReadUInt32(); // MaterialEntryFlags (64 is default often used with 256 and/or 512 only a few exceptions have 1 2 4 8...) this.DiffuseMapPath = reader.ReadString(); this.UnkFloat02 = reader.ReadSingle(); this.UnkByte01 = reader.ReadByte(); this.UnkByte02 = reader.ReadByte(); this.IsAbsolutePath = reader.ReadBoolean(); if ((this.Flags & (uint)PrimMtrlFlag.Bit14) != 0) { this.NormalMapPath = reader.ReadString(); this.UnkUInt01 = reader.ReadUInt32(); } }
public void Deserialize(BSReader reader) { this.Type = (PrimAnimationType)reader.ReadInt32(); this.PrimAnimationIndex = reader.ReadInt32(); var eventCount = reader.ReadInt32(); for (int i = 0; i < eventCount; i++) { this.Events.Add(reader.Deserialize <PrimAnimationEvent>()); } var walkPointCount = reader.ReadInt32(); this.WalkLength = reader.ReadFloat(); for (int i = 0; i < walkPointCount; i++) { this.WalkGraph.Add(reader.ReadVector2()); } }
public void Load(Stream stream) { // Read file structure using (var reader = new BSReader(stream)) { var signature = reader.ReadString(12); if (signature != LatestSignature) { // TODO: Migrate old version to current if possible. throw new NotSupportedException($"Migration from '{signature}' not supported."); } // Materials var mtrlCount = reader.ReadInt32(); Materials = new List <PrimMtrl>(mtrlCount); for (int i = 0; i < mtrlCount; i++) { this.Materials.Add(reader.Deserialize <PrimMtrl>()); } } }
public void Load(Stream stream) { // Read file structure using (var reader = new BSReader(stream)) { var signature = reader.ReadString(12); if (signature != LatestSignature) { // TODO: Migrate old version to current if possible. throw new NotSupportedException($"Migration from '{signature}' not supported."); } // File offsets (Collision, Resources) reader.SkipRead(8); // Unknown Int01 = reader.ReadUInt32(); Int02 = reader.ReadUInt32(); Int03 = reader.ReadUInt32(); Int04 = reader.ReadUInt32(); Int05 = reader.ReadUInt32(); // Object info this.ObjectInfo = reader.Deserialize <ObjectGeneralInfo>(); // FileOffset.Collision CollisionResourcePath = reader.ReadString(); // FileOffset.Resources var count = reader.ReadInt32(); ResourceSet = new List <string>(count); for (int i = 0; i < count; i++) { ResourceSet.Add(reader.ReadString()); } } }
public override void Deserialize(BSReader reader) { base.Deserialize(reader); this.UnkFloat02 = reader.ReadSingle(); this.UnkFloat03 = reader.ReadSingle(); this.UnkFloat04 = reader.ReadSingle(); this.UnkFloat05 = reader.ReadSingle(); this.UnkFloat06 = reader.ReadSingle(); this.UnkFloat07 = reader.ReadSingle(); var textureCount = reader.ReadInt32(); for (int i = 0; i < textureCount; i++) { // Check if entry is not enabled if (reader.ReadByte() == 0) { continue; } this.Textures.Add(reader.ReadString()); } }
public void Load(Stream stream) { // Read file structure using (var reader = new BSReader(stream)) { // Signature var signature = reader.ReadString(12); if (signature != LatestSignature) { // TODO: Migrate old version to current if possible. throw new NotSupportedException($"Migration from '{signature}' not supported."); } // File offsets (Material, Mesh, Animation, Skeleton, MeshGroup, AnimationGroup, ModPalette, Collision) reader.SkipRead(32); // Unknown Flags Flag01 = reader.ReadInt32(); Flag02 = reader.ReadInt32(); Flag03 = reader.ReadInt32(); Flag04 = reader.ReadInt32(); Flag05 = reader.ReadInt32(); // Object info this.ObjectInfo = reader.Deserialize <ObjectGeneralInfo>(); // Reserved UnkBuffer = reader.ReadBytes(40); // FileOffset.Collision CollisionMesh = reader.ReadString(); CollisionBox01 = reader.ReadBoundingBoxF(); CollisionBox02 = reader.ReadBoundingBoxF(); UseCollisionMatrix = reader.ReadUInt32() != 0; if (UseCollisionMatrix) { CollisionMatrix = reader.ReadMatrix4x4(); } // FileOffset.Material var count = reader.ReadInt32(); MaterialSet = new List <PrimMtrlSet>(count); for (int i = 0; i < count; i++) { MaterialSet.Add(reader.Deserialize <PrimMtrlSet>()); } // FileOffset.Mesh count = reader.ReadInt32(); MeshSet = new List <PrimMesh>(count); for (int i = 0; i < count; i++) { MeshSet.Add(reader.DeserializeParameterized <PrimMesh>(this.Flag01)); } // FileOffset.Animation AnimationTypeVersion = reader.ReadUInt32(); AnimationTypeUserDefine = reader.ReadUInt32(); count = reader.ReadInt32(); AnimationSet = new List <PrimAnimation>(count); for (int i = 0; i < count; i++) { AnimationSet.Add(reader.Deserialize <PrimAnimation>()); } // FileOffset.Skeleton HasSkeleton = reader.ReadUInt32() != 0; if (HasSkeleton) { SkeletonPath = reader.ReadString(); AttachmentBone = reader.ReadString(); } // FileOffset.MeshGroup count = reader.ReadInt32(); MeshGroups = new List <PrimMeshGroup>(count); for (int i = 0; i < count; i++) { this.MeshGroups.Add(reader.Deserialize <PrimMeshGroup>()); } // FileOffset.AnimationGroup count = reader.ReadInt32(); AnimationGroups = new List <PrimAniGroup>(count); for (int i = 0; i < count; i++) { this.AnimationGroups.Add(reader.Deserialize <PrimAniGroup>()); } // FileOffset.ModPalette count = reader.ReadInt32(); SystemModSets = new List <ModDataSet>(); for (int i = 0; i < count; i++) { SystemModSets.Add(reader.Deserialize <ModDataSet>()); } count = reader.ReadInt32(); AniModSets = new List <ModDataSet>(); for (int i = 0; i < count; i++) { AniModSets.Add(reader.Deserialize <ModDataSet>()); } // ResAttachable ResourceAttachable = reader.DeserializeParameterized <ResAttachable>(ObjectInfo.Type); } }
public void Deserialize(BSReader reader) { this.Path = reader.ReadString(); }
public void Deserialize(BSReader reader) { this.Time = reader.ReadInt32(); this.Value = reader.ReadSingle(); }
public void Deserialize(BSReader reader) { this.Path = reader.ReadString(); this.Time = reader.ReadInt32(); this.Event = reader.ReadString(); }
public void Deserialize(BSReader reader) { this.Index = reader.ReadInt32(); this.Path = reader.ReadString(); }