示例#1
0
 public MTRL(int APIversion, EventHandler handler, MTRL basis)
     : base(APIversion, handler)
 {
     this.mtrlUnknown1 = basis.mtrlUnknown1;
     this.mtrlUnknown2 = basis.mtrlUnknown2;
     this.mtrlUnknown3 = basis.mtrlUnknown3;
     this.sdList       = basis.sdList == null ? null : new ShaderDataList(handler, basis.sdList);
 }
示例#2
0
            internal void UnParse(Stream s)
            {
                long         start = s.Position;
                BinaryWriter w     = new BinaryWriter(s);

                w.Write((uint)FOURCC("MTRL"));
                w.Write(mtrlUnknown1);
                w.Write(mtrlUnknown2);
                w.Write(mtrlUnknown3);
                if (sdList == null)
                {
                    sdList = new ShaderDataList(handler);
                }
                sdList.UnParse(s, start);
            }
示例#3
0
        private void Parse(Stream s)
        {
            long         start   = s.Position;
            BinaryReader r       = new BinaryReader(s);
            uint         mtnfTag = r.ReadUInt32();

            if (checking)
            {
                if (mtnfTag != (uint)FOURCC("MTNF"))
                {
                    throw new InvalidDataException(String.Format("Invalid mtnfTag read: '{0}'; expected: 'MTNF'; at 0x{1:X8}", FOURCC(mtnfTag), s.Position));
                }
            }
            mtnfUnknown1 = r.ReadUInt32();
            this.sdList  = new ShaderDataList(handler, s, start, r.ReadInt32(), _ParentTGIBlocks, _RCOLTag);
        }
示例#4
0
            private void Parse(Stream s)
            {
                long         start   = s.Position;
                BinaryReader r       = new BinaryReader(s);
                uint         mtrlTag = r.ReadUInt32();

                if (checking)
                {
                    if (mtrlTag != (uint)FOURCC("MTRL"))
                    {
                        throw new InvalidDataException(String.Format("Invalid mtrlTag read: '{0}'; expected: 'MTRL'; at 0x{1:X8}", FOURCC(mtrlTag), s.Position));
                    }
                }
                mtrlUnknown1 = r.ReadUInt32();
                mtrlUnknown2 = r.ReadUInt16();
                mtrlUnknown3 = r.ReadUInt16();
                this.sdList  = new ShaderDataList(handler, s, start, null);
            }
示例#5
0
        internal void UnParse(Stream s)
        {
            long         start = s.Position;
            BinaryWriter w     = new BinaryWriter(s);

            w.Write((uint)FOURCC("MTNF"));
            w.Write(mtnfUnknown1);
            long dlPos = s.Position;

            w.Write((uint)0);//data length
            if (sdList == null)
            {
                sdList = new ShaderDataList(handler, _ParentTGIBlocks, _RCOLTag);
            }
            sdList.UnParse(s, start);

            long dlEnd = s.Position;

            s.Position = dlPos;
            w.Write((uint)(dlEnd - sdList.dataPos));
            s.Position = dlEnd;
        }
示例#6
0
 public MTNF(int APIversion, EventHandler handler, MTNF basis)
     : base(APIversion, handler)
 {
     this.mtnfUnknown1 = basis.mtnfUnknown1;
     this.sdList       = basis.sdList == null ? null : new ShaderDataList(handler, basis.sdList, basis._ParentTGIBlocks, basis._RCOLTag);
 }