Esempio n. 1
0
        // Methods
        public static List <VifPacket> EvaluateBlock(BinaryReader reader, ushort blockSize)
        {
            List <VifPacket> results  = new List <VifPacket>();
            long             blockEnd = reader.BaseStream.Position + (blockSize << 4);

            while (reader.BaseStream.Position < blockEnd)
            {
                VifTag vt = ReadVifTagHeader(reader);

                // Check if it's an unpack first
                if ((vt.Command & 0xF0) == 0x60 || (vt.Command & 0xF0) == 0x70)
                {
                    results.Add(new VifUnpack(vt, reader));
                }
                else
                {
                    results.Add(new VifPacket(vt));
                }
            }

            return(results);
        }
Esempio n. 2
0
 // Constructors
 public VifUnpack(VifTag vt, BinaryReader reader)
     : base(vt)
 {
     ReadElements(reader);
 }