本文整理汇总了C#中IWriter.WriteSByte方法的典型用法代码示例。如果您正苦于以下问题:C# IWriter.WriteSByte方法的具体用法?C# IWriter.WriteSByte怎么用?C# IWriter.WriteSByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWriter
的用法示例。
在下文中一共展示了IWriter.WriteSByte方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePatchInfo
private static void WritePatchInfo(Patch patch, ContainerWriter container, IWriter writer)
{
container.StartBlock("titl", 2); // Version 2
// Write target map info
writer.WriteInt32(patch.MapID);
if (patch.MapInternalName != null)
writer.WriteAscii(patch.MapInternalName);
else
writer.WriteByte(0);
// Write patch info
writer.WriteUTF16(patch.Name);
writer.WriteUTF16(patch.Description);
writer.WriteUTF16(patch.Author);
// Write screenshot
if (patch.Screenshot != null)
{
writer.WriteInt32(patch.Screenshot.Length);
writer.WriteBlock(patch.Screenshot);
}
else
{
writer.WriteInt32(0);
}
// Write meta info
writer.WriteUInt32(patch.MetaPokeBase);
writer.WriteSByte((sbyte) patch.MetaChangesIndex);
// Write output name
if (patch.OutputName != null)
writer.WriteAscii(patch.OutputName);
else
writer.WriteByte(0);
container.EndBlock();
}
示例2: WritePatchInfo
private static void WritePatchInfo(Patch patch, IWriter writer)
{
var startPos = WriteBlockHeader(writer, AssemblyPatchBlockID.Titl);
writer.WriteByte(1); // Version 1
// Write target map info
writer.WriteInt32(patch.MapID);
if (patch.MapInternalName != null)
writer.WriteAscii(patch.MapInternalName);
else
writer.WriteByte(0);
// Write patch info
writer.WriteUTF16(patch.Name);
writer.WriteUTF16(patch.Description);
writer.WriteUTF16(patch.Author);
// Write screenshot
if (patch.Screenshot != null)
{
writer.WriteInt32(patch.Screenshot.Length);
writer.WriteBlock(patch.Screenshot);
}
else
{
writer.WriteInt32(0);
}
// Write meta info
writer.WriteUInt32(patch.MetaPokeBase);
writer.WriteSByte((sbyte)patch.MetaChangesIndex);
EndBlock(writer, startPos);
}