public OBJf(IffChunk Chunk) : base(Chunk) { MemoryStream MemStream = new MemoryStream(Chunk.Data); BinaryReader Reader = new BinaryReader(MemStream); //Unknown + version (always 0) Reader.ReadBytes(8); string Header = Encoding.ASCII.GetString(Reader.ReadBytes(4)); if (Header != "fJBO") return; //Error? This shouldn't occur... m_NumEntries = Reader.ReadInt32(); for (int i = 0; i < m_NumEntries; i++) { IDPair FuncIDs = new IDPair(); FuncIDs.GuardFuncID = Reader.ReadUInt16(); FuncIDs.FunctionID = Reader.ReadUInt16(); m_FuncIDs.Add(FuncIDs); } }
/// <summary> /// Creates a new OBJf instance. /// </summary> /// <param name="Chunk">The data for the chunk.</param> public OBJf(IffChunk Chunk) : base(Chunk) { MemoryStream MemStream = new MemoryStream(Chunk.Data); BinaryReader Reader = new BinaryReader(MemStream); //Unknown + version (always 0) Reader.ReadBytes(8); string Header = Encoding.ASCII.GetString(Reader.ReadBytes(4)); if (Header != "fJBO") { return; //Error? This shouldn't occur... } m_NumEntries = Reader.ReadInt32(); for (int i = 0; i < m_NumEntries; i++) { IDPair FuncIDs = new IDPair(); FuncIDs.GuardFuncID = Reader.ReadUInt16(); FuncIDs.FunctionID = Reader.ReadUInt16(); m_FuncIDs.Add(FuncIDs); } }