using FSO.Files.Utils; using System; using System.IO; namespace FSO.Files.Formats.IFF.Chunks { public class CARR : IffChunk { public string Name; public JobLevel[] JobLevels; public override void Read(IffFile iff, Stream stream) { using (var io = IoBuffer.FromStream(stream, ByteOrder.LITTLE_ENDIAN)) { io.ReadUInt32(); //pad var version = io.ReadUInt32(); var MjbO = io.ReadUInt32(); var compressionCode = io.ReadByte(); if (compressionCode != 1) throw new Exception("hey what!!"); Name = io.ReadNullTerminatedString(); if (Name.Length % 2 == 1) io.ReadByte(); var iop = new IffFieldEncode(io); var numLevels = iop.ReadInt32(); JobLevels = new JobLevel[numLevels]; for (int i=0; i