本文整理汇总了C#中Blamite.Serialization.StructureValueCollection.GetInteger方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetInteger方法的具体用法?C# StructureValueCollection.GetInteger怎么用?C# StructureValueCollection.GetInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Serialization.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
private void Load(StructureValueCollection values)
{
Magic = (int) values.GetInteger("magic");
ParentMagic = (int) values.GetInteger("parent magic");
GrandparentMagic = (int) values.GetInteger("grandparent magic");
Description = new StringID(values.GetIntegerOrDefault("stringid", 0));
}
示例2: Load
private void Load(StructureValueCollection values, FileSegmenter segmenter)
{
_eofSegment = segmenter.WrapEOF((int) values.GetInteger("file size"));
var metaOffset = (int) values.GetInteger("meta offset");
var metaSize = (int) values.GetInteger("meta size");
uint metaOffsetMask = values.GetInteger("meta offset mask");
var metaSegment = new FileSegment(
segmenter.DefineSegment(metaOffset, metaSize, 0x200, SegmentResizeOrigin.Beginning), segmenter);
MetaArea = new FileSegmentGroup(new MetaOffsetConverter(metaSegment, metaOffsetMask));
IndexHeaderLocation = MetaArea.AddSegment(metaSegment);
Type = (CacheFileType) values.GetInteger("type");
var headerGroup = new FileSegmentGroup();
headerGroup.AddSegment(segmenter.WrapSegment(0, HeaderSize, 1, SegmentResizeOrigin.None));
StringIDCount = (int) values.GetInteger("string table count");
var sidDataSize = (int) values.GetInteger("string table size");
StringIDData = segmenter.WrapSegment((int) values.GetInteger("string table offset"), sidDataSize, 1,
SegmentResizeOrigin.End);
StringIDIndexTable = segmenter.WrapSegment((int) values.GetInteger("string index table offset"), StringIDCount*4, 4,
SegmentResizeOrigin.End);
FileNameCount = (int) values.GetInteger("file table count");
var fileDataSize = (int) values.GetInteger("file table size");
FileNameData = segmenter.WrapSegment((int) values.GetInteger("file table offset"), fileDataSize, 1,
SegmentResizeOrigin.End);
FileNameIndexTable = segmenter.WrapSegment((int) values.GetInteger("file index table offset"), FileNameCount*4, 4,
SegmentResizeOrigin.End);
InternalName = values.GetString("internal name");
ScenarioName = values.GetString("scenario name");
StringArea = new FileSegmentGroup();
StringArea.AddSegment(segmenter.WrapSegment((int) values.GetInteger("string block offset"), StringIDCount*0x80, 0x80,
SegmentResizeOrigin.End));
StringArea.AddSegment(StringIDIndexTable);
StringArea.AddSegment(StringIDData);
StringArea.AddSegment(FileNameIndexTable);
StringArea.AddSegment(FileNameData);
StringIDIndexTableLocation = SegmentPointer.FromOffset(StringIDIndexTable.Offset, StringArea);
StringIDDataLocation = SegmentPointer.FromOffset(StringIDData.Offset, StringArea);
FileNameIndexTableLocation = SegmentPointer.FromOffset(FileNameIndexTable.Offset, StringArea);
FileNameDataLocation = SegmentPointer.FromOffset(FileNameData.Offset, StringArea);
LocaleArea = new FileSegmentGroup();
var rawTableOffset = (int) values.GetInteger("raw table offset");
var rawTableSize = (int) values.GetInteger("raw table size");
RawTable = segmenter.WrapSegment(rawTableOffset, rawTableSize, 1, SegmentResizeOrigin.End);
Checksum = values.GetInteger("checksum");
// Set up a bogus partition table
Partitions = new Partition[1];
Partitions[0] = new Partition(SegmentPointer.FromOffset(MetaArea.Offset, MetaArea), (uint) MetaArea.Size);
}
示例3: Load
private void Load(StructureValueCollection values)
{
Magic = (int) values.GetInteger("magic");
ParentMagic = (int) values.GetInteger("parent magic");
GrandparentMagic = (int) values.GetInteger("grandparent magic");
// No description stringid :(
}
示例4: Load
private void Load(StructureValueCollection values, StringID[] stringIds)
{
SoundName = stringIds[values.GetInteger("sound name index")];
ParametersIndex = (int)values.GetInteger("parameters index");
FirstRuntimePermutationFlagIndex = (int)values.GetInteger("first runtime permutation flag index");
EncodedPermutationCount = ((int)values.GetInteger("encoded permutation count") >> 4) & 63;
FirstPermutationIndex = (int)values.GetInteger("first permutation index");
}
示例5: ReadObjects
/// <summary>
/// Reads all child objects of this reflexive.
/// </summary>
/// <param name="values">The values read from the parent.</param>
/// <param name="reader">The stream to read from.</param>
/// <param name="metaArea">The meta area of the cache file.</param>
/// <param name="stringIDs">The string ID source for the cache file.</param>
/// <param name="buildInfo">The build info for the cache file.</param>
/// <returns>The objects that were read.</returns>
public ScriptObject[] ReadObjects(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
StringIDSource stringIDs, EngineDescription buildInfo)
{
var count = (int) values.GetInteger(_countEntryName);
uint address = values.GetInteger(_addressEntryName);
StructureLayout layout = buildInfo.Layouts.GetLayout(_layoutName);
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
return entries.Select(e => ReadScriptObject(e, reader, metaArea, stringIDs, buildInfo)).ToArray();
}
示例6: Load
private void Load(StructureValueCollection values, IModelSubmesh[] submeshes)
{
IndexBufferStart = (int) values.GetInteger("index buffer start");
IndexBufferCount = (int) values.GetInteger("index buffer count");
VertexBufferCount = (int) values.GetInteger("vertex buffer count");
var submeshIndex = (int) values.GetInteger("parent submesh index");
Submesh = submeshes[submeshIndex];
}
示例7: LoadSoundNames
private void LoadSoundNames(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, EngineDescription buildInfo)
{
var count = (int)values.GetInteger("number of sound names");
var address = values.GetInteger("sound name table address");
var layout = buildInfo.Layouts.GetLayout("sound names");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
SoundNames = entries.Select(e => new StringID(e.GetInteger("name index"))).ToArray();
}
示例8: LoadSoundPermutations
private void LoadSoundPermutations(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, EngineDescription buildInfo)
{
var count = (int)values.GetInteger("number of sound permutations");
var address = values.GetInteger("sound permutation table address");
var layout = buildInfo.Layouts.GetLayout("sound permutations");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
SoundPermutations = (from entry in entries
select new FourthGenSoundPermutation(entry, SoundNames)).ToArray<ISoundPermutation>();
}
示例9: LoadPlatformCodecs
private void LoadPlatformCodecs(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, EngineDescription buildInfo)
{
var count = (int)values.GetInteger("number of platform codecs");
var address = values.GetInteger("platform codecs table address");
var layout = buildInfo.Layouts.GetLayout("sound platform codecs");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
SoundPlatformCodecs = (from entry in entries
select new FourthGenSoundPlatformCodec(entry)).ToArray<ISoundPlatformCodec>();
}
示例10: Load
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
EngineDescription buildInfo)
{
VertexFormat = (int) values.GetInteger("vertex format");
ExtraElementsPerVertex = (int) values.GetInteger("extra elements per vertex");
ExtraElementsType = (ExtraVertexElementType) values.GetInteger("extra element type");
LoadSubmeshes(values, reader, metaArea, buildInfo);
LoadVertexGroups(values, reader, metaArea, buildInfo, Submeshes);
}
示例11: LoadScales
private void LoadScales(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, EngineDescription buildInfo)
{
var count = (int)values.GetInteger("number of scales");
var address = values.GetInteger("scales table address");
var layout = buildInfo.Layouts.GetLayout("sound scales");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
SoundScales = (from entry in entries
select new ThirdGenSoundScale(entry)).ToArray<ISoundScale>();
}
示例12: LoadBoundingBoxes
private void LoadBoundingBoxes(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
EngineDescription buildInfo)
{
var count = (int) values.GetInteger("number of bounding boxes");
uint address = values.GetInteger("bounding box table address");
StructureLayout layout = buildInfo.Layouts.GetLayout("model bounding box");
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, 1, address, layout, metaArea);
BoundingBoxes = (from entry in entries
select BoundingBox.Deserialize(entry)).ToArray();
}
示例13: LoadPermutations
private void LoadPermutations(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
EngineDescription buildInfo)
{
var count = (int) values.GetInteger("number of permutations");
uint address = values.GetInteger("permutation table address");
StructureLayout layout = buildInfo.Layouts.GetLayout("model permutation");
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
Permutations = (from entry in entries
select new FourthGenModelPermutation(entry)).ToArray();
}
示例14: LoadVertexGroups
private void LoadVertexGroups(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
EngineDescription buildInfo, IModelSubmesh[] submeshes)
{
var count = (int) values.GetInteger("number of vertex groups");
uint address = values.GetInteger("vertex group table address");
StructureLayout layout = buildInfo.Layouts.GetLayout("model vertex group");
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
VertexGroups = (from entry in entries
select new ThirdGenModelVertexGroup(entry, submeshes)).ToArray();
}
示例15: LoadParameters
private IList<ScriptParameter> LoadParameters(IReader reader, StructureValueCollection values,
FileSegmentGroup metaArea, EngineDescription buildInfo, int addrFix)
{
var count = (int) values.GetInteger("number of parameters");
uint address = values.GetInteger("address of parameter list");
StructureLayout layout = buildInfo.Layouts.GetLayout("script parameter entry");
if (addrFix != 0)
address = (uint)addrFix + (address & 0xFFFFFFF);
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
return entries.Select(e => new ScriptParameter(e)).ToList();
}