public void Deserialize(Stream input, Endian endian)
        {
            this.DefinitionType  = input.ReadValueEnum <DefinitionType>(endian);
            this.Size            = input.ReadValueU32(endian);
            this.Unknown08       = input.ReadValueU32(endian);
            this.TypeHash        = input.ReadValueU32(endian);
            this.Name            = input.ReadString(64, true, Encoding.ASCII);
            this.Unknown50       = input.ReadValueU32(endian);
            this.ElementTypeHash = input.ReadValueU32(endian);
            this.Unknown58       = input.ReadValueU32(endian);

            uint count = input.ReadValueU32(endian);

            this.ValueDefinitions.Clear();
            for (uint i = 0; i < count; i++)
            {
                var definition = new DefinitionValue();
                definition.Deserialize(input, endian);
                this.ValueDefinitions.Add(definition);
            }
        }
Пример #2
0
 private static bool IsNativeType(DataFormat.DefinitionValue definition)
 {
     return(Enum.IsDefined(
                typeof(DataFormat.NativeValueType),
                definition.TypeHash) == true);
 }
Пример #3
0
 private object ParseNativeValue(long baseOffset, DataFormat.DefinitionValue definition, Stream input)
 {
     input.Seek(baseOffset + definition.Offset, SeekOrigin.Begin);
     return(this.ParseNativeValue(definition.TypeHash, definition.Size, input));
 }