Пример #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, string filename, out ISpriteFrame[] frames, out TypeDictionary metadata)
        {
            metadata = null;
            if (!IsShpTD(s))
            {
                frames = null;
                return(false);
            }

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