Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of CFramePack from a valid FileStream.
        /// </summary>
        /// <param name="file">The FileStream as it would be read by DarkEden.</param>
        public CImageFramePack(ref FileStream file)
        {
            if (file.Length == 0) return;

            this.Frames = new List<CImageFrame>();

            byte[] _spc = new byte[2];
            file.Read(_spc, 0, 2);
            UInt16 spritecount = BitConverter.ToUInt16(_spc, 0);

            for (int i = 0; i < spritecount; i++)
            {
                CImageFrame imgf = new CImageFrame(ref file);

                this.Frames.Add(imgf);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of CFramePack from a valid FileStream.
        /// </summary>
        /// <param name="file">The FileStream as it would be read by DarkEden.</param>
        public CImageFramePack(ref FileStream file)
        {
            if (file.Length == 0)
            {
                return;
            }

            this.Frames = new List <CImageFrame>();

            byte[] _spc = new byte[2];
            file.Read(_spc, 0, 2);
            UInt16 spritecount = BitConverter.ToUInt16(_spc, 0);

            for (int i = 0; i < spritecount; i++)
            {
                CImageFrame imgf = new CImageFrame(ref file);

                this.Frames.Add(imgf);
            }
        }