Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo 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;
            }