internal static StageRefract Read(EndianBinaryReader reader) { StageRefract refract = new StageRefract(); refract.Mode = ( StageReflectRefractResolution )reader.ReadInt32(); return(refract); }
internal void Read(EndianBinaryReader reader, BinaryFormat format) { if (format == BinaryFormat.F2nd || format == BinaryFormat.X) { Id = ( uint )reader.ReadUInt64(); Name = reader.ReadStringOffset(StringBinaryFormat.NullTerminated); Auth3dName = reader.ReadStringOffset(StringBinaryFormat.NullTerminated); Objects = StageObjects.ReadModern(reader); LensShaftInvScale = reader.ReadSingle(); Field00 = reader.ReadUInt32(); RenderTextureId = reader.ReadUInt32(); RenderTextureIdFlag = reader.ReadUInt32(); MovieTextureId = reader.ReadUInt32(); MovieTextureIdFlag = reader.ReadUInt32(); Field04 = reader.ReadUInt32(); Field04Flag = reader.ReadUInt32(); Field05 = reader.ReadUInt32(); Field05Flag = reader.ReadUInt32(); Field06 = reader.ReadUInt32(); Field06Flag = reader.ReadUInt32(); Field07 = reader.ReadUInt32(); Field07Flag = reader.ReadUInt32(); Field08 = reader.ReadUInt32(); Field09 = reader.ReadUInt32(); Field10 = reader.ReadUInt32(); if (format == BinaryFormat.X) { reader.Seek(4, SeekOrigin.Current); } Field11 = reader.ReadOffset(); Field12 = reader.ReadOffset(); RingRectangleX = reader.ReadSingle(); RingRectangleY = reader.ReadSingle(); RingRectangleWidth = reader.ReadSingle(); RingRectangleHeight = reader.ReadSingle(); RingRingHeight = reader.ReadSingle(); RingOutHeight = reader.ReadSingle(); if (format == BinaryFormat.X) { Field13 = reader.ReadUInt32(); } ReadStageEffects(reader); if (format == BinaryFormat.X) { reader.Seek(4, SeekOrigin.Current); } uint auth3dIdsCount = reader.ReadUInt32(); long auth3dIdsOffset = reader.ReadOffset(); reader.ReadAtOffset(auth3dIdsOffset, () => { for (int i = 0; i < auth3dIdsCount; i++) { Auth3dIds.Add(reader.ReadUInt32()); } }); if (format != BinaryFormat.X) { reader.Seek(4, SeekOrigin.Current); } } else { Name = reader.ReadStringOffset(StringBinaryFormat.NullTerminated); Auth3dName = reader.ReadStringOffset(StringBinaryFormat.NullTerminated); ObjectSetID = reader.ReadUInt32(); Objects = StageObjects.ReadClassic(reader); LensFlareTexture = reader.ReadUInt32(); LensShaftTexture = reader.ReadUInt32(); LensGhostTexture = reader.ReadUInt32(); LensShaftInvScale = reader.ReadSingle(); Field00 = reader.ReadUInt32(); RenderTextureId = reader.ReadUInt32(); if (format > BinaryFormat.DT) { MovieTextureId = reader.ReadUInt32(); } CollisionFilePath = reader.ReadStringOffset(StringBinaryFormat.NullTerminated); ReflectType = reader.ReadUInt32(); RefractEnable = reader.ReadUInt32() != 0; reader.ReadAtOffset(reader.ReadInt32(), () => Reflect = StageReflect.Read(reader)); reader.ReadAtOffset(reader.ReadInt32(), () => Refract = StageRefract.Read(reader)); if (format == BinaryFormat.FT) { Flags = (StageFlags)reader.ReadUInt32(); } RingRectangleX = reader.ReadSingle(); RingRectangleY = reader.ReadSingle(); RingRectangleWidth = reader.ReadSingle(); RingRectangleHeight = reader.ReadSingle(); RingRingHeight = reader.ReadSingle(); RingOutHeight = reader.ReadSingle(); } }