Esempio n. 1
0
        public DefineBinaryDataTag(FlashReader reader, TagRecord header)
            : base(reader, header)
        {
            CharacterId = reader.ReadUInt16();
            reader.ReadUInt32();

            BinaryData = reader.ReadBytes(header.Body.Length - 6);
        }
Esempio n. 2
0
        public DoABCTag(FlashReader reader, TagRecord header)
            : base(reader, header)
        {
            Flags = reader.ReadUInt32();
            Name = reader.ReadNullTerminatedString();

            int nameLength = (Encoding.UTF8.GetByteCount(Name) + 1);
            byte[] abcData = reader.ReadBytes(header.Body.Length - (nameLength + 4));

            ABC = new ABCFile(abcData);
        }
Esempio n. 3
0
        public TagRecord(FlashReader reader)
        {
            Start = reader.Position;

            ushort header = reader.ReadUInt16();
            TagType = (FlashTagType)(header >> 6);

            int length = (header & 63);
            if (length >= 63)
            {
                length = reader.ReadInt32();
                IsSpecialLong = (length < 63);
            }
            BodyStart = reader.Position;

            Body = reader.ReadBytes(length);
            reader.Position = BodyStart;
        }
        public DefineBitsLossless2Tag(FlashReader reader, TagRecord header) :
            base(reader, header)
        {
            CharacterId = reader.ReadUInt16();
            BitmapFormat = reader.ReadByte();
            BitmapWidth = reader.ReadUInt16();
            BitmapHeight = reader.ReadUInt16();

            _isCompressed = true;
            switch (BitmapFormat - 3)
            {
                case 0: break;

                case 1:
                case 2:
                {
                    _compressedBitmapData =
                        reader.ReadBytes(header.Body.Length - 7);

                    break;
                }
            }
        }