本文整理汇总了C#中CrystalMpq.MpqFileStream.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# MpqFileStream.ReadByte方法的具体用法?C# MpqFileStream.ReadByte怎么用?C# MpqFileStream.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CrystalMpq.MpqFileStream
的用法示例。
在下文中一共展示了MpqFileStream.ReadByte方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FileRead
public void FileRead(MpqFileStream stream, long offset)
{
stream.Position = offset + 4;
Name = stream.ReadString(256);
stream.Position = offset + 260;
Item = stream.ReadValueS32();
stream.Position = offset + 264;
ItemType = stream.ReadValueS32();
stream.Position = offset + 272;
Field3 = stream.ReadValueS32();
stream.Position = offset + 276;
AttributeParam1 = stream.ReadValueS32();
stream.Position = offset + 288;
ptAttributes_0__serAttributeFormula = new SerializeData();
ptAttributes_0__serAttributeFormula.FileRead(stream, stream.Position);
stream.Position = offset + 280;
//still checking variablearrays
ptAttributes_0__AttributeFormula = new List<byte>();
for(int i = 0; i < (int)(ptAttributes_0__serAttributeFormula.Field1 / 1); i++)
{
stream.Position = ptAttributes_0__serAttributeFormula.Field0 + 16 + (1*i) ;
byte temp12_ptAttributes_0__AttributeFormula;
temp12_ptAttributes_0__AttributeFormula = (byte)stream.ReadByte();
_ptAttributes_0__AttributeFormula.Add(temp12_ptAttributes_0__AttributeFormula);
}
stream.Position = offset + 296;
Field7 = stream.ReadValueS32();
stream.Position = offset + 300;
AttributeParam2 = stream.ReadValueS32();
stream.Position = offset + 312;
ptAttributes_1__serAttributeFormula = new SerializeData();
ptAttributes_1__serAttributeFormula.FileRead(stream, stream.Position);
stream.Position = offset + 304;
//still checking variablearrays
ptAttributes_1__AttributeFormula = new List<byte>();
for(int i = 0; i < (int)(ptAttributes_1__serAttributeFormula.Field1 / 1); i++)
{
stream.Position = ptAttributes_1__serAttributeFormula.Field0 + 16 + (1*i) ;
byte temp12_ptAttributes_1__AttributeFormula;
temp12_ptAttributes_1__AttributeFormula = (byte)stream.ReadByte();
_ptAttributes_1__AttributeFormula.Add(temp12_ptAttributes_1__AttributeFormula);
}
stream.Position = offset + 320;
Field11 = stream.ReadValueS32();
stream.Position = offset + 324;
AttributeParam3 = stream.ReadValueS32();
stream.Position = offset + 336;
ptAttributes_2__serAttributeFormula = new SerializeData();
ptAttributes_2__serAttributeFormula.FileRead(stream, stream.Position);
stream.Position = offset + 328;
//still checking variablearrays
ptAttributes_2__AttributeFormula = new List<byte>();
for(int i = 0; i < (int)(ptAttributes_2__serAttributeFormula.Field1 / 1); i++)
{
stream.Position = ptAttributes_2__serAttributeFormula.Field0 + 16 + (1*i) ;
byte temp12_ptAttributes_2__AttributeFormula;
temp12_ptAttributes_2__AttributeFormula = (byte)stream.ReadByte();
_ptAttributes_2__AttributeFormula.Add(temp12_ptAttributes_2__AttributeFormula);
}
stream.Position = offset + 344;
Field15 = stream.ReadValueS32();
stream.Position = offset + 348;
ReqAttribParam1 = stream.ReadValueS32();
stream.Position = offset + 360;
ptRequirements_0__serAttributeFormula = new SerializeData();
ptRequirements_0__serAttributeFormula.FileRead(stream, stream.Position);
stream.Position = offset + 352;
//still checking variablearrays
ptRequirements_0__AttributeFormula = new List<byte>();
for(int i = 0; i < (int)(ptRequirements_0__serAttributeFormula.Field1 / 1); i++)
{
stream.Position = ptRequirements_0__serAttributeFormula.Field0 + 16 + (1*i) ;
byte temp12_ptRequirements_0__AttributeFormula;
temp12_ptRequirements_0__AttributeFormula = (byte)stream.ReadByte();
_ptRequirements_0__AttributeFormula.Add(temp12_ptRequirements_0__AttributeFormula);
}
stream.Position = offset + 368;
Field19 = stream.ReadValueS32();
stream.Position = offset + 372;
ReqAttribParam2 = stream.ReadValueS32();
stream.Position = offset + 384;
ptRequirements_1__serAttributeFormula = new SerializeData();
ptRequirements_1__serAttributeFormula.FileRead(stream, stream.Position);
stream.Position = offset + 376;
//still checking variablearrays
ptRequirements_1__AttributeFormula = new List<byte>();
for(int i = 0; i < (int)(ptRequirements_1__serAttributeFormula.Field1 / 1); i++)
{
stream.Position = ptRequirements_1__serAttributeFormula.Field0 + 16 + (1*i) ;
byte temp12_ptRequirements_1__AttributeFormula;
temp12_ptRequirements_1__AttributeFormula = (byte)stream.ReadByte();
_ptRequirements_1__AttributeFormula.Add(temp12_ptRequirements_1__AttributeFormula);
}
stream.Position = offset + 392;
Field23 = stream.ReadString(1024);
}
示例2: TriggerConditions
public TriggerConditions(MpqFileStream stream)
{
Percent = stream.ReadByte();
stream.Position += 3;
Int1 = stream.ReadValueS32();
Int2 = stream.ReadValueS32();
Int3 = stream.ReadValueS32();
Int4 = stream.ReadValueS32();
Int5 = stream.ReadValueS32();
Int6 = stream.ReadValueS32();
Int7 = stream.ReadValueS32();
Int8 = stream.ReadValueS32();
}
示例3: NavMeshDef
public NavMeshDef(MpqFileStream stream)
{
SquaresCountX = stream.ReadInt32();
SquaresCoountY = stream.ReadInt32();
i0 = stream.ReadInt32();
NavMeshSquareCount = stream.ReadInt32();
f0 = stream.ReadFloat();
serNavMeshArraySquares = new SerializeData(stream);
long x = stream.Position;
stream.Position = serNavMeshArraySquares.Offset + 16;
NavMeshArraySquares = new NavMeshSquare[NavMeshSquareCount];
for (int i = 0; i < NavMeshSquareCount; i++)
{
NavMeshArraySquares[i] = new NavMeshSquare(stream);
}
stream.Position = x;
stream.Position += 12;
filename = new char[256];
for (int i = 0; i < 256; i++)
{
filename[i] = (char) stream.ReadByte(); // fix me / dark
}
}