本文整理汇总了C#中Blamite.Serialization.StructureValueCollection.GetArray方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetArray方法的具体用法?C# StructureValueCollection.GetArray怎么用?C# StructureValueCollection.GetArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Serialization.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadLanguages
private List<ThirdGenLanguage> LoadLanguages(StructureValueCollection values, FileSegmenter segmenter,
EngineDescription buildInfo)
{
StructureValueCollection[] languageSet = values.GetArray("languages");
IEnumerable<ThirdGenLanguage> result =
languageSet.Select((l, i) => new ThirdGenLanguage((GameLanguage) i, l, segmenter, LocaleArea, buildInfo));
return result.ToList();
}
示例2: LoadLanguages
private List<FourthGenLanguage> LoadLanguages(StructureValueCollection values, FileSegmenter segmenter,
EngineDescription buildInfo)
{
StructureValueCollection[] languageSet = values.GetArray("languages");
List<FourthGenLanguage> list = new List<FourthGenLanguage>();
for(int i=0;i<languageSet.Length;i++) list.Add(new FourthGenLanguage((GameLanguage) i, languageSet[i], segmenter, LocaleArea, buildInfo));
//IEnumerable<FourthGenLanguage> result = languageSet.Select((l, i) => new FourthGenLanguage((GameLanguage) i, l, segmenter, LocaleArea, buildInfo));
//return result.ToList();
return list;
}
示例3: LoadInteropData
private void LoadInteropData(StructureValueCollection headerValues)
{
// TODO: fix this shit for the h3beta
SectionOffsetMasks = headerValues.GetArray("offset masks").Select(v => v.GetInteger("mask")).ToArray();
Sections = headerValues.GetArray("sections").Select(v => new ThirdGenInteropSection(v)).ToArray();
DebugPointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Debug);
ResourcePointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Resource);
TagBufferPointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Tag);
LocalePointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Localization);
}
示例4: Load
private void Load(StructureValueCollection values, FileSegmenter segmenter)
{
segmenter.DefineSegment(0, HeaderSize, 1, SegmentResizeOrigin.Beginning); // Define a segment for the header
_eofSegment = segmenter.WrapEOF((int) values.GetInteger("file size"));
LoadInteropData(values);
RawTable = CalculateRawTableSegment(segmenter);
Type = (CacheFileType) values.GetInteger("type");
InternalName = values.GetString("internal name");
ScenarioName = values.GetString("scenario name");
XDKVersion = (int) values.GetInteger("xdk version");
FileSegment metaSegment = CalculateTagDataSegment(values, segmenter);
if (metaSegment != null)
{
uint virtualBase = values.GetInteger("virtual base address");
MetaArea = new FileSegmentGroup(new MetaAddressConverter(metaSegment, virtualBase));
MetaArea.AddSegment(metaSegment);
IndexHeaderLocation = SegmentPointer.FromPointer(values.GetInteger("index header address"), MetaArea);
Partitions = LoadPartitions(values.GetArray("partitions"));
}
else
{
Partitions = new Partition[0];
}
CalculateStringGroup(values, segmenter);
}