From af32c5ab32f3b2b1dd8f9efb05c48d3657d79c29 Mon Sep 17 00:00:00 2001 From: ook3d <47336113+ook3D@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:35:34 -0500 Subject: [PATCH] Update Ambient Zones, Rules and Static Emitters --- .../GameFiles/FileTypes/RelFile.cs | 1012 +++++++--------- CodeWalker.Core/World/AudioZones.cs | 36 +- .../Panels/EditAudioEmitterPanel.Designer.cs | 245 ++-- .../Project/Panels/EditAudioEmitterPanel.cs | 171 +-- .../Panels/EditAudioZonePanel.Designer.cs | 1042 +++++++++-------- .../Project/Panels/EditAudioZonePanel.cs | 633 +++++----- .../Project/Panels/EditAudioZonePanel.resx | 6 + CodeWalker/Project/ProjectForm.cs | 78 +- 8 files changed, 1501 insertions(+), 1722 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs index 54c3823..feb6ea7 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/RelFile.cs @@ -5269,66 +5269,86 @@ namespace CodeWalker.GameFiles } [TC(typeof(EXP))] public class Dat151AmbientZone : Dat151RelData { - public FlagsUint Flags0 { get; set; } - public Dat151ZoneShape Shape { get; set; } - public FlagsUint Flags1 { get; set; } - public Vector3 ActivationZonePosition { get; set; } + public FlagsUint Flags { get; set; } + public Dat151ZoneShape Shape { get; set; } // Should be a single byte then 7 bytes of padding + public uint Padding00 { get; set; } + public Vector3 ActivationZoneCentre { get; set; } public float Unused01 { get; set; } - public Vector3 ActivationZoneSize { get; set; } + public Vector3 ActivationZoneSize { get; set; } public float Unused02 { get; set; } - public Vector4 ActivationZoneVec1 { get; set; } - public Vector4 ActivationZoneVec2 { get; set; } - public uint ActivationZoneAngle { get; set; } - public Vector3 ActivationZoneVec3 { get; set; } - public Vector3 PlaybackZonePosition { get; set; } + public Vector3 ActivationZonePostRotationOffset { get; set; } + public uint Padding01 { get; set; } + public Vector3 ActivationZoneSizeScale { get; set; } + public uint Padding02 { get; set; } + public ushort ActivationZoneRotationAngle { get; set; } + public ushort Padding03 { get; set; } + public uint Padding04 { get; set; } + public uint Padding05 { get; set; } + public uint Padding06 { get; set; } + public Vector3 PositioningZoneCentre { get; set; } public float Unused06 { get; set; } - public Vector3 PlaybackZoneSize { get; set; } + public Vector3 PositioningZoneSize { get; set; } public float Unused07 { get; set; } - public Vector4 PlaybackZoneVec1 { get; set; } - public Vector4 PlaybackZoneVec2 { get; set; } - public uint PlaybackZoneAngle { get; set; } - public Vector3 PlaybackZoneVec3 { get; set; } - public Vector4 UnkVec1 { get; set; } - public Vector4 UnkVec2 { get; set; } - public MetaHash UnkHash0 { get; set; } - public MetaHash Scene { get; set; } - public Vector2 UnkVec3 { get; set; } - public MetaHash Unk13 { get; set; } - public byte Unk14 { get; set; } - public byte Unk15 { get; set; } - public byte RulesCount { get; set; } - public byte Unk16 { get; set; } + public Vector3 PositioningZonePostRotationOffset { get; set; } + public uint Padding07 { get; set; } + public Vector3 PositioningZoneSizeScale { get; set; } + public uint Padding08 { get; set; } + public ushort PositioningZoneRotationAngle { get; set; } + public ushort Padding09 { get; set; } + public uint Padding10 { get; set; } + public uint Padding11 { get; set; } + public uint Padding12 { get; set; } + public float BuiltUpFactor { get; set; } + public float MinPedDensity { get; set; } + public float MaxPedDensity { get; set; } + public uint PedDensityTOD { get; set; } + public float PedDensityScalar { get; set; } + public float MaxWindInfluence { get; set; } + public float MinWindInfluence { get; set; } + public uint WindElevationSounds { get; set; } + public MetaHash EnviromentRule { get; set; } + public MetaHash AudioScene { get; set; } + public float UnderwaterCreakFactor { get; set; } + public MetaHash PedWallaSettings { get; set; } + public MetaHash RandomisedRadioSettings { get; set; } + public byte NumRulesToPlay { get; set; } + public byte ZoneWaterCalculation { get; set; } + public byte NumRules { get; set; } + public byte Unused11 { get; set; } public MetaHash[] Rules { get; set; } - - public uint DependentAmbiencesCount { get; set; } - public DependentAmbience[] DependentAmbiences { get; set; } - public struct DependentAmbience : IMetaXmlItem + public byte NumDirAmbiences { get; set; } + public byte Unused12 { get; set; } + public byte Unused13 { get; set; } + public byte Unused14 { get; set; } + public DirAmbience[] DirAmbiences { get; set; } + public uint Unused15 { get; set; } + public struct DirAmbience : IMetaXmlItem { public MetaHash Name { get; set; } - public float Value { get; set; } - public DependentAmbience(BinaryReader br) + public float Volume { get; set; } + public DirAmbience(BinaryReader br) { Name = br.ReadUInt32(); - Value = br.ReadSingle(); + Volume = br.ReadSingle(); } public void Write(BinaryWriter bw) { bw.Write(Name); - bw.Write(Value); + bw.Write(Volume); } public void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); - RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); + RelXml.ValueTag(sb, indent, "Volume", FloatUtil.ToString(Volume)); } public void ReadXml(XmlNode node) { Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); - Value = Xml.GetChildFloatAttribute(node, "Value", "value"); + Volume = Xml.GetChildFloatAttribute(node, "Volume", "value"); } public override string ToString() { - return Name.ToString() + ": " + FloatUtil.ToString(Value); + return Name.ToString() + ": " + FloatUtil.ToString(Volume); } } @@ -5341,315 +5361,300 @@ namespace CodeWalker.GameFiles } public Dat151AmbientZone(RelData d, BinaryReader br) : base(d, br) { - Flags0 = br.ReadUInt32(); + Flags = br.ReadUInt32(); Shape = (Dat151ZoneShape)br.ReadUInt32(); - Flags1 = br.ReadUInt32(); - ActivationZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding00 = br.ReadUInt32(); + ActivationZoneCentre = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused01 = br.ReadSingle(); ActivationZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused02 = br.ReadSingle(); - ActivationZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - ActivationZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - ActivationZoneAngle = br.ReadUInt32();//### - ActivationZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZonePosition = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + ActivationZonePostRotationOffset = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding01 = br.ReadUInt32(); + ActivationZoneSizeScale = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding02 = br.ReadUInt32(); + ActivationZoneRotationAngle = br.ReadUInt16(); + Padding03 = br.ReadUInt16(); + Padding04 = br.ReadUInt32(); + Padding05 = br.ReadUInt32(); + Padding06 = br.ReadUInt32(); + PositioningZoneCentre = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused06 = br.ReadSingle(); - PlaybackZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + PositioningZoneSize = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); Unused07 = br.ReadSingle(); - PlaybackZoneVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZoneVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - PlaybackZoneAngle = br.ReadUInt32();//### - PlaybackZoneVec3 = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkVec1 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkVec2 = new Vector4(br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - UnkHash0 = br.ReadUInt32(); - Scene = br.ReadUInt32(); - UnkVec3 = new Vector2(br.ReadSingle(), br.ReadSingle()); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadByte(); - Unk15 = br.ReadByte(); - RulesCount = br.ReadByte(); - Unk16 = br.ReadByte(); - Rules = new MetaHash[RulesCount]; - for (int i = 0; i < RulesCount; i++) + PositioningZonePostRotationOffset = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding07 = br.ReadUInt32(); + PositioningZoneSizeScale = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); + Padding08 = br.ReadUInt32(); + PositioningZoneRotationAngle = br.ReadUInt16(); + Padding09 = br.ReadUInt16(); + Padding10 = br.ReadUInt32(); + Padding11 = br.ReadUInt32(); + Padding12 = br.ReadUInt32(); + BuiltUpFactor = br.ReadSingle(); + MinPedDensity = br.ReadSingle(); + MaxPedDensity = br.ReadSingle(); + PedDensityTOD = br.ReadUInt32(); + PedDensityScalar = br.ReadSingle(); + MaxWindInfluence = br.ReadSingle(); + MinWindInfluence = br.ReadSingle(); + WindElevationSounds = br.ReadUInt32(); + EnviromentRule = br.ReadUInt32(); + AudioScene = br.ReadUInt32(); + UnderwaterCreakFactor = br.ReadSingle(); + PedWallaSettings = br.ReadUInt32(); + RandomisedRadioSettings = br.ReadUInt32(); + NumRulesToPlay = br.ReadByte(); + ZoneWaterCalculation = br.ReadByte(); + NumRules = br.ReadByte(); + Unused11 = br.ReadByte(); + + Rules = new MetaHash[NumRules]; + for (int i = 0; i < NumRules; i++) { Rules[i] = br.ReadUInt32(); } - DependentAmbiencesCount = br.ReadUInt32(); - DependentAmbiences = new DependentAmbience[DependentAmbiencesCount]; - for (int i = 0; i < DependentAmbiencesCount; i++) + NumDirAmbiences = br.ReadByte(); + Unused12 = br.ReadByte(); + Unused13 = br.ReadByte(); + Unused14 = br.ReadByte(); + + DirAmbiences = new DirAmbience[NumDirAmbiences]; + for (int i = 0; i < NumDirAmbiences; i++) { - DependentAmbiences[i] = new DependentAmbience(br); + DirAmbiences[i] = new DirAmbience(br); } - if (DependentAmbiencesCount != 0) + if (NumDirAmbiences != 0) { } - - - #region testing - - var data = this.Data; - - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { - //byte[] remainder = br.ReadBytes((int)bytesleft); - //for (int i = 0; i < remainder.Length; i++) - //{ - // if (remainder[i] != 0) - // { } //no hits here! probably got everything, i'm assuming the block is padded to 0x10 or something. - //} - } - - - //RecVec(Pos01);//debug coords output - //RecVec(Pos06); - - - if (Unused01 != 0) - { }//no hit - if (Unused02 != 0) - { }//no hit - if (Unused06 != 0) - { }//no hit - if (Unused07 != 0) - { }//no hit - if (Shape != 0) - { }//eg 1, 2 - if (Flags1 != 0) - { }//no hit - if (ActivationZoneAngle > 360) - { }//no hit - if (PlaybackZoneAngle > 360) - { }//no hit - if (Unk13 != 0) - { }//eg 0xAE64583B, 0x61083310, 0xCAE96294, 0x1C376176 - if (UnkHash0 != 0) - { } - if (Scene != 0) - { } - - #endregion - } public override void Write(BinaryWriter bw) { - //base.Write(bw); WriteTypeAndOffset(bw); - bw.Write(Flags0); + bw.Write(Flags); bw.Write((uint)Shape); - bw.Write(Flags1); - bw.Write(ActivationZonePosition.X); - bw.Write(ActivationZonePosition.Y); - bw.Write(ActivationZonePosition.Z); + bw.Write(Padding00); + bw.Write(ActivationZoneCentre.X); + bw.Write(ActivationZoneCentre.Y); + bw.Write(ActivationZoneCentre.Z); bw.Write(Unused01); bw.Write(ActivationZoneSize.X); bw.Write(ActivationZoneSize.Y); bw.Write(ActivationZoneSize.Z); bw.Write(Unused02); - bw.Write(ActivationZoneVec1.X); - bw.Write(ActivationZoneVec1.Y); - bw.Write(ActivationZoneVec1.Z); - bw.Write(ActivationZoneVec1.W); - bw.Write(ActivationZoneVec2.X); - bw.Write(ActivationZoneVec2.Y); - bw.Write(ActivationZoneVec2.Z); - bw.Write(ActivationZoneVec2.W); - bw.Write(ActivationZoneAngle);//### - bw.Write(ActivationZoneVec3.X); - bw.Write(ActivationZoneVec3.Y); - bw.Write(ActivationZoneVec3.Z); - bw.Write(PlaybackZonePosition.X); - bw.Write(PlaybackZonePosition.Y); - bw.Write(PlaybackZonePosition.Z); + bw.Write(ActivationZonePostRotationOffset.X); + bw.Write(ActivationZonePostRotationOffset.Y); + bw.Write(ActivationZonePostRotationOffset.Z); + bw.Write(Padding01); + bw.Write(ActivationZoneSizeScale.X); + bw.Write(ActivationZoneSizeScale.Y); + bw.Write(ActivationZoneSizeScale.Z); + bw.Write(Padding02); + bw.Write(ActivationZoneRotationAngle); + bw.Write(Padding03); + bw.Write(Padding04); + bw.Write(Padding05); + bw.Write(Padding06); + bw.Write(PositioningZoneCentre.X); + bw.Write(PositioningZoneCentre.Y); + bw.Write(PositioningZoneCentre.Z); bw.Write(Unused06); - bw.Write(PlaybackZoneSize.X); - bw.Write(PlaybackZoneSize.Y); - bw.Write(PlaybackZoneSize.Z); + bw.Write(PositioningZoneSize.X); + bw.Write(PositioningZoneSize.Y); + bw.Write(PositioningZoneSize.Z); bw.Write(Unused07); - bw.Write(PlaybackZoneVec1.X); - bw.Write(PlaybackZoneVec1.Y); - bw.Write(PlaybackZoneVec1.Z); - bw.Write(PlaybackZoneVec1.W); - bw.Write(PlaybackZoneVec2.X); - bw.Write(PlaybackZoneVec2.Y); - bw.Write(PlaybackZoneVec2.Z); - bw.Write(PlaybackZoneVec2.W); - bw.Write(PlaybackZoneAngle);//### - bw.Write(PlaybackZoneVec3.X); - bw.Write(PlaybackZoneVec3.Y); - bw.Write(PlaybackZoneVec3.Z); - bw.Write(UnkVec1.X); - bw.Write(UnkVec1.Y); - bw.Write(UnkVec1.Z); - bw.Write(UnkVec1.W); - bw.Write(UnkVec2.X); - bw.Write(UnkVec2.Y); - bw.Write(UnkVec2.Z); - bw.Write(UnkVec2.W); - bw.Write(UnkHash0); - bw.Write(Scene); - bw.Write(UnkVec3.X); - bw.Write(UnkVec3.Y); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(RulesCount); - bw.Write(Unk16); - for (int i = 0; i < RulesCount; i++) + bw.Write(PositioningZonePostRotationOffset.X); + bw.Write(PositioningZonePostRotationOffset.Y); + bw.Write(PositioningZonePostRotationOffset.Z); + bw.Write(Padding07); + bw.Write(PositioningZoneSizeScale.X); + bw.Write(PositioningZoneSizeScale.Y); + bw.Write(PositioningZoneSizeScale.Z); + bw.Write(Padding08); + bw.Write(PositioningZoneRotationAngle); + bw.Write(Padding09); + bw.Write(Padding10); + bw.Write(Padding11); + bw.Write(Padding12); + bw.Write(BuiltUpFactor); + bw.Write(MinPedDensity); + bw.Write(MaxPedDensity); + bw.Write(PedDensityTOD); + bw.Write(PedDensityScalar); + bw.Write(MaxWindInfluence); + bw.Write(MinWindInfluence); + bw.Write(WindElevationSounds); + bw.Write(EnviromentRule); + bw.Write(AudioScene); + bw.Write(UnderwaterCreakFactor); + bw.Write(PedWallaSettings); + bw.Write(RandomisedRadioSettings); + bw.Write(NumRulesToPlay); + bw.Write(ZoneWaterCalculation); + bw.Write(NumRules); + bw.Write(Unused11); + + for (int i = 0; i < NumRules; i++) { bw.Write(Rules[i]); } + bw.Write(NumDirAmbiences); + bw.Write(Unused12); + bw.Write(Unused13); + bw.Write(Unused14); - bw.Write(DependentAmbiencesCount); - for (int i = 0; i < DependentAmbiencesCount; i++) + bw.Write(NumDirAmbiences); + for (int i = 0; i < NumDirAmbiences; i++) { - DependentAmbiences[i].Write(bw); + DirAmbiences[i].Write(bw); } - if (DependentAmbiencesCount != 0) + if (NumDirAmbiences != 0) { } - - while ((bw.BaseStream.Position & 0xF) != 0) bw.Write((byte)0); //pad out to next 16 bytes - } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags0", "0x" + Flags0.Hex); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.StringTag(sb, indent, "Shape", Shape.ToString()); - RelXml.ValueTag(sb, indent, "Flags1", "0x" + Flags1.Hex); - RelXml.SelfClosingTag(sb, indent, "ActivationZonePosition " + FloatUtil.GetVector3XmlString(ActivationZonePosition)); + RelXml.SelfClosingTag(sb, indent, "ActivationZoneCentre " + FloatUtil.GetVector3XmlString(ActivationZoneCentre)); RelXml.SelfClosingTag(sb, indent, "ActivationZoneSize " + FloatUtil.GetVector3XmlString(ActivationZoneSize)); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec1 " + FloatUtil.GetVector4XmlString(ActivationZoneVec1)); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec2 " + FloatUtil.GetVector4XmlString(ActivationZoneVec2)); - RelXml.ValueTag(sb, indent, "ActivationZoneAngle", ActivationZoneAngle.ToString()); - RelXml.SelfClosingTag(sb, indent, "ActivationZoneVec3 " + FloatUtil.GetVector3XmlString(ActivationZoneVec3)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZonePosition " + FloatUtil.GetVector3XmlString(PlaybackZonePosition)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneSize " + FloatUtil.GetVector3XmlString(PlaybackZoneSize)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec1 " + FloatUtil.GetVector4XmlString(PlaybackZoneVec1)); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec2 " + FloatUtil.GetVector4XmlString(PlaybackZoneVec2)); - RelXml.ValueTag(sb, indent, "PlaybackZoneAngle", PlaybackZoneAngle.ToString()); - RelXml.SelfClosingTag(sb, indent, "PlaybackZoneVec3 " + FloatUtil.GetVector3XmlString(PlaybackZoneVec3)); - RelXml.SelfClosingTag(sb, indent, "UnkVec1 " + FloatUtil.GetVector4XmlString(UnkVec1)); - RelXml.SelfClosingTag(sb, indent, "UnkVec2 " + FloatUtil.GetVector4XmlString(UnkVec2)); - RelXml.StringTag(sb, indent, "UnkHash0", RelXml.HashString(UnkHash0)); - RelXml.StringTag(sb, indent, "Scene", RelXml.HashString(Scene)); - RelXml.SelfClosingTag(sb, indent, "UnkVec3 " + FloatUtil.GetVector2XmlString(UnkVec3)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", Unk14.ToString()); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); + RelXml.SelfClosingTag(sb, indent, "ActivationZonePostRotationOffset " + FloatUtil.GetVector3XmlString(ActivationZonePostRotationOffset)); + RelXml.SelfClosingTag(sb, indent, "ActivationZoneSizeScale " + FloatUtil.GetVector3XmlString(ActivationZoneSizeScale)); + RelXml.ValueTag(sb, indent, "ActivationZoneRotationAngle", ActivationZoneRotationAngle.ToString()); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneCentre " + FloatUtil.GetVector3XmlString(PositioningZoneCentre)); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneSize " + FloatUtil.GetVector3XmlString(PositioningZoneSize)); + RelXml.SelfClosingTag(sb, indent, "PositioningZonePostRotationOffset " + FloatUtil.GetVector3XmlString(PositioningZonePostRotationOffset)); + RelXml.SelfClosingTag(sb, indent, "PositioningZoneSizeScale " + FloatUtil.GetVector3XmlString(PositioningZoneSizeScale)); + RelXml.ValueTag(sb, indent, "PositioningZoneRotationAngle", PositioningZoneRotationAngle.ToString()); + RelXml.ValueTag(sb, indent, "BuiltUpFactor", FloatUtil.ToString(BuiltUpFactor)); + RelXml.ValueTag(sb, indent, "MinPedDensity", FloatUtil.ToString(MinPedDensity)); + RelXml.ValueTag(sb, indent, "MaxPedDensity", FloatUtil.ToString(MaxPedDensity)); + RelXml.ValueTag(sb, indent, "PedDensityTOD", PedDensityTOD.ToString()); + RelXml.ValueTag(sb, indent, "PedDensityScalar", FloatUtil.ToString(PedDensityScalar)); + RelXml.ValueTag(sb, indent, "MaxWindInfluence", FloatUtil.ToString(MaxWindInfluence)); + RelXml.ValueTag(sb, indent, "MinWindInfluence", FloatUtil.ToString(MinWindInfluence)); + RelXml.ValueTag(sb, indent, "WindElevationSounds", WindElevationSounds.ToString()); + RelXml.StringTag(sb, indent, "EnviromentRule", RelXml.HashString(EnviromentRule)); + RelXml.StringTag(sb, indent, "AudioScene", RelXml.HashString(AudioScene)); + RelXml.StringTag(sb, indent, "RandomisedRadioSettings", RelXml.HashString(RandomisedRadioSettings)); + RelXml.ValueTag(sb, indent, "NumRulesToPlay", NumRulesToPlay.ToString()); + RelXml.ValueTag(sb, indent, "ZoneWaterCalculation", ZoneWaterCalculation.ToString()); RelXml.WriteHashItemArray(sb, Rules, indent, "Rules"); - RelXml.WriteItemArray(sb, DependentAmbiences, indent, "DependentAmbiences"); + RelXml.WriteItemArray(sb, DirAmbiences, indent, "DirAmbiences"); } public override void ReadXml(XmlNode node) { - Flags0 = Xml.GetChildUIntAttribute(node, "Flags0", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Shape = Xml.GetEnumValue(Xml.GetChildInnerText(node, "Shape")); - Flags1 = Xml.GetChildUIntAttribute(node, "Flags1", "value"); - ActivationZonePosition = Xml.GetChildVector3Attributes(node, "ActivationZonePosition"); + ActivationZoneCentre = Xml.GetChildVector3Attributes(node, "ActivationZoneCentre"); ActivationZoneSize = Xml.GetChildVector3Attributes(node, "ActivationZoneSize"); - ActivationZoneVec1 = Xml.GetChildVector4Attributes(node, "ActivationZoneVec1"); - ActivationZoneVec2 = Xml.GetChildVector4Attributes(node, "ActivationZoneVec2"); - ActivationZoneAngle = Xml.GetChildUIntAttribute(node, "ActivationZoneAngle", "value"); - ActivationZoneVec3 = Xml.GetChildVector3Attributes(node, "ActivationZoneVec3"); - PlaybackZonePosition = Xml.GetChildVector3Attributes(node, "PlaybackZonePosition"); - PlaybackZoneSize = Xml.GetChildVector3Attributes(node, "PlaybackZoneSize"); - PlaybackZoneVec1 = Xml.GetChildVector4Attributes(node, "PlaybackZoneVec1"); - PlaybackZoneVec2 = Xml.GetChildVector4Attributes(node, "PlaybackZoneVec2"); - PlaybackZoneAngle = Xml.GetChildUIntAttribute(node, "PlaybackZoneAngle", "value"); - PlaybackZoneVec3 = Xml.GetChildVector3Attributes(node, "PlaybackZoneVec3"); - UnkVec1 = Xml.GetChildVector4Attributes(node, "UnkVec1"); - UnkVec2 = Xml.GetChildVector4Attributes(node, "UnkVec2"); - UnkHash0 = XmlRel.GetHash(Xml.GetChildInnerText(node, "UnkHash0")); - Scene = XmlRel.GetHash(Xml.GetChildInnerText(node, "Scene")); - UnkVec3 = Xml.GetChildVector2Attributes(node, "UnkVec3"); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = (byte)Xml.GetChildUIntAttribute(node, "Unk14", "value"); - Unk15 = (byte)Xml.GetChildUIntAttribute(node, "Unk15", "value"); - Unk16 = (byte)Xml.GetChildUIntAttribute(node, "Unk16", "value"); + ActivationZonePostRotationOffset = Xml.GetChildVector3Attributes(node, "ActivationZonePostRotationOffset"); + ActivationZoneSizeScale = Xml.GetChildVector3Attributes(node, "ActivationZoneSizeScale"); + ActivationZoneRotationAngle = (ushort)Xml.GetChildUIntAttribute(node, "ActivationZoneRotationAngle", "value"); + PositioningZoneCentre = Xml.GetChildVector3Attributes(node, "PositioningZoneCentre"); + PositioningZoneSize = Xml.GetChildVector3Attributes(node, "PositioningZoneSize"); + PositioningZonePostRotationOffset = Xml.GetChildVector3Attributes(node, "PositioningZonePostRotationOffset"); + PositioningZoneSizeScale = Xml.GetChildVector3Attributes(node, "PositioningZoneSizeScale"); + PositioningZoneRotationAngle = (ushort)Xml.GetChildUIntAttribute(node, "PositioningZoneRotationAngle", "value"); + BuiltUpFactor = Xml.GetChildFloatAttribute(node, "BuiltUpFactor", "value"); + MinPedDensity = Xml.GetChildFloatAttribute(node, "MinPedDensity", "value"); + MaxPedDensity = Xml.GetChildFloatAttribute(node, "MaxPedDensity", "value"); + PedDensityTOD = Xml.GetChildUIntAttribute(node, "PedDensityTOD", "value"); + PedDensityScalar = Xml.GetChildFloatAttribute(node, "PedDensityScalar", "value"); + MaxWindInfluence = Xml.GetChildFloatAttribute(node, "MaxWindInfluence", "value"); + MinWindInfluence = Xml.GetChildFloatAttribute(node, "MinWindInfluence", "value"); + WindElevationSounds = Xml.GetChildUIntAttribute(node, "WindElevationSounds", "value"); + EnviromentRule = XmlRel.GetHash(Xml.GetChildInnerText(node, "EnviromentRule")); + AudioScene = XmlRel.GetHash(Xml.GetChildInnerText(node, "AudioScene")); + RandomisedRadioSettings = XmlRel.GetHash(Xml.GetChildInnerText(node, "RandomisedRadioSettings")); + NumRulesToPlay = (byte)Xml.GetChildUIntAttribute(node, "NumRulesToPlay", "value"); + ZoneWaterCalculation = (byte)Xml.GetChildUIntAttribute(node, "ZoneWaterCalculation", "value"); Rules = XmlRel.ReadHashItemArray(node, "Rules"); - RulesCount = (byte)(Rules?.Length ?? 0); - DependentAmbiences = XmlRel.ReadItemArray(node, "DependentAmbiences"); - DependentAmbiencesCount = (uint)(DependentAmbiences?.Length ?? 0); + DirAmbiences = XmlRel.ReadItemArray(node, "DirAmbiences"); } public override MetaHash[] GetMixerHashes() { - return new[] { Scene }; + return new[] { AudioScene }; } public override MetaHash[] GetGameHashes() { var list = new List(); - list.Add(UnkHash0); + list.Add(EnviromentRule); if (Rules != null) list.AddRange(Rules); - if (DependentAmbiences != null) + if (DirAmbiences != null) { - foreach (var ep in DependentAmbiences) list.Add(ep.Name); + foreach (var ep in DirAmbiences) list.Add(ep.Name); } return list.ToArray(); } } [TC(typeof(EXP))] public class Dat151AmbientRule : Dat151RelData { - public FlagsUint Flags0 { get; set; } - public FlagsUint Flags1 { get; set; } - public FlagsUint Flags2 { get; set; } + public uint Padding01 { get; set; } + public uint Padding02 { get; set; } + public FlagsUint Flags { get; set; } public Vector3 Position { get; set; } - public FlagsUint Flags3 { get; set; } //0 + public uint Padding03 { get; set; } public MetaHash ChildSound { get; set; } public MetaHash Category { get; set; } - public FlagsUint Flags4 { get; set; } //0 - public FlagsUint Flags5 { get; set; } //0xFFFFFFFF - public FlagsUint Flags6 { get; set; } //0 - public float Unk01 { get; set; } //1, 5, 100, ... - public float InnerRadius { get; set; } //inner radius of volume (playback bound) - public float OuterRadius { get; set; } //outer radius of volume (activation bound) - public ushort StartTime { get; set; } //time allows to start playing, in mins - public ushort EndTime { get; set; } //time to stop playing, in mins (max 1440) - public FlagsUshort Frequency { get; set; } //0..600 - public FlagsUshort Unk07 { get; set; } //0..150 - public FlagsByte Unk08 { get; set; } //0,1,2 - public FlagsByte Unk09 { get; set; } //0,1,2 - public FlagsByte Unk10 { get; set; } //1,2,3,4,8,255 - public FlagsByte Unk11 { get; set; } //1,2,3,4,5,6,8,10,255 - public FlagsByte Unk12 { get; set; } //0, 50, 80, 100 - public FlagsByte Unk13 { get; set; } //1,2,3,5 - public ushort VariablesCount { get; set; } //0,1,2,4 - public Variable[] Variables { get; set; } + public uint LastPlayTime { get; set; } + public int DynamicBankID { get; set; } + public uint DynamicSlotType { get; set; } + public float Weight { get; set; } + public float MinDist { get; set; } //inner radius of volume (playback bound) + public float MaxDist { get; set; } //outer radius of volume (activation bound) + public ushort MinTimeMinutes { get; set; } //time allows to start playing, in mins + public ushort MaxTimeMinutes { get; set; } //time to stop playing, in mins (max 1440) + public ushort MinRepeatTime { get; set; } //0..600 + public ushort MinRepeatTimeVariance { get; set; } //0..150 + public byte SpawnHeight { get; set; } //0,1,2 + public byte PositionUsage { get; set; } //0,1,2 + public byte MaxLocalInstances { get; set; } //1,2,3,4,8,255 + public byte MaxGlobalInstances { get; set; } //1,2,3,4,5,6,8,10,255 + public byte BlockabilityFactor { get; set; } //0, 50, 80, 100 + public byte MaxPathDepth { get; set; } //1,2,3,5 + public ushort NumConditions { get; set; } //0,1,2,4 + public Condition[] Conditions { get; set; } - public struct Variable : IMetaXmlItem + public struct Condition : IMetaXmlItem { public MetaHash Name; public float Value; - public FlagsUint Flags; - public Variable(BinaryReader br) + public byte ConditionType; + public byte BankLoading; + public ushort Padding; + public Condition(BinaryReader br) { Name = br.ReadUInt32(); Value = br.ReadSingle(); - Flags = br.ReadUInt32(); + ConditionType = br.ReadByte(); + BankLoading = br.ReadByte(); + Padding = br.ReadUInt16(); } public void Write(BinaryWriter bw) { bw.Write(Name); bw.Write(Value); - bw.Write(Flags); + bw.Write(ConditionType); + bw.Write(BankLoading); + bw.Write(Padding); } public void WriteXml(StringBuilder sb, int indent) { RelXml.StringTag(sb, indent, "Name", RelXml.HashString(Name)); RelXml.ValueTag(sb, indent, "Value", FloatUtil.ToString(Value)); - RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); + RelXml.ValueTag(sb, indent, "ConditionType", FloatUtil.ToString(ConditionType)); + RelXml.ValueTag(sb, indent, "BankLoading", FloatUtil.ToString(BankLoading)); } public void ReadXml(XmlNode node) { Name = XmlRel.GetHash(Xml.GetChildInnerText(node, "Name")); Value = Xml.GetChildFloatAttribute(node, "Value", "value"); - Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); + ConditionType = (byte)Xml.GetChildUIntAttribute(node, "ConditionType", "value"); + BankLoading = (byte)Xml.GetChildUIntAttribute(node, "BankLoading", "value"); } public override string ToString() { - return Name.ToString() + ": " + FloatUtil.ToString(Value) + ": " + Flags.ToString(); + return Name.ToString() + ": " + FloatUtil.ToString(Value) + ": " + ConditionType.ToString(); } } @@ -5661,40 +5666,40 @@ namespace CodeWalker.GameFiles } public Dat151AmbientRule(RelData d, BinaryReader br) : base(d, br) { - Flags0 = br.ReadUInt32(); - Flags1 = br.ReadUInt32(); - Flags2 = br.ReadUInt32(); + Padding01 = br.ReadUInt32(); + Padding02 = br.ReadUInt32(); + Flags = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Flags3 = br.ReadUInt32(); //0 + Padding03 = br.ReadUInt32(); ChildSound = br.ReadUInt32(); Category = br.ReadUInt32(); - Flags4 = br.ReadUInt32(); //0 - Flags5 = br.ReadUInt32(); //0xFFFFFFFF - Flags6 = br.ReadUInt32(); //0 - Unk01 = br.ReadSingle(); //1, 5, 100, ... - InnerRadius = br.ReadSingle(); //inner radius of volume (playback bound) - OuterRadius = br.ReadSingle(); //outer radius of volume (activation bound) - StartTime = br.ReadUInt16(); //time allows to start playing, in mins - EndTime = br.ReadUInt16(); //time to stop playing, in mins (max 1440) - Frequency = br.ReadUInt16(); //0..600 - Unk07 = br.ReadUInt16(); //0..150 - Unk08 = br.ReadByte(); //0,1,2 - Unk09 = br.ReadByte(); //0,1,2 - Unk10 = br.ReadByte(); //1,2,3,4,8,255 - Unk11 = br.ReadByte(); //1,2,3,4,5,6,8,10,255 - Unk12 = br.ReadByte(); //0, 50, 80, 100 - Unk13 = br.ReadByte(); //1,2,3,5 - VariablesCount = br.ReadUInt16(); //0,1,2,4 + LastPlayTime = br.ReadUInt32(); + DynamicBankID = br.ReadInt32(); + DynamicSlotType = br.ReadUInt32(); + Weight = br.ReadSingle(); + MinDist = br.ReadSingle(); //inner radius of volume (playback bound) + MaxDist = br.ReadSingle(); //outer radius of volume (activation bound) + MinTimeMinutes = br.ReadUInt16(); //time allows to start playing, in mins + MaxTimeMinutes = br.ReadUInt16(); //time to stop playing, in mins (max 1440) + MinRepeatTime = br.ReadUInt16(); + MinRepeatTimeVariance = br.ReadUInt16(); + SpawnHeight = br.ReadByte(); + PositionUsage = br.ReadByte(); + MaxLocalInstances = br.ReadByte(); + MaxGlobalInstances = br.ReadByte(); + BlockabilityFactor = br.ReadByte(); + MaxPathDepth = br.ReadByte(); + NumConditions = br.ReadUInt16(); - if (VariablesCount > 0) + if (NumConditions > 0) { - Variables = new Variable[VariablesCount]; - for (int i = 0; i < VariablesCount; i++) + Conditions = new Condition[NumConditions]; + for (int i = 0; i < NumConditions; i++) { - Variables[i] = new Variable(br); + Conditions[i] = new Condition(br); } //array seems to be padded to multiples of 16 bytes. (read the rest here) - int brem = (16 - ((VariablesCount * 12) % 16)) % 16; + int brem = (16 - ((NumConditions * 12) % 16)) % 16; if (brem > 0) { byte[] brema = br.ReadBytes(brem); @@ -5706,242 +5711,44 @@ namespace CodeWalker.GameFiles } } - - #region testing - - switch (Frequency.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 18: - case 20: - case 22: - case 24: - case 25: - case 26: - case 30: - case 32: - case 35: - case 40: - case 45: - case 48: - case 50: - case 51: - case 54: - case 55: - case 57: - case 60: - case 64: - case 65: - case 70: - case 75: - case 80: - case 90: - case 95: - case 97: - case 100: - case 120: - case 125: - case 130: - case 135: - case 140: - case 145: - case 150: - case 160: - case 170: - case 178: - case 180: - case 190: - case 200: - case 220: - case 225: - case 240: - case 245: - case 250: - case 300: - case 350: - case 500: - case 600: - break; - default: - break; - } - switch (Unk07.Value) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 12: - case 15: - case 17: - case 20: - case 21: - case 22: - case 25: - case 27: - case 30: - case 32: - case 35: - case 40: - case 50: - case 60: - case 100: - case 150: - break; - default: - break; - } - switch (Unk08.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk09.Value) - { - case 0: - case 1: - case 2: - break; - default: - break; - } - switch (Unk10.Value) - { - case 1: - case 2: - case 3: - case 4: - case 8: - case 255: - break; - default: - break; - } - switch (Unk11.Value) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 8: - case 10: - case 255: - break; - default: - break; - } - switch (Unk12.Value) - { - case 0: - case 50: - case 80: - case 100: - break; - default: - break; - } - switch (Unk13.Value) - { - case 1: - case 2: - case 3: - case 5: - break; - default: - break; - } - switch (VariablesCount) - { - case 0: - case 1: - case 2: - case 4: - break; - default: - break; - } - - - - //if ((Position.X != 0) || (Position.Y != 0) || (Position.Z != 0)) - //{ - // FoundCoords.Add(FloatUtil.GetVector3String(Position) + ", " + GetNameString()); - //} - - long bytesleft = br.BaseStream.Length - br.BaseStream.Position; - if (bytesleft != 0) - { } - - - #endregion - } public override void Write(BinaryWriter bw) { //base.Write(bw); WriteTypeAndOffset(bw); - bw.Write(Flags0); - bw.Write(Flags1); - bw.Write(Flags2); + bw.Write(Padding01); + bw.Write(Padding02); + bw.Write(Flags); bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Flags3); + bw.Write(Padding03); bw.Write(ChildSound); bw.Write(Category); - bw.Write(Flags4); - bw.Write(Flags5); - bw.Write(Flags6); - bw.Write(Unk01); - bw.Write(InnerRadius); - bw.Write(OuterRadius); - bw.Write(StartTime); - bw.Write(EndTime); - bw.Write(Frequency); - bw.Write(Unk07); - bw.Write(Unk08); - bw.Write(Unk09); - bw.Write(Unk10); - bw.Write(Unk11); - bw.Write(Unk12); - bw.Write(Unk13); - bw.Write(VariablesCount); + bw.Write(LastPlayTime); + bw.Write(DynamicBankID); + bw.Write(DynamicSlotType); + bw.Write(Weight); + bw.Write(MinDist); + bw.Write(MaxDist); + bw.Write(MinTimeMinutes); + bw.Write(MaxTimeMinutes); + bw.Write(MinRepeatTime); + bw.Write(MinRepeatTimeVariance); + bw.Write(SpawnHeight); + bw.Write(PositionUsage); + bw.Write(MaxLocalInstances); + bw.Write(MaxGlobalInstances); + bw.Write(BlockabilityFactor); + bw.Write(MaxPathDepth); + bw.Write(NumConditions); - if (VariablesCount > 0) + if (NumConditions > 0) { - for (int i = 0; i < VariablesCount; i++) + for (int i = 0; i < NumConditions; i++) { - Variables[i].Write(bw); + Conditions[i].Write(bw); } //array seems to be padded to multiples of 16 bytes. (write the rest here) while ((bw.BaseStream.Position & 0xF) != 0) bw.Write((byte)0); //pad out to next 16 bytes @@ -5950,58 +5757,52 @@ namespace CodeWalker.GameFiles } public override void WriteXml(StringBuilder sb, int indent) { - RelXml.ValueTag(sb, indent, "Flags0", "0x" + Flags0.Hex); - RelXml.ValueTag(sb, indent, "Flags1", "0x" + Flags1.Hex); - RelXml.ValueTag(sb, indent, "Flags2", "0x" + Flags2.Hex); + RelXml.ValueTag(sb, indent, "Flags", "0x" + Flags.Hex); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.ValueTag(sb, indent, "Flags3", "0x" + Flags3.Hex); RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); RelXml.StringTag(sb, indent, "Category", RelXml.HashString(Category)); - RelXml.ValueTag(sb, indent, "Flags4", "0x" + Flags4.Hex); - RelXml.ValueTag(sb, indent, "Flags5", "0x" + Flags5.Hex); - RelXml.ValueTag(sb, indent, "Flags6", "0x" + Flags6.Hex); - RelXml.ValueTag(sb, indent, "Unk01", FloatUtil.ToString(Unk01)); - RelXml.ValueTag(sb, indent, "InnerRadius", FloatUtil.ToString(InnerRadius)); - RelXml.ValueTag(sb, indent, "OuterRadius", FloatUtil.ToString(OuterRadius)); - RelXml.ValueTag(sb, indent, "StartTime", StartTime.ToString()); - RelXml.ValueTag(sb, indent, "EndTime", EndTime.ToString()); - RelXml.ValueTag(sb, indent, "Frequency", Frequency.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk07", Unk07.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk09", Unk09.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk10", Unk10.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk12", Unk12.Value.ToString()); - RelXml.ValueTag(sb, indent, "Unk13", Unk13.Value.ToString()); - RelXml.WriteItemArray(sb, Variables, indent, "Variables"); + RelXml.ValueTag(sb, indent, "LastPlayTime", LastPlayTime.ToString()); ; + RelXml.ValueTag(sb, indent, "DynamicBankID", DynamicBankID.ToString()); + RelXml.ValueTag(sb, indent, "DynamicSlotType", DynamicSlotType.ToString()); + RelXml.ValueTag(sb, indent, "Weight", FloatUtil.ToString(Weight)); + RelXml.ValueTag(sb, indent, "MinDist", FloatUtil.ToString(MinDist)); + RelXml.ValueTag(sb, indent, "MaxDist", FloatUtil.ToString(MaxDist)); + RelXml.ValueTag(sb, indent, "MinTimeMinutes", MinTimeMinutes.ToString()); + RelXml.ValueTag(sb, indent, "MaxTimeMinutes", MaxTimeMinutes.ToString()); + RelXml.ValueTag(sb, indent, "MinRepeatTime", MinRepeatTime.ToString()); + RelXml.ValueTag(sb, indent, "MinRepeatTimeVariance", MinRepeatTimeVariance.ToString()); + RelXml.ValueTag(sb, indent, "SpawnHeight", SpawnHeight.ToString()); + RelXml.ValueTag(sb, indent, "PositionUsage", PositionUsage.ToString()); + RelXml.ValueTag(sb, indent, "MaxLocalInstances", MaxLocalInstances.ToString()); + RelXml.ValueTag(sb, indent, "MaxGlobalInstances", MaxGlobalInstances.ToString()); + RelXml.ValueTag(sb, indent, "BlockabilityFactor", BlockabilityFactor.ToString()); + RelXml.ValueTag(sb, indent, "MaxPathDepth", MaxPathDepth.ToString()); + RelXml.WriteItemArray(sb, Conditions, indent, "Conditions"); } public override void ReadXml(XmlNode node) { - Flags0 = Xml.GetChildUIntAttribute(node, "Flags0", "value"); - Flags1 = Xml.GetChildUIntAttribute(node, "Flags1", "value"); - Flags2 = Xml.GetChildUIntAttribute(node, "Flags2", "value"); + Flags = Xml.GetChildUIntAttribute(node, "Flags", "value"); Position = Xml.GetChildVector3Attributes(node, "Position"); - Flags3 = Xml.GetChildUIntAttribute(node, "Flags3", "value"); ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); Category = XmlRel.GetHash(Xml.GetChildInnerText(node, "Category")); - Flags4 = Xml.GetChildUIntAttribute(node, "Flags4", "value"); - Flags5 = Xml.GetChildUIntAttribute(node, "Flags5", "value"); - Flags6 = Xml.GetChildUIntAttribute(node, "Flags6", "value"); - Unk01 = Xml.GetChildFloatAttribute(node, "Unk01", "value"); - InnerRadius = Xml.GetChildFloatAttribute(node, "InnerRadius", "value"); - OuterRadius = Xml.GetChildFloatAttribute(node, "OuterRadius", "value"); - StartTime = (ushort)Xml.GetChildUIntAttribute(node, "StartTime", "value"); - EndTime = (ushort)Xml.GetChildUIntAttribute(node, "EndTime", "value"); - Frequency = (ushort)Xml.GetChildUIntAttribute(node, "Frequency", "value"); - Unk07 = (ushort)Xml.GetChildUIntAttribute(node, "Unk07", "value"); - Unk08 = (byte)Xml.GetChildUIntAttribute(node, "Unk08", "value"); - Unk09 = (byte)Xml.GetChildUIntAttribute(node, "Unk09", "value"); - Unk10 = (byte)Xml.GetChildUIntAttribute(node, "Unk10", "value"); - Unk11 = (byte)Xml.GetChildUIntAttribute(node, "Unk11", "value"); - Unk12 = (byte)Xml.GetChildUIntAttribute(node, "Unk12", "value"); - Unk13 = (byte)Xml.GetChildUIntAttribute(node, "Unk13", "value"); - Variables = XmlRel.ReadItemArray(node, "Variables"); - VariablesCount = (ushort)(Variables?.Length ?? 0); + LastPlayTime = Xml.GetChildUIntAttribute(node, "LastPlayTime", "value"); + DynamicBankID = (int)Xml.GetChildUIntAttribute(node, "DynamicBankID", "value"); + DynamicSlotType = Xml.GetChildUIntAttribute(node, "DynamicSlotType", "value"); + Weight = Xml.GetChildFloatAttribute(node, "Weight", "value"); + MinDist = Xml.GetChildFloatAttribute(node, "MinDist", "value"); + MaxDist = Xml.GetChildFloatAttribute(node, "MaxDist", "value"); + MinTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MinTimeMinutes", "value"); + MaxTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MaxTimeMinutes", "value"); + MinRepeatTime = (ushort)Xml.GetChildUIntAttribute(node, "MinRepeatTime", "value"); + MinRepeatTimeVariance = (ushort)Xml.GetChildUIntAttribute(node, "MinRepeatTimeVariance", "value"); + SpawnHeight = (byte)Xml.GetChildUIntAttribute(node, "SpawnHeight", "value"); + PositionUsage = (byte)Xml.GetChildUIntAttribute(node, "PositionUsage", "value"); + MaxLocalInstances = (byte)Xml.GetChildUIntAttribute(node, "MaxLocalInstances", "value"); + MaxGlobalInstances = (byte)Xml.GetChildUIntAttribute(node, "MaxGlobalInstances", "value"); + BlockabilityFactor = (byte)Xml.GetChildUIntAttribute(node, "BlockabilityFactor", "value"); + MaxPathDepth = (byte)Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); + Conditions = XmlRel.ReadItemArray(node, "Conditions"); + NumConditions = (ushort)(Conditions?.Length ?? 0); } public override MetaHash[] GetCategoryHashes() { @@ -6062,34 +5863,35 @@ namespace CodeWalker.GameFiles return ZoneHashes; } } - [TC(typeof(EXP))] public class Dat151StaticEmitter : Dat151RelData + [TC(typeof(EXP))] + public class Dat151StaticEmitter : Dat151RelData { public FlagsUint Flags { get; set; }//flags public MetaHash ChildSound { get; set; } public MetaHash RadioStation { get; set; } public Vector3 Position { get; set; } - public float Unk06 { get; set; } - public float Unk07 { get; set; } - public int Unk08 { get; set; } + public float MinDistance { get; set; } + public float MaxDistance { get; set; } + public int EmittedVolume { get; set; } public short LPFCutoff { get; set; } public short HPFCutoff { get; set; } - public int Unk11 { get; set; } + public int RolloffFactor { get; set; } public MetaHash Interior { get; set; } public MetaHash Room { get; set; } - public MetaHash Unk13 { get; set; } - public float Unk14 { get; set; } - public ushort Unk15 { get; set; } - public ushort Unk16 { get; set; } + public MetaHash RadioStationForScore { get; set; } + public float MaxLeakage { get; set; } + public ushort MinLeakageDistance { get; set; } + public ushort MaxLeakageDistance { get; set; } public MetaHash Alarm { get; set; } - public MetaHash Unk18 { get; set; } + public MetaHash OnBreakOneShot { get; set; } public uint MaxPathDepth { get; set; } public uint SmallReverbSend { get; set; } public uint MediumReverbSend { get; set; } public uint LargeReverbSend { get; set; } public ushort MinTimeMinutes { get; set; } public ushort MaxTimeMinutes { get; set; } - public float Unk21 { get; set; } - public float Unk22 { get; set; } + public float BrokenHealth { get; set; } + public float UndamagedHealth { get; set; } public Dat151StaticEmitter(RelFile rel) : base(rel) { @@ -6102,28 +5904,28 @@ namespace CodeWalker.GameFiles ChildSound = br.ReadUInt32(); RadioStation = br.ReadUInt32(); Position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle()); - Unk06 = br.ReadSingle(); - Unk07 = br.ReadSingle(); - Unk08 = br.ReadInt32(); + MinDistance = br.ReadSingle(); + MaxDistance = br.ReadSingle(); + EmittedVolume = br.ReadInt32(); LPFCutoff = br.ReadInt16(); HPFCutoff = br.ReadInt16(); - Unk11 = br.ReadInt32(); + RolloffFactor = br.ReadInt32(); Interior = br.ReadUInt32(); Room = br.ReadUInt32(); - Unk13 = br.ReadUInt32(); - Unk14 = br.ReadSingle(); - Unk15 = br.ReadUInt16(); - Unk16 = br.ReadUInt16(); + RadioStationForScore = br.ReadUInt32(); + MaxLeakage = br.ReadSingle(); + MinLeakageDistance = br.ReadUInt16(); + MaxLeakageDistance = br.ReadUInt16(); Alarm = br.ReadUInt32(); - Unk18 = br.ReadUInt32(); + OnBreakOneShot = br.ReadUInt32(); MaxPathDepth = br.ReadByte(); SmallReverbSend = br.ReadByte(); MediumReverbSend = br.ReadByte(); LargeReverbSend = br.ReadByte(); MinTimeMinutes = br.ReadUInt16(); MaxTimeMinutes = br.ReadUInt16(); - Unk21 = br.ReadSingle(); - Unk22 = br.ReadSingle(); + BrokenHealth = br.ReadSingle(); + UndamagedHealth = br.ReadSingle(); var bytesleft = br.BaseStream.Length - br.BaseStream.Position; if (bytesleft != 0) @@ -6138,28 +5940,28 @@ namespace CodeWalker.GameFiles bw.Write(Position.X); bw.Write(Position.Y); bw.Write(Position.Z); - bw.Write(Unk06); - bw.Write(Unk07); - bw.Write(Unk08); + bw.Write(MinDistance); + bw.Write(MaxDistance); + bw.Write(EmittedVolume); bw.Write(LPFCutoff); bw.Write(HPFCutoff); - bw.Write(Unk11); + bw.Write(RolloffFactor); bw.Write(Interior); bw.Write(Room); - bw.Write(Unk13); - bw.Write(Unk14); - bw.Write(Unk15); - bw.Write(Unk16); + bw.Write(RadioStationForScore); + bw.Write(MaxLeakage); + bw.Write(MinLeakageDistance); + bw.Write(MaxLeakageDistance); bw.Write(Alarm); - bw.Write(Unk18); + bw.Write(OnBreakOneShot); bw.Write(MaxPathDepth); bw.Write(SmallReverbSend); bw.Write(MediumReverbSend); bw.Write(LargeReverbSend); bw.Write(MinTimeMinutes); bw.Write(MaxTimeMinutes); - bw.Write(Unk21); - bw.Write(Unk22); + bw.Write(BrokenHealth); + bw.Write(UndamagedHealth); } public override void WriteXml(StringBuilder sb, int indent) { @@ -6167,28 +5969,28 @@ namespace CodeWalker.GameFiles RelXml.StringTag(sb, indent, "ChildSound", RelXml.HashString(ChildSound)); RelXml.StringTag(sb, indent, "RadioStation", RelXml.HashString(RadioStation)); RelXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position)); - RelXml.ValueTag(sb, indent, "Unk06", FloatUtil.ToString(Unk06)); - RelXml.ValueTag(sb, indent, "Unk07", FloatUtil.ToString(Unk07)); - RelXml.ValueTag(sb, indent, "Unk08", Unk08.ToString()); + RelXml.ValueTag(sb, indent, "MinDistance", FloatUtil.ToString(MinDistance)); + RelXml.ValueTag(sb, indent, "MaxDistance", FloatUtil.ToString(MaxDistance)); + RelXml.ValueTag(sb, indent, "EmittedVolume", EmittedVolume.ToString()); RelXml.ValueTag(sb, indent, "LPFCutoff", LPFCutoff.ToString()); RelXml.ValueTag(sb, indent, "HPFCutoff", HPFCutoff.ToString()); - RelXml.ValueTag(sb, indent, "Unk11", Unk11.ToString()); + RelXml.ValueTag(sb, indent, "RolloffFactor", RolloffFactor.ToString()); RelXml.StringTag(sb, indent, "Interior", RelXml.HashString(Interior)); RelXml.StringTag(sb, indent, "Room", RelXml.HashString(Room)); - RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13)); - RelXml.ValueTag(sb, indent, "Unk14", FloatUtil.ToString(Unk14)); - RelXml.ValueTag(sb, indent, "Unk15", Unk15.ToString()); - RelXml.ValueTag(sb, indent, "Unk16", Unk16.ToString()); + RelXml.StringTag(sb, indent, "RadioStationForScore", RelXml.HashString(RadioStationForScore)); + RelXml.ValueTag(sb, indent, "MaxLeakage", FloatUtil.ToString(MaxLeakage)); + RelXml.ValueTag(sb, indent, "MinLeakageDistance", MinLeakageDistance.ToString()); + RelXml.ValueTag(sb, indent, "MaxLeakageDistance", MaxLeakageDistance.ToString()); RelXml.StringTag(sb, indent, "Alarm", RelXml.HashString(Alarm)); - RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18)); + RelXml.StringTag(sb, indent, "OnBreakOneShot", RelXml.HashString(OnBreakOneShot)); RelXml.ValueTag(sb, indent, "MaxPathDepth", MaxPathDepth.ToString()); RelXml.ValueTag(sb, indent, "SmallReverbSend", SmallReverbSend.ToString()); RelXml.ValueTag(sb, indent, "MediumReverbSend", MediumReverbSend.ToString()); RelXml.ValueTag(sb, indent, "LargeReverbSend", LargeReverbSend.ToString()); RelXml.ValueTag(sb, indent, "MinTimeMinutes", MinTimeMinutes.ToString()); RelXml.ValueTag(sb, indent, "MaxTimeMinutes", MaxTimeMinutes.ToString()); - RelXml.ValueTag(sb, indent, "Unk21", FloatUtil.ToString(Unk21)); - RelXml.ValueTag(sb, indent, "Unk22", FloatUtil.ToString(Unk22)); + RelXml.ValueTag(sb, indent, "BrokenHealth", FloatUtil.ToString(BrokenHealth)); + RelXml.ValueTag(sb, indent, "UndamagedHealth", FloatUtil.ToString(UndamagedHealth)); } public override void ReadXml(XmlNode node) { @@ -6196,32 +5998,32 @@ namespace CodeWalker.GameFiles ChildSound = XmlRel.GetHash(Xml.GetChildInnerText(node, "ChildSound")); RadioStation = XmlRel.GetHash(Xml.GetChildInnerText(node, "RadioStation")); Position = Xml.GetChildVector3Attributes(node, "Position"); - Unk06 = Xml.GetChildFloatAttribute(node, "Unk06", "value"); - Unk07 = Xml.GetChildFloatAttribute(node, "Unk07", "value"); - Unk08 = Xml.GetChildIntAttribute(node, "Unk08", "value"); + MinDistance = Xml.GetChildFloatAttribute(node, "MinDistance", "value"); + MaxDistance = Xml.GetChildFloatAttribute(node, "MaxDistance", "value"); + EmittedVolume = Xml.GetChildIntAttribute(node, "EmittedVolume", "value"); LPFCutoff = (short)Xml.GetChildIntAttribute(node, "LPFCutoff", "value"); HPFCutoff = (short)Xml.GetChildIntAttribute(node, "HPFCutoff", "value"); - Unk11 = Xml.GetChildIntAttribute(node, "Unk11", "value"); + RolloffFactor = Xml.GetChildIntAttribute(node, "RolloffFactor", "value"); Interior = XmlRel.GetHash(Xml.GetChildInnerText(node, "Interior")); Room = XmlRel.GetHash(Xml.GetChildInnerText(node, "Room")); - Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13")); - Unk14 = Xml.GetChildFloatAttribute(node, "Unk14", "value"); - Unk15 = (ushort)Xml.GetChildUIntAttribute(node, "Unk15", "value"); - Unk16 = (ushort)Xml.GetChildUIntAttribute(node, "Unk16", "value"); + RadioStationForScore = XmlRel.GetHash(Xml.GetChildInnerText(node, "RadioStationForScore")); + MaxLeakage = Xml.GetChildFloatAttribute(node, "MaxLeakage", "value"); + MinLeakageDistance = (ushort)Xml.GetChildUIntAttribute(node, "MinLeakageDistance", "value"); + MaxLeakageDistance = (ushort)Xml.GetChildUIntAttribute(node, "MaxLeakageDistance", "value"); Alarm = XmlRel.GetHash(Xml.GetChildInnerText(node, "Alarm")); - Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18")); + OnBreakOneShot = XmlRel.GetHash(Xml.GetChildInnerText(node, "OnBreakOneShot")); MaxPathDepth = Xml.GetChildUIntAttribute(node, "MaxPathDepth", "value"); SmallReverbSend = Xml.GetChildUIntAttribute(node, "SmallReverbSend", "value"); MediumReverbSend = Xml.GetChildUIntAttribute(node, "MediumReverbSend", "value"); LargeReverbSend = Xml.GetChildUIntAttribute(node, "LargeReverbSend", "value"); MinTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MinTimeMinutes", "value"); MaxTimeMinutes = (ushort)Xml.GetChildUIntAttribute(node, "MaxTimeMinutes", "value"); - Unk21 = Xml.GetChildFloatAttribute(node, "Unk21", "value"); - Unk22 = Xml.GetChildFloatAttribute(node, "Unk22", "value"); + BrokenHealth = Xml.GetChildFloatAttribute(node, "BrokenHealth", "value"); + UndamagedHealth = Xml.GetChildFloatAttribute(node, "UndamagedHealth", "value"); } public override MetaHash[] GetSoundHashes() { - return new[] { ChildSound, Unk18 }; + return new[] { ChildSound, OnBreakOneShot }; } public override MetaHash[] GetGameHashes() { diff --git a/CodeWalker.Core/World/AudioZones.cs b/CodeWalker.Core/World/AudioZones.cs index a96834a..ae31055 100644 --- a/CodeWalker.Core/World/AudioZones.cs +++ b/CodeWalker.Core/World/AudioZones.cs @@ -162,29 +162,29 @@ namespace CodeWalker.World switch (zone.Shape) { case Dat151ZoneShape.Box: - InnerPos = zone.PlaybackZonePosition; - InnerMax = zone.PlaybackZoneSize * 0.5f; + InnerPos = zone.PositioningZoneCentre; + InnerMax = zone.PositioningZoneSize * 0.5f; InnerMin = -InnerMax; - InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.PlaybackZoneAngle * deg2rad); + InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.PositioningZoneRotationAngle * deg2rad); break; case Dat151ZoneShape.Sphere: - InnerPos = zone.PlaybackZonePosition; + InnerPos = zone.PositioningZoneCentre; InnerOri = Quaternion.Identity; - InnerRadius = zone.PlaybackZoneSize.X; + InnerRadius = zone.PositioningZoneSize.X; OuterRadius = zone.ActivationZoneSize.X; break; case Dat151ZoneShape.Line: - InnerPos = zone.PlaybackZonePosition; + InnerPos = zone.PositioningZoneCentre; InnerMin = new Vector3(-1.0f, -1.0f, 0.0f); - InnerMax = new Vector3(1.0f, 1.0f, (zone.PlaybackZoneSize - zone.PlaybackZonePosition).Length()); - InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.PlaybackZonePosition, zone.PlaybackZoneSize, Vector3.UnitZ)); + InnerMax = new Vector3(1.0f, 1.0f, (zone.PositioningZoneSize - zone.PositioningZoneCentre).Length()); + InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.PositioningZoneCentre, zone.PositioningZoneSize, Vector3.UnitZ)); break; } - OuterPos = zone.ActivationZonePosition; + OuterPos = zone.ActivationZoneCentre; OuterMax = zone.ActivationZoneSize * 0.5f; OuterMin = -OuterMax; - OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.ActivationZoneAngle * deg2rad); + OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.ActivationZoneRotationAngle * deg2rad); bool useouter = ((InnerMax.X == 0) || (InnerMax.Y == 0) || (InnerMax.Z == 0)); if (useouter && (zone.Shape != Dat151ZoneShape.Sphere)) @@ -215,8 +215,8 @@ namespace CodeWalker.World OrientationInv = Quaternion.Identity; InnerPos = emitter.Position; OuterPos = InnerPos; - InnerRadius = emitter.InnerRadius; - OuterRadius = emitter.OuterRadius; + InnerRadius = emitter.MinDist; + OuterRadius = emitter.MaxDist; bool useouter = (InnerRadius == 0); if (useouter) @@ -239,8 +239,8 @@ namespace CodeWalker.World if (AudioZone != null) { - AudioZone.PlaybackZonePosition = InnerPos; - AudioZone.ActivationZonePosition = OuterPos; + AudioZone.PositioningZoneCentre = InnerPos; + AudioZone.ActivationZoneCentre = OuterPos; } if (AudioEmitter != null) { @@ -266,8 +266,8 @@ namespace CodeWalker.World OuterOri = Orientation; if (AudioZone != null) { - AudioZone.PlaybackZoneAngle = uangl; - AudioZone.ActivationZoneAngle = uangl; + AudioZone.PositioningZoneRotationAngle = (ushort)uangl; + AudioZone.ActivationZoneRotationAngle = (ushort)uangl; } } else @@ -280,7 +280,7 @@ namespace CodeWalker.World OuterOri = Orientation; if (AudioZone != null) { - AudioZone.ActivationZoneAngle = uangl; + AudioZone.ActivationZoneRotationAngle = (ushort)uangl; } } else @@ -288,7 +288,7 @@ namespace CodeWalker.World InnerOri = Orientation; if (AudioZone != null) { - AudioZone.PlaybackZoneAngle = uangl; + AudioZone.PositioningZoneRotationAngle = (ushort)uangl; } } } diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs index 52e6b3c..2a19c88 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditAudioEmitterPanel.Designer.cs @@ -32,6 +32,12 @@ this.GoToButton = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.label25 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); this.Unk13UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk12UpDown = new System.Windows.Forms.NumericUpDown(); this.Unk11UpDown = new System.Windows.Forms.NumericUpDown(); @@ -46,8 +52,6 @@ this.Flags5TextBox = new System.Windows.Forms.TextBox(); this.label22 = new System.Windows.Forms.Label(); this.Flags4TextBox = new System.Windows.Forms.TextBox(); - this.label19 = new System.Windows.Forms.Label(); - this.Flags3TextBox = new System.Windows.Forms.TextBox(); this.DeleteButton = new System.Windows.Forms.Button(); this.AddToProjectButton = new System.Windows.Forms.Button(); this.label21 = new System.Windows.Forms.Label(); @@ -57,10 +61,6 @@ this.label15 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.Flags1TextBox = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.Flags0TextBox = new System.Windows.Forms.TextBox(); this.label12 = new System.Windows.Forms.Label(); this.NameTextBox = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -77,9 +77,6 @@ this.InnerRadiusTextBox = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.PositionTextBox = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Unk13UpDown)).BeginInit(); @@ -119,6 +116,9 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.label25); + this.tabPage1.Controls.Add(this.label24); + this.tabPage1.Controls.Add(this.label11); this.tabPage1.Controls.Add(this.label9); this.tabPage1.Controls.Add(this.label8); this.tabPage1.Controls.Add(this.label5); @@ -136,8 +136,6 @@ this.tabPage1.Controls.Add(this.Flags5TextBox); this.tabPage1.Controls.Add(this.label22); this.tabPage1.Controls.Add(this.Flags4TextBox); - this.tabPage1.Controls.Add(this.label19); - this.tabPage1.Controls.Add(this.Flags3TextBox); this.tabPage1.Controls.Add(this.DeleteButton); this.tabPage1.Controls.Add(this.AddToProjectButton); this.tabPage1.Controls.Add(this.label21); @@ -147,10 +145,6 @@ this.tabPage1.Controls.Add(this.label15); this.tabPage1.Controls.Add(this.label17); this.tabPage1.Controls.Add(this.label18); - this.tabPage1.Controls.Add(this.label14); - this.tabPage1.Controls.Add(this.Flags1TextBox); - this.tabPage1.Controls.Add(this.label13); - this.tabPage1.Controls.Add(this.Flags0TextBox); this.tabPage1.Controls.Add(this.label12); this.tabPage1.Controls.Add(this.NameTextBox); this.tabPage1.Controls.Add(this.label6); @@ -175,9 +169,63 @@ this.tabPage1.Text = "Ambient Emitter"; this.tabPage1.UseVisualStyleBackColor = true; // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(354, 109); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(81, 13); + this.label25.TabIndex = 88; + this.label25.Text = "Position Usage:"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(7, 380); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(112, 13); + this.label24.TabIndex = 87; + this.label24.Text = "Max Global Instances:"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(7, 354); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(87, 13); + this.label11.TabIndex = 86; + this.label11.Text = "Max Path Depth:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(192, 178); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(78, 13); + this.label9.TabIndex = 45; + this.label9.Text = "(game minutes)"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 203); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(55, 13); + this.label8.TabIndex = 46; + this.label8.Text = "End Time:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 253); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(94, 13); + this.label5.TabIndex = 50; + this.label5.Text = "Max Repeat Time:"; + // // Unk13UpDown // - this.Unk13UpDown.Location = new System.Drawing.Point(138, 325); + this.Unk13UpDown.Location = new System.Drawing.Point(126, 352); this.Unk13UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -190,7 +238,7 @@ // // Unk12UpDown // - this.Unk12UpDown.Location = new System.Drawing.Point(84, 325); + this.Unk12UpDown.Location = new System.Drawing.Point(126, 326); this.Unk12UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -203,7 +251,7 @@ // // Unk11UpDown // - this.Unk11UpDown.Location = new System.Drawing.Point(138, 301); + this.Unk11UpDown.Location = new System.Drawing.Point(126, 378); this.Unk11UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -216,7 +264,7 @@ // // Unk10UpDown // - this.Unk10UpDown.Location = new System.Drawing.Point(84, 301); + this.Unk10UpDown.Location = new System.Drawing.Point(126, 302); this.Unk10UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -229,7 +277,7 @@ // // Unk09UpDown // - this.Unk09UpDown.Location = new System.Drawing.Point(138, 277); + this.Unk09UpDown.Location = new System.Drawing.Point(451, 107); this.Unk09UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -242,7 +290,7 @@ // // Unk07UpDown // - this.Unk07UpDown.Location = new System.Drawing.Point(84, 251); + this.Unk07UpDown.Location = new System.Drawing.Point(104, 253); this.Unk07UpDown.Maximum = new decimal(new int[] { 65535, 0, @@ -255,7 +303,7 @@ // // Unk08UpDown // - this.Unk08UpDown.Location = new System.Drawing.Point(84, 277); + this.Unk08UpDown.Location = new System.Drawing.Point(126, 278); this.Unk08UpDown.Maximum = new decimal(new int[] { 255, 0, @@ -268,7 +316,7 @@ // // FrequencyUpDown // - this.FrequencyUpDown.Location = new System.Drawing.Point(84, 227); + this.FrequencyUpDown.Location = new System.Drawing.Point(104, 228); this.FrequencyUpDown.Maximum = new decimal(new int[] { 65535, 0, @@ -309,16 +357,16 @@ // this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(340, 178); + this.label23.Location = new System.Drawing.Point(339, 84); this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(44, 13); + this.label23.Size = new System.Drawing.Size(49, 13); this.label23.TabIndex = 80; - this.label23.Text = "Flags 5:"; + this.label23.Text = "Bank ID:"; // // Flags5TextBox // this.Flags5TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags5TextBox.Location = new System.Drawing.Point(390, 175); + this.Flags5TextBox.Location = new System.Drawing.Point(389, 81); this.Flags5TextBox.Name = "Flags5TextBox"; this.Flags5TextBox.Size = new System.Drawing.Size(155, 20); this.Flags5TextBox.TabIndex = 81; @@ -328,40 +376,21 @@ // this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(340, 154); + this.label22.Location = new System.Drawing.Point(326, 60); this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(44, 13); + this.label22.Size = new System.Drawing.Size(65, 13); this.label22.TabIndex = 78; - this.label22.Text = "Flags 4:"; + this.label22.Text = "Last Played:"; // // Flags4TextBox // this.Flags4TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags4TextBox.Location = new System.Drawing.Point(390, 151); + this.Flags4TextBox.Location = new System.Drawing.Point(389, 57); this.Flags4TextBox.Name = "Flags4TextBox"; this.Flags4TextBox.Size = new System.Drawing.Size(155, 20); this.Flags4TextBox.TabIndex = 79; this.Flags4TextBox.TextChanged += new System.EventHandler(this.Flags4TextBox_TextChanged); // - // label19 - // - this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(340, 130); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(44, 13); - this.label19.TabIndex = 76; - this.label19.Text = "Flags 3:"; - // - // Flags3TextBox - // - this.Flags3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags3TextBox.Location = new System.Drawing.Point(390, 127); - this.Flags3TextBox.Name = "Flags3TextBox"; - this.Flags3TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags3TextBox.TabIndex = 77; - this.Flags3TextBox.TextChanged += new System.EventHandler(this.Flags3TextBox_TextChanged); - // // DeleteButton // this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -388,16 +417,16 @@ // this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(340, 106); + this.label21.Location = new System.Drawing.Point(339, 33); this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(44, 13); + this.label21.Size = new System.Drawing.Size(35, 13); this.label21.TabIndex = 74; - this.label21.Text = "Flags 2:"; + this.label21.Text = "Flags:"; // // Flags2TextBox // this.Flags2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags2TextBox.Location = new System.Drawing.Point(390, 103); + this.Flags2TextBox.Location = new System.Drawing.Point(389, 30); this.Flags2TextBox.Name = "Flags2TextBox"; this.Flags2TextBox.Size = new System.Drawing.Size(155, 20); this.Flags2TextBox.TabIndex = 75; @@ -407,11 +436,11 @@ // this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(305, 241); + this.label20.Location = new System.Drawing.Point(293, 253); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(160, 26); + this.label20.Size = new System.Drawing.Size(59, 13); this.label20.TabIndex = 82; - this.label20.Text = "Ext params:\r\nName (hash), Value (float), Flags"; + this.label20.Text = "Conditions:"; // // VariablesTextBox // @@ -430,65 +459,27 @@ this.label15.AutoSize = true; this.label15.Location = new System.Drawing.Point(7, 328); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(63, 13); + this.label15.Size = new System.Drawing.Size(96, 13); this.label15.TabIndex = 58; - this.label15.Text = "Unk 12, 13:"; + this.label15.Text = "Blockability Factor:"; // // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(7, 304); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(63, 13); + this.label17.Size = new System.Drawing.Size(108, 13); this.label17.TabIndex = 55; - this.label17.Text = "Unk 10, 11:"; + this.label17.Text = "Max Local Instances:"; // // label18 // this.label18.AutoSize = true; this.label18.Location = new System.Drawing.Point(7, 280); this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(51, 13); + this.label18.Size = new System.Drawing.Size(77, 13); this.label18.TabIndex = 52; - this.label18.Text = "Unk 8, 9:"; - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(340, 82); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(44, 13); - this.label14.TabIndex = 72; - this.label14.Text = "Flags 1:"; - // - // Flags1TextBox - // - this.Flags1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags1TextBox.Location = new System.Drawing.Point(390, 79); - this.Flags1TextBox.Name = "Flags1TextBox"; - this.Flags1TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags1TextBox.TabIndex = 73; - this.Flags1TextBox.TextChanged += new System.EventHandler(this.Flags1TextBox_TextChanged); - // - // label13 - // - this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(340, 58); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(44, 13); - this.label13.TabIndex = 70; - this.label13.Text = "Flags 0:"; - // - // Flags0TextBox - // - this.Flags0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags0TextBox.Location = new System.Drawing.Point(390, 55); - this.Flags0TextBox.Name = "Flags0TextBox"; - this.Flags0TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags0TextBox.TabIndex = 71; - this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged); + this.label18.Text = "Spawn Height:"; // // label12 // @@ -514,9 +505,9 @@ this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(7, 230); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(39, 13); + this.label6.Size = new System.Drawing.Size(91, 13); this.label6.TabIndex = 48; - this.label6.Text = "Unk 6:"; + this.label6.Text = "Min Repeat Time:"; // // label7 // @@ -551,9 +542,9 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(7, 154); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(39, 13); + this.label4.Size = new System.Drawing.Size(44, 13); this.label4.TabIndex = 41; - this.label4.Text = "Unk 1:"; + this.label4.Text = "Weight:"; // // Unk01TextBox // @@ -570,9 +561,9 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(7, 130); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(44, 13); + this.label3.Size = new System.Drawing.Size(52, 13); this.label3.TabIndex = 39; - this.label3.Text = "Hash 2:"; + this.label3.Text = "Category:"; // // CategoryTextBox // @@ -589,9 +580,9 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(7, 106); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(44, 13); + this.label2.Size = new System.Drawing.Size(67, 13); this.label2.TabIndex = 37; - this.label2.Text = "Hash 1:"; + this.label2.Text = "Child Sound:"; // // ChildSoundTextBox // @@ -641,33 +632,6 @@ this.PositionTextBox.TabIndex = 32; this.PositionTextBox.TextChanged += new System.EventHandler(this.PositionTextBox_TextChanged); // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(7, 253); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(39, 13); - this.label5.TabIndex = 50; - this.label5.Text = "Unk 7:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(7, 203); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(55, 13); - this.label8.TabIndex = 46; - this.label8.Text = "End Time:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(192, 178); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(78, 13); - this.label9.TabIndex = 45; - this.label9.Text = "(game minutes)"; - // // EditAudioEmitterPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -709,10 +673,6 @@ private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox Flags1TextBox; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox Flags0TextBox; private System.Windows.Forms.Label label12; private System.Windows.Forms.TextBox NameTextBox; private System.Windows.Forms.Label label6; @@ -733,8 +693,6 @@ private System.Windows.Forms.TextBox Flags5TextBox; private System.Windows.Forms.Label label22; private System.Windows.Forms.TextBox Flags4TextBox; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox Flags3TextBox; private System.Windows.Forms.NumericUpDown FrequencyUpDown; private System.Windows.Forms.NumericUpDown EndTimeUpDown; private System.Windows.Forms.NumericUpDown StartTimeUpDown; @@ -748,5 +706,8 @@ private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label24; } } \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs b/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs index 4f4e9f2..64e9bbf 100644 --- a/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs +++ b/CodeWalker/Project/Panels/EditAudioEmitterPanel.cs @@ -66,10 +66,7 @@ namespace CodeWalker.Project.Panels Unk11UpDown.Value = 0; Unk12UpDown.Value = 0; Unk13UpDown.Value = 0; - Flags0TextBox.Text = string.Empty; - Flags1TextBox.Text = string.Empty; Flags2TextBox.Text = string.Empty; - Flags3TextBox.Text = string.Empty; Flags4TextBox.Text = string.Empty; Flags5TextBox.Text = string.Empty; VariablesTextBox.Text = string.Empty; @@ -84,38 +81,35 @@ namespace CodeWalker.Project.Panels var e = CurrentEmitter.AudioEmitter; NameTextBox.Text = e.NameHash.ToString(); PositionTextBox.Text = FloatUtil.GetVector3String(e.Position); - InnerRadiusTextBox.Text = FloatUtil.ToString(e.InnerRadius); - OuterRadiusTextBox.Text = FloatUtil.ToString(e.OuterRadius); + InnerRadiusTextBox.Text = FloatUtil.ToString(e.MinDist); + OuterRadiusTextBox.Text = FloatUtil.ToString(e.MaxDist); ChildSoundTextBox.Text = e.ChildSound.ToString(); CategoryTextBox.Text = e.Category.ToString(); - Unk01TextBox.Text = FloatUtil.ToString(e.Unk01); - StartTimeUpDown.Value = e.StartTime; - EndTimeUpDown.Value = e.EndTime; - FrequencyUpDown.Value = e.Frequency.Value; - Unk07UpDown.Value = e.Unk07.Value; - Unk08UpDown.Value = e.Unk08.Value; - Unk09UpDown.Value = e.Unk09.Value; - Unk10UpDown.Value = e.Unk10.Value; - Unk11UpDown.Value = e.Unk11.Value; - Unk12UpDown.Value = e.Unk12.Value; - Unk13UpDown.Value = e.Unk13.Value; - Flags0TextBox.Text = e.Flags0.Hex; - Flags1TextBox.Text = e.Flags1.Hex; - Flags2TextBox.Text = e.Flags2.Hex; - Flags3TextBox.Text = e.Flags3.Hex; - Flags4TextBox.Text = e.Flags4.Hex; - Flags5TextBox.Text = e.Flags5.Hex; + Unk01TextBox.Text = FloatUtil.ToString(e.Weight); + StartTimeUpDown.Value = e.MinTimeMinutes; + EndTimeUpDown.Value = e.MaxTimeMinutes; + FrequencyUpDown.Value = e.MinRepeatTime; + Unk07UpDown.Value = e.MinRepeatTimeVariance; + Unk08UpDown.Value = e.SpawnHeight; + Unk09UpDown.Value = e.PositionUsage; + Unk10UpDown.Value = e.MaxLocalInstances; + Unk11UpDown.Value = e.MaxGlobalInstances; + Unk12UpDown.Value = e.BlockabilityFactor; + Unk13UpDown.Value = e.MaxPathDepth; + Flags2TextBox.Text = e.Flags.Hex; + Flags4TextBox.Text = FloatUtil.ToString(e.LastPlayTime); + Flags5TextBox.Text = FloatUtil.ToString(e.DynamicBankID); StringBuilder sb = new StringBuilder(); - if (e.Variables != null) + if (e.Conditions != null) { - foreach (var extparam in e.Variables) + foreach (var extparam in e.Conditions) { sb.Append(extparam.Name.ToString()); sb.Append(", "); sb.Append(FloatUtil.ToString(extparam.Value)); sb.Append(", "); - sb.Append(extparam.Flags.ToString()); + sb.Append(extparam.ConditionType.ToString()); sb.AppendLine(); } } @@ -195,9 +189,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; float rad = FloatUtil.Parse(InnerRadiusTextBox.Text); - if (CurrentEmitter.AudioEmitter.InnerRadius != rad) + if (CurrentEmitter.AudioEmitter.MinDist != rad) { - CurrentEmitter.AudioEmitter.InnerRadius = rad; + CurrentEmitter.AudioEmitter.MinDist = rad; ProjectItemChanged(); } @@ -209,9 +203,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; float rad = FloatUtil.Parse(OuterRadiusTextBox.Text); - if (CurrentEmitter.AudioEmitter.OuterRadius != rad) + if (CurrentEmitter.AudioEmitter.MaxDist != rad) { - CurrentEmitter.AudioEmitter.OuterRadius = rad; + CurrentEmitter.AudioEmitter.MaxDist = rad; ProjectItemChanged(); } @@ -267,9 +261,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; float unk = FloatUtil.Parse(Unk01TextBox.Text); - if (CurrentEmitter.AudioEmitter.Unk01 != unk) + if (CurrentEmitter.AudioEmitter.Weight != unk) { - CurrentEmitter.AudioEmitter.Unk01 = unk; + CurrentEmitter.AudioEmitter.Weight = unk; ProjectItemChanged(); } @@ -281,9 +275,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; ushort unk = (ushort)StartTimeUpDown.Value; - if (CurrentEmitter.AudioEmitter.StartTime != unk) + if (CurrentEmitter.AudioEmitter.MinTimeMinutes != unk) { - CurrentEmitter.AudioEmitter.StartTime = unk; + CurrentEmitter.AudioEmitter.MinTimeMinutes = unk; ProjectItemChanged(); } @@ -295,9 +289,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; ushort unk = (ushort)EndTimeUpDown.Value; - if (CurrentEmitter.AudioEmitter.EndTime != unk) + if (CurrentEmitter.AudioEmitter.MaxTimeMinutes != unk) { - CurrentEmitter.AudioEmitter.EndTime = unk; + CurrentEmitter.AudioEmitter.MaxTimeMinutes = unk; ProjectItemChanged(); } @@ -309,9 +303,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; ushort unk = (ushort)FrequencyUpDown.Value; - if (CurrentEmitter.AudioEmitter.Frequency.Value != unk) + if (CurrentEmitter.AudioEmitter.MinRepeatTime != unk) { - CurrentEmitter.AudioEmitter.Frequency = unk; + CurrentEmitter.AudioEmitter.MinRepeatTime = unk; ProjectItemChanged(); } @@ -323,9 +317,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; ushort unk = (ushort)Unk07UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk07.Value != unk) + if (CurrentEmitter.AudioEmitter.MinRepeatTimeVariance != unk) { - CurrentEmitter.AudioEmitter.Unk07 = unk; + CurrentEmitter.AudioEmitter.MinRepeatTimeVariance = unk; ProjectItemChanged(); } @@ -337,9 +331,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk08UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk08.Value != unk) + if (CurrentEmitter.AudioEmitter.SpawnHeight != unk) { - CurrentEmitter.AudioEmitter.Unk08 = unk; + CurrentEmitter.AudioEmitter.SpawnHeight = unk; ProjectItemChanged(); } @@ -351,9 +345,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk09UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk09.Value != unk) + if (CurrentEmitter.AudioEmitter.PositionUsage != unk) { - CurrentEmitter.AudioEmitter.Unk09 = unk; + CurrentEmitter.AudioEmitter.PositionUsage = unk; ProjectItemChanged(); } @@ -365,9 +359,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk10UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk10.Value != unk) + if (CurrentEmitter.AudioEmitter.MaxLocalInstances != unk) { - CurrentEmitter.AudioEmitter.Unk10 = unk; + CurrentEmitter.AudioEmitter.MaxLocalInstances = unk; ProjectItemChanged(); } @@ -379,9 +373,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk11UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk11.Value != unk) + if (CurrentEmitter.AudioEmitter.MaxGlobalInstances != unk) { - CurrentEmitter.AudioEmitter.Unk11 = unk; + CurrentEmitter.AudioEmitter.MaxGlobalInstances = unk; ProjectItemChanged(); } @@ -393,9 +387,9 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk12UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk12.Value != unk) + if (CurrentEmitter.AudioEmitter.BlockabilityFactor != unk) { - CurrentEmitter.AudioEmitter.Unk12 = unk; + CurrentEmitter.AudioEmitter.BlockabilityFactor = unk; ProjectItemChanged(); } @@ -407,48 +401,14 @@ namespace CodeWalker.Project.Panels if (CurrentEmitter?.AudioEmitter == null) return; byte unk = (byte)Unk13UpDown.Value; - if (CurrentEmitter.AudioEmitter.Unk13.Value != unk) + if (CurrentEmitter.AudioEmitter.MaxPathDepth != unk) { - CurrentEmitter.AudioEmitter.Unk13 = unk; + CurrentEmitter.AudioEmitter.MaxPathDepth = unk; ProjectItemChanged(); } } - private void Flags0TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags0 != flags) - { - CurrentEmitter.AudioEmitter.Flags0 = flags; - - ProjectItemChanged(); - } - } - } - - private void Flags1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags1 != flags) - { - CurrentEmitter.AudioEmitter.Flags1 = flags; - - ProjectItemChanged(); - } - } - } - private void Flags2TextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; @@ -457,26 +417,9 @@ namespace CodeWalker.Project.Panels uint flags = 0; if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags2 != flags) + if (CurrentEmitter.AudioEmitter.Flags != flags) { - CurrentEmitter.AudioEmitter.Flags2 = flags; - - ProjectItemChanged(); - } - } - } - - private void Flags3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEmitter?.AudioEmitter == null) return; - - uint flags = 0; - if (uint.TryParse(Flags3TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentEmitter.AudioEmitter.Flags3 != flags) - { - CurrentEmitter.AudioEmitter.Flags3 = flags; + CurrentEmitter.AudioEmitter.Flags = flags; ProjectItemChanged(); } @@ -491,9 +434,9 @@ namespace CodeWalker.Project.Panels uint flags = 0; if (uint.TryParse(Flags4TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags4 != flags) + if (CurrentEmitter.AudioEmitter.LastPlayTime != flags) { - CurrentEmitter.AudioEmitter.Flags4 = flags; + CurrentEmitter.AudioEmitter.LastPlayTime = flags; ProjectItemChanged(); } @@ -508,9 +451,9 @@ namespace CodeWalker.Project.Panels uint flags = 0; if (uint.TryParse(Flags5TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentEmitter.AudioEmitter.Flags5 != flags) + if (CurrentEmitter.AudioEmitter.DynamicBankID != flags) { - CurrentEmitter.AudioEmitter.Flags5 = flags; + CurrentEmitter.AudioEmitter.DynamicBankID = (int)flags; ProjectItemChanged(); } @@ -525,13 +468,13 @@ namespace CodeWalker.Project.Panels var paramstrs = VariablesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (paramstrs?.Length > 0) { - var paramlist = new List(); + var paramlist = new List(); foreach (var paramstr in paramstrs) { var paramvals = paramstr.Split(','); if (paramvals?.Length == 3) { - var param = new Dat151AmbientRule.Variable(); + var param = new Dat151AmbientRule.Condition(); var hashstr = paramvals[0].Trim(); var valstr = paramvals[1].Trim(); var flgstr = paramvals[2].Trim(); @@ -545,13 +488,13 @@ namespace CodeWalker.Project.Panels uint.TryParse(flgstr, out flags); param.Name = hash; param.Value = FloatUtil.Parse(valstr); - param.Flags = flags; + param.ConditionType = (byte)flags; paramlist.Add(param); } } - CurrentEmitter.AudioEmitter.Variables = paramlist.ToArray(); - CurrentEmitter.AudioEmitter.VariablesCount = (ushort)paramlist.Count; + CurrentEmitter.AudioEmitter.Conditions = paramlist.ToArray(); + CurrentEmitter.AudioEmitter.NumConditions = (ushort)paramlist.Count; ProjectItemChanged(); } @@ -561,7 +504,7 @@ namespace CodeWalker.Project.Panels { if (CurrentEmitter == null) return; if (ProjectForm.WorldForm == null) return; - ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PlaybackZoneSize); + ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PositioningZoneSize); } private void AddToProjectButton_Click(object sender, EventArgs e) diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs b/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs index 5de9905..3c3d88b 100644 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs +++ b/CodeWalker/Project/Panels/EditAudioZonePanel.Designer.cs @@ -28,66 +28,90 @@ /// private void InitializeComponent() { + System.Windows.Forms.Label label18; + System.Windows.Forms.Label label27; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioZonePanel)); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.PositioningRotationAngleTextBox = new System.Windows.Forms.TextBox(); + this.label26 = new System.Windows.Forms.Label(); + this.ActivationZoneRotationAngleTextBox = new System.Windows.Forms.TextBox(); this.label22 = new System.Windows.Forms.Label(); - this.UnkBytesTextBox = new System.Windows.Forms.TextBox(); + this.WindElevationSoundsTextBox = new System.Windows.Forms.TextBox(); + this.ZoneWaterCalculationTextBox = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.MaxWindInfluenceTextBox = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.MinWindInfluenceTextBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.PedDensityScalarTextBox = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.MaxPedDensityTextBox = new System.Windows.Forms.TextBox(); + this.MinPedDensityTextBox = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.PedDensityTODTextBox = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.BuiltUpFactorTextBox = new System.Windows.Forms.TextBox(); + this.PositioningSizeScaleTextBox = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.PositioningRotationOffsetTextBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.PositioningSizeTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.ActivationSizeScaleTextBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.ActivationRotationOffsetTextBox = new System.Windows.Forms.TextBox(); + this.ActivationSizeTextBox = new System.Windows.Forms.TextBox(); + this.label25 = new System.Windows.Forms.Label(); + this.AudioSceneTextBox = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.EnviromentRuleTextBox = new System.Windows.Forms.TextBox(); this.DeleteButton = new System.Windows.Forms.Button(); this.AddToProjectButton = new System.Windows.Forms.Button(); this.label21 = new System.Windows.Forms.Label(); - this.Unk13TextBox = new System.Windows.Forms.TextBox(); + this.RandomRadioSettingsTextBox = new System.Windows.Forms.TextBox(); this.label20 = new System.Windows.Forms.Label(); - this.DependentAmbiencesTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.DirAmbiencesTextBox = new CodeWalker.WinForms.TextBoxFix(); this.label19 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.UnkVec3TextBox = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.UnkVec2TextBox = new System.Windows.Forms.TextBox(); - this.label18 = new System.Windows.Forms.Label(); - this.UnkVec1TextBox = new System.Windows.Forms.TextBox(); - this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.label14 = new System.Windows.Forms.Label(); - this.Flags1TextBox = new System.Windows.Forms.TextBox(); + this.RulesTextBox = new CodeWalker.WinForms.TextBoxFix(); this.label13 = new System.Windows.Forms.Label(); - this.Flags0TextBox = new System.Windows.Forms.TextBox(); + this.FlagsTextBox = new System.Windows.Forms.TextBox(); this.ShapeComboBox = new System.Windows.Forms.ComboBox(); this.label23 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.NameTextBox = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.OuterVec3TextBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.OuterVec2TextBox = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.OuterVec1TextBox = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.OuterAngleTextBox = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.OuterSizeTextBox = new System.Windows.Forms.TextBox(); this.label11 = new System.Windows.Forms.Label(); - this.OuterPosTextBox = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.InnerVec3TextBox = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.InnerVec2TextBox = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.InnerVec1TextBox = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.InnerAngleTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.InnerSizeTextBox = new System.Windows.Forms.TextBox(); + this.PositioningCentreTextBox = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); - this.InnerPosTextBox = new System.Windows.Forms.TextBox(); + this.ActivationZoneCentreTextBox = new System.Windows.Forms.TextBox(); this.GoToButton = new System.Windows.Forms.Button(); - this.label24 = new System.Windows.Forms.Label(); - this.Hash0TextBox = new System.Windows.Forms.TextBox(); - this.label25 = new System.Windows.Forms.Label(); - this.SceneTextBox = new System.Windows.Forms.TextBox(); + label18 = new System.Windows.Forms.Label(); + label27 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.SuspendLayout(); // + // label18 + // + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(154, 319); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(91, 13); + label18.TabIndex = 109; + label18.Text = "Zone Water Calc:"; + // + // label27 + // + label27.AutoSize = true; + label27.Location = new System.Drawing.Point(167, 361); + label27.Name = "label27"; + label27.Size = new System.Drawing.Size(81, 13); + label27.TabIndex = 115; + label27.Text = "Pos. Rot Angle:"; + // // tabControl1 // this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -102,58 +126,62 @@ // // tabPage1 // - this.tabPage1.Controls.Add(this.label25); - this.tabPage1.Controls.Add(this.SceneTextBox); - this.tabPage1.Controls.Add(this.label24); - this.tabPage1.Controls.Add(this.Hash0TextBox); + this.tabPage1.Controls.Add(label27); + this.tabPage1.Controls.Add(this.PositioningRotationAngleTextBox); + this.tabPage1.Controls.Add(this.label26); + this.tabPage1.Controls.Add(this.ActivationZoneRotationAngleTextBox); this.tabPage1.Controls.Add(this.label22); - this.tabPage1.Controls.Add(this.UnkBytesTextBox); + this.tabPage1.Controls.Add(this.WindElevationSoundsTextBox); + this.tabPage1.Controls.Add(label18); + this.tabPage1.Controls.Add(this.ZoneWaterCalculationTextBox); + this.tabPage1.Controls.Add(this.label17); + this.tabPage1.Controls.Add(this.MaxWindInfluenceTextBox); + this.tabPage1.Controls.Add(this.label15); + this.tabPage1.Controls.Add(this.MinWindInfluenceTextBox); + this.tabPage1.Controls.Add(this.label14); + this.tabPage1.Controls.Add(this.PedDensityScalarTextBox); + this.tabPage1.Controls.Add(this.label10); + this.tabPage1.Controls.Add(this.label9); + this.tabPage1.Controls.Add(this.MaxPedDensityTextBox); + this.tabPage1.Controls.Add(this.MinPedDensityTextBox); + this.tabPage1.Controls.Add(this.label8); + this.tabPage1.Controls.Add(this.PedDensityTODTextBox); + this.tabPage1.Controls.Add(this.label7); + this.tabPage1.Controls.Add(this.BuiltUpFactorTextBox); + this.tabPage1.Controls.Add(this.PositioningSizeScaleTextBox); + this.tabPage1.Controls.Add(this.label6); + this.tabPage1.Controls.Add(this.label5); + this.tabPage1.Controls.Add(this.PositioningRotationOffsetTextBox); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.PositioningSizeTextBox); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.ActivationSizeScaleTextBox); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Controls.Add(this.ActivationRotationOffsetTextBox); + this.tabPage1.Controls.Add(this.ActivationSizeTextBox); + this.tabPage1.Controls.Add(this.label25); + this.tabPage1.Controls.Add(this.AudioSceneTextBox); + this.tabPage1.Controls.Add(this.label24); + this.tabPage1.Controls.Add(this.EnviromentRuleTextBox); this.tabPage1.Controls.Add(this.DeleteButton); this.tabPage1.Controls.Add(this.AddToProjectButton); this.tabPage1.Controls.Add(this.label21); - this.tabPage1.Controls.Add(this.Unk13TextBox); + this.tabPage1.Controls.Add(this.RandomRadioSettingsTextBox); this.tabPage1.Controls.Add(this.label20); - this.tabPage1.Controls.Add(this.DependentAmbiencesTextBox); + this.tabPage1.Controls.Add(this.DirAmbiencesTextBox); this.tabPage1.Controls.Add(this.label19); - this.tabPage1.Controls.Add(this.label15); - this.tabPage1.Controls.Add(this.UnkVec3TextBox); - this.tabPage1.Controls.Add(this.label17); - this.tabPage1.Controls.Add(this.UnkVec2TextBox); - this.tabPage1.Controls.Add(this.label18); - this.tabPage1.Controls.Add(this.UnkVec1TextBox); - this.tabPage1.Controls.Add(this.HashesTextBox); - this.tabPage1.Controls.Add(this.label14); - this.tabPage1.Controls.Add(this.Flags1TextBox); + this.tabPage1.Controls.Add(this.RulesTextBox); this.tabPage1.Controls.Add(this.label13); - this.tabPage1.Controls.Add(this.Flags0TextBox); + this.tabPage1.Controls.Add(this.FlagsTextBox); this.tabPage1.Controls.Add(this.ShapeComboBox); this.tabPage1.Controls.Add(this.label23); this.tabPage1.Controls.Add(this.label12); this.tabPage1.Controls.Add(this.NameTextBox); - this.tabPage1.Controls.Add(this.label6); - this.tabPage1.Controls.Add(this.OuterVec3TextBox); - this.tabPage1.Controls.Add(this.label7); - this.tabPage1.Controls.Add(this.OuterVec2TextBox); - this.tabPage1.Controls.Add(this.label8); - this.tabPage1.Controls.Add(this.OuterVec1TextBox); - this.tabPage1.Controls.Add(this.label9); - this.tabPage1.Controls.Add(this.OuterAngleTextBox); - this.tabPage1.Controls.Add(this.label10); - this.tabPage1.Controls.Add(this.OuterSizeTextBox); this.tabPage1.Controls.Add(this.label11); - this.tabPage1.Controls.Add(this.OuterPosTextBox); - this.tabPage1.Controls.Add(this.label5); - this.tabPage1.Controls.Add(this.InnerVec3TextBox); - this.tabPage1.Controls.Add(this.label4); - this.tabPage1.Controls.Add(this.InnerVec2TextBox); - this.tabPage1.Controls.Add(this.label3); - this.tabPage1.Controls.Add(this.InnerVec1TextBox); - this.tabPage1.Controls.Add(this.label2); - this.tabPage1.Controls.Add(this.InnerAngleTextBox); - this.tabPage1.Controls.Add(this.label1); - this.tabPage1.Controls.Add(this.InnerSizeTextBox); + this.tabPage1.Controls.Add(this.PositioningCentreTextBox); this.tabPage1.Controls.Add(this.label16); - this.tabPage1.Controls.Add(this.InnerPosTextBox); + this.tabPage1.Controls.Add(this.ActivationZoneCentreTextBox); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); @@ -162,24 +190,348 @@ this.tabPage1.Text = "Ambient Zone"; this.tabPage1.UseVisualStyleBackColor = true; // + // PositioningRotationAngleTextBox + // + this.PositioningRotationAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositioningRotationAngleTextBox.Location = new System.Drawing.Point(266, 358); + this.PositioningRotationAngleTextBox.Name = "PositioningRotationAngleTextBox"; + this.PositioningRotationAngleTextBox.Size = new System.Drawing.Size(55, 20); + this.PositioningRotationAngleTextBox.TabIndex = 114; + this.PositioningRotationAngleTextBox.TextChanged += new System.EventHandler(this.PositioningRotationAngleTextBox_TextChanged); + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(7, 361); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(87, 13); + this.label26.TabIndex = 113; + this.label26.Text = "Activ. Rot Angle:"; + // + // ActivationZoneRotationAngleTextBox + // + this.ActivationZoneRotationAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ActivationZoneRotationAngleTextBox.Location = new System.Drawing.Point(93, 358); + this.ActivationZoneRotationAngleTextBox.Name = "ActivationZoneRotationAngleTextBox"; + this.ActivationZoneRotationAngleTextBox.Size = new System.Drawing.Size(55, 20); + this.ActivationZoneRotationAngleTextBox.TabIndex = 112; + this.ActivationZoneRotationAngleTextBox.TextChanged += new System.EventHandler(this.ActivationZoneRotationAngleTextBox_TextChanged); + // // label22 // this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(327, 34); + this.label22.Location = new System.Drawing.Point(310, 140); this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(58, 13); - this.label22.TabIndex = 64; - this.label22.Text = "Unk bytes:"; + this.label22.Size = new System.Drawing.Size(74, 13); + this.label22.TabIndex = 111; + this.label22.Text = "Wind Sounds:"; // - // UnkBytesTextBox + // WindElevationSoundsTextBox // - this.UnkBytesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.UnkBytesTextBox.Location = new System.Drawing.Point(390, 31); - this.UnkBytesTextBox.Name = "UnkBytesTextBox"; - this.UnkBytesTextBox.Size = new System.Drawing.Size(155, 20); - this.UnkBytesTextBox.TabIndex = 65; - this.UnkBytesTextBox.TextChanged += new System.EventHandler(this.UnkBytesTextBox_TextChanged); + this.WindElevationSoundsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.WindElevationSoundsTextBox.Location = new System.Drawing.Point(390, 137); + this.WindElevationSoundsTextBox.Name = "WindElevationSoundsTextBox"; + this.WindElevationSoundsTextBox.Size = new System.Drawing.Size(155, 20); + this.WindElevationSoundsTextBox.TabIndex = 110; + this.WindElevationSoundsTextBox.TextChanged += new System.EventHandler(this.WindElevationSoundsTextBox_TextChanged); + // + // ZoneWaterCalculationTextBox + // + this.ZoneWaterCalculationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ZoneWaterCalculationTextBox.Location = new System.Drawing.Point(266, 316); + this.ZoneWaterCalculationTextBox.Name = "ZoneWaterCalculationTextBox"; + this.ZoneWaterCalculationTextBox.Size = new System.Drawing.Size(55, 20); + this.ZoneWaterCalculationTextBox.TabIndex = 108; + this.ZoneWaterCalculationTextBox.TextChanged += new System.EventHandler(this.ZoneWaterCalculationTextBox_TextChanged); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(167, 398); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(105, 13); + this.label17.TabIndex = 107; + this.label17.Text = "Max Wind Influence:"; + // + // MaxWindInfluenceTextBox + // + this.MaxWindInfluenceTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MaxWindInfluenceTextBox.Location = new System.Drawing.Point(274, 395); + this.MaxWindInfluenceTextBox.Name = "MaxWindInfluenceTextBox"; + this.MaxWindInfluenceTextBox.Size = new System.Drawing.Size(55, 20); + this.MaxWindInfluenceTextBox.TabIndex = 106; + this.MaxWindInfluenceTextBox.TextChanged += new System.EventHandler(this.MaxWindInfluenceTextBox_TextChanged); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(7, 398); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(102, 13); + this.label15.TabIndex = 105; + this.label15.Text = "Min Wind Influence:"; + // + // MinWindInfluenceTextBox + // + this.MinWindInfluenceTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MinWindInfluenceTextBox.Location = new System.Drawing.Point(106, 395); + this.MinWindInfluenceTextBox.Name = "MinWindInfluenceTextBox"; + this.MinWindInfluenceTextBox.Size = new System.Drawing.Size(55, 20); + this.MinWindInfluenceTextBox.TabIndex = 104; + this.MinWindInfluenceTextBox.TextChanged += new System.EventHandler(this.MinWindInfluenceTextBox_TextChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(154, 293); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(100, 13); + this.label14.TabIndex = 103; + this.label14.Text = "Ped Density Scalar:"; + // + // PedDensityScalarTextBox + // + this.PedDensityScalarTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PedDensityScalarTextBox.Location = new System.Drawing.Point(266, 290); + this.PedDensityScalarTextBox.Name = "PedDensityScalarTextBox"; + this.PedDensityScalarTextBox.Size = new System.Drawing.Size(55, 20); + this.PedDensityScalarTextBox.TabIndex = 102; + this.PedDensityScalarTextBox.TextChanged += new System.EventHandler(this.PedDensityScalarTextBox_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(7, 319); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(90, 13); + this.label10.TabIndex = 101; + this.label10.Text = "Max Ped Density:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(7, 293); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(87, 13); + this.label9.TabIndex = 100; + this.label9.Text = "Min Ped Density:"; + // + // MaxPedDensityTextBox + // + this.MaxPedDensityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MaxPedDensityTextBox.Location = new System.Drawing.Point(93, 316); + this.MaxPedDensityTextBox.Name = "MaxPedDensityTextBox"; + this.MaxPedDensityTextBox.Size = new System.Drawing.Size(55, 20); + this.MaxPedDensityTextBox.TabIndex = 99; + this.MaxPedDensityTextBox.TextChanged += new System.EventHandler(this.MaxPedDensityTextBox_TextChanged); + // + // MinPedDensityTextBox + // + this.MinPedDensityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MinPedDensityTextBox.Location = new System.Drawing.Point(93, 290); + this.MinPedDensityTextBox.Name = "MinPedDensityTextBox"; + this.MinPedDensityTextBox.Size = new System.Drawing.Size(55, 20); + this.MinPedDensityTextBox.TabIndex = 98; + this.MinPedDensityTextBox.TextChanged += new System.EventHandler(this.MinPedDensityTextBox_TextChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(154, 267); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(93, 13); + this.label8.TabIndex = 97; + this.label8.Text = "Ped Density TOD:"; + // + // PedDensityTODTextBox + // + this.PedDensityTODTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PedDensityTODTextBox.Location = new System.Drawing.Point(266, 264); + this.PedDensityTODTextBox.Name = "PedDensityTODTextBox"; + this.PedDensityTODTextBox.Size = new System.Drawing.Size(55, 20); + this.PedDensityTODTextBox.TabIndex = 96; + this.PedDensityTODTextBox.TextChanged += new System.EventHandler(this.PedDensityTODTextBox_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 267); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(80, 13); + this.label7.TabIndex = 95; + this.label7.Text = "Built Up Factor:"; + // + // BuiltUpFactorTextBox + // + this.BuiltUpFactorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.BuiltUpFactorTextBox.Location = new System.Drawing.Point(93, 264); + this.BuiltUpFactorTextBox.Name = "BuiltUpFactorTextBox"; + this.BuiltUpFactorTextBox.Size = new System.Drawing.Size(55, 20); + this.BuiltUpFactorTextBox.TabIndex = 94; + this.BuiltUpFactorTextBox.TextChanged += new System.EventHandler(this.BuiltUpFactorTextBox_TextChanged); + // + // PositioningSizeScaleTextBox + // + this.PositioningSizeScaleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositioningSizeScaleTextBox.Location = new System.Drawing.Point(121, 238); + this.PositioningSizeScaleTextBox.Name = "PositioningSizeScaleTextBox"; + this.PositioningSizeScaleTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningSizeScaleTextBox.TabIndex = 93; + this.PositioningSizeScaleTextBox.TextChanged += new System.EventHandler(this.PositioningSizeScaleTextBox_TextChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 243); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(114, 13); + this.label6.TabIndex = 92; + this.label6.Text = "Positioning Size Scale:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 215); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(112, 13); + this.label5.TabIndex = 91; + this.label5.Text = "Positioning Rot Offset:"; + // + // PositioningRotationOffsetTextBox + // + this.PositioningRotationOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositioningRotationOffsetTextBox.Location = new System.Drawing.Point(121, 212); + this.PositioningRotationOffsetTextBox.Name = "PositioningRotationOffsetTextBox"; + this.PositioningRotationOffsetTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningRotationOffsetTextBox.TabIndex = 90; + this.PositioningRotationOffsetTextBox.TextChanged += new System.EventHandler(this.PositioningRotationOffsetTextBox_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 189); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(84, 13); + this.label4.TabIndex = 89; + this.label4.Text = "Positioning Size:"; + // + // PositioningSizeTextBox + // + this.PositioningSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositioningSizeTextBox.Location = new System.Drawing.Point(121, 186); + this.PositioningSizeTextBox.Name = "PositioningSizeTextBox"; + this.PositioningSizeTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningSizeTextBox.TabIndex = 88; + this.PositioningSizeTextBox.TextChanged += new System.EventHandler(this.PositioningSizeTextBox_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 134); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(110, 13); + this.label3.TabIndex = 87; + this.label3.Text = "Activation Size Scale:"; + // + // ActivationSizeScaleTextBox + // + this.ActivationSizeScaleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ActivationSizeScaleTextBox.Location = new System.Drawing.Point(121, 134); + this.ActivationSizeScaleTextBox.Name = "ActivationSizeScaleTextBox"; + this.ActivationSizeScaleTextBox.Size = new System.Drawing.Size(172, 20); + this.ActivationSizeScaleTextBox.TabIndex = 86; + this.ActivationSizeScaleTextBox.TextChanged += new System.EventHandler(this.ActivationSizeScaleTextBox_TextChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 111); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(108, 13); + this.label2.TabIndex = 85; + this.label2.Text = "Activation Rot Offset:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 85); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(80, 13); + this.label1.TabIndex = 84; + this.label1.Text = "Activation Size:"; + // + // ActivationRotationOffsetTextBox + // + this.ActivationRotationOffsetTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ActivationRotationOffsetTextBox.Location = new System.Drawing.Point(121, 108); + this.ActivationRotationOffsetTextBox.Name = "ActivationRotationOffsetTextBox"; + this.ActivationRotationOffsetTextBox.Size = new System.Drawing.Size(200, 20); + this.ActivationRotationOffsetTextBox.TabIndex = 83; + this.ActivationRotationOffsetTextBox.TextChanged += new System.EventHandler(this.ActivationRotationOffsetTextBox_TextChanged); + // + // ActivationSizeTextBox + // + this.ActivationSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ActivationSizeTextBox.Location = new System.Drawing.Point(121, 82); + this.ActivationSizeTextBox.Name = "ActivationSizeTextBox"; + this.ActivationSizeTextBox.Size = new System.Drawing.Size(172, 20); + this.ActivationSizeTextBox.TabIndex = 82; + this.ActivationSizeTextBox.TextChanged += new System.EventHandler(this.ActivationSizeTextBox_TextChanged); + // + // label25 + // + this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(313, 58); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(71, 13); + this.label25.TabIndex = 74; + this.label25.Text = "Audio Scene:"; + // + // AudioSceneTextBox + // + this.AudioSceneTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.AudioSceneTextBox.Location = new System.Drawing.Point(390, 58); + this.AudioSceneTextBox.Name = "AudioSceneTextBox"; + this.AudioSceneTextBox.Size = new System.Drawing.Size(155, 20); + this.AudioSceneTextBox.TabIndex = 75; + this.AudioSceneTextBox.TextChanged += new System.EventHandler(this.AudioSceneTextBox_TextChanged); + // + // label24 + // + this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(296, 88); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(88, 13); + this.label24.TabIndex = 72; + this.label24.Text = "Enviroment Rule:"; + // + // EnviromentRuleTextBox + // + this.EnviromentRuleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.EnviromentRuleTextBox.Location = new System.Drawing.Point(390, 85); + this.EnviromentRuleTextBox.Name = "EnviromentRuleTextBox"; + this.EnviromentRuleTextBox.Size = new System.Drawing.Size(155, 20); + this.EnviromentRuleTextBox.TabIndex = 73; + this.EnviromentRuleTextBox.TextChanged += new System.EventHandler(this.EnviromentRuleTextBox_TextChanged); // // DeleteButton // @@ -207,20 +559,20 @@ // this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(340, 106); + this.label21.Location = new System.Drawing.Point(268, 36); this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(44, 13); + this.label21.Size = new System.Drawing.Size(122, 13); this.label21.TabIndex = 70; - this.label21.Text = "Unk13:"; + this.label21.Text = "Random Radio Settings:"; // - // Unk13TextBox + // RandomRadioSettingsTextBox // - this.Unk13TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Unk13TextBox.Location = new System.Drawing.Point(390, 103); - this.Unk13TextBox.Name = "Unk13TextBox"; - this.Unk13TextBox.Size = new System.Drawing.Size(155, 20); - this.Unk13TextBox.TabIndex = 71; - this.Unk13TextBox.TextChanged += new System.EventHandler(this.Unk13TextBox_TextChanged); + this.RandomRadioSettingsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.RandomRadioSettingsTextBox.Location = new System.Drawing.Point(390, 33); + this.RandomRadioSettingsTextBox.Name = "RandomRadioSettingsTextBox"; + this.RandomRadioSettingsTextBox.Size = new System.Drawing.Size(155, 20); + this.RandomRadioSettingsTextBox.TabIndex = 71; + this.RandomRadioSettingsTextBox.TextChanged += new System.EventHandler(this.RandomisedRadioSettings_TextChanged); // // label20 // @@ -228,21 +580,21 @@ this.label20.AutoSize = true; this.label20.Location = new System.Drawing.Point(340, 303); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(193, 13); + this.label20.Size = new System.Drawing.Size(115, 13); this.label20.TabIndex = 78; - this.label20.Text = "Ext params: Name (hash), Value (float)"; + this.label20.Text = "Directional Ambiences:"; // - // DependentAmbiencesTextBox + // DirAmbiencesTextBox // - this.DependentAmbiencesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.DependentAmbiencesTextBox.Location = new System.Drawing.Point(335, 319); - this.DependentAmbiencesTextBox.Multiline = true; - this.DependentAmbiencesTextBox.Name = "DependentAmbiencesTextBox"; - this.DependentAmbiencesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.DependentAmbiencesTextBox.Size = new System.Drawing.Size(209, 92); - this.DependentAmbiencesTextBox.TabIndex = 79; - this.DependentAmbiencesTextBox.WordWrap = false; - this.DependentAmbiencesTextBox.TextChanged += new System.EventHandler(this.DependentAmbiencesTextBox_TextChanged); + this.DirAmbiencesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DirAmbiencesTextBox.Location = new System.Drawing.Point(335, 319); + this.DirAmbiencesTextBox.Multiline = true; + this.DirAmbiencesTextBox.Name = "DirAmbiencesTextBox"; + this.DirAmbiencesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.DirAmbiencesTextBox.Size = new System.Drawing.Size(209, 92); + this.DirAmbiencesTextBox.TabIndex = 79; + this.DirAmbiencesTextBox.WordWrap = false; + this.DirAmbiencesTextBox.TextChanged += new System.EventHandler(this.DirAmbiencesTextBox_TextChanged); // // label19 // @@ -250,116 +602,40 @@ this.label19.AutoSize = true; this.label19.Location = new System.Drawing.Point(340, 183); this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(46, 13); + this.label19.Size = new System.Drawing.Size(37, 13); this.label19.TabIndex = 76; - this.label19.Text = "Hashes:"; + this.label19.Text = "Rules:"; // - // label15 + // RulesTextBox // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(7, 394); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(60, 13); - this.label15.TabIndex = 62; - this.label15.Text = "Unk vec 3:"; - // - // UnkVec3TextBox - // - this.UnkVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec3TextBox.Location = new System.Drawing.Point(84, 391); - this.UnkVec3TextBox.Name = "UnkVec3TextBox"; - this.UnkVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec3TextBox.TabIndex = 63; - this.UnkVec3TextBox.TextChanged += new System.EventHandler(this.UnkVec3TextBox_TextChanged); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(7, 370); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(60, 13); - this.label17.TabIndex = 60; - this.label17.Text = "Unk vec 2:"; - // - // UnkVec2TextBox - // - this.UnkVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec2TextBox.Location = new System.Drawing.Point(84, 367); - this.UnkVec2TextBox.Name = "UnkVec2TextBox"; - this.UnkVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec2TextBox.TabIndex = 61; - this.UnkVec2TextBox.TextChanged += new System.EventHandler(this.UnkVec2TextBox_TextChanged); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(7, 346); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(60, 13); - this.label18.TabIndex = 58; - this.label18.Text = "Unk vec 1:"; - // - // UnkVec1TextBox - // - this.UnkVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.UnkVec1TextBox.Location = new System.Drawing.Point(84, 343); - this.UnkVec1TextBox.Name = "UnkVec1TextBox"; - this.UnkVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.UnkVec1TextBox.TabIndex = 59; - this.UnkVec1TextBox.TextChanged += new System.EventHandler(this.UnkVec1TextBox_TextChanged); - // - // HashesTextBox - // - this.HashesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.HashesTextBox.Location = new System.Drawing.Point(335, 199); - this.HashesTextBox.Multiline = true; - this.HashesTextBox.Name = "HashesTextBox"; - this.HashesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.HashesTextBox.Size = new System.Drawing.Size(209, 92); - this.HashesTextBox.TabIndex = 77; - this.HashesTextBox.WordWrap = false; - this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged); - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(340, 82); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(44, 13); - this.label14.TabIndex = 68; - this.label14.Text = "Flags 1:"; - // - // Flags1TextBox - // - this.Flags1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags1TextBox.Location = new System.Drawing.Point(390, 79); - this.Flags1TextBox.Name = "Flags1TextBox"; - this.Flags1TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags1TextBox.TabIndex = 69; - this.Flags1TextBox.TextChanged += new System.EventHandler(this.Flags1TextBox_TextChanged); + this.RulesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.RulesTextBox.Location = new System.Drawing.Point(335, 199); + this.RulesTextBox.Multiline = true; + this.RulesTextBox.Name = "RulesTextBox"; + this.RulesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.RulesTextBox.Size = new System.Drawing.Size(209, 92); + this.RulesTextBox.TabIndex = 77; + this.RulesTextBox.WordWrap = false; + this.RulesTextBox.TextChanged += new System.EventHandler(this.RulesTextBox_TextChanged); // // label13 // this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(340, 58); + this.label13.Location = new System.Drawing.Point(340, 114); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(44, 13); + this.label13.Size = new System.Drawing.Size(35, 13); this.label13.TabIndex = 66; - this.label13.Text = "Flags 0:"; + this.label13.Text = "Flags:"; // - // Flags0TextBox + // FlagsTextBox // - this.Flags0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Flags0TextBox.Location = new System.Drawing.Point(390, 55); - this.Flags0TextBox.Name = "Flags0TextBox"; - this.Flags0TextBox.Size = new System.Drawing.Size(155, 20); - this.Flags0TextBox.TabIndex = 67; - this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged); + this.FlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.FlagsTextBox.Location = new System.Drawing.Point(390, 111); + this.FlagsTextBox.Name = "FlagsTextBox"; + this.FlagsTextBox.Size = new System.Drawing.Size(155, 20); + this.FlagsTextBox.TabIndex = 67; + this.FlagsTextBox.TextChanged += new System.EventHandler(this.FlagsTextBox_TextChanged); // // ShapeComboBox // @@ -369,9 +645,9 @@ "Box", "Line", "Sphere"}); - this.ShapeComboBox.Location = new System.Drawing.Point(84, 30); + this.ShapeComboBox.Location = new System.Drawing.Point(84, 28); this.ShapeComboBox.Name = "ShapeComboBox"; - this.ShapeComboBox.Size = new System.Drawing.Size(151, 21); + this.ShapeComboBox.Size = new System.Drawing.Size(178, 21); this.ShapeComboBox.TabIndex = 33; this.ShapeComboBox.SelectedIndexChanged += new System.EventHandler(this.ShapeComboBox_SelectedIndexChanged); // @@ -403,233 +679,43 @@ this.NameTextBox.TabIndex = 30; this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged); // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(7, 322); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(66, 13); - this.label6.TabIndex = 56; - this.label6.Text = "Outer vec 3:"; - // - // OuterVec3TextBox - // - this.OuterVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec3TextBox.Location = new System.Drawing.Point(84, 319); - this.OuterVec3TextBox.Name = "OuterVec3TextBox"; - this.OuterVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec3TextBox.TabIndex = 57; - this.OuterVec3TextBox.TextChanged += new System.EventHandler(this.OuterVec3TextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(7, 298); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(66, 13); - this.label7.TabIndex = 54; - this.label7.Text = "Outer vec 2:"; - // - // OuterVec2TextBox - // - this.OuterVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec2TextBox.Location = new System.Drawing.Point(84, 295); - this.OuterVec2TextBox.Name = "OuterVec2TextBox"; - this.OuterVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec2TextBox.TabIndex = 55; - this.OuterVec2TextBox.TextChanged += new System.EventHandler(this.OuterVec2TextBox_TextChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(7, 274); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(66, 13); - this.label8.TabIndex = 52; - this.label8.Text = "Outer vec 1:"; - // - // OuterVec1TextBox - // - this.OuterVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterVec1TextBox.Location = new System.Drawing.Point(84, 271); - this.OuterVec1TextBox.Name = "OuterVec1TextBox"; - this.OuterVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.OuterVec1TextBox.TabIndex = 53; - this.OuterVec1TextBox.TextChanged += new System.EventHandler(this.OuterVec1TextBox_TextChanged); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(7, 250); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(65, 13); - this.label9.TabIndex = 50; - this.label9.Text = "Outer angle:"; - // - // OuterAngleTextBox - // - this.OuterAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterAngleTextBox.Location = new System.Drawing.Point(84, 247); - this.OuterAngleTextBox.Name = "OuterAngleTextBox"; - this.OuterAngleTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterAngleTextBox.TabIndex = 51; - this.OuterAngleTextBox.TextChanged += new System.EventHandler(this.OuterAngleTextBox_TextChanged); - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(7, 226); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(57, 13); - this.label10.TabIndex = 48; - this.label10.Text = "Outer size:"; - // - // OuterSizeTextBox - // - this.OuterSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.OuterSizeTextBox.Location = new System.Drawing.Point(84, 223); - this.OuterSizeTextBox.Name = "OuterSizeTextBox"; - this.OuterSizeTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterSizeTextBox.TabIndex = 49; - this.OuterSizeTextBox.TextChanged += new System.EventHandler(this.OuterSizeTextBox_TextChanged); - // // label11 // this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(7, 202); + this.label11.Location = new System.Drawing.Point(7, 163); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(75, 13); + this.label11.Size = new System.Drawing.Size(95, 13); this.label11.TabIndex = 46; - this.label11.Text = "Outer position:"; + this.label11.Text = "Positioning Centre:"; // - // OuterPosTextBox + // PositioningCentreTextBox // - this.OuterPosTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.PositioningCentreTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.OuterPosTextBox.Location = new System.Drawing.Point(84, 199); - this.OuterPosTextBox.Name = "OuterPosTextBox"; - this.OuterPosTextBox.Size = new System.Drawing.Size(237, 20); - this.OuterPosTextBox.TabIndex = 47; - this.OuterPosTextBox.TextChanged += new System.EventHandler(this.OuterPosTextBox_TextChanged); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(7, 178); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(64, 13); - this.label5.TabIndex = 44; - this.label5.Text = "Inner vec 3:"; - // - // InnerVec3TextBox - // - this.InnerVec3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec3TextBox.Location = new System.Drawing.Point(84, 175); - this.InnerVec3TextBox.Name = "InnerVec3TextBox"; - this.InnerVec3TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec3TextBox.TabIndex = 45; - this.InnerVec3TextBox.TextChanged += new System.EventHandler(this.InnerVec3TextBox_TextChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(7, 154); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(64, 13); - this.label4.TabIndex = 42; - this.label4.Text = "Inner vec 2:"; - // - // InnerVec2TextBox - // - this.InnerVec2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec2TextBox.Location = new System.Drawing.Point(84, 151); - this.InnerVec2TextBox.Name = "InnerVec2TextBox"; - this.InnerVec2TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec2TextBox.TabIndex = 43; - this.InnerVec2TextBox.TextChanged += new System.EventHandler(this.InnerVec2TextBox_TextChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(7, 130); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(64, 13); - this.label3.TabIndex = 40; - this.label3.Text = "Inner vec 1:"; - // - // InnerVec1TextBox - // - this.InnerVec1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerVec1TextBox.Location = new System.Drawing.Point(84, 127); - this.InnerVec1TextBox.Name = "InnerVec1TextBox"; - this.InnerVec1TextBox.Size = new System.Drawing.Size(237, 20); - this.InnerVec1TextBox.TabIndex = 41; - this.InnerVec1TextBox.TextChanged += new System.EventHandler(this.InnerVec1TextBox_TextChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(7, 106); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(63, 13); - this.label2.TabIndex = 38; - this.label2.Text = "Inner angle:"; - // - // InnerAngleTextBox - // - this.InnerAngleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerAngleTextBox.Location = new System.Drawing.Point(84, 103); - this.InnerAngleTextBox.Name = "InnerAngleTextBox"; - this.InnerAngleTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerAngleTextBox.TabIndex = 39; - this.InnerAngleTextBox.TextChanged += new System.EventHandler(this.InnerAngleTextBox_TextChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(7, 82); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(55, 13); - this.label1.TabIndex = 36; - this.label1.Text = "Inner size:"; - // - // InnerSizeTextBox - // - this.InnerSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.InnerSizeTextBox.Location = new System.Drawing.Point(84, 79); - this.InnerSizeTextBox.Name = "InnerSizeTextBox"; - this.InnerSizeTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerSizeTextBox.TabIndex = 37; - this.InnerSizeTextBox.TextChanged += new System.EventHandler(this.InnerSizeTextBox_TextChanged); + this.PositioningCentreTextBox.Location = new System.Drawing.Point(121, 160); + this.PositioningCentreTextBox.Name = "PositioningCentreTextBox"; + this.PositioningCentreTextBox.Size = new System.Drawing.Size(200, 20); + this.PositioningCentreTextBox.TabIndex = 47; + this.PositioningCentreTextBox.TextChanged += new System.EventHandler(this.OuterPosTextBox_TextChanged); // // label16 // this.label16.AutoSize = true; this.label16.Location = new System.Drawing.Point(7, 58); this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(73, 13); + this.label16.Size = new System.Drawing.Size(91, 13); this.label16.TabIndex = 34; - this.label16.Text = "Inner position:"; + this.label16.Text = "Activation Centre:"; // - // InnerPosTextBox + // ActivationZoneCentreTextBox // - this.InnerPosTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.ActivationZoneCentreTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.InnerPosTextBox.Location = new System.Drawing.Point(84, 55); - this.InnerPosTextBox.Name = "InnerPosTextBox"; - this.InnerPosTextBox.Size = new System.Drawing.Size(237, 20); - this.InnerPosTextBox.TabIndex = 35; - this.InnerPosTextBox.TextChanged += new System.EventHandler(this.InnerPosTextBox_TextChanged); + this.ActivationZoneCentreTextBox.Location = new System.Drawing.Point(121, 55); + this.ActivationZoneCentreTextBox.Name = "ActivationZoneCentreTextBox"; + this.ActivationZoneCentreTextBox.Size = new System.Drawing.Size(186, 20); + this.ActivationZoneCentreTextBox.TabIndex = 35; + this.ActivationZoneCentreTextBox.TextChanged += new System.EventHandler(this.PositioningCentreTextBoxTextChanged); // // GoToButton // @@ -642,44 +728,6 @@ this.GoToButton.UseVisualStyleBackColor = true; this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click); // - // label24 - // - this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(340, 130); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(44, 13); - this.label24.TabIndex = 72; - this.label24.Text = "Hash 0:"; - // - // Hash0TextBox - // - this.Hash0TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Hash0TextBox.Location = new System.Drawing.Point(390, 127); - this.Hash0TextBox.Name = "Hash0TextBox"; - this.Hash0TextBox.Size = new System.Drawing.Size(155, 20); - this.Hash0TextBox.TabIndex = 73; - this.Hash0TextBox.TextChanged += new System.EventHandler(this.Hash0TextBox_TextChanged); - // - // label25 - // - this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(340, 154); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(44, 13); - this.label25.TabIndex = 74; - this.label25.Text = "Hash 1:"; - // - // SceneTextBox - // - this.SceneTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.SceneTextBox.Location = new System.Drawing.Point(390, 151); - this.SceneTextBox.Name = "SceneTextBox"; - this.SceneTextBox.Size = new System.Drawing.Size(155, 20); - this.SceneTextBox.TabIndex = 75; - this.SceneTextBox.TextChanged += new System.EventHandler(this.SceneTextBox_TextChanged); - // // EditAudioZonePanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -701,57 +749,59 @@ private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Label label16; - private System.Windows.Forms.TextBox InnerPosTextBox; + private System.Windows.Forms.TextBox ActivationZoneCentreTextBox; private System.Windows.Forms.Button GoToButton; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox InnerSizeTextBox; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox InnerVec2TextBox; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox InnerVec1TextBox; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox InnerAngleTextBox; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox InnerVec3TextBox; private System.Windows.Forms.Label label12; private System.Windows.Forms.TextBox NameTextBox; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox OuterVec3TextBox; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox OuterVec2TextBox; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TextBox OuterVec1TextBox; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox OuterAngleTextBox; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox OuterSizeTextBox; private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox OuterPosTextBox; + private System.Windows.Forms.TextBox PositioningCentreTextBox; private System.Windows.Forms.ComboBox ShapeComboBox; private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox Flags1TextBox; private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox Flags0TextBox; - private WinForms.TextBoxFix HashesTextBox; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox UnkVec3TextBox; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.TextBox UnkVec2TextBox; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.TextBox UnkVec1TextBox; + private System.Windows.Forms.TextBox FlagsTextBox; + private WinForms.TextBoxFix RulesTextBox; private System.Windows.Forms.Label label20; - private WinForms.TextBoxFix DependentAmbiencesTextBox; + private WinForms.TextBoxFix DirAmbiencesTextBox; private System.Windows.Forms.Label label19; private System.Windows.Forms.Label label21; - private System.Windows.Forms.TextBox Unk13TextBox; + private System.Windows.Forms.TextBox RandomRadioSettingsTextBox; private System.Windows.Forms.Button AddToProjectButton; private System.Windows.Forms.Button DeleteButton; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.TextBox UnkBytesTextBox; private System.Windows.Forms.Label label25; - private System.Windows.Forms.TextBox SceneTextBox; + private System.Windows.Forms.TextBox AudioSceneTextBox; private System.Windows.Forms.Label label24; - private System.Windows.Forms.TextBox Hash0TextBox; + private System.Windows.Forms.TextBox EnviromentRuleTextBox; + private System.Windows.Forms.TextBox ActivationSizeTextBox; + private System.Windows.Forms.TextBox ActivationRotationOffsetTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox ActivationSizeScaleTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox PositioningSizeTextBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox PositioningRotationOffsetTextBox; + private System.Windows.Forms.TextBox PositioningSizeScaleTextBox; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox BuiltUpFactorTextBox; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox PedDensityTODTextBox; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox MaxPedDensityTextBox; + private System.Windows.Forms.TextBox MinPedDensityTextBox; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox PedDensityScalarTextBox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox MinWindInfluenceTextBox; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.TextBox MaxWindInfluenceTextBox; + private System.Windows.Forms.TextBox ZoneWaterCalculationTextBox; + private System.Windows.Forms.TextBox WindElevationSoundsTextBox; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.TextBox ActivationZoneRotationAngleTextBox; + private System.Windows.Forms.TextBox PositioningRotationAngleTextBox; } } \ No newline at end of file diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.cs b/CodeWalker/Project/Panels/EditAudioZonePanel.cs index ac11e26..1cdc9f9 100644 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.cs +++ b/CodeWalker/Project/Panels/EditAudioZonePanel.cs @@ -1,16 +1,9 @@ using CodeWalker.GameFiles; using CodeWalker.World; -using SharpDX; using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Globalization; -using System.Linq; using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; namespace CodeWalker.Project.Panels { @@ -53,29 +46,34 @@ namespace CodeWalker.Project.Panels populatingui = true; NameTextBox.Text = string.Empty; ShapeComboBox.Text = string.Empty; - InnerPosTextBox.Text = string.Empty; - InnerSizeTextBox.Text = string.Empty; - InnerAngleTextBox.Text = string.Empty; - InnerVec1TextBox.Text = string.Empty; - InnerVec2TextBox.Text = string.Empty; - InnerVec3TextBox.Text = string.Empty; - OuterPosTextBox.Text = string.Empty; - OuterSizeTextBox.Text = string.Empty; - OuterAngleTextBox.Text = string.Empty; - OuterVec1TextBox.Text = string.Empty; - OuterVec2TextBox.Text = string.Empty; - OuterVec3TextBox.Text = string.Empty; - UnkVec1TextBox.Text = string.Empty; - UnkVec2TextBox.Text = string.Empty; - UnkVec3TextBox.Text = string.Empty; - UnkBytesTextBox.Text = string.Empty; - Flags0TextBox.Text = string.Empty; - Flags1TextBox.Text = string.Empty; - Unk13TextBox.Text = string.Empty; - Hash0TextBox.Text = string.Empty; - SceneTextBox.Text = string.Empty; - HashesTextBox.Text = string.Empty; - DependentAmbiencesTextBox.Text = string.Empty; + FlagsTextBox.Text = string.Empty; + + ActivationZoneCentreTextBox.Text = string.Empty; + ActivationSizeTextBox.Text = string.Empty; + ActivationRotationOffsetTextBox.Text = string.Empty; + ActivationSizeScaleTextBox.Text = string.Empty; + + PositioningCentreTextBox.Text = string.Empty; + PositioningSizeTextBox.Text = string.Empty; + PositioningRotationOffsetTextBox.Text = string.Empty; + PositioningSizeScaleTextBox.Text = string.Empty; + + BuiltUpFactorTextBox.Text = string.Empty; + MinPedDensityTextBox.Text = string.Empty; + MaxPedDensityTextBox.Text = string.Empty; + PedDensityTODTextBox.Text = string.Empty; + PedDensityScalarTextBox.Text = string.Empty; + ZoneWaterCalculationTextBox.Text = string.Empty; + PositioningRotationAngleTextBox.Text = string.Empty; + ActivationZoneRotationAngleTextBox.Text = string.Empty; + MinWindInfluenceTextBox.Text = string.Empty; + + WindElevationSoundsTextBox.Text = string.Empty; + RandomRadioSettingsTextBox.Text = string.Empty; + EnviromentRuleTextBox.Text = string.Empty; + AudioSceneTextBox.Text = string.Empty; + RulesTextBox.Text = string.Empty; + DirAmbiencesTextBox.Text = string.Empty; populatingui = false; } else @@ -87,27 +85,31 @@ namespace CodeWalker.Project.Panels var z = CurrentZone.AudioZone; NameTextBox.Text = z.NameHash.ToString(); ShapeComboBox.Text = z.Shape.ToString(); - InnerPosTextBox.Text = FloatUtil.GetVector3String(z.PlaybackZonePosition); - InnerSizeTextBox.Text = FloatUtil.GetVector3String(z.PlaybackZoneSize); - InnerAngleTextBox.Text = z.PlaybackZoneAngle.ToString(); - InnerVec1TextBox.Text = FloatUtil.GetVector4String(z.PlaybackZoneVec1); - InnerVec2TextBox.Text = FloatUtil.GetVector4String(z.PlaybackZoneVec2); - InnerVec3TextBox.Text = FloatUtil.GetVector3String(z.PlaybackZoneVec3); - OuterPosTextBox.Text = FloatUtil.GetVector3String(z.ActivationZonePosition); - OuterSizeTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSize); - OuterAngleTextBox.Text = z.ActivationZoneAngle.ToString(); - OuterVec1TextBox.Text = FloatUtil.GetVector4String(z.ActivationZoneVec1); - OuterVec2TextBox.Text = FloatUtil.GetVector4String(z.ActivationZoneVec2); - OuterVec3TextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneVec3); - UnkVec1TextBox.Text = FloatUtil.GetVector4String(z.UnkVec1); - UnkVec2TextBox.Text = FloatUtil.GetVector4String(z.UnkVec2); - UnkVec3TextBox.Text = FloatUtil.GetVector2String(z.UnkVec3); - UnkBytesTextBox.Text = string.Format("{0}, {1}, {2}", z.Unk14, z.Unk15, z.Unk16); - Flags0TextBox.Text = z.Flags0.Hex; - Flags1TextBox.Text = z.Flags1.Hex; - Unk13TextBox.Text = z.Unk13.Hex; - Hash0TextBox.Text = z.UnkHash0.ToString(); - SceneTextBox.Text = z.Scene.ToString(); + FlagsTextBox.Text = z.Flags.Hex; + ActivationZoneCentreTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneCentre); + ActivationSizeTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSize); + ActivationRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.ActivationZonePostRotationOffset); + ActivationRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSizeScale); + + PositioningCentreTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneCentre); + PositioningSizeTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneSize); + PositioningRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.PositioningZonePostRotationOffset); + PositioningSizeScaleTextBox.Text = FloatUtil.GetVector3String(z.PositioningZoneSizeScale); + + BuiltUpFactorTextBox.Text = z.BuiltUpFactor.ToString(); + MinPedDensityTextBox.Text = z.MinPedDensity.ToString(); + MaxPedDensityTextBox.Text = z.MaxPedDensity.ToString(); + PedDensityTODTextBox.Text = z.PedDensityTOD.ToString(); + PedDensityScalarTextBox.Text = z.PedDensityScalar.ToString(); + ZoneWaterCalculationTextBox.Text = z.ZoneWaterCalculation.ToString(); + PositioningRotationAngleTextBox.Text = z.PositioningZoneRotationAngle.ToString(); + ActivationZoneRotationAngleTextBox.Text = z.ActivationZoneRotationAngle.ToString(); + MinWindInfluenceTextBox.Text = z.MinWindInfluence.ToString(); + + WindElevationSoundsTextBox.Text = z.WindElevationSounds.ToString(); + RandomRadioSettingsTextBox.Text = z.RandomisedRadioSettings.ToString(); + EnviromentRuleTextBox.Text = z.EnviromentRule.ToString(); + AudioSceneTextBox.Text = z.AudioScene.ToString(); StringBuilder sb = new StringBuilder(); if (z.Rules != null) @@ -117,20 +119,20 @@ namespace CodeWalker.Project.Panels sb.AppendLine(hash.ToString()); } } - HashesTextBox.Text = sb.ToString(); + RulesTextBox.Text = sb.ToString(); sb.Clear(); - if (z.DependentAmbiences != null) + if (z.DirAmbiences != null) { - foreach (var extparam in z.DependentAmbiences) + foreach (var extparam in z.DirAmbiences) { sb.Append(extparam.Name.ToString()); sb.Append(", "); - sb.Append(FloatUtil.ToString(extparam.Value)); + sb.Append(FloatUtil.ToString(extparam.Volume)); sb.AppendLine(); } } - DependentAmbiencesTextBox.Text = sb.ToString(); + DirAmbiencesTextBox.Text = sb.ToString(); populatingui = false; @@ -198,99 +200,18 @@ namespace CodeWalker.Project.Panels } - private void InnerPosTextBox_TextChanged(object sender, EventArgs e) + private void PositioningCentreTextBoxTextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var vec = FloatUtil.ParseVector3String(InnerPosTextBox.Text); - if (CurrentZone.AudioZone.PlaybackZonePosition != vec) + var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text); + if (CurrentZone.AudioZone.PositioningZoneCentre != vec) { - CurrentZone.AudioZone.PlaybackZonePosition = vec; + CurrentZone.AudioZone.PositioningZoneCentre = vec; ProjectItemChanged(); - //var wf = ProjectForm.WorldForm; - //if (wf != null) - //{ - // wf.BeginInvoke(new Action(() => - // { - // wf.SetWidgetPosition(CurrentZone.Position, true); - // })); - //} - } - } - - private void InnerSizeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(InnerSizeTextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneSize != vec) - { - CurrentZone.AudioZone.PlaybackZoneSize = vec; - - ProjectItemChanged(); - } - } - - private void InnerAngleTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint ang = 0; - if (uint.TryParse(InnerAngleTextBox.Text, out ang)) - { - if (CurrentZone.AudioZone.PlaybackZoneAngle != ang) - { - CurrentZone.AudioZone.PlaybackZoneAngle = ang; - - ProjectItemChanged(); - } - } - } - - private void InnerVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(InnerVec1TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec1 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec1 = vec; - - ProjectItemChanged(); - } - } - - private void InnerVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(InnerVec2TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec2 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec2 = vec; - - ProjectItemChanged(); - } - } - - private void InnerVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(InnerVec3TextBox.Text); - if (CurrentZone.AudioZone.PlaybackZoneVec3 != vec) - { - CurrentZone.AudioZone.PlaybackZoneVec3 = vec; - - ProjectItemChanged(); } } @@ -299,159 +220,43 @@ namespace CodeWalker.Project.Panels if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var vec = FloatUtil.ParseVector3String(OuterPosTextBox.Text); - if (CurrentZone.AudioZone.ActivationZonePosition != vec) + var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text); + if (CurrentZone.AudioZone.ActivationZoneCentre != vec) { - CurrentZone.AudioZone.ActivationZonePosition = vec; + CurrentZone.AudioZone.ActivationZoneCentre = vec; ProjectItemChanged(); } } - private void OuterSizeTextBox_TextChanged(object sender, EventArgs e) + private void ActivationZoneRotationAngleTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var vec = FloatUtil.ParseVector3String(OuterSizeTextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneSize != vec) + uint ang; + if (uint.TryParse(ActivationZoneRotationAngleTextBox.Text, out ang)) { - CurrentZone.AudioZone.ActivationZoneSize = vec; - - ProjectItemChanged(); - } - } - - private void OuterAngleTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - uint ang = 0; - if (uint.TryParse(OuterAngleTextBox.Text, out ang)) - { - if (CurrentZone.AudioZone.ActivationZoneAngle != ang) + if (CurrentZone.AudioZone.ActivationZoneRotationAngle != ang) { - CurrentZone.AudioZone.ActivationZoneAngle = ang; + CurrentZone.AudioZone.ActivationZoneRotationAngle = (ushort)ang; ProjectItemChanged(); } } } - private void OuterVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(OuterVec1TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec1 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec1 = vec; - - ProjectItemChanged(); - } - } - - private void OuterVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(OuterVec2TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec2 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec2 = vec; - - ProjectItemChanged(); - } - } - - private void OuterVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector3String(OuterVec3TextBox.Text); - if (CurrentZone.AudioZone.ActivationZoneVec3 != vec) - { - CurrentZone.AudioZone.ActivationZoneVec3 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(UnkVec1TextBox.Text); - if (CurrentZone.AudioZone.UnkVec1 != vec) - { - CurrentZone.AudioZone.UnkVec1 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector4String(UnkVec2TextBox.Text); - if (CurrentZone.AudioZone.UnkVec2 != vec) - { - CurrentZone.AudioZone.UnkVec2 = vec; - - ProjectItemChanged(); - } - } - - private void UnkVec3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var vec = FloatUtil.ParseVector2String(UnkVec3TextBox.Text); - if (CurrentZone.AudioZone.UnkVec3 != vec) - { - CurrentZone.AudioZone.UnkVec3 = vec; - - ProjectItemChanged(); - } - } - - private void UnkBytesTextBox_TextChanged(object sender, EventArgs e) - { - var vals = UnkBytesTextBox.Text.Split(','); - if (vals?.Length == 3) - { - byte val0 = 0, val1 = 0, val2 = 0; - byte.TryParse(vals[0].Trim(), out val0); - byte.TryParse(vals[1].Trim(), out val1); - byte.TryParse(vals[2].Trim(), out val2); - - CurrentZone.AudioZone.Unk14 = val0; - CurrentZone.AudioZone.Unk15 = val1; - CurrentZone.AudioZone.Unk16 = val2; - - ProjectItemChanged(); - } - } - - private void Flags0TextBox_TextChanged(object sender, EventArgs e) + private void FlagsTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; uint flags = 0; - if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) + if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) { - if (CurrentZone.AudioZone.Flags0 != flags) + if (CurrentZone.AudioZone.Flags != flags) { - CurrentZone.AudioZone.Flags0 = flags; + CurrentZone.AudioZone.Flags = flags; ProjectItemChanged(); } @@ -459,29 +264,12 @@ namespace CodeWalker.Project.Panels } - private void Flags1TextBox_TextChanged(object sender, EventArgs e) + private void RandomisedRadioSettings_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - uint flags = 0; - if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags)) - { - if (CurrentZone.AudioZone.Flags1 != flags) - { - CurrentZone.AudioZone.Flags1 = flags; - - ProjectItemChanged(); - } - } - } - - private void Unk13TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentZone?.AudioZone == null) return; - - var hashstr = Unk13TextBox.Text; + var hashstr = RandomRadioSettingsTextBox.Text; uint hash = 0; if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes { @@ -489,20 +277,20 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(hashstr); } - if (CurrentZone.AudioZone.Unk13 != hash) + if (CurrentZone.AudioZone.RandomisedRadioSettings != hash) { - CurrentZone.AudioZone.Unk13 = hash; + CurrentZone.AudioZone.RandomisedRadioSettings = hash; ProjectItemChanged(); } } - private void Hash0TextBox_TextChanged(object sender, EventArgs e) + private void EnviromentRuleTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var hashstr = Hash0TextBox.Text; + var hashstr = EnviromentRuleTextBox.Text; uint hash = 0; if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes { @@ -510,20 +298,20 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(hashstr); } - if (CurrentZone.AudioZone.UnkHash0 != hash) + if (CurrentZone.AudioZone.EnviromentRule != hash) { - CurrentZone.AudioZone.UnkHash0 = hash; + CurrentZone.AudioZone.EnviromentRule = hash; ProjectItemChanged(); } } - private void SceneTextBox_TextChanged(object sender, EventArgs e) + private void AudioSceneTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var hashstr = SceneTextBox.Text; + var hashstr = AudioSceneTextBox.Text; uint hash = 0; if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes { @@ -531,20 +319,20 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(hashstr); } - if (CurrentZone.AudioZone.Scene != hash) + if (CurrentZone.AudioZone.AudioScene != hash) { - CurrentZone.AudioZone.Scene = hash; + CurrentZone.AudioZone.AudioScene = hash; ProjectItemChanged(); } } - private void HashesTextBox_TextChanged(object sender, EventArgs e) + private void RulesTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var hashstrs = HashesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + var hashstrs = RulesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (hashstrs?.Length > 0) { var hashlist = new List(); @@ -560,27 +348,27 @@ namespace CodeWalker.Project.Panels } CurrentZone.AudioZone.Rules = hashlist.ToArray(); - CurrentZone.AudioZone.RulesCount = (byte)hashlist.Count; + CurrentZone.AudioZone.NumRules = (byte)hashlist.Count; ProjectItemChanged(); } } - private void DependentAmbiencesTextBox_TextChanged(object sender, EventArgs e) + private void DirAmbiencesTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; if (CurrentZone?.AudioZone == null) return; - var paramstrs = DependentAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + var paramstrs = DirAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); if (paramstrs?.Length > 0) { - var paramlist = new List(); + var paramlist = new List(); foreach (var paramstr in paramstrs) { var paramvals = paramstr.Split(','); if (paramvals?.Length == 2) { - var param = new Dat151AmbientZone.DependentAmbience(); + var param = new Dat151AmbientZone.DirAmbience(); var hashstr = paramvals[0].Trim(); var valstr = paramvals[1].Trim(); uint hash = 0; @@ -590,13 +378,13 @@ namespace CodeWalker.Project.Panels JenkIndex.Ensure(hashstr); } param.Name = hash; - param.Value = FloatUtil.Parse(valstr); + param.Volume = FloatUtil.Parse(valstr); paramlist.Add(param); } } - CurrentZone.AudioZone.DependentAmbiences = paramlist.ToArray(); - CurrentZone.AudioZone.DependentAmbiencesCount = (uint)paramlist.Count; + CurrentZone.AudioZone.DirAmbiences = paramlist.ToArray(); + CurrentZone.AudioZone.NumDirAmbiences = (byte)paramlist.Count; ProjectItemChanged(); } @@ -606,7 +394,7 @@ namespace CodeWalker.Project.Panels { if (CurrentZone == null) return; if (ProjectForm.WorldForm == null) return; - ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PlaybackZoneSize); + ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PositioningZoneSize); } private void AddToProjectButton_Click(object sender, EventArgs e) @@ -620,5 +408,232 @@ namespace CodeWalker.Project.Panels ProjectForm.SetProjectItem(CurrentZone); ProjectForm.DeleteAudioZone(); } + + private void BuiltUpFactorTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(BuiltUpFactorTextBox.Text); + if (CurrentZone.AudioZone.BuiltUpFactor != vec) + { + CurrentZone.AudioZone.BuiltUpFactor = vec; + + ProjectItemChanged(); + } + } + + private void PedDensityTODTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(PedDensityTODTextBox.Text); + if (CurrentZone.AudioZone.PedDensityTOD != vec) + { + CurrentZone.AudioZone.PedDensityTOD = (uint)vec; + + ProjectItemChanged(); + } + } + + private void MinPedDensityTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(MinPedDensityTextBox.Text); + if (CurrentZone.AudioZone.MinPedDensity != vec) + { + CurrentZone.AudioZone.MinPedDensity = vec; + + ProjectItemChanged(); + } + } + + private void PedDensityScalarTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(PedDensityScalarTextBox.Text); + if (CurrentZone.AudioZone.PedDensityScalar != vec) + { + CurrentZone.AudioZone.PedDensityScalar = vec; + + ProjectItemChanged(); + } + } + + private void MaxPedDensityTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(MaxPedDensityTextBox.Text); + if (CurrentZone.AudioZone.MaxPedDensity != vec) + { + CurrentZone.AudioZone.MaxPedDensity = vec; + + ProjectItemChanged(); + } + } + + private void ZoneWaterCalculationTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(ZoneWaterCalculationTextBox.Text); + if (CurrentZone.AudioZone.ZoneWaterCalculation != vec) + { + CurrentZone.AudioZone.ZoneWaterCalculation = (byte)vec; + + ProjectItemChanged(); + } + } + + private void PositioningSizeTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text); + if (CurrentZone.AudioZone.PositioningZoneSize != vec) + { + CurrentZone.AudioZone.PositioningZoneSize = vec; + + ProjectItemChanged(); + } + } + + private void PositioningRotationAngleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + uint ang = 0; + if (uint.TryParse(PositioningRotationAngleTextBox.Text, out ang)) + { + if (CurrentZone.AudioZone.PositioningZoneRotationAngle != ang) + { + CurrentZone.AudioZone.PositioningZoneRotationAngle = (ushort)ang; + + ProjectItemChanged(); + } + } + } + + private void PositioningRotationOffsetTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningRotationOffsetTextBox.Text); + if (CurrentZone.AudioZone.PositioningZonePostRotationOffset != vec) + { + CurrentZone.AudioZone.PositioningZonePostRotationOffset = vec; + + ProjectItemChanged(); + } + } + + private void PositioningSizeScaleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text); + if (CurrentZone.AudioZone.PositioningZoneSizeScale != vec) + { + CurrentZone.AudioZone.PositioningZoneSizeScale = vec; + + ProjectItemChanged(); + } + } + + private void ActivationSizeTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationSizeTextBox.Text); + if (CurrentZone.AudioZone.ActivationZoneSize != vec) + { + CurrentZone.AudioZone.ActivationZoneSize = vec; + + ProjectItemChanged(); + } + } + + private void ActivationRotationOffsetTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationRotationOffsetTextBox.Text); + if (CurrentZone.AudioZone.ActivationZonePostRotationOffset != vec) + { + CurrentZone.AudioZone.ActivationZonePostRotationOffset = vec; + + ProjectItemChanged(); + } + } + + private void ActivationSizeScaleTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.ParseVector3String(ActivationSizeScaleTextBox.Text); + if (CurrentZone.AudioZone.ActivationZoneSizeScale != vec) + { + CurrentZone.AudioZone.ActivationZoneSizeScale = vec; + + ProjectItemChanged(); + } + } + + private void MinWindInfluenceTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(MinWindInfluenceTextBox.Text); + if (CurrentZone.AudioZone.MinWindInfluence != vec) + { + CurrentZone.AudioZone.MinWindInfluence = vec; + + ProjectItemChanged(); + } + } + + private void MaxWindInfluenceTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(MaxWindInfluenceTextBox.Text); + if (CurrentZone.AudioZone.MaxWindInfluence != vec) + { + CurrentZone.AudioZone.MaxWindInfluence = vec; + + ProjectItemChanged(); + } + } + + private void WindElevationSoundsTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentZone?.AudioZone == null) return; + + var vec = FloatUtil.Parse(WindElevationSoundsTextBox.Text); + if (CurrentZone.AudioZone.WindElevationSounds != vec) + { + CurrentZone.AudioZone.WindElevationSounds = (uint)vec; + + ProjectItemChanged(); + } + } } } diff --git a/CodeWalker/Project/Panels/EditAudioZonePanel.resx b/CodeWalker/Project/Panels/EditAudioZonePanel.resx index 1431f6b..48f71f3 100644 --- a/CodeWalker/Project/Panels/EditAudioZonePanel.resx +++ b/CodeWalker/Project/Panels/EditAudioZonePanel.resx @@ -117,6 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + False + + + False + diff --git a/CodeWalker/Project/ProjectForm.cs b/CodeWalker/Project/ProjectForm.cs index 5d1f1a6..e213886 100644 --- a/CodeWalker/Project/ProjectForm.cs +++ b/CodeWalker/Project/ProjectForm.cs @@ -6422,32 +6422,35 @@ namespace CodeWalker.Project //AA800424 box, line //AA800420 sphere - zone.Flags0 = cp ? copy.AudioZone.Flags0.Value : 0xAA800424; - zone.Flags1 = cp ? copy.AudioZone.Flags1 : 0; + zone.Flags = cp ? copy.AudioZone.Flags.Value : 0xAA800424; zone.Shape = cp ? copy.AudioZone.Shape : Dat151ZoneShape.Box; - zone.PlaybackZoneSize = cp ? copy.AudioZone.PlaybackZoneSize : Vector3.One * 10.0f; - zone.PlaybackZoneAngle = cp ? copy.AudioZone.PlaybackZoneAngle : 0; - zone.PlaybackZoneVec1 = cp ? copy.AudioZone.PlaybackZoneVec1 : Vector4.Zero; - zone.PlaybackZoneVec2 = cp ? copy.AudioZone.PlaybackZoneVec2 : new Vector4(1, 1, 1, 0); - zone.PlaybackZoneVec3 = cp ? copy.AudioZone.PlaybackZoneVec3 : Vector3.Zero; + zone.PositioningZoneSize = cp ? copy.AudioZone.PositioningZoneSize : Vector3.One * 10.0f; + zone.PositioningZoneRotationAngle = (ushort)(cp ? copy.AudioZone.PositioningZoneRotationAngle : 0); + zone.PositioningZonePostRotationOffset = cp ? copy.AudioZone.PositioningZonePostRotationOffset : Vector3.Zero; + zone.PositioningZoneSizeScale = cp ? copy.AudioZone.PositioningZoneSizeScale : new Vector3(1, 1, 1); zone.ActivationZoneSize = cp ? copy.AudioZone.ActivationZoneSize : Vector3.One * 15.0f; - zone.ActivationZoneAngle = cp ? copy.AudioZone.ActivationZoneAngle : 0; - zone.ActivationZoneVec1 = cp ? copy.AudioZone.ActivationZoneVec1 : Vector4.Zero; - zone.ActivationZoneVec2 = cp ? copy.AudioZone.ActivationZoneVec2 : new Vector4(1, 1, 1, 0); - zone.ActivationZoneVec3 = cp ? copy.AudioZone.ActivationZoneVec3 : Vector3.Zero; - zone.UnkVec1 = cp ? copy.AudioZone.UnkVec1 : new Vector4(0, 0, 1, 0); - zone.UnkVec2 = cp ? copy.AudioZone.UnkVec2 : new Vector4(1, -1, -1, 0); - zone.UnkHash0 = cp ? copy.AudioZone.UnkHash0 : 0; - zone.Scene = cp ? copy.AudioZone.Scene : 0; - zone.UnkVec3 = cp ? copy.AudioZone.UnkVec3 : new Vector2(-1, 0); - zone.Unk13 = cp ? copy.AudioZone.Unk13 : 0; - zone.Unk14 = cp ? copy.AudioZone.Unk14 : (byte)4; - zone.Unk15 = cp ? copy.AudioZone.Unk15 : (byte)1; - zone.Unk16 = cp ? copy.AudioZone.Unk16 : (byte)0; - zone.RulesCount = cp ? copy.AudioZone.RulesCount : (byte)0; + zone.ActivationZoneRotationAngle = (ushort)(cp ? copy.AudioZone.ActivationZoneRotationAngle : 0); + zone.ActivationZonePostRotationOffset = cp ? copy.AudioZone.ActivationZonePostRotationOffset : Vector3.Zero; + zone.ActivationZoneSizeScale = cp ? copy.AudioZone.ActivationZoneSizeScale : new Vector3(1, 1, 1); + zone.BuiltUpFactor = cp ? copy.AudioZone.BuiltUpFactor : 0; + zone.MinPedDensity = cp ? copy.AudioZone.MinPedDensity : 0; + zone.MaxPedDensity = cp ? copy.AudioZone.MaxPedDensity : 0; + zone.PedDensityTOD = cp ? copy.AudioZone.PedDensityTOD : 0; + zone.PedDensityScalar = cp ? copy.AudioZone.PedDensityScalar : 0; + zone.MaxWindInfluence = cp ? copy.AudioZone.MaxWindInfluence : 0; + zone.MinWindInfluence = cp ? copy.AudioZone.MinWindInfluence : 0; + zone.WindElevationSounds = cp ? copy.AudioZone.WindElevationSounds : 0; + zone.EnviromentRule = cp ? copy.AudioZone.EnviromentRule : 0; + zone.AudioScene = cp ? copy.AudioZone.AudioScene : 0; + zone.UnderwaterCreakFactor = cp ? copy.AudioZone.UnderwaterCreakFactor : 0; + zone.PedWallaSettings = cp ? copy.AudioZone.PedWallaSettings : 0; + zone.RandomisedRadioSettings = cp ? copy.AudioZone.RandomisedRadioSettings : 0; + zone.NumRulesToPlay = cp ? copy.AudioZone.NumRulesToPlay : (byte)4; + zone.ZoneWaterCalculation = cp ? copy.AudioZone.ZoneWaterCalculation : (byte)1; + zone.NumDirAmbiences = cp ? copy.AudioZone.NumDirAmbiences : (byte)0; + zone.NumRules = cp ? copy.AudioZone.NumRules : (byte)0; zone.Rules = cp ? copy.AudioZone.Rules : null; - zone.DependentAmbiencesCount = cp ? copy.AudioZone.DependentAmbiencesCount : 0; - zone.DependentAmbiences = cp ? copy.AudioZone.DependentAmbiences : null; + zone.DirAmbiences = cp ? copy.AudioZone.DirAmbiences : null; zone.Name = "zone1"; zone.NameHash = JenkHash.GenHash(zone.Name); @@ -6547,21 +6550,20 @@ namespace CodeWalker.Project var emitter = new Dat151AmbientRule(CurrentAudioFile); - emitter.Flags0 = cp ? copy.AudioEmitter.Flags0.Value : 0xAA001100; - emitter.Flags5 = cp ? copy.AudioEmitter.Flags5.Value : 0xFFFFFFFF; - emitter.InnerRadius = cp ? copy.AudioEmitter.InnerRadius : 0.0f; - emitter.OuterRadius = cp ? copy.AudioEmitter.OuterRadius : 20.0f; - emitter.Unk01 = cp ? copy.AudioEmitter.Unk01 : 1.0f; - emitter.StartTime = cp ? copy.AudioEmitter.StartTime : (ushort)0; - emitter.EndTime = cp ? copy.AudioEmitter.EndTime : (ushort)1440; - emitter.Frequency = cp ? copy.AudioEmitter.Frequency.Value : (ushort)0; - emitter.Unk07 = cp ? copy.AudioEmitter.Unk07.Value : (ushort)0; - emitter.Unk08 = cp ? copy.AudioEmitter.Unk08.Value : (byte)0; - emitter.Unk09 = cp ? copy.AudioEmitter.Unk09.Value : (byte)1; - emitter.Unk10 = cp ? copy.AudioEmitter.Unk10.Value : (byte)1; - emitter.Unk11 = cp ? copy.AudioEmitter.Unk11.Value : (byte)1; - emitter.Unk12 = cp ? copy.AudioEmitter.Unk12.Value : (byte)100; - emitter.Unk13 = cp ? copy.AudioEmitter.Unk13.Value : (byte)3; + emitter.DynamicBankID = cp ? copy.AudioEmitter.DynamicBankID : 0; + emitter.MinDist = cp ? copy.AudioEmitter.MinDist : 0.0f; + emitter.MaxDist = cp ? copy.AudioEmitter.MaxDist : 20.0f; + emitter.Weight = cp ? copy.AudioEmitter.Weight : 1.0f; + emitter.MinTimeMinutes = cp ? copy.AudioEmitter.MinTimeMinutes : (ushort)0; + emitter.MaxTimeMinutes = cp ? copy.AudioEmitter.MaxTimeMinutes : (ushort)1440; + emitter.MinRepeatTime = cp ? copy.AudioEmitter.MinRepeatTime : (ushort)0; + emitter.MinRepeatTimeVariance = cp ? copy.AudioEmitter.MinRepeatTimeVariance : (ushort)0; + emitter.SpawnHeight = cp ? copy.AudioEmitter.SpawnHeight : (byte)0; + emitter.PositionUsage = cp ? copy.AudioEmitter.PositionUsage : (byte)1; + emitter.MaxLocalInstances = cp ? copy.AudioEmitter.MaxLocalInstances : (byte)1; + emitter.MaxGlobalInstances = cp ? copy.AudioEmitter.MaxGlobalInstances : (byte)1; + emitter.BlockabilityFactor = cp ? copy.AudioEmitter.BlockabilityFactor : (byte)100; + emitter.MaxPathDepth = cp ? copy.AudioEmitter.MaxPathDepth : (byte)3; emitter.Name = "emitter1";