public LingoNameChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.IsBigEndian = true;

            Remnants.Enqueue(input.ReadInt32());
            Remnants.Enqueue(input.ReadInt32());
            input.ReadInt32();
            input.ReadInt32();

            short nameOffset = input.ReadInt16();

            Names = new List <string>(input.ReadInt16());

            input.Position = nameOffset;

            for (int i = 0; i < Names.Capacity; i++)
            {
                Names.Add(input.ReadString());
            }
        }
Beispiel #2
0
        public MovieCastListChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.IsBigEndian = true;

            input.ReadInt32();
            Entries = new List <CastListEntry>(input.ReadInt32());
            Remnants.Enqueue(input.ReadInt16());

            Unknowns = new int[input.ReadInt32()];
            for (int i = 0; i < Unknowns.Length; i++)
            {
                Unknowns[i] = input.ReadInt32();
            }

            input.ReadInt32();
            for (int i = 0; i < Entries.Capacity; i++)
            {
                Entries.Add(new CastListEntry(ref input));
            }
        }
Beispiel #3
0
        public ScoreReferenceChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.ReadInt32();
            input.ReadInt32();

            int entryCount = input.ReadInt32();

            input.ReadInt32();

            input.ReadInt16();
            input.ReadInt16();

            Remnants.Enqueue(input.ReadInt32());

            Entries = new Dictionary <short, int>(entryCount);
            for (int i = 0; i < entryCount; i++)
            {
                Entries.Add(input.ReadInt16(), input.ReadInt32());
            }
        }
Beispiel #4
0
        public MemoryMapChunk(ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            Remnants.Enqueue(input.ReadInt16());
            input.ReadInt16();

            int entryCountMax = input.ReadInt32();
            int entryCount    = input.ReadInt32();

            LastJunkId = input.ReadInt32();
            Remnants.Enqueue(input.ReadInt32());
            LastFreeId = input.ReadInt32();

            Entries = new ChunkEntry[entryCount];
            for (int i = 0; i < Entries.Length; i++)
            {
                var entry = new ChunkEntry(input);
                entry.Header.Id = i;

                Entries[i] = entry;
            }
        }
Beispiel #5
0
        public FileInfoChunk(ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            int bitfieldLen = input.ReadBigEndian <int>();

            BitField = input.ReadBytes(bitfieldLen);

            Offsets = new List <int>(input.ReadBigEndian <short>());

            input.ReadByte();

            for (short i = 0; i < Offsets.Capacity; i++)
            {
                Offsets.Add(input.ReadBigEndian <int>());
            }

            input.ReadByte();
            CreatedBy = input.ReadString();
            input.ReadByte();
            ModifiedBy = input.ReadString();
            input.ReadByte();
            FilePath = input.ReadString();
        }
Beispiel #6
0
        public FileInfoChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.IsBigEndian = true;

            //TODO: VList
            BitField = input.ReadBytes(input.ReadInt32()).ToArray();

            Offsets = new List <int>(input.ReadInt16());

            input.ReadByte();

            for (short i = 0; i < Offsets.Capacity; i++)
            {
                Offsets.Add(input.ReadInt32());
            }

            input.ReadByte();
            CreatedBy = input.ReadString();
            input.ReadByte();
            ModifiedBy = input.ReadString();
            input.ReadByte();
            FilePath = input.ReadString();
        }
Beispiel #7
0
        public ScoreLabelChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.IsBigEndian = true;

            var offsetMap = new (short frame, int offset)[input.ReadInt16()];
Beispiel #8
0
 public FileMetadataChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Codec = input.ReadReversedString(4).ToCodec();
 }
Beispiel #9
0
 protected BinaryDataChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Data = input.ReadBytes((int)header.Length);
 }
Beispiel #10
0
 public BitmapChunk(ref ShockwaveReader input, ChunkHeader header)
     : base(ref input, header)
 {
 }
Beispiel #11
0
 public FileMetadataChunk(ref ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Codec = (CodecKind)(IsBigEndian ?
                         input.ReadInt32() : input.ReadBEInt32());
 }
Beispiel #12
0
 public FontMapChunk(ShockwaveReader input, ChunkHeader header)
     : base(input, header)
 {
 }
Beispiel #13
0
 public UnknownChunk(ref ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Data = input.ReadBytes(header.Length).ToArray();
 }
Beispiel #14
0
 protected BinaryDataChunk(ref ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Data = input.ReadBytes(header.Length).ToArray();
 }
Beispiel #15
0
        public ConfigChunk(ref ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.IsBigEndian = true;

            input.ReadInt16();
            Version = (DirectorVersion)input.ReadUInt16();

            StageRectangle = input.ReadRect();

            MinMember = input.ReadInt16();      //Obsolete
            MaxMember = input.ReadInt16();      //Obsolete

            Tempo = input.ReadByte();           // == 0 => 20
            Remnants.Enqueue(input.ReadByte()); //LightSwitch

            byte g = input.ReadByte();          //??
            byte b = input.ReadByte();          //??

            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16()); //768 - Seen this one alot in DIRAPI
            Remnants.Enqueue(input.ReadInt16());

            byte r = input.ReadByte(); //??????????

            StageBackgroundColor = Color.FromArgb(r, g, b);

            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadInt32());

            MovieVersion = (DirectorVersion)input.ReadInt16();
            Remnants.Enqueue(input.ReadInt16());//16?
            Remnants.Enqueue(input.ReadInt32());
            Remnants.Enqueue(input.ReadInt32());
            Remnants.Enqueue(input.ReadInt32());
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());

            RandomNumber = input.ReadInt16();

            Remnants.Enqueue(input.ReadInt32());
            Remnants.Enqueue(input.ReadInt32());
            OldDefaultPalette = input.ReadInt16();
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt32());

            DefaultPalette = input.ReadInt32(); //TODO:
            //two int16?? ^^

            Remnants.Enqueue(input.ReadInt16()); //two bytes? - IDA

            Remnants.Enqueue(input.ReadInt16());

            if (!input.IsDataAvailable)
            {
                return;
            }

            DownloadFramesBeforePlaying = input.ReadInt32(); //90
            //Zeros
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());
            Remnants.Enqueue(input.ReadInt16());
        }
Beispiel #16
0
 public FGEIChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     _input = input;
 }
Beispiel #17
0
 public FileVersionChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     What    = input.ReadBytes(5);
     Version = input.ReadString();
 }
Beispiel #18
0
 public UnknownChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     Data = input.ReadBytes((int)header.Length);
 }
Beispiel #19
0
 public ChunkEntry(ChunkHeader header)
 {
     Header = header;
 }
Beispiel #20
0
 public SoundDataChunk(ShockwaveReader input, ChunkHeader header)
     : base(input, header)
 {
 }
Beispiel #21
0
        public ConfigChunk(ShockwaveReader input, ChunkHeader header)
            : base(header)
        {
            input.ReadBigEndian <short>();
            Version = (DirectorVersion)input.ReadBigEndian <ushort>();

            StageRectangle = input.ReadRect();

            MinMember = input.ReadBigEndian <short>(); //Obsolete
            MaxMember = input.ReadBigEndian <short>(); //Obsolete

            Tempo = input.ReadByte();
            Remnants.Enqueue(input.ReadByte());

            byte g = input.ReadByte();
            byte b = input.ReadByte();

            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());

            //https://www.youtube.com/watch?v=sA_eCl4Txzs
            byte r = input.ReadByte();

            StageBackgroundColor = Color.FromArgb(r, g, b);

            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadByte()); //-2 when version < 0x551
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadBigEndian <int>());

            MovieVersion = (DirectorVersion)input.ReadBigEndian <short>();
            Remnants.Enqueue(input.ReadBigEndian <short>());//16?
            Remnants.Enqueue(input.ReadBigEndian <int>());
            Remnants.Enqueue(input.ReadBigEndian <int>());
            Remnants.Enqueue(input.ReadBigEndian <int>());
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadByte());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());

            RandomNumber = input.ReadBigEndian <short>();

            Remnants.Enqueue(input.ReadBigEndian <int>());
            Remnants.Enqueue(input.ReadBigEndian <int>());
            OldDefaultPalette = input.ReadBigEndian <short>();
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <int>());
            DefaultPalette = input.ReadBigEndian <int>(); //TODO:
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            DownloadFramesBeforePlaying = input.ReadBigEndian <int>(); //90
            //Zeros
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
            Remnants.Enqueue(input.ReadBigEndian <short>());
        }
 public FileGzipEmbeddedImageChunk(ChunkHeader header)
     : base(header)
 {
 }
Beispiel #23
0
 public ScoreLabelChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     var offsetMap = new (short frame, int offset)[input.ReadBigEndian <short>()];
Beispiel #24
0
        protected ChunkItem(ChunkHeader header)
        {
            Header = header;

            Remnants = new Queue <object>();
        }
 public InitialLoadSegmentChunk(ShockwaveReader input, ChunkHeader header)
     : base(header)
 {
     _input = WrapDecompressor(input);
 }