Exemple #1
0
        public void Read(EndianBinaryReader reader, StringSet stringSet)
        {
            Name         = reader.ReadStringOffset(StringBinaryFormat.NullTerminated);
            BackFaceName = reader.ReadStringOffset(StringBinaryFormat.NullTerminated);
            Field08      = reader.ReadUInt32();
            int count = reader.ReadInt32();

            Field10 = reader.ReadUInt32();
            Field14 = reader.ReadUInt32();

            reader.ReadOffset(() =>
            {
                for (int i = 0; i < Field18.Length; i++)
                {
                    if ((Field10 & (1 << i)) != 0)
                    {
                        Field18[i] = reader.ReadMatrix4x4();
                    }
                }
            });

            reader.ReadOffset(() =>
            {
                Field1C.Capacity = count;

                for (int i = 0; i < count; i++)
                {
                    var data = new Field1CData();
                    data.Read(reader);
                    Field1C.Add(data);
                }
            });

            reader.ReadOffset(() =>
            {
                Field20.Capacity = count;

                for (int i = 0; i < count; i++)
                {
                    var data = new Field20Data();
                    data.Read(reader);
                    Field20.Add(data);
                }
            });

            reader.ReadOffset(() =>
            {
                Field24 = reader.ReadUInt16s(reader.ReadUInt16());
            });

            reader.ReadOffset(() =>
            {
                Field28 = reader.ReadUInt16s(reader.ReadUInt16());
            });

            Field2C = reader.ReadUInt32();
            Field30 = reader.ReadUInt32();
        }
Exemple #2
0
        public void Read(EndianBinaryReader reader, StringSet stringSet)
        {
            Field00 = reader.ReadStringOffset(StringBinaryFormat.NullTerminated);
            Field04 = reader.ReadStringOffset(StringBinaryFormat.NullTerminated);
            Field08 = reader.ReadUInt32();
            int count = reader.ReadInt32();

            Field10 = reader.ReadUInt32();
            Field14 = reader.ReadUInt32();

            reader.ReadOffset(() =>
            {
                Field18.Capacity = count;

                for (int i = 0; i < count; i++)
                {
                    Field18.Add(reader.ReadVector3());
                }
            });

            reader.ReadOffset(() =>
            {
                Field1C.Capacity = count;

                for (int i = 0; i < count; i++)
                {
                    var data = new Field1CData();
                    data.Read(reader);
                    Field1C.Add(data);
                }
            });

            reader.ReadOffset(() =>
            {
                Field20.Capacity = count;

                for (int i = 0; i < count; i++)
                {
                    var data = new Field20Data();
                    data.Read(reader);
                    Field20.Add(data);
                }
            });

            reader.ReadOffset(() =>
            {
                Field24 = reader.ReadUInt16s(reader.ReadUInt16());
            });

            reader.ReadOffset(() =>
            {
                Field28 = reader.ReadUInt16s(reader.ReadUInt16());
            });

            Field2C = reader.ReadUInt32();
            Field30 = reader.ReadUInt32();
        }