示例#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);
        }
示例#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);
        }
示例#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;
            }
示例#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;
        }
示例#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;
        }
示例#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;
        }
示例#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;
        }
示例#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;
        }
示例#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;
        }
示例#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);
 }
示例#11
0
文件: VPXY.cs 项目: Onebeld/Regul
 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);
 }