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


C# MpqFileStream.Read方法代码示例

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


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

示例1: ScriptFormula

        public ScriptFormula(MpqFileStream stream)
        {
            this.I0 = stream.ReadValueS32();
            this.I1 = stream.ReadValueS32();
            this.I2 = stream.ReadValueS32();
            this.I3 = stream.ReadValueS32();
            this.I4 = stream.ReadValueS32();
            this.NameSize = stream.ReadValueS32();
            this.I5 = stream.ReadValueS32();
            this.OpcodeSize = stream.ReadValueS32();
            this.OpCodeName = new byte[NameSize];
            stream.Read(OpCodeName, 0, NameSize);
            switch(NameSize % 4)
            {
                case 0:
                    break;
                case 1:
                    stream.Position += 3;
                    break;
                case 2:
                    stream.Position += 2;
                    break;
                case 3:
                    stream.Position += 1;
                    break;

            }
            this.OpCodeArray = new byte[OpcodeSize];
            stream.Read(OpCodeArray, 0, OpcodeSize);
        }
开发者ID:Velhenn,项目名称:mooege,代码行数:30,代码来源:Common.cs

示例2: RGBAColor

 /// <summary>
 /// Reads RGBAColor from given MPQFileStream.
 /// </summary>
 /// <param name="stream">The MPQFileStream to read from.</param>
 public RGBAColor(MpqFileStream stream)
 {
     var buf = new byte[4];
     stream.Read(buf, 0, 4);
     Red = buf[0];
     Green = buf[1];
     Blue = buf[2];
     Alpha = buf[3];
 }
开发者ID:wow4all,项目名称:mooege,代码行数:13,代码来源:RGBAColor.cs

示例3: Read

 public void Read(MpqFileStream stream)
 {
     c0 = new char[256];
     c1 = new char[512];
     byte[] buf = new byte[512];
     stream.Read(buf, 0, 256);
     for (int i = 0; i < c0.Length; i++)
     {
         c0[i] = (char)buf[i];
     }
     stream.Read(buf, 0, 512);
     for (int i = 0; i < c1.Length; i++)
     {
         c1[i] = (char)buf[i];
     }
     i0 = stream.ReadValueS32();
     i1 = stream.ReadValueS32();
 }
开发者ID:saddam9004,项目名称:mooege,代码行数:18,代码来源:Power.cs

示例4: WeightedLook

            public WeightedLook(MpqFileStream stream)
            {
                byte[] buf = new byte[64];                
                stream.Read(buf, 0, 64); LookLink = Encoding.ASCII.GetString(buf);
                i0 = stream.ReadInt32();

            }
开发者ID:SaintNeo,项目名称:mooege,代码行数:7,代码来源:Actor.cs

示例5: Marker

		   public Marker(MpqFileStream stream)
		   {
			   byte[] buf = new byte[128];
			   stream.Read(buf, 0, 128); Name = Encoding.ASCII.GetString(buf);
			   i0 = stream.ReadInt32();
			   PRTransform = new PRTransform(stream);
			   SNOName = new SNOName(stream);
			   serTagMap = new SerializeData(stream);
			   TagMap = stream.ReadInt32();
			   i1 = stream.ReadInt32();
			   i2 = stream.ReadInt32();
			   serMarkerLinks = new SerializeData(stream);
			   stream.Position += (3 * 4);
			   long x = stream.Position;
			   
			   if (serTagMap.Size > 0)
			   {
				   stream.Position = serTagMap.Offset + 16;
				   TM = new TagMap(stream);

			   }
			   stream.Position = x;
		   }
开发者ID:fortenbt,项目名称:mooege,代码行数:23,代码来源:MpqDataTypes.cs


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