Exemplo n.º 1
0
        protected override Stream UnParse()
        {
            long         pos;
            MemoryStream ms = new MemoryStream();
            BinaryWriter w  = new BinaryWriter(ms);

            w.Write(unknown1);
            pos = ms.Position;
            w.Write((uint)0); //tgiOffset
            w.Write((uint)0); //tgiSize
            w.Write(unknown2);
            if (tgiBlocks == null)
            {
                tgiBlocks = new TGIBlockList(OnResourceChanged);
            }
            if (tgiIndexes == null)
            {
                tgiIndexes = new Int32IndexList(OnResourceChanged, Int16.MaxValue, ReadInt16, WriteInt16, tgiBlocks);
            }
            tgiIndexes.UnParse(ms);
            tgiBlocks.UnParse(ms, pos);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;

            return(ms);
        }
Exemplo n.º 2
0
        protected override Stream UnParse()
        {
            MemoryStream s = new MemoryStream();
            BinaryWriter w = new BinaryWriter(s);

            w.Write(version);

            long pos = s.Position;

            w.Write((uint)0); // tgiOffset
            w.Write((uint)0); // tgiSize

            w.Write(nameHash);
            if (tgiBlocks == null)
            {
                tgiBlocks = new TGIBlockList(OnResourceChanged);
            }
            if (tgiIndexes == null)
            {
                tgiIndexes = new Int32IndexList(OnResourceChanged, tgiBlocks);
            }
            tgiIndexes.UnParse(s);
            w.Write(bidirectional);
            w.Write((uint)casPanelGroup);
            w.Write((uint)sort);
            w.Write(unknown1);

            tgiBlocks.UnParse(s, pos);

            return(s);
        }
Exemplo n.º 3
0
            internal override void UnParse(Stream s)
            {
                BinaryWriter w = new BinaryWriter(s);

                w.Write((byte)0x00);
                w.Write(entryID);
                if (tgiIndexes == null)
                {
                    tgiIndexes = new Int32IndexList(handler, byte.MaxValue, ReadByte, WriteByte);
                }
                tgiIndexes.UnParse(s);
                tgiIndexes.ParentTGIBlocks = ParentTGIBlocks;
            }
Exemplo n.º 4
0
        void Parse(Stream s)
        {
            long         tgiPosn, tgiSize;
            BinaryReader r = new BinaryReader(s);

            unknown1   = r.ReadUInt16();
            tgiPosn    = r.ReadUInt32() + s.Position;
            tgiSize    = r.ReadUInt32();
            unknown2   = r.ReadUInt16();
            tgiIndexes = new Int32IndexList(OnResourceChanged, s, Int16.MaxValue, ReadInt16, WriteInt16);
            tgiBlocks  = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;
        }
Exemplo n.º 5
0
        void Parse(Stream s)
        {
            long tgiPosn, tgiSize;
            BinaryReader r = new BinaryReader(s);

            unknown1 = r.ReadUInt16();
            tgiPosn = r.ReadUInt32() + s.Position;
            tgiSize = r.ReadUInt32();
            unknown2 = r.ReadUInt16();
            tgiIndexes = new Int32IndexList(OnResourceChanged, s, Int16.MaxValue, ReadInt16, WriteInt16);
            tgiBlocks = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;
        }
Exemplo n.º 6
0
        private void Parse(Stream s)
        {
            long         tgiPosn, tgiSize;
            BinaryReader r = new BinaryReader(s);

            version = r.ReadUInt32();

            tgiPosn = r.ReadUInt32() + s.Position;
            tgiSize = r.ReadUInt32();

            nameHash      = r.ReadUInt64();
            tgiIndexes    = new Int32IndexList(OnResourceChanged, s);
            bidirectional = r.ReadByte();
            casPanelGroup = (CASPanelGroupType)r.ReadUInt32();
            sort          = (CASPanelSortType)r.ReadUInt32();
            unknown1      = r.ReadUInt32();
            tgiBlocks     = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;
        }
Exemplo n.º 7
0
        private void Parse(Stream s)
        {
            long tgiPosn, tgiSize;
            BinaryReader r = new BinaryReader(s);

            version = r.ReadUInt32();

            tgiPosn = r.ReadUInt32() + s.Position;
            tgiSize = r.ReadUInt32();

            nameHash = r.ReadUInt64();
            tgiIndexes = new Int32IndexList(OnResourceChanged, s);
            bidirectional = r.ReadByte();
            casPanelGroup = (CASPanelGroupType)r.ReadUInt32();
            sort = (CASPanelSortType)r.ReadUInt32();
            unknown1 = r.ReadUInt32();
            tgiBlocks = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;
        }
Exemplo n.º 8
0
        protected override Stream UnParse()
        {
            long pos;
            MemoryStream ms = new MemoryStream();
            BinaryWriter w = new BinaryWriter(ms);

            w.Write(unknown1);
            pos = ms.Position;
            w.Write((uint)0);//tgiOffset
            w.Write((uint)0);//tgiSize
            w.Write(unknown2);
            if (tgiBlocks == null) tgiBlocks = new TGIBlockList(OnResourceChanged);
            if (tgiIndexes == null) tgiIndexes = new Int32IndexList(OnResourceChanged, Int16.MaxValue, ReadInt16, WriteInt16, tgiBlocks);
            tgiIndexes.UnParse(ms);
            tgiBlocks.UnParse(ms, pos);

            tgiIndexes.ParentTGIBlocks = tgiBlocks;

            return ms;
        }
Exemplo n.º 9
0
        protected override Stream UnParse()
        {
            MemoryStream s = new MemoryStream();
            BinaryWriter w = new BinaryWriter(s);

            w.Write(version);

            long pos = s.Position;
            w.Write((uint)0); // tgiOffset
            w.Write((uint)0); // tgiSize

            w.Write(nameHash);
            if (tgiBlocks == null) tgiBlocks = new TGIBlockList(OnResourceChanged);
            if (tgiIndexes == null) tgiIndexes = new Int32IndexList(OnResourceChanged, tgiBlocks);
            tgiIndexes.UnParse(s);
            w.Write(bidirectional);
            w.Write((uint)casPanelGroup);
            w.Write((uint)sort);
            w.Write(unknown1);

            tgiBlocks.UnParse(s, pos);

            return s;
        }
Exemplo n.º 10
0
 public Entry00(int APIversion, EventHandler handler, byte entryType, byte entryID, IEnumerable <int> tgiIndexes, DependentList <TGIBlock> ParentTGIBlocks = null)
     : base(APIversion, handler)
 {
     _ParentTGIBlocks = ParentTGIBlocks; this.entryID = entryID; this.tgiIndexes = new Int32IndexList(handler, tgiIndexes, byte.MaxValue, ReadByte, WriteByte, _ParentTGIBlocks);
 }
Exemplo n.º 11
0
 public Entry00(EventHandler handler, byte entryType, byte entryID, Stream s,
                DependentList <TGIBlock> ParentTGIBlocks = null)
     : base(handler)
 {
     _ParentTGIBlocks = ParentTGIBlocks; this.entryID = entryID; this.tgiIndexes = new Int32IndexList(handler, s, byte.MaxValue, ReadByte, WriteByte, _ParentTGIBlocks);
 }