本文整理汇总了C#中CrystalMpq.MpqFileStream.ReadStringZ方法的典型用法代码示例。如果您正苦于以下问题:C# MpqFileStream.ReadStringZ方法的具体用法?C# MpqFileStream.ReadStringZ怎么用?C# MpqFileStream.ReadStringZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CrystalMpq.MpqFileStream
的用法示例。
在下文中一共展示了MpqFileStream.ReadStringZ方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = stream.ReadStringZ(Encoding.ASCII);
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);
}