Example #1
0
 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 );
 }
Example #2
0
        public MES( 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 ) );
            }
        }
Example #3
0
        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 );
        }
Example #4
0
 public NAME( System.IO.Stream stream )
     : base(stream)
 {
     stream.ReadAlign( 0x10 );
     Filename = stream.ReadAscii( (int)SectionSize ).TrimNull();
 }