private void Parse(Stream s) { BinaryReader r = new BinaryReader(s); uint dw1 = r.ReadUInt32(); uint dw2 = r.ReadUInt32(); s.Position = 0; if (dw1 == 0x8EAF13DE && dw2 == 0x00000000) { rigFormat = RigFormat.WrappedGranny; //ParseWrappedGranny(s); ParseRawGranny(s); } else if ((dw1 == 0x00000003 || dw1 == 0x00000004) && ((dw2 == 0x00000001 || dw2 == 0x00000002))) { rigFormat = RigFormat.Clear; ParseClear(s); } else { rigFormat = RigFormat.RawGranny; ParseRawGranny(s); } }
IKChainList ikChains = null;//major >= 4 #endregion public RigResource(int APIversion, Stream s) : base(APIversion, s) { if (stream == null) { rigFormat = RigFormat.Clear; stream = UnParse(); OnResourceChanged(this, EventArgs.Empty); } stream.Position = 0; Parse(stream); }