本文整理汇总了C#中Blamite.Serialization.StructureValueCollection.GetRaw方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetRaw方法的具体用法?C# StructureValueCollection.GetRaw怎么用?C# StructureValueCollection.GetRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Serialization.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetRaw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
private void Load(StructureValueCollection values, FileSegmenter segmenter, FileSegmentGroup localeArea)
{
StringCount = (int) values.GetInteger("string count");
if (StringCount > 0)
{
// Index table offset, segment, and pointer
int localeIndexTableOffset = localeArea.PointerToOffset(values.GetInteger("locale index table offset"));
LocaleIndexTable = segmenter.WrapSegment(localeIndexTableOffset, StringCount*8, 8, SegmentResizeOrigin.End);
LocaleIndexTableLocation = localeArea.AddSegment(LocaleIndexTable);
// Data offset, segment, and pointer
int localeDataOffset = localeArea.PointerToOffset(values.GetInteger("locale data index offset"));
var localeDataSize = (int) values.GetInteger("locale table size");
LocaleData = segmenter.WrapSegment(localeDataOffset, localeDataSize, _sizeAlign, SegmentResizeOrigin.End);
LocaleDataLocation = localeArea.AddSegment(LocaleData);
// Load hashes if they exist
if (values.HasRaw("index table hash"))
IndexTableHash = values.GetRaw("index table hash");
if (values.HasRaw("string data hash"))
StringDataHash = values.GetRaw("string data hash");
}
}
示例2: LoadPage
private ResourcePage LoadPage(StructureValueCollection values, int index, FourthGenCacheFileReference[] externalFiles)
{
var result = new ResourcePage();
result.Index = index;
result.Salt = (ushort) values.GetInteger("salt");
result.Flags = (byte) values.GetInteger("flags");
result.CompressionMethod = ((int) values.GetInteger("compression codec index") != -1)
? ResourcePageCompression.Deflate
: ResourcePageCompression.None; // FIXME: hax/laziness
var externalFile = (int) values.GetInteger("shared cache file index");
result.FilePath = (externalFile != -1) ? externalFiles[externalFile].Path : null;
result.Unknown1 = (int) values.GetIntegerOrDefault("unknown 1", 0);
result.Offset = (int) values.GetInteger("compressed block offset");
result.CompressedSize = (int) values.GetInteger("compressed block size");
result.UncompressedSize = (int) values.GetInteger("uncompressed block size");
result.Checksum = values.GetInteger("checksum");
result.Hash1 = values.GetRaw("hash 1");
result.Hash2 = values.GetRaw("hash 2");
result.Hash3 = values.GetRaw("hash 3");
result.Unknown2 = (int) values.GetIntegerOrDefault("unknown 2", 0);
result.Unknown3 = (int) values.GetIntegerOrDefault("unknown 3", 0);
return result;
}
示例3: Load
private void Load(StructureValueCollection values, StringIDSource stringIDs)
{
Guid = values.GetRaw("guid");
Name = stringIDs.GetString(new StringID(values.GetInteger("name stringid")));
}