本文整理汇总了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);
}
示例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];
}
示例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();
}
示例4: WeightedLook
public WeightedLook(MpqFileStream stream)
{
byte[] buf = new byte[64];
stream.Read(buf, 0, 64); LookLink = Encoding.ASCII.GetString(buf);
i0 = stream.ReadInt32();
}
示例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;
}