本文整理汇总了C#中X360.IO.DJsIO.ReadUInt24方法的典型用法代码示例。如果您正苦于以下问题:C# DJsIO.ReadUInt24方法的具体用法?C# DJsIO.ReadUInt24怎么用?C# DJsIO.ReadUInt24使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X360.IO.DJsIO
的用法示例。
在下文中一共展示了DJsIO.ReadUInt24方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ItemEntry
internal ItemEntry(byte[] xDataIn, long DirectOffset, ushort xID, STFSPackage xPackageIn)
{
try
{
xPackage = xPackageIn;
DJsIO xFileIO = new DJsIO(xDataIn, true);
xFileIO.Position = 0;
xEntryID = xID;
xFileIO.Position = 0x28;
xFlag = xFileIO.ReadByte();
if (xNameLength > 0x28)
xNameLength = 0x28;
xFileIO.Position = 0;
if (xNameLength == 0)
return;
xName = xFileIO.ReadString(StringForm.ASCII, xNameLength);
xName.IsValidXboxName();
xFileIO.Position = 0x2F;
xStartBlock = xFileIO.ReadUInt24(false);
xFolderPointer = xFileIO.ReadUInt16();
xSize = xFileIO.ReadInt32();
xBlockCount = (uint)(((xSize - 1) / 0x1000) + 1);
xCreated = xFileIO.ReadInt32();
xAccessed = xFileIO.ReadInt32();
xDirectoryOffset = DirectOffset;
}
catch { xNameLength = 0; }
}
示例2: SVODPackage
/// <summary>Initialize the package via header info
/// <param name="xHeaderIO">Stream to header information</param>
/// <param name="xDataPath">Path of data files, null if you want to want to load header only</param>
/// </summary>
public SVODPackage(DJsIO xHeaderIO, string xDataPath)
{
xActive = true;
if (xDataPath != null && xDataPath != "")
{
xDataPath = xDataPath.Replace('\\', '/');
if (xDataPath[xDataPath.Length - 1] == '/')
xDataPath = xDataPath.Substring(0, xDataPath.Length - 1);
}
new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(System.DLLIdentify.PrivilegeCheck)).Start(System.Threading.Thread.CurrentThread);
IO = xHeaderIO;
xHeaderIO.Position = 0;
xHeaderIO.IsBigEndian = true;
uint xBuff = xHeaderIO.ReadUInt32();
if (!Enum.IsDefined(typeof(PackageMagic), xBuff) || (PackageMagic)xBuff == PackageMagic.Unknown)
return;
xHeaderIO.Position = 0x379;
if (xHeaderIO.ReadByte() != 0x24 && xHeaderIO.ReadByte() != 5 &&
xHeaderIO.ReadByte() != 5 && xHeaderIO.ReadByte() != 0x11)
return;
xHeaderData = new HeaderData(xHeaderIO, (PackageMagic)xBuff);
xHeaderIO.Position = 0x391;
xIsShifted = (((xHeaderIO.ReadByte() >> 6) & 1) == 1);
xBlockCount = xHeaderIO.ReadUInt24();
if (xIsShifted)
xDeviation = xHeaderIO.ReadUInt32(false);
if (xDataPath == null || xDataPath == "")
{
xActive = false;
return;
}
try { xDataFiles = new DJsIO[(int)xHeaderData.DataFileCount]; }
catch { throw SVODExcepts.Unknown; }
if (xDataFiles.Length > 9999 || xDataFiles.Length == 0)
throw SVODExcepts.Count;
for (uint i = 0; i < xDataFiles.Length; i++)
{
xDataFiles[i] = new DJsIO(xDataPath + SVODFuncs.formatstring((uint)i), DJFileMode.Open, true);
if (!xDataFiles[i].Accessed) { throw SVODExcepts.Access; }
}
xActive = false;
}