示例#1
0
            public ImageHeader(Stream stream, ShpTDSprite reader)
            {
                this.reader = reader;
                var data = stream.ReadUInt32();

                FileOffset = data & 0xffffff;
                Format     = (Format)(data >> 24);

                RefOffset = stream.ReadUInt16();
                RefFormat = (Format)stream.ReadUInt16();
            }
示例#2
0
        public bool TryParseSprite(Stream s, out ISpriteFrame[] frames, out TypeDictionary metadata)
        {
            metadata = null;
            if (!IsShpTD(s))
            {
                frames = null;
                return(false);
            }

            frames = new ShpTDSprite(s).Frames.ToArray();
            return(true);
        }