Esempio n. 1
0
        public static FileIdentifier Read(DataReader reader, bool includeAssetPath)
        {
            FileIdentifier fi = new FileIdentifier();

            if (includeAssetPath) {
                fi.AssetPath = reader.ReadString();
            }

            fi.GUID = reader.ReadBytes(16);
            fi.Type = reader.ReadInt32();
            fi.FilePath = reader.ReadString();

            return fi;
        }
Esempio n. 2
0
        public static ObjectData Read(DataReader reader, ObjectInfo info, int dataOffset)
        {
            ObjectData od = new ObjectData();

            od.ObjectID = info.ObjectID;
            od.TypeID = info.TypeID;
            od.ClassID = info.ClassID;
            od.ScriptTypeIndex = info.ScriptTypeIndex;
            od.IsStripped = info.IsStripped;

            reader.JumpTo(dataOffset + info.ByteStart);
            od.Bytes = reader.ReadBytes(info.ByteSize);

            return od;
        }
        public static RTTIClassHierarchyDescriptor Read(DataReader reader)
        {
            RTTIClassHierarchyDescriptor chd = new RTTIClassHierarchyDescriptor();

            chd.Signature = reader.ReadString();
            chd.Attributes = reader.ReadInt32();
            chd.NumberOfBaseClasses = reader.ReadInt32();
            chd.BaseClassDescriptors = new RTTIBaseClassDescriptor[chd.NumberOfBaseClasses];

            for (int i = 0; i < chd.NumberOfBaseClasses; i++) {
                chd.BaseClassDescriptors[i] = RTTIBaseClassDescriptor.Read(reader);
            }

            reader.ReadBytes(4); //Read padding bytes

            return chd;
        }