FSO.Files.Formats.IFF.Chunks.DGRP.Read C# (CSharp) Méthode

Read() public méthode

Reads a DGRP from a stream instance.
public Read ( IffFile iff, Stream stream ) : void
iff IffFile An Iff instance.
stream Stream A Stream instance holding a DGRP chunk.
Résultat void
        public override void Read(IffFile iff, Stream stream)
        {
            using (var io = IoBuffer.FromStream(stream, ByteOrder.LITTLE_ENDIAN))
            {
                var version = io.ReadUInt16();
                uint imageCount = version < 20003 ? io.ReadUInt16() : io.ReadUInt32();
                Images = new DGRPImage[imageCount];

                for (var i = 0; i < imageCount; i++)
                {
                    var image = new DGRPImage(this);
                    image.Read(version, io);
                    Images[i] = image;
                }
            }
        }