Esempio n. 1
0
        public override void ReadFromFile(MemoryStream reader, bool isBigEndian)
        {
            base.ReadFromFile(reader, isBigEndian);
            unk01      = reader.ReadInt32(isBigEndian);
            planesSize = reader.ReadInt32(isBigEndian);
            planes     = new Vector4[planesSize];

            for (int i = 0; i != planes.Length; i++)
            {
                planes[i] = Vector4Extenders.ReadFromFile(reader, isBigEndian);
            }

            bounds = BoundingBoxExtenders.ReadFromFile(reader, isBigEndian);
        }
Esempio n. 2
0
        public override void ReadFromFile(MemoryStream reader, bool isBigEndian)
        {
            base.ReadFromFile(reader, isBigEndian);
            unk_08_int = reader.ReadInt32(isBigEndian);
            planesSize = reader.ReadInt32(isBigEndian);

            planes = new Vector4[planesSize];
            for (int i = 0; i != planes.Length; i++)
            {
                planes[i] = Vector4Extenders.ReadFromFile(reader, isBigEndian);
            }

            bounds         = BoundingBoxExtenders.ReadFromFile(reader, isBigEndian);
            unk_13_vector3 = Vector3Utils.ReadFromFile(reader, isBigEndian);
            unk_14_vector3 = Vector3Utils.ReadFromFile(reader, isBigEndian);
            sectorName     = new HashName(reader, isBigEndian);
        }
Esempio n. 3
0
 public void ReadFromFile(BinaryReader reader)
 {
     size           = reader.ReadInt32();
     actorTypeName  = readString(reader);
     entityType     = readString(reader);
     unkString      = readString(reader);
     unk2String     = readString(reader);
     definitionName = readString(reader);
     frameName      = readString(reader);
     actortypeID    = reader.ReadInt32();
     defintionHash  = reader.ReadUInt64();
     frameNameHash  = reader.ReadUInt64();
     position       = Vector3Extenders.ReadFromFile(reader);
     quat           = Vector4Extenders.ReadFromFile(reader);
     scale          = Vector3Extenders.ReadFromFile(reader);
     unk3           = reader.ReadUInt16();
     dataID         = reader.ReadUInt16();
 }
Esempio n. 4
0
        public void ReadFromFile(BinaryReader reader)
        {
            fileName       = new string(reader.ReadChars(reader.ReadByte()));
            numActorhashes = reader.ReadInt32();
            actorHashes    = new ulong[numActorhashes];

            for (int i = 0; i != actorHashes.Length; i++)
            {
                actorHashes[i] = reader.ReadUInt64();
            }

            unk01 = reader.ReadInt32();
            unk02 = reader.ReadByte();

            count1    = reader.ReadInt16();
            unksData2 = new ushort[count1];

            for (int i = 0; i != count1; i++)
            {
                unksData2[i] = reader.ReadUInt16();
            }

            parent       = reader.ReadInt32();
            unk03        = reader.ReadInt32();
            soundPrimary = new string(reader.ReadChars(reader.ReadByte()));
            parentIdx    = reader.ReadInt16();
            sUnk04       = reader.ReadInt16();
            count2       = reader.ReadInt16();

            data = new unkStruct1[count2];
            for (int i = 0; i != count2; i++)
            {
                unkStruct1 subData = new unkStruct1();
                subData.unk0      = reader.ReadByte();
                subData.unk1      = reader.ReadByte();
                subData.numFloats = reader.ReadByte();

                subData.floats = new Vector4[subData.numFloats];

                for (int x = 0; x != subData.numFloats; x++)
                {
                    subData.floats[x] = Vector4Extenders.ReadFromFile(reader);
                }

                subData.numShorts = reader.ReadInt16();

                subData.shorts = new short[subData.numShorts];

                for (int x = 0; x != subData.numShorts; x++)
                {
                    subData.shorts[x] = reader.ReadInt16();
                }

                subData.unk2       = reader.ReadInt32();
                subData.unk3       = reader.ReadSingle();
                subData.sectorName = new string(reader.ReadChars(reader.ReadByte()));
                subData.unk4       = reader.ReadInt16();
                subData.unk5       = reader.ReadInt32();
                data[i]            = subData;
            }

            sUnk06 = reader.ReadByte();
            sUnk07 = reader.ReadInt32();
            data1  = new unkStruct2[sUnk07];
            for (int i = 0; i != sUnk07; i++)
            {
                byte       sZero   = reader.ReadByte();
                unkStruct2 subData = new unkStruct2();
                subData.portalName = new string(reader.ReadChars(reader.ReadByte()));
                subData.floats     = new float[5];
                for (int x = 0; x != 5; x++)
                {
                    subData.floats[x] = reader.ReadSingle();
                }
                subData.sectorToLoad = new string(reader.ReadChars(reader.ReadByte()));
                subData.unk01        = reader.ReadByte();
                subData.sectorType   = new string(reader.ReadChars(reader.ReadByte()));
                subData.unk02        = reader.ReadByte();
                subData.unk03        = reader.ReadSingle();
                subData.doorName     = new string(reader.ReadChars(reader.ReadByte()));
                subData.unk04        = reader.ReadByte();
                subData.unk05        = reader.ReadByte();

                if (subData.unk05 == 1)
                {
                    subData.unk06 = reader.ReadByte();
                }

                data1[i] = subData;
            }
            DumpToSound();
        }