public CFLD(System.IO.Stream stream) : base(stream) { if (SectionIdentifierHumanReadable != "CFLD") { throw new System.Exception("Attempted to parse a 'CFLD' section with data from a '" + SectionIdentifierHumanReadable + "' section."); } Subsections = new List <IFileSection>(); long PositionAtBeginning = stream.Position; stream.ReadAlign(0x10); while (stream.Position < PositionAtBeginning + _SectionSize) { if (stream.PeekUInt32() == 0x00000000) { stream.DiscardBytes(0x10); continue; } IFileSection s = FileSectionFactory.ParseNextSection(stream); Subsections.Add(s); stream.ReadAlign(0x10); } stream.ReadAlign(0x10); }
public DATA(System.IO.Stream stream) : base(stream) { // probably a generic binary blob, though I don't quite understand the format // just skip it if we encountered it stream.ReadAlign(0x10); stream.DiscardBytes(SectionSize); }
public TABL(System.IO.Stream stream) : base(stream) { uint count = stream.ReadUInt32().FromEndian(Util.Endianness.BigEndian); stream.ReadAlign(0x10); Messages = new List <string>((int)count); for (uint i = 0; i < count; ++i) { Messages.Add(TextConverter.ReadToNulltermAndDecode(stream)); } }
public NAME(System.IO.Stream stream) : base(stream) { stream.ReadAlign(0x10); Filename = stream.ReadAscii((int)SectionSize).TrimNull(); }