}                                                 //0xC-0x10

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(UnkShort);

                    writer.Write(UnkShort1);

                    writer.Write(UnkShort2);

                    writer.Write(UnkShort3);

                    writer.Write(ParameterHash.HashKey);

                    writer.Write(ParameterHash1.HashKey);

                    writer.Write(AudioTracks[0]);

                    writer.Write(AudioTracks[1]);

                    writer.Write(AudioTracks[2]);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 2
0
        }                                        // ...

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);         //0x0-0x4

                    writer.Write(FrameStartTime);         //0x4-0x8

                    writer.Write(AudioTracks[1]);         //0x8-0xC

                    writer.Write(FrameTimeInterval);      //0xC-0xE

                    writer.Write((byte)Variables.Length); //0xE-0xF

                    for (int i = 0; i < Variables.Length; i++)
                    {
                        writer.Write(Variables[i].HashKey);
                    }

                    for (int i = 0; i < UnkByteData.Length; i++)
                    {
                        writer.Write(UnkByteData[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 3
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(Value);
                }

                return(stream.ToArray());
            }
        }
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);
                    writer.Write(ParameterHash.HashKey);
                    writer.Write(VariableString);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 5
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);         //0x0-0x4

                    writer.Write(AudioTracks[1]);         //0x4-0x8

                    writer.Write(ParameterHash1.HashKey); //0x8-0xC

                    writer.Write(UnkByte);                //0xC-0xD

                    writer.Write(UnkFloat);               //0xD-0x11

                    writer.Write(ParameterHash2.HashKey); //0x11-0x15
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 6
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);

                    writer.Write((byte)Variables.Length);

                    for (int i = 0; i < Variables.Length; i++)
                    {
                        writer.Write(Variables[i].Name.HashKey);

                        writer.Write(Variables[i].Value);

                        writer.Write(Variables[i].UnkFloat);

                        writer.Write(Variables[i].Flags);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 7
0
        }                                    //0x14-0x18

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);

                    writer.Write(UnkFloat);

                    writer.Write(UnkFloat1);

                    writer.Write(UnkFloat2);

                    writer.Write(UnkFloat3);

                    writer.Write(UnkFloat4);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 8
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(UnkByte);

                    writer.Write(DataStart);

                    writer.Write(Enumerable.Repeat <byte>(0xFF, DataStart).ToArray());

                    writer.Write((byte)AudioTracks.Count);

                    for (int i = 0; i < AudioTracks.Count; i++)
                    {
                        writer.Write(AudioTracks[i]);

                        writer.Write(AudioTrackUnkFloats[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 9
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioContainers[0]);

                    writer.Write(FileName.HashKey);

                    writer.Write(WaveSlotNum);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 10
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    var buffer = new byte[Value.Length * 4];

                    Buffer.BlockCopy(Value, 0, buffer, 0, buffer.Length);

                    writer.Write(buffer);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 11
0
        public override byte[] Serialize()
        {
            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(Value.HashKey);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 12
0
        public override byte[] Serialize()
        {
            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(_type);

                    writer.Write((short)Items.Length);

                    writer.Write(Unk);

                    for (int i = 0; i < Items.Length; i++)
                    {
                        writer.Write(Items[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 13
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write((byte)AudioTracks.Count);

                    for (int i = 0; i < AudioTracks.Count; i++)
                    {
                        writer.Write(AudioTracks[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write((byte)UnkArrayData.Length);

                    for (int i = 0; i < UnkArrayData.Length; i++)
                    {
                        writer.Write(UnkArrayData[i].HashKey);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 15
0
        }                                      //0xD-...

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(UnkInt);

                    writer.Write(UnkInt1);

                    writer.Write(VoiceDataHash.HashKey);

                    writer.Write(SpeechName);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 16
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write((short)Items.Length);

                    for (int i = 0; i < Items.Length; i++)
                    {
                        writer.Write(Items[i].First.HashKey);

                        writer.Write(Items[i].Second);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 17
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(Items.Length);

                    for (int i = 0; i < Items.Length; i++)
                    {
                        writer.Write(Items[i].ScriptName.HashKey);

                        writer.Write(AudioTracks[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 18
0
 public static void Write(this IOBinaryWriter writer, audHashDesc hashdesc)
 {
     hashdesc.Offset = (int)writer.BaseStream.Position;
     writer.Write(hashdesc.TrackName.HashKey);
 }
Ejemplo n.º 19
0
        }                                                 //0x18-0x1C

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(UnkShort);

                    writer.Write(UnkShort1);

                    writer.Write(UnkShort2);

                    writer.Write(UnkShort3);

                    writer.Write(UnkHash.HashKey);

                    writer.Write(ParameterHash.HashKey);

                    writer.Write(ParameterHash1.HashKey);

                    writer.Write(ParameterHash2.HashKey);

                    writer.Write(ParameterHash3.HashKey);

                    writer.Write((byte)AudioTracks.Count);

                    for (int i = 0; i < AudioTracks.Count; i++)
                    {
                        writer.Write(AudioTracks[i]);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 20
0
        }                                                      //0x7D-...

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(WaveSlotIndex);

                    writer.Write(WaveA.ContainerName.HashKey);

                    writer.Write(WaveA.FileName.HashKey);

                    writer.Write(WaveB.ContainerName.HashKey);

                    writer.Write(WaveB.FileName.HashKey);

                    writer.Write(WaveC.ContainerName.HashKey);

                    writer.Write(WaveC.FileName.HashKey);

                    writer.Write(WaveD.ContainerName.HashKey);

                    writer.Write(WaveD.FileName.HashKey);

                    writer.Write(WaveE.ContainerName.HashKey);

                    writer.Write(WaveE.FileName.HashKey);

                    writer.Write(WaveF.ContainerName.HashKey);

                    writer.Write(WaveF.FileName.HashKey);

                    writer.Write(DataItem1.UnkFlags);
                    writer.Write(DataItem1.UnkFlags1);
                    writer.Write(DataItem1.UnkByte);
                    writer.Write(DataItem1.UnkByte1);
                    writer.Write(DataItem1.UnkFloat);

                    writer.Write(DataItem2.UnkFlags);
                    writer.Write(DataItem2.UnkFlags1);
                    writer.Write(DataItem2.UnkByte);
                    writer.Write(DataItem2.UnkByte1);
                    writer.Write(DataItem2.UnkFloat);

                    writer.Write(DataItem3.UnkFlags);
                    writer.Write(DataItem3.UnkFlags1);
                    writer.Write(DataItem3.UnkByte);
                    writer.Write(DataItem3.UnkByte1);
                    writer.Write(DataItem3.UnkFloat);

                    writer.Write(DataItem4.UnkFlags);
                    writer.Write(DataItem4.UnkFlags1);
                    writer.Write(DataItem4.UnkByte);
                    writer.Write(DataItem4.UnkByte1);
                    writer.Write(DataItem4.UnkFloat);

                    writer.Write(DataItem5.UnkFlags);
                    writer.Write(DataItem5.UnkFlags1);
                    writer.Write(DataItem5.UnkByte);
                    writer.Write(DataItem5.UnkByte1);
                    writer.Write(DataItem5.UnkFloat);

                    writer.Write(DataItem6.UnkFlags);
                    writer.Write(DataItem6.UnkFlags1);
                    writer.Write(DataItem6.UnkByte);
                    writer.Write(DataItem6.UnkByte1);
                    writer.Write(DataItem6.UnkFloat);

                    writer.Write(UnkInt6);

                    writer.Write(UnkInt7);

                    writer.Write(UnkShort);

                    writer.Write(UnkShort1);

                    writer.Write(UnkShort2);

                    writer.Write(UnkShort3);

                    writer.Write(UnkShort4);

                    writer.Write(UnkShort5);

                    writer.Write(AudioTracks[0]);

                    writer.Write((byte)UnkFloatData.Length);

                    for (int i = 0; i < UnkFloatData.Length; i++)
                    {
                        writer.Write(UnkFloatData[i].First);

                        writer.Write(UnkFloatData[i].Second);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 21
0
        }                                                            //0x28-..

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(OptAmpUnkHash.HashKey);

                    writer.Write(UnkHash1.HashKey);

                    writer.Write(UnkFloat);

                    writer.Write(UnkInt2);

                    writer.Write(trackCount);

                    for (int i = 0; i < AudioTracks.Count; i++)
                    {
                        writer.Write(AudioTracks[i]);
                    }

                    writer.Write(UnkArrayData.Length);

                    for (int i = 0; i < UnkArrayData.Length; i++)
                    {
                        writer.Write(UnkArrayData[i].UnkHash.HashKey);

                        writer.Write(UnkArrayData[i].ParameterHash.HashKey);

                        writer.Write(UnkArrayData[i].Value);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 22
0
        }                                                            //0x20-

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);

                    writer.Write(UnkFloat);

                    writer.Write(UnkFloat1);

                    writer.Write(ParameterHash.HashKey);

                    writer.Write(AudioTracks[1]);

                    writer.Write(WaveSlotId);

                    writer.Write(UnkHash1.HashKey);

                    writer.Write(UnkArrayData.Length);

                    for (int i = 0; i < UnkArrayData.Length; i++)
                    {
                        writer.Write(UnkArrayData[i].First);

                        writer.Write(UnkArrayData[i].Second.HashKey);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 23
0
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);

                    writer.Write((byte)UnkData.Length);

                    for (int i = 0; i < UnkData.Length; i++)
                    {
                        writer.Write(UnkData[i].UnkByte);

                        writer.Write(UnkData[i].UnkInt);

                        writer.Write(UnkData[i].UnkInt1);

                        writer.Write(UnkData[i].UnkInt2);

                        writer.Write(UnkData[i].UnkInt3);

                        writer.Write(UnkData[i].UnkInt4);

                        writer.Write(UnkData[i].ParameterHash.HashKey);

                        writer.Write(UnkData[i].ParameterHash1.HashKey);
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 24
0
        public byte[] Serialize()
        {
            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(DataType);

                    writer.Write(DataFlags);

                    if (DataFlags != 0xAAAAAAAA)
                    {
                        if ((DataFlags & 1) != 0)
                        {
                            writer.Write(_unkFlags);
                        }

                        if ((DataFlags & 2) != 0)
                        {
                            writer.Write(_unk1);
                        }

                        if ((DataFlags & 4) != 0)
                        {
                            writer.Write(_unk2);
                        }

                        if ((DataFlags & 8) != 0)
                        {
                            writer.Write(_unk3);
                        }

                        if ((DataFlags & 0x10) != 0)
                        {
                            writer.Write(_unk4);
                        }

                        if ((DataFlags & 0x20) != 0)
                        {
                            writer.Write(_unk5);
                        }

                        if ((DataFlags & 0x40) != 0)
                        {
                            writer.Write(_unk6);
                        }

                        if ((DataFlags & 0x80) != 0)
                        {
                            writer.Write(_unk7);
                        }

                        if ((DataFlags & 0x100) != 0)
                        {
                            writer.Write(_unk8);
                        }

                        if ((DataFlags & 0x200) != 0)
                        {
                            writer.Write(_unk9);
                        }
                        if ((DataFlags & 0x400) != 0)
                        {
                            writer.Write(_unkHash1);
                        }

                        if ((DataFlags & 0x800) != 0)
                        {
                            writer.Write(_unkHash2);
                        }

                        if ((DataFlags & 0x1000) != 0)
                        {
                            writer.Write(_unk10);
                        }

                        if ((DataFlags & 0x2000) != 0)
                        {
                            writer.Write(_unk11);
                        }

                        if ((DataFlags & 0x4000) != 0)
                        {
                            writer.Write(_unk12);
                        }

                        if ((DataFlags & 0x8000) != 0)
                        {
                            writer.Write(_categoryHash);
                        }

                        if ((DataFlags & 0x10000) != 0)
                        {
                            writer.Write(_unk14);
                        }

                        if ((DataFlags & 0x20000) != 0)
                        {
                            writer.Write(_unk15);
                        }

                        if ((DataFlags & 0x40000) != 0)
                        {
                            writer.Write(_unk16);
                        }

                        if ((DataFlags & 0x80000) != 0)
                        {
                            writer.Write(_unk17);
                        }

                        if ((DataFlags & 0x100000) != 0)
                        {
                            writer.Write(_unkHash3);
                        }

                        if ((DataFlags & 0x200000) != 0)
                        {
                            writer.Write(_unk18);
                        }

                        if ((DataFlags & 0x400000) != 0)
                        {
                            writer.Write(_unk19);
                        }

                        if ((DataFlags & 0x800000) != 0)
                        {
                            writer.Write(_unk20);
                        }

                        if ((DataFlags & 0x1000000) != 0)
                        {
                            writer.Write(_unk21);
                        }

                        if ((DataFlags & 0x2000000) != 0)
                        {
                            writer.Write(_unkHash4);
                        }

                        if ((DataFlags & 0x4000000) != 0)
                        {
                            writer.Write(_unkHash5);
                        }

                        if ((DataFlags & 0x8000000) != 0)
                        {
                            writer.Write(_unk22);
                        }

                        if ((DataFlags & 0x10000000) != 0)
                        {
                            writer.Write(_unk23);
                        }

                        if ((DataFlags & 0x20000000) != 0)
                        {
                            writer.Write(_unk24);
                        }
                    }
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 25
0
        }                                    //0x48-0x4C

        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(UnkShortA);

                    writer.Write(UnkShortA1);

                    writer.Write(UnkShortB);

                    writer.Write(UnkShortB1);

                    writer.Write(UnkByteA);

                    writer.Write(UnkByteA1);

                    writer.Write(UnkInt);

                    writer.Write(UnkShortC);

                    writer.Write(UnkIntA);

                    writer.Write(UnkIntA1);

                    writer.Write(CurvesUnkHash.HashKey);

                    writer.Write(CurvesUnkHash1.HashKey);

                    writer.Write(CurvesUnkHash2.HashKey);

                    writer.Write(ParameterHash.HashKey);

                    writer.Write(ParameterHash1.HashKey);

                    writer.Write(ParameterHash2.HashKey);

                    writer.Write(ParameterHash3.HashKey);

                    writer.Write(ParameterHash4.HashKey);

                    writer.Write(AudioTracks[0]);

                    writer.Write(UnkIntC);

                    writer.Write(ParameterHash5.HashKey);

                    writer.Write(UnkFloat);

                    writer.Write(UnkFloat1);
                }

                return(stream.ToArray());
            }
        }
Ejemplo n.º 26
0
 public static void Write(this IOBinaryWriter writer, audHashString hash)
 {
     writer.Write(hash.HashKey);
 }
        public override byte[] Serialize()
        {
            var bytes = base.Serialize();

            using (MemoryStream stream = new MemoryStream())
            {
                using (IOBinaryWriter writer = new IOBinaryWriter(stream))
                {
                    writer.Write(bytes);

                    writer.Write(AudioTracks[0]);

                    writer.Write(UnkArrayData.Length);

                    for (int i = 0; i < UnkArrayData.Length; i++)
                    {
                        writer.Write(UnkArrayData[i].ParameterHash.HashKey);

                        writer.Write(UnkArrayData[i].UnkFloat);

                        writer.Write(UnkArrayData[i].UnkFloat1);

                        if (UnkArrayData[i].NestedData != null)
                        {
                            writer.Write(UnkArrayData[i].NestedData.Length);

                            for (int x = 0; x < UnkArrayData[i].NestedData.Length; x++)
                            {
                                writer.Write(UnkArrayData[i].NestedData[x].UnkFloat);

                                writer.Write(UnkArrayData[i].NestedData[x].UnkInt);

                                writer.Write(UnkArrayData[i].NestedData[x].ParameterHash.HashKey);

                                writer.Write(UnkArrayData[i].NestedData[x].UnkFloat1);

                                writer.Write(UnkArrayData[i].NestedData[x].UnkFloat2);

                                writer.Write(UnkArrayData[i].NestedData[x].NestedItems.Length);

                                for (int y = 0; y < UnkArrayData[i].NestedData[x].NestedItems.Length; y++)
                                {
                                    writer.Write(UnkArrayData[i].NestedData[x].NestedItems[y].First);

                                    writer.Write(UnkArrayData[i].NestedData[x].NestedItems[y].Second);
                                }
                            }
                        }
                    }
                }

                return(stream.ToArray());
            }
        }