当前位置: 首页>>代码示例>>C#>>正文


C# ResourceDataReader.ReadBytes方法代码示例

本文整理汇总了C#中ResourceDataReader.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# ResourceDataReader.ReadBytes方法的具体用法?C# ResourceDataReader.ReadBytes怎么用?C# ResourceDataReader.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ResourceDataReader的用法示例。


在下文中一共展示了ResourceDataReader.ReadBytes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h = reader.ReadUInt32();
     this.len1 = reader.ReadUInt32();
     this.len2 = reader.ReadUInt32();
     this.len3 = reader.ReadUInt16();
     this.Unknown_Eh = reader.ReadUInt16();
     this.Data1 = reader.ReadBytes((int)len1);
     this.Data2 = reader.ReadBytes((int)len2);
     this.Data3 = reader.ReadBytes((int)len3);
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:15,代码来源:Expression_Unk1_GTA5_pc.cs

示例2: Read

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            reader.Endianess = RageLib.Data.Endianess.BigEndian;
            this.DataLength = reader.ReadUInt32();
            reader.Endianess = RageLib.Data.Endianess.LittleEndian;

            this.Data = reader.ReadBytes((int)DataLength);
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:12,代码来源:Unknown_META_001.cs

示例3: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h = reader.ReadUInt32();
     this.DataLength = reader.ReadUInt32();
     this.Unknown_8h = reader.ReadUInt32();
     this.Unknown_Ch = reader.ReadUInt32();
     this.Unknown_10h = reader.ReadUInt32();
     this.Unknown_14h = reader.ReadUInt32();
     this.Unknown_18h = reader.ReadUInt32();
     this.Unknown_1Ch = reader.ReadUInt32();
     this.Data = reader.ReadBytes((int)DataLength);
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:16,代码来源:Unknown_CL_300.cs

示例4: Read

        public override void Read(ResourceDataReader reader, params object[] parameters)
        {

            int cnt = Convert.ToInt32(parameters[0]);
            Data = reader.ReadBytes(16 * cnt);


        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:8,代码来源:Unknown_M_003_ed86f522.cs

示例5: Read

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            uint format = Convert.ToUInt32(parameters[0]);
            int Width = Convert.ToInt32(parameters[1]);
            int Height = Convert.ToInt32(parameters[2]);
            int Levels = Convert.ToInt32(parameters[3]);
            int Stride = Convert.ToInt32(parameters[4]);

            //Data = new List<byte[]>();
            //int length = Stride * Height;
            //for (int i = 0; i < Levels; i++)
            //{
            //    var buf = reader.ReadBytes(length);
            //    Data.Add(buf);
            //    length /= 4;
            //}

            int fullLength = 0;
            int length = Stride * Height;
            for (int i = 0; i < Levels; i++)
            {
                fullLength += length;
                length /= 4;
            }

            FullData = reader.ReadBytes(fullLength);
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:30,代码来源:Texture_GTA5_pc.cs


注:本文中的ResourceDataReader.ReadBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。