示例#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);
        }
示例#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);
        }
示例#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;
            }