PR #230 and #248 with extra audio editing improvements

This commit is contained in:
dexy 2024-07-17 18:00:55 +10:00
parent 124180c4e1
commit f5a637588f
26 changed files with 12667 additions and 11272 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,10 +13,6 @@ namespace CodeWalker.World
public volatile bool Inited = false;
public GameFileCache GameFileCache;
public List<AudioPlacement> Zones = new List<AudioPlacement>();
public List<AudioPlacement> Emitters = new List<AudioPlacement>();
public List<AudioPlacement> AllItems = new List<AudioPlacement>();
public Dictionary<RelFile, AudioPlacement[]> PlacementsDict = new Dictionary<RelFile, AudioPlacement[]>();
@ -26,10 +22,6 @@ namespace CodeWalker.World
GameFileCache = gameFileCache;
Zones.Clear();
Emitters.Clear();
AllItems.Clear();
List<AudioPlacement> placements = new List<AudioPlacement>();
@ -44,9 +36,6 @@ namespace CodeWalker.World
PlacementsDict[relfile] = placements.ToArray();
}
AllItems.AddRange(Zones);
AllItems.AddRange(Emitters);
Inited = true;
}
@ -59,12 +48,14 @@ namespace CodeWalker.World
if (reldata is Dat151AmbientZone)
{
placement = new AudioPlacement(relfile, reldata as Dat151AmbientZone);
if (addtoLists) Zones.Add(placement);
}
else if (reldata is Dat151AmbientRule)
{
placement = new AudioPlacement(relfile, reldata as Dat151AmbientRule);
if (addtoLists) Emitters.Add(placement);
}
else if (reldata is Dat151StaticEmitter)
{
placement = new AudioPlacement(relfile, reldata as Dat151StaticEmitter);
}
if (placement != null)
{
@ -105,8 +96,9 @@ namespace CodeWalker.World
public string Name { get; set; }
public MetaHash NameHash { get; set; }
public RelFile RelFile { get; set; }
public Dat151AmbientZone AudioZone { get; set; }
public Dat151AmbientRule AudioEmitter { get; set; }
public Dat151AmbientZone AmbientZone { get; set; }
public Dat151AmbientRule AmbientRule { get; set; }
public Dat151StaticEmitter StaticEmitter { get; set; }
public Dat151ZoneShape Shape { get; set; }
public string ShortTypeName { get; set; }
public string FullTypeName { get; set; }
@ -131,27 +123,37 @@ namespace CodeWalker.World
public AudioPlacement(RelFile rel, Dat151AmbientZone zone)
{
RelFile = rel;
AudioZone = zone;
ShortTypeName = "AudioZone";
FullTypeName = "Audio Zone";
AmbientZone = zone;
ShortTypeName = "AmbientZone";
FullTypeName = "Ambient Zone";
UpdateFromZone();
UpdateFromAmbientZone();
}
public AudioPlacement(RelFile rel, Dat151AmbientRule emitter)
public AudioPlacement(RelFile rel, Dat151AmbientRule rule)
{
RelFile = rel;
AudioEmitter = emitter;
ShortTypeName = "AudioEmitter";
FullTypeName = "Audio Emitter";
AmbientRule = rule;
ShortTypeName = "AmbientRule";
FullTypeName = "Ambient Rule";
UpdateFromEmitter();
UpdateFromAmbientRule();
}
public AudioPlacement(RelFile rel, Dat151StaticEmitter emitter)
{
RelFile = rel;
StaticEmitter = emitter;
ShortTypeName = "StaticEmitter";
FullTypeName = "Static Emitter";
UpdateFromStaticEmitter();
}
public void UpdateFromZone()
public void UpdateFromAmbientZone()
{
if (AudioZone == null) return;
var zone = AudioZone;
if (AmbientZone == null) return;
var zone = AmbientZone;
Name = zone.Name;
NameHash = zone.NameHash;
@ -162,29 +164,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))
@ -202,10 +204,36 @@ namespace CodeWalker.World
}
public void UpdateFromEmitter()
public void UpdateFromAmbientRule()
{
if (AudioEmitter == null) return;
var emitter = AudioEmitter;
if (AmbientRule == null) return;
var rule = AmbientRule;
Name = rule.Name;
NameHash = rule.NameHash;
Shape = Dat151ZoneShape.Sphere;
Orientation = Quaternion.Identity;
OrientationInv = Quaternion.Identity;
InnerPos = rule.Position;
OuterPos = InnerPos;
InnerRadius = rule.MinDist;
OuterRadius = rule.MaxDist;
bool useouter = (InnerRadius == 0);
if (useouter)
{
InnerRadius = 1;
}
Position = InnerPos;
HitSphereRad = InnerRadius;// useouter ? OuterRadius : InnerRadius;
}
public void UpdateFromStaticEmitter()
{
if (StaticEmitter == null) return;
var emitter = StaticEmitter;
Name = emitter.Name;
NameHash = emitter.NameHash;
@ -215,8 +243,8 @@ namespace CodeWalker.World
OrientationInv = Quaternion.Identity;
InnerPos = emitter.Position;
OuterPos = InnerPos;
InnerRadius = emitter.InnerRadius;
OuterRadius = emitter.OuterRadius;
InnerRadius = emitter.MinDistance;
OuterRadius = emitter.MaxDistance;
bool useouter = (InnerRadius == 0);
if (useouter)
@ -237,14 +265,18 @@ namespace CodeWalker.World
OuterPos += delta;
Position = useouter ? OuterPos : InnerPos;
if (AudioZone != null)
if (AmbientZone != null)
{
AudioZone.PlaybackZonePosition = InnerPos;
AudioZone.ActivationZonePosition = OuterPos;
AmbientZone.PositioningZoneCentre = InnerPos;
AmbientZone.ActivationZoneCentre = OuterPos;
}
if (AudioEmitter != null)
if (AmbientRule != null)
{
AudioEmitter.Position = InnerPos;
AmbientRule.Position = InnerPos;
}
if (StaticEmitter != null)
{
StaticEmitter.Position = InnerPos;
}
}
public void SetOrientation(Quaternion ori)
@ -264,10 +296,10 @@ namespace CodeWalker.World
{
InnerOri = Orientation;
OuterOri = Orientation;
if (AudioZone != null)
if (AmbientZone != null)
{
AudioZone.PlaybackZoneAngle = uangl;
AudioZone.ActivationZoneAngle = uangl;
AmbientZone.PositioningZoneRotationAngle = (ushort)uangl;
AmbientZone.ActivationZoneRotationAngle = (ushort)uangl;
}
}
else
@ -278,17 +310,17 @@ namespace CodeWalker.World
if (useouter)
{
OuterOri = Orientation;
if (AudioZone != null)
if (AmbientZone != null)
{
AudioZone.ActivationZoneAngle = uangl;
AmbientZone.ActivationZoneRotationAngle = (ushort)uangl;
}
}
else
{
InnerOri = Orientation;
if (AudioZone != null)
if (AmbientZone != null)
{
AudioZone.PlaybackZoneAngle = uangl;
AmbientZone.PositioningZoneRotationAngle = (ushort)uangl;
}
}
}

View File

@ -1,6 +1,6 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioEmitterPanel
partial class EditAudioAmbientRulePanel
{
/// <summary>
/// Required designer variable.
@ -28,15 +28,21 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioEmitterPanel));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientRulePanel));
this.GoToButton = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.ExplicitSpawnCombo = new System.Windows.Forms.ComboBox();
this.label13 = 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();
this.Unk10UpDown = new System.Windows.Forms.NumericUpDown();
this.Unk09UpDown = new System.Windows.Forms.NumericUpDown();
this.Unk07UpDown = new System.Windows.Forms.NumericUpDown();
this.Unk08UpDown = new System.Windows.Forms.NumericUpDown();
this.FrequencyUpDown = 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,16 +77,12 @@
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();
((System.ComponentModel.ISupportInitialize)(this.Unk12UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk11UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk10UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).BeginInit();
@ -119,6 +115,10 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.ExplicitSpawnCombo);
this.tabPage1.Controls.Add(this.label13);
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);
@ -126,7 +126,6 @@
this.tabPage1.Controls.Add(this.Unk12UpDown);
this.tabPage1.Controls.Add(this.Unk11UpDown);
this.tabPage1.Controls.Add(this.Unk10UpDown);
this.tabPage1.Controls.Add(this.Unk09UpDown);
this.tabPage1.Controls.Add(this.Unk07UpDown);
this.tabPage1.Controls.Add(this.Unk08UpDown);
this.tabPage1.Controls.Add(this.FrequencyUpDown);
@ -136,8 +135,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 +144,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);
@ -172,12 +165,77 @@
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(551, 421);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Ambient Emitter";
this.tabPage1.Text = "Ambient Rule";
this.tabPage1.UseVisualStyleBackColor = true;
//
// ExplicitSpawnCombo
//
this.ExplicitSpawnCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ExplicitSpawnCombo.FormattingEnabled = true;
this.ExplicitSpawnCombo.Location = new System.Drawing.Point(412, 103);
this.ExplicitSpawnCombo.Name = "ExplicitSpawnCombo";
this.ExplicitSpawnCombo.Size = new System.Drawing.Size(132, 21);
this.ExplicitSpawnCombo.TabIndex = 90;
this.ExplicitSpawnCombo.SelectedIndexChanged += new System.EventHandler(this.ExplicitSpawnCombo_SelectedIndexChanged);
//
// 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(329, 106);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(77, 13);
this.label13.TabIndex = 89;
this.label13.Text = "Explicit spawn:";
//
// 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 +248,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 +261,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 +274,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,
@ -227,22 +285,9 @@
this.Unk10UpDown.TabIndex = 56;
this.Unk10UpDown.ValueChanged += new System.EventHandler(this.Unk10UpDown_ValueChanged);
//
// Unk09UpDown
//
this.Unk09UpDown.Location = new System.Drawing.Point(138, 277);
this.Unk09UpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.Unk09UpDown.Name = "Unk09UpDown";
this.Unk09UpDown.Size = new System.Drawing.Size(48, 20);
this.Unk09UpDown.TabIndex = 54;
this.Unk09UpDown.ValueChanged += new System.EventHandler(this.Unk09UpDown_ValueChanged);
//
// 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 +300,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 +313,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,18 +354,18 @@
//
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(357, 82);
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(412, 78);
this.Flags5TextBox.Name = "Flags5TextBox";
this.Flags5TextBox.Size = new System.Drawing.Size(155, 20);
this.Flags5TextBox.Size = new System.Drawing.Size(132, 20);
this.Flags5TextBox.TabIndex = 81;
this.Flags5TextBox.TextChanged += new System.EventHandler(this.Flags5TextBox_TextChanged);
//
@ -328,40 +373,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(343, 57);
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(412, 54);
this.Flags4TextBox.Name = "Flags4TextBox";
this.Flags4TextBox.Size = new System.Drawing.Size(155, 20);
this.Flags4TextBox.Size = new System.Drawing.Size(132, 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)));
@ -369,7 +395,7 @@
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 85;
this.DeleteButton.Text = "Delete emitter";
this.DeleteButton.Text = "Delete rule";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
@ -388,18 +414,18 @@
//
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(371, 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(412, 30);
this.Flags2TextBox.Name = "Flags2TextBox";
this.Flags2TextBox.Size = new System.Drawing.Size(155, 20);
this.Flags2TextBox.Size = new System.Drawing.Size(132, 20);
this.Flags2TextBox.TabIndex = 75;
this.Flags2TextBox.TextChanged += new System.EventHandler(this.Flags2TextBox_TextChanged);
//
@ -407,11 +433,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 +456,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 +502,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 +539,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 +558,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 +577,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,34 +629,7 @@
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
// EditAudioAmbientRulePanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@ -676,8 +637,8 @@
this.Controls.Add(this.GoToButton);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioEmitterPanel";
this.Text = "Edit Audio Emitter";
this.Name = "EditAudioAmbientRulePanel";
this.Text = "Edit Audio Ambient Rule";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
@ -685,7 +646,6 @@
((System.ComponentModel.ISupportInitialize)(this.Unk12UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk11UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk10UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).EndInit();
@ -709,10 +669,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 +689,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;
@ -744,9 +698,12 @@
private System.Windows.Forms.NumericUpDown Unk12UpDown;
private System.Windows.Forms.NumericUpDown Unk11UpDown;
private System.Windows.Forms.NumericUpDown Unk10UpDown;
private System.Windows.Forms.NumericUpDown Unk09UpDown;
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 label24;
private System.Windows.Forms.ComboBox ExplicitSpawnCombo;
private System.Windows.Forms.Label label13;
}
}

View File

@ -13,37 +13,42 @@ using System.Windows.Forms;
namespace CodeWalker.Project.Panels
{
public partial class EditAudioEmitterPanel : ProjectPanel
public partial class EditAudioAmbientRulePanel : ProjectPanel
{
public ProjectForm ProjectForm;
public AudioPlacement CurrentEmitter { get; set; }
public AudioPlacement CurrentRule { get; set; }
private bool populatingui = false;
public EditAudioEmitterPanel(ProjectForm owner)
public EditAudioAmbientRulePanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
ExplicitSpawnCombo.Items.Clear();
ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.Disabled);
ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.WorldRelative);
ExplicitSpawnCombo.Items.Add(Dat151AmbientRule.ExplicitSpawnType.InteriorRelative);
}
public void SetEmitter(AudioPlacement emitter)
public void SetRule(AudioPlacement rule)
{
CurrentEmitter = emitter;
Tag = emitter;
CurrentRule = rule;
Tag = rule;
UpdateFormTitle();
UpdateUI();
}
private void UpdateFormTitle()
{
Text = CurrentEmitter?.NameHash.ToString() ?? "";
Text = CurrentRule?.NameHash.ToString() ?? "";
}
private void UpdateUI()
{
if (CurrentEmitter?.AudioEmitter == null)
if (CurrentRule?.AmbientRule == null)
{
AddToProjectButton.Enabled = false;
DeleteButton.Enabled = false;
@ -61,15 +66,12 @@ namespace CodeWalker.Project.Panels
FrequencyUpDown.Value = 0;
Unk07UpDown.Value = 0;
Unk08UpDown.Value = 0;
Unk09UpDown.Value = 0;
ExplicitSpawnCombo.SelectedItem = null;
Unk10UpDown.Value = 0;
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;
@ -77,45 +79,42 @@ namespace CodeWalker.Project.Panels
}
else
{
AddToProjectButton.Enabled = CurrentEmitter?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentEmitter.RelFile) : false;
AddToProjectButton.Enabled = CurrentRule?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentRule.RelFile) : false;
DeleteButton.Enabled = !AddToProjectButton.Enabled;
populatingui = true;
var e = CurrentEmitter.AudioEmitter;
var e = CurrentRule.AmbientRule;
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;
ExplicitSpawnCombo.SelectedItem = e.ExplicitSpawn;
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();
}
}
@ -125,7 +124,7 @@ namespace CodeWalker.Project.Panels
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SelectObject(CurrentEmitter);
ProjectForm.WorldForm.SelectObject(CurrentRule);
}
}
@ -133,9 +132,9 @@ namespace CodeWalker.Project.Panels
private void ProjectItemChanged()
{
CurrentEmitter?.UpdateFromEmitter();//also update the placement wrapper
CurrentRule?.UpdateFromAmbientRule();//also update the placement wrapper
if (CurrentEmitter?.RelFile != null)
if (CurrentRule?.RelFile != null)
{
ProjectForm.SetAudioFileHasChanged(true);
}
@ -145,7 +144,7 @@ namespace CodeWalker.Project.Panels
private void NameTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint hash = 0;
string name = NameTextBox.Text;
@ -156,10 +155,10 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.AudioEmitter.NameHash != hash)
if (CurrentRule.AmbientRule.NameHash != hash)
{
CurrentEmitter.AudioEmitter.Name = NameTextBox.Text;
CurrentEmitter.AudioEmitter.NameHash = hash;
CurrentRule.AmbientRule.Name = NameTextBox.Text;
CurrentRule.AmbientRule.NameHash = hash;
ProjectItemChanged();
UpdateFormTitle();
@ -169,12 +168,12 @@ namespace CodeWalker.Project.Panels
private void PositionTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
var vec = FloatUtil.ParseVector3String(PositionTextBox.Text);
if (CurrentEmitter.AudioEmitter.Position != vec)
if (CurrentRule.AmbientRule.Position != vec)
{
CurrentEmitter.AudioEmitter.Position = vec;
CurrentRule.AmbientRule.Position = vec;
ProjectItemChanged();
@ -192,12 +191,12 @@ namespace CodeWalker.Project.Panels
private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
float rad = FloatUtil.Parse(InnerRadiusTextBox.Text);
if (CurrentEmitter.AudioEmitter.InnerRadius != rad)
if (CurrentRule.AmbientRule.MinDist != rad)
{
CurrentEmitter.AudioEmitter.InnerRadius = rad;
CurrentRule.AmbientRule.MinDist = rad;
ProjectItemChanged();
}
@ -206,12 +205,12 @@ namespace CodeWalker.Project.Panels
private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
float rad = FloatUtil.Parse(OuterRadiusTextBox.Text);
if (CurrentEmitter.AudioEmitter.OuterRadius != rad)
if (CurrentRule.AmbientRule.MaxDist != rad)
{
CurrentEmitter.AudioEmitter.OuterRadius = rad;
CurrentRule.AmbientRule.MaxDist = rad;
ProjectItemChanged();
}
@ -220,7 +219,7 @@ namespace CodeWalker.Project.Panels
private void ChildSoundTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint hash = 0;
string name = ChildSoundTextBox.Text;
@ -231,9 +230,9 @@ namespace CodeWalker.Project.Panels
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.AudioEmitter.ChildSound != hash)
if (CurrentRule.AmbientRule.ChildSound != hash)
{
CurrentEmitter.AudioEmitter.ChildSound = hash;
CurrentRule.AmbientRule.ChildSound = hash;
ProjectItemChanged();
}
@ -242,7 +241,7 @@ namespace CodeWalker.Project.Panels
private void CategoryTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint hash = 0;
string name = CategoryTextBox.Text;
@ -253,9 +252,9 @@ namespace CodeWalker.Project.Panels
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.AudioEmitter.Category != hash)
if (CurrentRule.AmbientRule.Category != hash)
{
CurrentEmitter.AudioEmitter.Category = hash;
CurrentRule.AmbientRule.Category = hash;
ProjectItemChanged();
}
@ -264,12 +263,12 @@ namespace CodeWalker.Project.Panels
private void Unk01TextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
float unk = FloatUtil.Parse(Unk01TextBox.Text);
if (CurrentEmitter.AudioEmitter.Unk01 != unk)
if (CurrentRule.AmbientRule.Weight != unk)
{
CurrentEmitter.AudioEmitter.Unk01 = unk;
CurrentRule.AmbientRule.Weight = unk;
ProjectItemChanged();
}
@ -278,12 +277,12 @@ namespace CodeWalker.Project.Panels
private void StartTimeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
ushort unk = (ushort)StartTimeUpDown.Value;
if (CurrentEmitter.AudioEmitter.StartTime != unk)
if (CurrentRule.AmbientRule.MinTimeMinutes != unk)
{
CurrentEmitter.AudioEmitter.StartTime = unk;
CurrentRule.AmbientRule.MinTimeMinutes = unk;
ProjectItemChanged();
}
@ -292,12 +291,12 @@ namespace CodeWalker.Project.Panels
private void EndTimeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
ushort unk = (ushort)EndTimeUpDown.Value;
if (CurrentEmitter.AudioEmitter.EndTime != unk)
if (CurrentRule.AmbientRule.MaxTimeMinutes != unk)
{
CurrentEmitter.AudioEmitter.EndTime = unk;
CurrentRule.AmbientRule.MaxTimeMinutes = unk;
ProjectItemChanged();
}
@ -306,12 +305,12 @@ namespace CodeWalker.Project.Panels
private void FrequencyUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
ushort unk = (ushort)FrequencyUpDown.Value;
if (CurrentEmitter.AudioEmitter.Frequency.Value != unk)
if (CurrentRule.AmbientRule.MinRepeatTime != unk)
{
CurrentEmitter.AudioEmitter.Frequency = unk;
CurrentRule.AmbientRule.MinRepeatTime = unk;
ProjectItemChanged();
}
@ -320,12 +319,12 @@ namespace CodeWalker.Project.Panels
private void Unk07UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
ushort unk = (ushort)Unk07UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk07.Value != unk)
if (CurrentRule.AmbientRule.MinRepeatTimeVariance != unk)
{
CurrentEmitter.AudioEmitter.Unk07 = unk;
CurrentRule.AmbientRule.MinRepeatTimeVariance = unk;
ProjectItemChanged();
}
@ -334,26 +333,26 @@ namespace CodeWalker.Project.Panels
private void Unk08UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk08UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk08.Value != unk)
if (CurrentRule.AmbientRule.SpawnHeight != unk)
{
CurrentEmitter.AudioEmitter.Unk08 = unk;
CurrentRule.AmbientRule.SpawnHeight = unk;
ProjectItemChanged();
}
}
private void Unk09UpDown_ValueChanged(object sender, EventArgs e)
private void ExplicitSpawnCombo_SelectedIndexChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk09UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk09.Value != unk)
var val = (Dat151AmbientRule.ExplicitSpawnType)ExplicitSpawnCombo.SelectedItem;
if (CurrentRule.AmbientRule.ExplicitSpawn != val)
{
CurrentEmitter.AudioEmitter.Unk09 = unk;
CurrentRule.AmbientRule.ExplicitSpawn = val;
ProjectItemChanged();
}
@ -362,12 +361,12 @@ namespace CodeWalker.Project.Panels
private void Unk10UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk10UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk10.Value != unk)
if (CurrentRule.AmbientRule.MaxLocalInstances != unk)
{
CurrentEmitter.AudioEmitter.Unk10 = unk;
CurrentRule.AmbientRule.MaxLocalInstances = unk;
ProjectItemChanged();
}
@ -376,12 +375,12 @@ namespace CodeWalker.Project.Panels
private void Unk11UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk11UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk11.Value != unk)
if (CurrentRule.AmbientRule.MaxGlobalInstances != unk)
{
CurrentEmitter.AudioEmitter.Unk11 = unk;
CurrentRule.AmbientRule.MaxGlobalInstances = unk;
ProjectItemChanged();
}
@ -390,12 +389,12 @@ namespace CodeWalker.Project.Panels
private void Unk12UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk12UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk12.Value != unk)
if (CurrentRule.AmbientRule.BlockabilityFactor != unk)
{
CurrentEmitter.AudioEmitter.Unk12 = unk;
CurrentRule.AmbientRule.BlockabilityFactor = unk;
ProjectItemChanged();
}
@ -404,79 +403,28 @@ namespace CodeWalker.Project.Panels
private void Unk13UpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
byte unk = (byte)Unk13UpDown.Value;
if (CurrentEmitter.AudioEmitter.Unk13.Value != unk)
if (CurrentRule.AmbientRule.MaxPathDepth != unk)
{
CurrentEmitter.AudioEmitter.Unk13 = unk;
CurrentRule.AmbientRule.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;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint flags = 0;
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentEmitter.AudioEmitter.Flags2 != flags)
if (CurrentRule.AmbientRule.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;
CurrentRule.AmbientRule.Flags = flags;
ProjectItemChanged();
}
@ -486,14 +434,14 @@ namespace CodeWalker.Project.Panels
private void Flags4TextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint flags = 0;
if (uint.TryParse(Flags4TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentEmitter.AudioEmitter.Flags4 != flags)
if (CurrentRule.AmbientRule.LastPlayTime != flags)
{
CurrentEmitter.AudioEmitter.Flags4 = flags;
CurrentRule.AmbientRule.LastPlayTime = flags;
ProjectItemChanged();
}
@ -503,14 +451,14 @@ namespace CodeWalker.Project.Panels
private void Flags5TextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
uint flags = 0;
if (uint.TryParse(Flags5TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentEmitter.AudioEmitter.Flags5 != flags)
if (CurrentRule.AmbientRule.DynamicBankID != flags)
{
CurrentEmitter.AudioEmitter.Flags5 = flags;
CurrentRule.AmbientRule.DynamicBankID = (int)flags;
ProjectItemChanged();
}
@ -520,18 +468,18 @@ namespace CodeWalker.Project.Panels
private void VariablesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.AudioEmitter == null) return;
if (CurrentRule?.AmbientRule == null) return;
var paramstrs = VariablesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (paramstrs?.Length > 0)
{
var paramlist = new List<Dat151AmbientRule.Variable>();
var paramlist = new List<Dat151AmbientRule.Condition>();
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 +493,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;
CurrentRule.AmbientRule.Conditions = paramlist.ToArray();
CurrentRule.AmbientRule.NumConditions = (ushort)paramlist.Count;
ProjectItemChanged();
}
@ -559,22 +507,21 @@ namespace CodeWalker.Project.Panels
private void GoToButton_Click(object sender, EventArgs e)
{
if (CurrentEmitter == null) return;
if (CurrentRule == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PlaybackZoneSize);
ProjectForm.WorldForm.GoToPosition(CurrentRule.Position, SharpDX.Vector3.One * CurrentRule.OuterRadius);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentEmitter);
ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile);
ProjectForm.SetProjectItem(CurrentRule);
ProjectForm.AddAudioFileToProject(CurrentRule.RelFile);
}
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentEmitter);
ProjectForm.DeleteAudioEmitter();
ProjectForm.SetProjectItem(CurrentRule);
ProjectForm.DeleteAudioAmbientRule();
}
}
}

View File

@ -1,6 +1,6 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioZoneListPanel
partial class EditAudioAmbientZoneListPanel
{
/// <summary>
/// Required designer variable.
@ -28,14 +28,14 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioZoneListPanel));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientZoneListPanel));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.DeleteButton = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
this.NameTextBox = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix();
this.DeleteButton = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
@ -67,6 +67,17 @@
this.tabPage1.Text = "Ambient Zone List";
this.tabPage1.UseVisualStyleBackColor = true;
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(438, 381);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 77;
this.DeleteButton.Text = "Delete list";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// label12
//
this.label12.AutoSize = true;
@ -109,26 +120,15 @@
this.HashesTextBox.WordWrap = false;
this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged);
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(438, 381);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 77;
this.DeleteButton.Text = "Delete list";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// EditAudioZoneListPanel
// EditAudioAmbientZoneListPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 450);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioZoneListPanel";
this.Text = "Edit Audio Zone List";
this.Name = "EditAudioAmbientZoneListPanel";
this.Text = "Edit Audio Ambient Zone List";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();

View File

@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace CodeWalker.Project.Panels
{
public partial class EditAudioZoneListPanel : ProjectPanel
public partial class EditAudioAmbientZoneListPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public Dat151AmbientZoneList CurrentZoneList { get; set; }
@ -19,7 +19,7 @@ namespace CodeWalker.Project.Panels
private bool populatingui = false;
public EditAudioZoneListPanel(ProjectForm owner)
public EditAudioAmbientZoneListPanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
@ -144,7 +144,7 @@ namespace CodeWalker.Project.Panels
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentZoneList);
ProjectForm.DeleteAudioZoneList();
ProjectForm.DeleteAudioAmbientZoneList();
}
}
}

View File

@ -0,0 +1,768 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioAmbientZonePanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Label label18;
System.Windows.Forms.Label label27;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioAmbientZonePanel));
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.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.RandomRadioSettingsTextBox = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.DirAmbiencesTextBox = new CodeWalker.WinForms.TextBoxFix();
this.label19 = new System.Windows.Forms.Label();
this.RulesTextBox = new CodeWalker.WinForms.TextBoxFix();
this.label13 = new System.Windows.Forms.Label();
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.label11 = new System.Windows.Forms.Label();
this.PositioningCentreTextBox = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.ActivationZoneCentreTextBox = new System.Windows.Forms.TextBox();
this.GoToButton = new System.Windows.Forms.Button();
this.SelectRuleButton = new System.Windows.Forms.Button();
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(162, 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(185, 357);
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)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(2, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(559, 447);
this.tabControl1.TabIndex = 17;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.SelectRuleButton);
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.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.RandomRadioSettingsTextBox);
this.tabPage1.Controls.Add(this.label20);
this.tabPage1.Controls.Add(this.DirAmbiencesTextBox);
this.tabPage1.Controls.Add(this.label19);
this.tabPage1.Controls.Add(this.RulesTextBox);
this.tabPage1.Controls.Add(this.label13);
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.label11);
this.tabPage1.Controls.Add(this.PositioningCentreTextBox);
this.tabPage1.Controls.Add(this.label16);
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);
this.tabPage1.Size = new System.Drawing.Size(551, 421);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Ambient Zone";
this.tabPage1.UseVisualStyleBackColor = true;
//
// PositioningRotationAngleTextBox
//
this.PositioningRotationAngleTextBox.Location = new System.Drawing.Point(272, 354);
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(18, 357);
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.Location = new System.Drawing.Point(109, 354);
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.AutoSize = true;
this.label22.Location = new System.Drawing.Point(310, 140);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(74, 13);
this.label22.TabIndex = 111;
this.label22.Text = "Wind Sounds:";
//
// WindElevationSoundsTextBox
//
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.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, 394);
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.Location = new System.Drawing.Point(272, 391);
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(5, 394);
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.Location = new System.Drawing.Point(109, 391);
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(162, 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.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.Location = new System.Drawing.Point(98, 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.Location = new System.Drawing.Point(98, 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(162, 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.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.Location = new System.Drawing.Point(98, 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.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.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.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.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.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.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.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.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.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.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
//
this.DeleteButton.Location = new System.Drawing.Point(343, 3);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 81;
this.DeleteButton.Text = "Delete zone";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// AddToProjectButton
//
this.AddToProjectButton.Location = new System.Drawing.Point(452, 3);
this.AddToProjectButton.Name = "AddToProjectButton";
this.AddToProjectButton.Size = new System.Drawing.Size(93, 23);
this.AddToProjectButton.TabIndex = 80;
this.AddToProjectButton.Text = "Add to project";
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(268, 36);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(122, 13);
this.label21.TabIndex = 70;
this.label21.Text = "Random Radio Settings:";
//
// RandomRadioSettingsTextBox
//
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
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(340, 306);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(115, 13);
this.label20.TabIndex = 78;
this.label20.Text = "Directional Ambiences:";
//
// DirAmbiencesTextBox
//
this.DirAmbiencesTextBox.Location = new System.Drawing.Point(335, 322);
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
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(340, 161);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(37, 13);
this.label19.TabIndex = 76;
this.label19.Text = "Rules:";
//
// RulesTextBox
//
this.RulesTextBox.Location = new System.Drawing.Point(335, 177);
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);
this.RulesTextBox.Enter += new System.EventHandler(this.RulesTextBox_Enter);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(340, 114);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(35, 13);
this.label13.TabIndex = 66;
this.label13.Text = "Flags:";
//
// FlagsTextBox
//
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
//
this.ShapeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ShapeComboBox.FormattingEnabled = true;
this.ShapeComboBox.Items.AddRange(new object[] {
"Box",
"Line",
"Sphere"});
this.ShapeComboBox.Location = new System.Drawing.Point(84, 28);
this.ShapeComboBox.Name = "ShapeComboBox";
this.ShapeComboBox.Size = new System.Drawing.Size(178, 21);
this.ShapeComboBox.TabIndex = 33;
this.ShapeComboBox.SelectedIndexChanged += new System.EventHandler(this.ShapeComboBox_SelectedIndexChanged);
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(7, 33);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(41, 13);
this.label23.TabIndex = 32;
this.label23.Text = "Shape:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(7, 9);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(64, 13);
this.label12.TabIndex = 29;
this.label12.Text = "Name hash:";
//
// NameTextBox
//
this.NameTextBox.Location = new System.Drawing.Point(84, 6);
this.NameTextBox.Name = "NameTextBox";
this.NameTextBox.Size = new System.Drawing.Size(237, 20);
this.NameTextBox.TabIndex = 30;
this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(7, 163);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(95, 13);
this.label11.TabIndex = 46;
this.label11.Text = "Positioning Centre:";
//
// PositioningCentreTextBox
//
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(91, 13);
this.label16.TabIndex = 34;
this.label16.Text = "Activation Centre:";
//
// ActivationZoneCentreTextBox
//
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
//
this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.GoToButton.Location = new System.Drawing.Point(483, 0);
this.GoToButton.Name = "GoToButton";
this.GoToButton.Size = new System.Drawing.Size(68, 23);
this.GoToButton.TabIndex = 31;
this.GoToButton.Text = "Go to";
this.GoToButton.UseVisualStyleBackColor = true;
this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click);
//
// SelectRuleButton
//
this.SelectRuleButton.Enabled = false;
this.SelectRuleButton.Location = new System.Drawing.Point(469, 272);
this.SelectRuleButton.Name = "SelectRuleButton";
this.SelectRuleButton.Size = new System.Drawing.Size(75, 23);
this.SelectRuleButton.TabIndex = 116;
this.SelectRuleButton.Text = "Select Rule";
this.SelectRuleButton.UseVisualStyleBackColor = true;
this.SelectRuleButton.Click += new System.EventHandler(this.SelectRuleButton_Click);
//
// EditAudioAmbientZonePanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 450);
this.Controls.Add(this.GoToButton);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioAmbientZonePanel";
this.Text = "Edit Audio Ambient Zone";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox ActivationZoneCentreTextBox;
private System.Windows.Forms.Button GoToButton;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox NameTextBox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox PositioningCentreTextBox;
private System.Windows.Forms.ComboBox ShapeComboBox;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox FlagsTextBox;
private WinForms.TextBoxFix RulesTextBox;
private System.Windows.Forms.Label label20;
private WinForms.TextBoxFix DirAmbiencesTextBox;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox RandomRadioSettingsTextBox;
private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.Button DeleteButton;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.TextBox AudioSceneTextBox;
private System.Windows.Forms.Label label24;
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;
private System.Windows.Forms.Button SelectRuleButton;
}
}

View File

@ -0,0 +1,675 @@
using CodeWalker.GameFiles;
using CodeWalker.World;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace CodeWalker.Project.Panels
{
public partial class EditAudioAmbientZonePanel : ProjectPanel
{
public ProjectForm ProjectForm;
public AudioPlacement CurrentZone { get; set; }
private bool populatingui = false;
public EditAudioAmbientZonePanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
}
public void SetZone(AudioPlacement zone)
{
CurrentZone = zone;
Tag = zone;
UpdateFormTitle();
UpdateUI();
}
private void UpdateFormTitle()
{
Text = CurrentZone?.NameHash.ToString() ?? "";
}
private void UpdateUI()
{
if (CurrentZone?.AmbientZone == null)
{
AddToProjectButton.Enabled = false;
DeleteButton.Enabled = false;
populatingui = true;
NameTextBox.Text = string.Empty;
ShapeComboBox.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
{
AddToProjectButton.Enabled = CurrentZone?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentZone.RelFile) : false;
DeleteButton.Enabled = !AddToProjectButton.Enabled;
populatingui = true;
var z = CurrentZone.AmbientZone;
NameTextBox.Text = z.NameHash.ToString();
ShapeComboBox.Text = z.Shape.ToString();
FlagsTextBox.Text = z.Flags.Hex;
ActivationZoneCentreTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneCentre);
ActivationSizeTextBox.Text = FloatUtil.GetVector3String(z.ActivationZoneSize);
ActivationRotationOffsetTextBox.Text = FloatUtil.GetVector3String(z.ActivationZonePostRotationOffset);
ActivationSizeScaleTextBox.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.EnvironmentRule.ToString();
AudioSceneTextBox.Text = z.AudioScene.ToString();
StringBuilder sb = new StringBuilder();
if (z.Rules != null)
{
foreach (var hash in z.Rules)
{
sb.AppendLine(hash.ToString());
}
}
RulesTextBox.Text = sb.ToString();
sb.Clear();
if (z.DirAmbiences != null)
{
foreach (var extparam in z.DirAmbiences)
{
sb.Append(extparam.Name.ToString());
sb.Append(", ");
sb.Append(FloatUtil.ToString(extparam.Volume));
sb.AppendLine();
}
}
DirAmbiencesTextBox.Text = sb.ToString();
populatingui = false;
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SelectObject(CurrentZone);
}
}
}
private void ProjectItemChanged()
{
CurrentZone?.UpdateFromAmbientZone();//also update the placement wrapper
if (CurrentZone?.RelFile != null)
{
ProjectForm.SetAudioFileHasChanged(true);
}
}
private void NameTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
uint hash = 0;
string name = NameTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentZone.AmbientZone.NameHash != hash)
{
CurrentZone.AmbientZone.Name = NameTextBox.Text;
CurrentZone.AmbientZone.NameHash = hash;
ProjectItemChanged();
UpdateFormTitle();
}
}
private void ShapeComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
Dat151ZoneShape shape = Dat151ZoneShape.Box;
if (Enum.TryParse<Dat151ZoneShape>(ShapeComboBox.Text, out shape))
{
if (CurrentZone.AmbientZone.Shape != shape)
{
CurrentZone.AmbientZone.Shape = shape;
ProjectItemChanged();
}
}
}
private void PositioningCentreTextBoxTextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text);
if (CurrentZone.AmbientZone.PositioningZoneCentre != vec)
{
CurrentZone.AmbientZone.PositioningZoneCentre = vec;
ProjectItemChanged();
}
}
private void OuterPosTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(PositioningCentreTextBox.Text);
if (CurrentZone.AmbientZone.ActivationZoneCentre != vec)
{
CurrentZone.AmbientZone.ActivationZoneCentre = vec;
ProjectItemChanged();
}
}
private void ActivationZoneRotationAngleTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
uint ang;
if (uint.TryParse(ActivationZoneRotationAngleTextBox.Text, out ang))
{
if (CurrentZone.AmbientZone.ActivationZoneRotationAngle != ang)
{
CurrentZone.AmbientZone.ActivationZoneRotationAngle = (ushort)ang;
ProjectItemChanged();
}
}
}
private void FlagsTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
uint flags = 0;
if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentZone.AmbientZone.Flags != flags)
{
CurrentZone.AmbientZone.Flags = flags;
ProjectItemChanged();
}
}
}
private void RandomisedRadioSettings_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var hashstr = RandomRadioSettingsTextBox.Text;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AmbientZone.RandomisedRadioSettings != hash)
{
CurrentZone.AmbientZone.RandomisedRadioSettings = hash;
ProjectItemChanged();
}
}
private void EnviromentRuleTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var hashstr = EnviromentRuleTextBox.Text;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AmbientZone.EnvironmentRule != hash)
{
CurrentZone.AmbientZone.EnvironmentRule = hash;
ProjectItemChanged();
}
}
private void AudioSceneTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var hashstr = AudioSceneTextBox.Text;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AmbientZone.AudioScene != hash)
{
CurrentZone.AmbientZone.AudioScene = hash;
ProjectItemChanged();
}
}
private void RulesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var hashstrs = RulesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (hashstrs?.Length > 0)
{
var hashlist = new List<MetaHash>();
foreach (var hashstr in hashstrs)
{
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
hashlist.Add(hash);
}
CurrentZone.AmbientZone.Rules = hashlist.ToArray();
CurrentZone.AmbientZone.NumRules = (byte)hashlist.Count;
ProjectItemChanged();
}
}
private void DirAmbiencesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var paramstrs = DirAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (paramstrs?.Length > 0)
{
var paramlist = new List<Dat151AmbientZone.DirAmbience>();
foreach (var paramstr in paramstrs)
{
var paramvals = paramstr.Split(',');
if (paramvals?.Length == 2)
{
var param = new Dat151AmbientZone.DirAmbience();
var hashstr = paramvals[0].Trim();
var valstr = paramvals[1].Trim();
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
param.Name = hash;
param.Volume = FloatUtil.Parse(valstr);
paramlist.Add(param);
}
}
CurrentZone.AmbientZone.DirAmbiences = paramlist.ToArray();
CurrentZone.AmbientZone.NumDirAmbiences = (byte)paramlist.Count;
ProjectItemChanged();
}
}
private void GoToButton_Click(object sender, EventArgs e)
{
if (CurrentZone == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AmbientZone.PositioningZoneSize);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentZone);
ProjectForm.AddAudioFileToProject(CurrentZone.RelFile);
}
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentZone);
ProjectForm.DeleteAudioAmbientZone();
}
private void BuiltUpFactorTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(BuiltUpFactorTextBox.Text);
if (CurrentZone.AmbientZone.BuiltUpFactor != vec)
{
CurrentZone.AmbientZone.BuiltUpFactor = vec;
ProjectItemChanged();
}
}
private void PedDensityTODTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(PedDensityTODTextBox.Text);
if (CurrentZone.AmbientZone.PedDensityTOD != vec)
{
CurrentZone.AmbientZone.PedDensityTOD = (uint)vec;
ProjectItemChanged();
}
}
private void MinPedDensityTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(MinPedDensityTextBox.Text);
if (CurrentZone.AmbientZone.MinPedDensity != vec)
{
CurrentZone.AmbientZone.MinPedDensity = vec;
ProjectItemChanged();
}
}
private void PedDensityScalarTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(PedDensityScalarTextBox.Text);
if (CurrentZone.AmbientZone.PedDensityScalar != vec)
{
CurrentZone.AmbientZone.PedDensityScalar = vec;
ProjectItemChanged();
}
}
private void MaxPedDensityTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(MaxPedDensityTextBox.Text);
if (CurrentZone.AmbientZone.MaxPedDensity != vec)
{
CurrentZone.AmbientZone.MaxPedDensity = vec;
ProjectItemChanged();
}
}
private void ZoneWaterCalculationTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(ZoneWaterCalculationTextBox.Text);
if (CurrentZone.AmbientZone.ZoneWaterCalculation != vec)
{
CurrentZone.AmbientZone.ZoneWaterCalculation = (byte)vec;
ProjectItemChanged();
}
}
private void PositioningSizeTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text);
if (CurrentZone.AmbientZone.PositioningZoneSize != vec)
{
CurrentZone.AmbientZone.PositioningZoneSize = vec;
ProjectItemChanged();
}
}
private void PositioningRotationAngleTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
uint ang = 0;
if (uint.TryParse(PositioningRotationAngleTextBox.Text, out ang))
{
if (CurrentZone.AmbientZone.PositioningZoneRotationAngle != ang)
{
CurrentZone.AmbientZone.PositioningZoneRotationAngle = (ushort)ang;
ProjectItemChanged();
}
}
}
private void PositioningRotationOffsetTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(PositioningRotationOffsetTextBox.Text);
if (CurrentZone.AmbientZone.PositioningZonePostRotationOffset != vec)
{
CurrentZone.AmbientZone.PositioningZonePostRotationOffset = vec;
ProjectItemChanged();
}
}
private void PositioningSizeScaleTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(PositioningSizeTextBox.Text);
if (CurrentZone.AmbientZone.PositioningZoneSizeScale != vec)
{
CurrentZone.AmbientZone.PositioningZoneSizeScale = vec;
ProjectItemChanged();
}
}
private void ActivationSizeTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(ActivationSizeTextBox.Text);
if (CurrentZone.AmbientZone.ActivationZoneSize != vec)
{
CurrentZone.AmbientZone.ActivationZoneSize = vec;
ProjectItemChanged();
}
}
private void ActivationRotationOffsetTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(ActivationRotationOffsetTextBox.Text);
if (CurrentZone.AmbientZone.ActivationZonePostRotationOffset != vec)
{
CurrentZone.AmbientZone.ActivationZonePostRotationOffset = vec;
ProjectItemChanged();
}
}
private void ActivationSizeScaleTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.ParseVector3String(ActivationSizeScaleTextBox.Text);
if (CurrentZone.AmbientZone.ActivationZoneSizeScale != vec)
{
CurrentZone.AmbientZone.ActivationZoneSizeScale = vec;
ProjectItemChanged();
}
}
private void MinWindInfluenceTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(MinWindInfluenceTextBox.Text);
if (CurrentZone.AmbientZone.MinWindInfluence != vec)
{
CurrentZone.AmbientZone.MinWindInfluence = vec;
ProjectItemChanged();
}
}
private void MaxWindInfluenceTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(MaxWindInfluenceTextBox.Text);
if (CurrentZone.AmbientZone.MaxWindInfluence != vec)
{
CurrentZone.AmbientZone.MaxWindInfluence = vec;
ProjectItemChanged();
}
}
private void WindElevationSoundsTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AmbientZone == null) return;
var vec = FloatUtil.Parse(WindElevationSoundsTextBox.Text);
if (CurrentZone.AmbientZone.WindElevationSounds != vec)
{
CurrentZone.AmbientZone.WindElevationSounds = (uint)vec;
ProjectItemChanged();
}
}
private void RulesTextBox_Enter(object sender, EventArgs e)
{
if (RulesTextBox.Text.Length == 0) return;
SelectRuleButton.Enabled = true;
}
private void SelectRuleButton_Click(object sender, EventArgs e)
{
var txt = RulesTextBox.Text;
var start = RulesTextBox.SelectionStart;
if (txt.Length == 0) return;
if (start >= txt.Length) start = txt.Length - 1;
for (int i = start; i >= 0; i--)
{
if (txt[i] == '\n') break;
start = i;
}
var end = start;
for (int i = start; i < txt.Length; i++)
{
if ((txt[i] == '\n') || (txt[i] == '\r')) break;
end = i;
}
var str = txt.Substring(start, end - start + 1);
if (string.IsNullOrEmpty(str)) return;
uint hash;
if (!uint.TryParse(str, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(str);
}
ProjectForm?.ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(hash);
}
}
}

View File

@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label27.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -15,7 +15,7 @@ namespace CodeWalker.Project.Panels
public partial class EditAudioInteriorPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public Dat151Interior CurrentInterior { get; set; }
public Dat151InteriorSettings CurrentInterior { get; set; }
private bool populatingui = false;
@ -27,7 +27,7 @@ namespace CodeWalker.Project.Panels
}
public void SetInterior(Dat151Interior interior)
public void SetInterior(Dat151InteriorSettings interior)
{
CurrentInterior = interior;
Tag = interior;
@ -66,8 +66,8 @@ namespace CodeWalker.Project.Panels
NameTextBox.Text = ci.NameHash.ToString();
FlagsTextBox.Text = ci.Flags.Hex;
WallaTextBox.Text = ci.Walla.ToString();
TunnelTextBox.Text = ci.Tunnel.ToString();
WallaTextBox.Text = ci.InteriorWallaSoundSet.ToString();
TunnelTextBox.Text = ci.InteriorReflections.ToString();
StringBuilder sb = new StringBuilder();
if (ci.Rooms != null)
@ -150,9 +150,9 @@ namespace CodeWalker.Project.Panels
JenkIndex.Ensure(name);
}
if (CurrentInterior.Walla != hash)
if (CurrentInterior.InteriorWallaSoundSet != hash)
{
CurrentInterior.Walla = hash;
CurrentInterior.InteriorWallaSoundSet = hash;
ProjectItemChanged();
}
@ -171,9 +171,9 @@ namespace CodeWalker.Project.Panels
JenkIndex.Ensure(name);
}
if (CurrentInterior.Tunnel != hash)
if (CurrentInterior.InteriorReflections != hash)
{
CurrentInterior.Tunnel = hash;
CurrentInterior.InteriorReflections = hash;
ProjectItemChanged();
}

View File

@ -75,22 +75,22 @@ namespace CodeWalker.Project.Panels
var cr = CurrentRoom;
NameTextBox.Text = cr.NameHash.ToString();
MloRoomTextBox.Text = cr.MloRoom.ToString();
ZoneTextBox.Text = cr.Zone.ToString();
Unk02TextBox.Text = cr.Unk02.ToString();
Unk03TextBox.Text = FloatUtil.ToString(cr.Unk03);
ReverbTextBox.Text = FloatUtil.ToString(cr.Reverb);
EchoTextBox.Text = FloatUtil.ToString(cr.Echo);
SoundTextBox.Text = cr.Sound.ToString();
Unk07TextBox.Text = FloatUtil.ToString(cr.Unk07);
Unk08TextBox.Text = FloatUtil.ToString(cr.Unk08);
Unk09TextBox.Text = FloatUtil.ToString(cr.Unk09);
Unk10TextBox.Text = FloatUtil.ToString(cr.Unk10);
Unk11TextBox.Text = FloatUtil.ToString(cr.Unk11);
Unk12TextBox.Text = FloatUtil.ToString(cr.Unk12);
Unk13TextBox.Text = cr.Unk13.ToString();
SoundSetTextBox.Text = cr.SoundSet.ToString();
Flags0TextBox.Text = cr.Flags0.Hex;
MloRoomTextBox.Text = cr.RoomName.ToString();
ZoneTextBox.Text = cr.AmbientZone.ToString();
Unk02TextBox.Text = cr.InteriorType.ToString();
Unk03TextBox.Text = FloatUtil.ToString(cr.ReverbSmall);
ReverbTextBox.Text = FloatUtil.ToString(cr.ReverbMedium);
EchoTextBox.Text = FloatUtil.ToString(cr.ReverbLarge);
SoundTextBox.Text = cr.RoomToneSound.ToString();
Unk07TextBox.Text = FloatUtil.ToString(cr.RainType);
Unk08TextBox.Text = FloatUtil.ToString(cr.ExteriorAudibility);
Unk09TextBox.Text = FloatUtil.ToString(cr.RoomOcclusionDamping);
Unk10TextBox.Text = FloatUtil.ToString(cr.NonMarkedPortalOcclusion);
Unk11TextBox.Text = FloatUtil.ToString(cr.DistanceFromPortalForOcclusion);
Unk12TextBox.Text = FloatUtil.ToString(cr.DistanceFromPortalFadeDistance);
Unk13TextBox.Text = cr.WeaponMetrics.ToString();
SoundSetTextBox.Text = cr.InteriorWallaSoundSet.ToString();
Flags0TextBox.Text = cr.Flags.Hex;
populatingui = false;
@ -144,9 +144,9 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentRoom.MloRoom != hash)
if (CurrentRoom.RoomName != hash)
{
CurrentRoom.MloRoom = hash;
CurrentRoom.RoomName = hash;
ProjectItemChanged();
}
@ -166,9 +166,9 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentRoom.Zone != hash)
if (CurrentRoom.AmbientZone != hash)
{
CurrentRoom.Zone = hash;
CurrentRoom.AmbientZone = hash;
ProjectItemChanged();
}
@ -182,9 +182,9 @@ namespace CodeWalker.Project.Panels
uint val = 0;
if (uint.TryParse(Unk02TextBox.Text, out val))
{
if (CurrentRoom.Unk02 != val)
if (CurrentRoom.InteriorType != val)
{
CurrentRoom.Unk02 = val;
CurrentRoom.InteriorType = (byte)val;
ProjectItemChanged();
}
@ -199,9 +199,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk03TextBox.Text, out val))
{
if (CurrentRoom.Unk03 != val)
if (CurrentRoom.ReverbSmall != val)
{
CurrentRoom.Unk03 = val;
CurrentRoom.ReverbSmall = val;
ProjectItemChanged();
}
@ -216,9 +216,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(ReverbTextBox.Text, out val))
{
if (CurrentRoom.Reverb != val)
if (CurrentRoom.ReverbMedium != val)
{
CurrentRoom.Reverb = val;
CurrentRoom.ReverbMedium = val;
ProjectItemChanged();
}
@ -233,9 +233,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(EchoTextBox.Text, out val))
{
if (CurrentRoom.Echo != val)
if (CurrentRoom.ReverbLarge != val)
{
CurrentRoom.Echo = val;
CurrentRoom.ReverbLarge = val;
ProjectItemChanged();
}
@ -256,9 +256,9 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentRoom.Sound != hash)
if (CurrentRoom.RoomToneSound != hash)
{
CurrentRoom.Sound = hash;
CurrentRoom.RoomToneSound = hash;
ProjectItemChanged();
}
@ -272,9 +272,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk07TextBox.Text, out val))
{
if (CurrentRoom.Unk07 != val)
if (CurrentRoom.RainType != val)
{
CurrentRoom.Unk07 = val;
CurrentRoom.RainType = (byte)val;
ProjectItemChanged();
}
@ -289,9 +289,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk08TextBox.Text, out val))
{
if (CurrentRoom.Unk08 != val)
if (CurrentRoom.ExteriorAudibility != val)
{
CurrentRoom.Unk08 = val;
CurrentRoom.ExteriorAudibility = val;
ProjectItemChanged();
}
@ -306,9 +306,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk09TextBox.Text, out val))
{
if (CurrentRoom.Unk09 != val)
if (CurrentRoom.RoomOcclusionDamping != val)
{
CurrentRoom.Unk09 = val;
CurrentRoom.RoomOcclusionDamping = val;
ProjectItemChanged();
}
@ -323,9 +323,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk10TextBox.Text, out val))
{
if (CurrentRoom.Unk10 != val)
if (CurrentRoom.NonMarkedPortalOcclusion != val)
{
CurrentRoom.Unk10 = val;
CurrentRoom.NonMarkedPortalOcclusion = val;
ProjectItemChanged();
}
@ -340,9 +340,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk11TextBox.Text, out val))
{
if (CurrentRoom.Unk11 != val)
if (CurrentRoom.DistanceFromPortalForOcclusion != val)
{
CurrentRoom.Unk11 = val;
CurrentRoom.DistanceFromPortalForOcclusion = val;
ProjectItemChanged();
}
@ -357,9 +357,9 @@ namespace CodeWalker.Project.Panels
float val = 0;
if (FloatUtil.TryParse(Unk12TextBox.Text, out val))
{
if (CurrentRoom.Unk12 != val)
if (CurrentRoom.DistanceFromPortalFadeDistance != val)
{
CurrentRoom.Unk12 = val;
CurrentRoom.DistanceFromPortalFadeDistance = val;
ProjectItemChanged();
}
@ -380,9 +380,9 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentRoom.Unk13 != hash)
if (CurrentRoom.WeaponMetrics != hash)
{
CurrentRoom.Unk13 = hash;
CurrentRoom.WeaponMetrics = hash;
ProjectItemChanged();
}
@ -402,9 +402,9 @@ namespace CodeWalker.Project.Panels
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentRoom.SoundSet != hash)
if (CurrentRoom.InteriorWallaSoundSet != hash)
{
CurrentRoom.SoundSet = hash;
CurrentRoom.InteriorWallaSoundSet = hash;
ProjectItemChanged();
}
@ -418,9 +418,9 @@ namespace CodeWalker.Project.Panels
uint flags = 0;
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentRoom.Flags0 != flags)
if (CurrentRoom.Flags != flags)
{
CurrentRoom.Flags0 = flags;
CurrentRoom.Flags = flags;
ProjectItemChanged();
}

View File

@ -1,6 +1,6 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioEmitterListPanel
partial class EditAudioStaticEmitterListPanel
{
/// <summary>
/// Required designer variable.
@ -28,14 +28,14 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioEmitterListPanel));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioStaticEmitterListPanel));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.DeleteButton = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
this.NameTextBox = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix();
this.DeleteButton = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
@ -64,9 +64,20 @@
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(551, 420);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Ambient Emitter List";
this.tabPage1.Text = "Static Emitter List";
this.tabPage1.UseVisualStyleBackColor = true;
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(438, 381);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 76;
this.DeleteButton.Text = "Delete list";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// label12
//
this.label12.AutoSize = true;
@ -109,26 +120,15 @@
this.HashesTextBox.WordWrap = false;
this.HashesTextBox.TextChanged += new System.EventHandler(this.HashesTextBox_TextChanged);
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(438, 381);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 76;
this.DeleteButton.Text = "Delete list";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// EditAudioEmitterListPanel
// EditAudioStaticEmitterListPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 450);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioEmitterListPanel";
this.Text = "Edit Audio Emitter List";
this.Name = "EditAudioStaticEmitterListPanel";
this.Text = "Edit Audio Static Emitter List";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();

View File

@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace CodeWalker.Project.Panels
{
public partial class EditAudioEmitterListPanel : ProjectPanel
public partial class EditAudioStaticEmitterListPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public Dat151StaticEmitterList CurrentEmitterList { get; set; }
@ -19,7 +19,7 @@ namespace CodeWalker.Project.Panels
private bool populatingui = false;
public EditAudioEmitterListPanel(ProjectForm owner)
public EditAudioStaticEmitterListPanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
@ -144,7 +144,7 @@ namespace CodeWalker.Project.Panels
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentEmitterList);
ProjectForm.DeleteAudioEmitterList();
ProjectForm.DeleteAudioStaticEmitterList();
}
}
}

View File

@ -0,0 +1,883 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioStaticEmitterPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditAudioStaticEmitterPanel));
this.GoToButton = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label28 = new System.Windows.Forms.Label();
this.UndamagedHealthTextBox = new System.Windows.Forms.TextBox();
this.label27 = new System.Windows.Forms.Label();
this.BrokenHealthTextBox = new System.Windows.Forms.TextBox();
this.LargeReverbUpDown = new System.Windows.Forms.NumericUpDown();
this.label26 = new System.Windows.Forms.Label();
this.MediumReverbUpDown = new System.Windows.Forms.NumericUpDown();
this.label25 = new System.Windows.Forms.Label();
this.SmallReverbUpDown = new System.Windows.Forms.NumericUpDown();
this.label24 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.MaxLeakageTextBox = new System.Windows.Forms.TextBox();
this.MaxLeakageDistUpDown = new System.Windows.Forms.NumericUpDown();
this.label22 = new System.Windows.Forms.Label();
this.MinLeakageDistUpDown = new System.Windows.Forms.NumericUpDown();
this.label20 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.OnBreakTextBox = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.AlarmTextBox = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.RoomTextBox = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.InteriorTextBox = new System.Windows.Forms.TextBox();
this.RolloffFactorUpDown = new System.Windows.Forms.NumericUpDown();
this.label13 = new System.Windows.Forms.Label();
this.HPFCutoffUpDown = new System.Windows.Forms.NumericUpDown();
this.label11 = new System.Windows.Forms.Label();
this.LPFCutoffUpDown = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.VolumeTextBox = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.MaxPathDepthUpDown = new System.Windows.Forms.NumericUpDown();
this.EndTimeUpDown = new System.Windows.Forms.NumericUpDown();
this.StartTimeUpDown = new System.Windows.Forms.NumericUpDown();
this.DeleteButton = new System.Windows.Forms.Button();
this.AddToProjectButton = new System.Windows.Forms.Button();
this.label21 = new System.Windows.Forms.Label();
this.FlagsTextBox = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.NameTextBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.OuterRadiusTextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.RadioScoreTextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.RadioStationTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.ChildSoundTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.InnerRadiusTextBox = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.PositionTextBox = new System.Windows.Forms.TextBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LargeReverbUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MediumReverbUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SmallReverbUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MaxLeakageDistUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MinLeakageDistUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RolloffFactorUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.HPFCutoffUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LPFCutoffUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MaxPathDepthUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).BeginInit();
this.SuspendLayout();
//
// GoToButton
//
this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.GoToButton.Location = new System.Drawing.Point(483, 0);
this.GoToButton.Name = "GoToButton";
this.GoToButton.Size = new System.Drawing.Size(68, 23);
this.GoToButton.TabIndex = 1;
this.GoToButton.Text = "Go to";
this.GoToButton.UseVisualStyleBackColor = true;
this.GoToButton.Click += new System.EventHandler(this.GoToButton_Click);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(2, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(559, 447);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label28);
this.tabPage1.Controls.Add(this.UndamagedHealthTextBox);
this.tabPage1.Controls.Add(this.label27);
this.tabPage1.Controls.Add(this.BrokenHealthTextBox);
this.tabPage1.Controls.Add(this.LargeReverbUpDown);
this.tabPage1.Controls.Add(this.label26);
this.tabPage1.Controls.Add(this.MediumReverbUpDown);
this.tabPage1.Controls.Add(this.label25);
this.tabPage1.Controls.Add(this.SmallReverbUpDown);
this.tabPage1.Controls.Add(this.label24);
this.tabPage1.Controls.Add(this.label23);
this.tabPage1.Controls.Add(this.MaxLeakageTextBox);
this.tabPage1.Controls.Add(this.MaxLeakageDistUpDown);
this.tabPage1.Controls.Add(this.label22);
this.tabPage1.Controls.Add(this.MinLeakageDistUpDown);
this.tabPage1.Controls.Add(this.label20);
this.tabPage1.Controls.Add(this.label19);
this.tabPage1.Controls.Add(this.OnBreakTextBox);
this.tabPage1.Controls.Add(this.label17);
this.tabPage1.Controls.Add(this.AlarmTextBox);
this.tabPage1.Controls.Add(this.label15);
this.tabPage1.Controls.Add(this.RoomTextBox);
this.tabPage1.Controls.Add(this.label14);
this.tabPage1.Controls.Add(this.InteriorTextBox);
this.tabPage1.Controls.Add(this.RolloffFactorUpDown);
this.tabPage1.Controls.Add(this.label13);
this.tabPage1.Controls.Add(this.HPFCutoffUpDown);
this.tabPage1.Controls.Add(this.label11);
this.tabPage1.Controls.Add(this.LPFCutoffUpDown);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.label5);
this.tabPage1.Controls.Add(this.VolumeTextBox);
this.tabPage1.Controls.Add(this.label9);
this.tabPage1.Controls.Add(this.label8);
this.tabPage1.Controls.Add(this.MaxPathDepthUpDown);
this.tabPage1.Controls.Add(this.EndTimeUpDown);
this.tabPage1.Controls.Add(this.StartTimeUpDown);
this.tabPage1.Controls.Add(this.DeleteButton);
this.tabPage1.Controls.Add(this.AddToProjectButton);
this.tabPage1.Controls.Add(this.label21);
this.tabPage1.Controls.Add(this.FlagsTextBox);
this.tabPage1.Controls.Add(this.label18);
this.tabPage1.Controls.Add(this.label12);
this.tabPage1.Controls.Add(this.NameTextBox);
this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.label10);
this.tabPage1.Controls.Add(this.OuterRadiusTextBox);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.RadioScoreTextBox);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.RadioStationTextBox);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.ChildSoundTextBox);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.InnerRadiusTextBox);
this.tabPage1.Controls.Add(this.label16);
this.tabPage1.Controls.Add(this.PositionTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(551, 421);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Static Emitter";
this.tabPage1.UseVisualStyleBackColor = true;
//
// label28
//
this.label28.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(336, 335);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(100, 13);
this.label28.TabIndex = 82;
this.label28.Text = "Undamaged health:";
//
// UndamagedHealthTextBox
//
this.UndamagedHealthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.UndamagedHealthTextBox.Location = new System.Drawing.Point(442, 332);
this.UndamagedHealthTextBox.Name = "UndamagedHealthTextBox";
this.UndamagedHealthTextBox.Size = new System.Drawing.Size(102, 20);
this.UndamagedHealthTextBox.TabIndex = 83;
this.UndamagedHealthTextBox.TextChanged += new System.EventHandler(this.UndamagedHealthTextBox_TextChanged);
//
// label27
//
this.label27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(360, 310);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(76, 13);
this.label27.TabIndex = 80;
this.label27.Text = "Broken health:";
//
// BrokenHealthTextBox
//
this.BrokenHealthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BrokenHealthTextBox.Location = new System.Drawing.Point(442, 307);
this.BrokenHealthTextBox.Name = "BrokenHealthTextBox";
this.BrokenHealthTextBox.Size = new System.Drawing.Size(102, 20);
this.BrokenHealthTextBox.TabIndex = 81;
this.BrokenHealthTextBox.TextChanged += new System.EventHandler(this.BrokenHealthTextBox_TextChanged);
//
// LargeReverbUpDown
//
this.LargeReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.LargeReverbUpDown.Location = new System.Drawing.Point(442, 281);
this.LargeReverbUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.LargeReverbUpDown.Name = "LargeReverbUpDown";
this.LargeReverbUpDown.Size = new System.Drawing.Size(48, 20);
this.LargeReverbUpDown.TabIndex = 79;
this.LargeReverbUpDown.ValueChanged += new System.EventHandler(this.LargeReverbUpDown_ValueChanged);
//
// label26
//
this.label26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(340, 283);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(96, 13);
this.label26.TabIndex = 78;
this.label26.Text = "Large reverb send:";
//
// MediumReverbUpDown
//
this.MediumReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.MediumReverbUpDown.Location = new System.Drawing.Point(442, 255);
this.MediumReverbUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.MediumReverbUpDown.Name = "MediumReverbUpDown";
this.MediumReverbUpDown.Size = new System.Drawing.Size(48, 20);
this.MediumReverbUpDown.TabIndex = 77;
this.MediumReverbUpDown.ValueChanged += new System.EventHandler(this.MediumReverbUpDown_ValueChanged);
//
// 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(331, 257);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(106, 13);
this.label25.TabIndex = 76;
this.label25.Text = "Medium reverb send:";
//
// SmallReverbUpDown
//
this.SmallReverbUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.SmallReverbUpDown.Location = new System.Drawing.Point(442, 229);
this.SmallReverbUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.SmallReverbUpDown.Name = "SmallReverbUpDown";
this.SmallReverbUpDown.Size = new System.Drawing.Size(48, 20);
this.SmallReverbUpDown.TabIndex = 75;
this.SmallReverbUpDown.ValueChanged += new System.EventHandler(this.SmallReverbUpDown_ValueChanged);
//
// 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, 231);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(94, 13);
this.label24.TabIndex = 74;
this.label24.Text = "Small reverb send:";
//
// label23
//
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(365, 130);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(71, 13);
this.label23.TabIndex = 66;
this.label23.Text = "Max leakage:";
//
// MaxLeakageTextBox
//
this.MaxLeakageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.MaxLeakageTextBox.Location = new System.Drawing.Point(442, 127);
this.MaxLeakageTextBox.Name = "MaxLeakageTextBox";
this.MaxLeakageTextBox.Size = new System.Drawing.Size(102, 20);
this.MaxLeakageTextBox.TabIndex = 67;
this.MaxLeakageTextBox.TextChanged += new System.EventHandler(this.MaxLeakageTextBox_TextChanged);
//
// MaxLeakageDistUpDown
//
this.MaxLeakageDistUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.MaxLeakageDistUpDown.Location = new System.Drawing.Point(442, 179);
this.MaxLeakageDistUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.MaxLeakageDistUpDown.Name = "MaxLeakageDistUpDown";
this.MaxLeakageDistUpDown.Size = new System.Drawing.Size(102, 20);
this.MaxLeakageDistUpDown.TabIndex = 71;
this.MaxLeakageDistUpDown.ValueChanged += new System.EventHandler(this.MaxLeakageDistUpDown_ValueChanged);
//
// 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(348, 181);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(90, 13);
this.label22.TabIndex = 70;
this.label22.Text = "Max leakage dist:";
//
// MinLeakageDistUpDown
//
this.MinLeakageDistUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.MinLeakageDistUpDown.Location = new System.Drawing.Point(442, 153);
this.MinLeakageDistUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.MinLeakageDistUpDown.Name = "MinLeakageDistUpDown";
this.MinLeakageDistUpDown.Size = new System.Drawing.Size(102, 20);
this.MinLeakageDistUpDown.TabIndex = 69;
this.MinLeakageDistUpDown.ValueChanged += new System.EventHandler(this.MinLeakageDistUpDown_ValueChanged);
//
// label20
//
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(349, 155);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(87, 13);
this.label20.TabIndex = 68;
this.label20.Text = "Min leakage dist:";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(7, 258);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(54, 13);
this.label19.TabIndex = 49;
this.label19.Text = "On break:";
//
// OnBreakTextBox
//
this.OnBreakTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.OnBreakTextBox.Location = new System.Drawing.Point(84, 255);
this.OnBreakTextBox.Name = "OnBreakTextBox";
this.OnBreakTextBox.Size = new System.Drawing.Size(237, 20);
this.OnBreakTextBox.TabIndex = 50;
this.OnBreakTextBox.TextChanged += new System.EventHandler(this.OnBreakTextBox_TextChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(7, 232);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(36, 13);
this.label17.TabIndex = 47;
this.label17.Text = "Alarm:";
//
// AlarmTextBox
//
this.AlarmTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AlarmTextBox.Location = new System.Drawing.Point(84, 229);
this.AlarmTextBox.Name = "AlarmTextBox";
this.AlarmTextBox.Size = new System.Drawing.Size(237, 20);
this.AlarmTextBox.TabIndex = 48;
this.AlarmTextBox.TextChanged += new System.EventHandler(this.AlarmTextBox_TextChanged);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(7, 206);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(68, 13);
this.label15.TabIndex = 45;
this.label15.Text = "Interior room:";
//
// RoomTextBox
//
this.RoomTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RoomTextBox.Location = new System.Drawing.Point(84, 203);
this.RoomTextBox.Name = "RoomTextBox";
this.RoomTextBox.Size = new System.Drawing.Size(237, 20);
this.RoomTextBox.TabIndex = 46;
this.RoomTextBox.TextChanged += new System.EventHandler(this.RoomTextBox_TextChanged);
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(7, 180);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(42, 13);
this.label14.TabIndex = 43;
this.label14.Text = "Interior:";
//
// InteriorTextBox
//
this.InteriorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.InteriorTextBox.Location = new System.Drawing.Point(84, 177);
this.InteriorTextBox.Name = "InteriorTextBox";
this.InteriorTextBox.Size = new System.Drawing.Size(237, 20);
this.InteriorTextBox.TabIndex = 44;
this.InteriorTextBox.TextChanged += new System.EventHandler(this.InteriorTextBox_TextChanged);
//
// RolloffFactorUpDown
//
this.RolloffFactorUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.RolloffFactorUpDown.Location = new System.Drawing.Point(442, 103);
this.RolloffFactorUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.RolloffFactorUpDown.Name = "RolloffFactorUpDown";
this.RolloffFactorUpDown.Size = new System.Drawing.Size(102, 20);
this.RolloffFactorUpDown.TabIndex = 65;
this.RolloffFactorUpDown.ValueChanged += new System.EventHandler(this.RolloffFactorUpDown_ValueChanged);
//
// 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(365, 106);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(70, 13);
this.label13.TabIndex = 64;
this.label13.Text = "Rolloff factor:";
//
// HPFCutoffUpDown
//
this.HPFCutoffUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.HPFCutoffUpDown.Location = new System.Drawing.Point(442, 79);
this.HPFCutoffUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.HPFCutoffUpDown.Name = "HPFCutoffUpDown";
this.HPFCutoffUpDown.Size = new System.Drawing.Size(102, 20);
this.HPFCutoffUpDown.TabIndex = 63;
this.HPFCutoffUpDown.ValueChanged += new System.EventHandler(this.HPFCutoffUpDown_ValueChanged);
//
// label11
//
this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(365, 82);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(62, 13);
this.label11.TabIndex = 62;
this.label11.Text = "HPF Cutoff:";
//
// LPFCutoffUpDown
//
this.LPFCutoffUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.LPFCutoffUpDown.Location = new System.Drawing.Point(442, 54);
this.LPFCutoffUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.LPFCutoffUpDown.Name = "LPFCutoffUpDown";
this.LPFCutoffUpDown.Size = new System.Drawing.Size(102, 20);
this.LPFCutoffUpDown.TabIndex = 61;
this.LPFCutoffUpDown.ValueChanged += new System.EventHandler(this.LPFCutoffUpDown_ValueChanged);
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(365, 57);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(60, 13);
this.label6.TabIndex = 60;
this.label6.Text = "LPF Cutoff:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 284);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(45, 13);
this.label5.TabIndex = 51;
this.label5.Text = "Volume:";
//
// VolumeTextBox
//
this.VolumeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.VolumeTextBox.Location = new System.Drawing.Point(84, 281);
this.VolumeTextBox.Name = "VolumeTextBox";
this.VolumeTextBox.Size = new System.Drawing.Size(237, 20);
this.VolumeTextBox.TabIndex = 52;
this.VolumeTextBox.TextChanged += new System.EventHandler(this.VolumeTextBox_TextChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(192, 310);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(78, 13);
this.label9.TabIndex = 55;
this.label9.Text = "(game minutes)";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(7, 335);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(55, 13);
this.label8.TabIndex = 56;
this.label8.Text = "End Time:";
//
// MaxPathDepthUpDown
//
this.MaxPathDepthUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.MaxPathDepthUpDown.Location = new System.Drawing.Point(442, 203);
this.MaxPathDepthUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.MaxPathDepthUpDown.Name = "MaxPathDepthUpDown";
this.MaxPathDepthUpDown.Size = new System.Drawing.Size(48, 20);
this.MaxPathDepthUpDown.TabIndex = 73;
this.MaxPathDepthUpDown.ValueChanged += new System.EventHandler(this.MaxPathDepthUpDown_ValueChanged);
//
// EndTimeUpDown
//
this.EndTimeUpDown.Location = new System.Drawing.Point(84, 333);
this.EndTimeUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.EndTimeUpDown.Name = "EndTimeUpDown";
this.EndTimeUpDown.Size = new System.Drawing.Size(102, 20);
this.EndTimeUpDown.TabIndex = 57;
this.EndTimeUpDown.ValueChanged += new System.EventHandler(this.EndTimeUpDown_ValueChanged);
//
// StartTimeUpDown
//
this.StartTimeUpDown.Location = new System.Drawing.Point(84, 307);
this.StartTimeUpDown.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.StartTimeUpDown.Name = "StartTimeUpDown";
this.StartTimeUpDown.Size = new System.Drawing.Size(102, 20);
this.StartTimeUpDown.TabIndex = 54;
this.StartTimeUpDown.ValueChanged += new System.EventHandler(this.StartTimeUpDown_ValueChanged);
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(343, 3);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 85;
this.DeleteButton.Text = "Delete emitter";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// AddToProjectButton
//
this.AddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.AddToProjectButton.Location = new System.Drawing.Point(452, 3);
this.AddToProjectButton.Name = "AddToProjectButton";
this.AddToProjectButton.Size = new System.Drawing.Size(93, 23);
this.AddToProjectButton.TabIndex = 84;
this.AddToProjectButton.Text = "Add to project";
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// label21
//
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(339, 33);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(35, 13);
this.label21.TabIndex = 58;
this.label21.Text = "Flags:";
//
// FlagsTextBox
//
this.FlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.FlagsTextBox.Location = new System.Drawing.Point(389, 30);
this.FlagsTextBox.Name = "FlagsTextBox";
this.FlagsTextBox.Size = new System.Drawing.Size(155, 20);
this.FlagsTextBox.TabIndex = 59;
this.FlagsTextBox.TextChanged += new System.EventHandler(this.FlagsTextBox_TextChanged);
//
// label18
//
this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(348, 205);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(87, 13);
this.label18.TabIndex = 72;
this.label18.Text = "Max Path Depth:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(7, 9);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(64, 13);
this.label12.TabIndex = 29;
this.label12.Text = "Name hash:";
//
// NameTextBox
//
this.NameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.NameTextBox.Location = new System.Drawing.Point(84, 6);
this.NameTextBox.Name = "NameTextBox";
this.NameTextBox.Size = new System.Drawing.Size(237, 20);
this.NameTextBox.TabIndex = 30;
this.NameTextBox.TextChanged += new System.EventHandler(this.NameTextBox_TextChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(7, 310);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(58, 13);
this.label7.TabIndex = 53;
this.label7.Text = "Start Time:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(7, 81);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(67, 13);
this.label10.TabIndex = 35;
this.label10.Text = "Outer radius:";
//
// OuterRadiusTextBox
//
this.OuterRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.OuterRadiusTextBox.Location = new System.Drawing.Point(84, 78);
this.OuterRadiusTextBox.Name = "OuterRadiusTextBox";
this.OuterRadiusTextBox.Size = new System.Drawing.Size(237, 20);
this.OuterRadiusTextBox.TabIndex = 36;
this.OuterRadiusTextBox.TextChanged += new System.EventHandler(this.OuterRadiusTextBox_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(67, 13);
this.label4.TabIndex = 41;
this.label4.Text = "Radio score:";
//
// RadioScoreTextBox
//
this.RadioScoreTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RadioScoreTextBox.Location = new System.Drawing.Point(84, 151);
this.RadioScoreTextBox.Name = "RadioScoreTextBox";
this.RadioScoreTextBox.Size = new System.Drawing.Size(237, 20);
this.RadioScoreTextBox.TabIndex = 42;
this.RadioScoreTextBox.TextChanged += new System.EventHandler(this.RadioScoreTextBox_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(72, 13);
this.label3.TabIndex = 39;
this.label3.Text = "Radio station:";
//
// RadioStationTextBox
//
this.RadioStationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RadioStationTextBox.Location = new System.Drawing.Point(84, 127);
this.RadioStationTextBox.Name = "RadioStationTextBox";
this.RadioStationTextBox.Size = new System.Drawing.Size(237, 20);
this.RadioStationTextBox.TabIndex = 40;
this.RadioStationTextBox.TextChanged += new System.EventHandler(this.RadioStationTextBox_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(67, 13);
this.label2.TabIndex = 37;
this.label2.Text = "Child Sound:";
//
// ChildSoundTextBox
//
this.ChildSoundTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ChildSoundTextBox.Location = new System.Drawing.Point(84, 103);
this.ChildSoundTextBox.Name = "ChildSoundTextBox";
this.ChildSoundTextBox.Size = new System.Drawing.Size(237, 20);
this.ChildSoundTextBox.TabIndex = 38;
this.ChildSoundTextBox.TextChanged += new System.EventHandler(this.ChildSoundTextBox_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 57);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 13);
this.label1.TabIndex = 33;
this.label1.Text = "Inner radius:";
//
// InnerRadiusTextBox
//
this.InnerRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.InnerRadiusTextBox.Location = new System.Drawing.Point(84, 54);
this.InnerRadiusTextBox.Name = "InnerRadiusTextBox";
this.InnerRadiusTextBox.Size = new System.Drawing.Size(237, 20);
this.InnerRadiusTextBox.TabIndex = 34;
this.InnerRadiusTextBox.TextChanged += new System.EventHandler(this.InnerRadiusTextBox_TextChanged);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(7, 33);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(47, 13);
this.label16.TabIndex = 31;
this.label16.Text = "Position:";
//
// PositionTextBox
//
this.PositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PositionTextBox.Location = new System.Drawing.Point(84, 30);
this.PositionTextBox.Name = "PositionTextBox";
this.PositionTextBox.Size = new System.Drawing.Size(237, 20);
this.PositionTextBox.TabIndex = 32;
this.PositionTextBox.TextChanged += new System.EventHandler(this.PositionTextBox_TextChanged);
//
// EditAudioStaticEmitterPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 450);
this.Controls.Add(this.GoToButton);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioStaticEmitterPanel";
this.Text = "Edit Audio Static Emitter";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.LargeReverbUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MediumReverbUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SmallReverbUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MaxLeakageDistUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MinLeakageDistUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RolloffFactorUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.HPFCutoffUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LPFCutoffUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MaxPathDepthUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button GoToButton;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.NumericUpDown MaxPathDepthUpDown;
private System.Windows.Forms.NumericUpDown EndTimeUpDown;
private System.Windows.Forms.NumericUpDown StartTimeUpDown;
private System.Windows.Forms.Button DeleteButton;
private System.Windows.Forms.Button AddToProjectButton;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox NameTextBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox OuterRadiusTextBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox RadioScoreTextBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox RadioStationTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox ChildSoundTextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox InnerRadiusTextBox;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox PositionTextBox;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox FlagsTextBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox VolumeTextBox;
private System.Windows.Forms.NumericUpDown RolloffFactorUpDown;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.NumericUpDown HPFCutoffUpDown;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.NumericUpDown LPFCutoffUpDown;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox RoomTextBox;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox InteriorTextBox;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox OnBreakTextBox;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox AlarmTextBox;
private System.Windows.Forms.NumericUpDown MaxLeakageDistUpDown;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.NumericUpDown MinLeakageDistUpDown;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.TextBox MaxLeakageTextBox;
private System.Windows.Forms.NumericUpDown LargeReverbUpDown;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.NumericUpDown MediumReverbUpDown;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.NumericUpDown SmallReverbUpDown;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.TextBox UndamagedHealthTextBox;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.TextBox BrokenHealthTextBox;
}
}

View File

@ -0,0 +1,613 @@
using CodeWalker.GameFiles;
using CodeWalker.World;
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
{
public partial class EditAudioStaticEmitterPanel : ProjectPanel
{
public ProjectForm ProjectForm;
public AudioPlacement CurrentEmitter { get; set; }
private bool populatingui = false;
public EditAudioStaticEmitterPanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
}
public void SetEmitter(AudioPlacement emitter)
{
CurrentEmitter = emitter;
Tag = emitter;
UpdateFormTitle();
UpdateUI();
}
private void UpdateFormTitle()
{
Text = CurrentEmitter?.NameHash.ToString() ?? "";
}
private void UpdateUI()
{
if (CurrentEmitter?.StaticEmitter == null)
{
AddToProjectButton.Enabled = false;
DeleteButton.Enabled = false;
populatingui = true;
NameTextBox.Text = string.Empty;
FlagsTextBox.Text = string.Empty;
PositionTextBox.Text = string.Empty;
InnerRadiusTextBox.Text = string.Empty;
OuterRadiusTextBox.Text = string.Empty;
ChildSoundTextBox.Text = string.Empty;
RadioStationTextBox.Text = string.Empty;
RadioScoreTextBox.Text = string.Empty;
InteriorTextBox.Text = string.Empty;
RoomTextBox.Text = string.Empty;
AlarmTextBox.Text = string.Empty;
OnBreakTextBox.Text = string.Empty;
VolumeTextBox.Text = string.Empty;
StartTimeUpDown.Value = 0;
EndTimeUpDown.Value = 0;
LPFCutoffUpDown.Value = 0;
HPFCutoffUpDown.Value = 0;
RolloffFactorUpDown.Value = 0;
MaxLeakageTextBox.Text = string.Empty;
MinLeakageDistUpDown.Value = 0;
MaxLeakageDistUpDown.Value = 0;
MaxPathDepthUpDown.Value = 0;
SmallReverbUpDown.Value = 0;
MediumReverbUpDown.Value = 0;
LargeReverbUpDown.Value = 0;
BrokenHealthTextBox.Text = string.Empty;
UndamagedHealthTextBox.Text = string.Empty;
populatingui = false;
}
else
{
AddToProjectButton.Enabled = CurrentEmitter?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentEmitter.RelFile) : false;
DeleteButton.Enabled = !AddToProjectButton.Enabled;
populatingui = true;
var e = CurrentEmitter.StaticEmitter;
NameTextBox.Text = e.NameHash.ToString();
FlagsTextBox.Text = e.Flags.Hex;
PositionTextBox.Text = FloatUtil.GetVector3String(e.Position);
InnerRadiusTextBox.Text = FloatUtil.ToString(e.MinDistance);
OuterRadiusTextBox.Text = FloatUtil.ToString(e.MaxDistance);
ChildSoundTextBox.Text = e.ChildSound.ToString();
RadioStationTextBox.Text = e.RadioStation.ToString();
RadioScoreTextBox.Text = e.RadioStationForScore.ToString();
InteriorTextBox.Text = e.Interior.ToString();
RoomTextBox.Text = e.Room.ToString();
AlarmTextBox.Text = e.Alarm.ToString();
OnBreakTextBox.Text = e.OnBreakOneShot.ToString();
VolumeTextBox.Text = e.EmittedVolume.ToString();
StartTimeUpDown.Value = e.MinTimeMinutes;
EndTimeUpDown.Value = e.MaxTimeMinutes;
LPFCutoffUpDown.Value = e.LPFCutoff;
HPFCutoffUpDown.Value = e.HPFCutoff;
RolloffFactorUpDown.Value = e.RolloffFactor;
MaxLeakageTextBox.Text = FloatUtil.ToString(e.MaxLeakage);
MinLeakageDistUpDown.Value = e.MinLeakageDistance;
MaxLeakageDistUpDown.Value = e.MaxLeakageDistance;
MaxPathDepthUpDown.Value = e.MaxPathDepth;
SmallReverbUpDown.Value = e.SmallReverbSend;
MediumReverbUpDown.Value = e.MediumReverbSend;
LargeReverbUpDown.Value = e.LargeReverbSend;
BrokenHealthTextBox.Text = FloatUtil.ToString(e.BrokenHealth);
UndamagedHealthTextBox.Text = FloatUtil.ToString(e.UndamagedHealth);
populatingui = false;
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SelectObject(CurrentEmitter);
}
}
}
private void ProjectItemChanged()
{
CurrentEmitter?.UpdateFromStaticEmitter();//also update the placement wrapper
if (CurrentEmitter?.RelFile != null)
{
ProjectForm.SetAudioFileHasChanged(true);
}
}
private void NameTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = NameTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.NameHash != hash)
{
CurrentEmitter.StaticEmitter.Name = NameTextBox.Text;
CurrentEmitter.StaticEmitter.NameHash = hash;
ProjectItemChanged();
UpdateFormTitle();
}
}
private void PositionTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var vec = FloatUtil.ParseVector3String(PositionTextBox.Text);
if (CurrentEmitter.StaticEmitter.Position != vec)
{
CurrentEmitter.StaticEmitter.Position = vec;
ProjectItemChanged();
//var wf = ProjectForm.WorldForm;
//if (wf != null)
//{
// wf.BeginInvoke(new Action(() =>
// {
// wf.SetWidgetPosition(CurrentEmitter.Position, true);
// }));
//}
}
}
private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
float rad = FloatUtil.Parse(InnerRadiusTextBox.Text);
if (CurrentEmitter.StaticEmitter.MinDistance != rad)
{
CurrentEmitter.StaticEmitter.MinDistance = rad;
ProjectItemChanged();
}
}
private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
float rad = FloatUtil.Parse(OuterRadiusTextBox.Text);
if (CurrentEmitter.StaticEmitter.MaxDistance != rad)
{
CurrentEmitter.StaticEmitter.MaxDistance = rad;
ProjectItemChanged();
}
}
private void ChildSoundTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = ChildSoundTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.ChildSound != hash)
{
CurrentEmitter.StaticEmitter.ChildSound = hash;
ProjectItemChanged();
}
}
private void RadioStationTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = RadioStationTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.RadioStation != hash)
{
CurrentEmitter.StaticEmitter.RadioStation = hash;
ProjectItemChanged();
}
}
private void RadioScoreTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = RadioScoreTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.RadioStationForScore != hash)
{
CurrentEmitter.StaticEmitter.RadioStationForScore = hash;
ProjectItemChanged();
}
}
private void InteriorTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = InteriorTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.Interior != hash)
{
CurrentEmitter.StaticEmitter.Interior = hash;
ProjectItemChanged();
}
}
private void RoomTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = RoomTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.Room != hash)
{
CurrentEmitter.StaticEmitter.Room = hash;
ProjectItemChanged();
}
}
private void AlarmTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = AlarmTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.Alarm != hash)
{
CurrentEmitter.StaticEmitter.Alarm = hash;
ProjectItemChanged();
}
}
private void OnBreakTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint hash = 0;
string name = OnBreakTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//HashLabel.Text = "Hash: " + hash.ToString();
if (CurrentEmitter.StaticEmitter.OnBreakOneShot != hash)
{
CurrentEmitter.StaticEmitter.OnBreakOneShot = hash;
ProjectItemChanged();
}
}
private void VolumeTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
int.TryParse(VolumeTextBox.Text, out var val);
if (CurrentEmitter.StaticEmitter.EmittedVolume != val)
{
CurrentEmitter.StaticEmitter.EmittedVolume = val;
ProjectItemChanged();
}
}
private void StartTimeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)StartTimeUpDown.Value;
if (CurrentEmitter.StaticEmitter.MinTimeMinutes != val)
{
CurrentEmitter.StaticEmitter.MinTimeMinutes = val;
ProjectItemChanged();
}
}
private void EndTimeUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)EndTimeUpDown.Value;
if (CurrentEmitter.StaticEmitter.MaxTimeMinutes != val)
{
CurrentEmitter.StaticEmitter.MaxTimeMinutes = val;
ProjectItemChanged();
}
}
private void FlagsTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
uint flags = 0;
if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentEmitter.StaticEmitter.Flags != flags)
{
CurrentEmitter.StaticEmitter.Flags = flags;
ProjectItemChanged();
}
}
}
private void LPFCutoffUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)LPFCutoffUpDown.Value;
if (CurrentEmitter.StaticEmitter.LPFCutoff != val)
{
CurrentEmitter.StaticEmitter.LPFCutoff = val;
ProjectItemChanged();
}
}
private void HPFCutoffUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)HPFCutoffUpDown.Value;
if (CurrentEmitter.StaticEmitter.HPFCutoff != val)
{
CurrentEmitter.StaticEmitter.HPFCutoff = val;
ProjectItemChanged();
}
}
private void RolloffFactorUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)RolloffFactorUpDown.Value;
if (CurrentEmitter.StaticEmitter.RolloffFactor != val)
{
CurrentEmitter.StaticEmitter.RolloffFactor = val;
ProjectItemChanged();
}
}
private void MaxLeakageTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = FloatUtil.Parse(MaxLeakageTextBox.Text);
if (CurrentEmitter.StaticEmitter.MaxLeakage != val)
{
CurrentEmitter.StaticEmitter.MaxLeakage = val;
ProjectItemChanged();
}
}
private void MinLeakageDistUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)MinLeakageDistUpDown.Value;
if (CurrentEmitter.StaticEmitter.MinLeakageDistance != val)
{
CurrentEmitter.StaticEmitter.MinLeakageDistance = val;
ProjectItemChanged();
}
}
private void MaxLeakageDistUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (ushort)MaxLeakageDistUpDown.Value;
if (CurrentEmitter.StaticEmitter.MaxLeakageDistance != val)
{
CurrentEmitter.StaticEmitter.MaxLeakageDistance = val;
ProjectItemChanged();
}
}
private void MaxPathDepthUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (byte)MaxPathDepthUpDown.Value;
if (CurrentEmitter.StaticEmitter.MaxPathDepth != val)
{
CurrentEmitter.StaticEmitter.MaxPathDepth = val;
ProjectItemChanged();
}
}
private void SmallReverbUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (byte)SmallReverbUpDown.Value;
if (CurrentEmitter.StaticEmitter.SmallReverbSend != val)
{
CurrentEmitter.StaticEmitter.SmallReverbSend = val;
ProjectItemChanged();
}
}
private void MediumReverbUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (byte)MediumReverbUpDown.Value;
if (CurrentEmitter.StaticEmitter.MediumReverbSend != val)
{
CurrentEmitter.StaticEmitter.MediumReverbSend = val;
ProjectItemChanged();
}
}
private void LargeReverbUpDown_ValueChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = (byte)LargeReverbUpDown.Value;
if (CurrentEmitter.StaticEmitter.LargeReverbSend != val)
{
CurrentEmitter.StaticEmitter.LargeReverbSend = val;
ProjectItemChanged();
}
}
private void BrokenHealthTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = FloatUtil.Parse(BrokenHealthTextBox.Text);
if (CurrentEmitter.StaticEmitter.BrokenHealth != val)
{
CurrentEmitter.StaticEmitter.BrokenHealth = val;
ProjectItemChanged();
}
}
private void UndamagedHealthTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentEmitter?.StaticEmitter == null) return;
var val = FloatUtil.Parse(UndamagedHealthTextBox.Text);
if (CurrentEmitter.StaticEmitter.UndamagedHealth != val)
{
CurrentEmitter.StaticEmitter.UndamagedHealth = val;
ProjectItemChanged();
}
}
private void GoToButton_Click(object sender, EventArgs e)
{
if (CurrentEmitter == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, SharpDX.Vector3.One * CurrentEmitter.InnerRadius * 2.0f);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentEmitter);
ProjectForm.AddAudioFileToProject(CurrentEmitter.RelFile);
}
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentEmitter);
ProjectForm.DeleteAudioStaticEmitter();
}
}
}

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA
AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////v8/u3v+Pn6//7+////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//7+/vX3/rzA3OHl9fz9////////////////////////////////////////////////////////////
//////////////////////////////////////////////////7//+zv+3Z6qcLI5Pr7////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////7+/+br+15in6+33vf5//////////////////7+//7+////////////////////
//////////////////////////////3+//v8//v8//3+//////////////////////7+/+Ho+1dana20
4/b4//////////z9//P2/+Tp/ezw/vz9//////////////////////////////////////////7///X4
/9Pa+tPa+/H1//z9//////////////////7+/93k+SsscaSr3PX3//////7+//L1/7W98AcWgrvC8Pj6
//////////////////////////////////////////7+/+bs/xohiAEJdrvF9+7y//z9////////////
//7+/9rh+CEkapmh0/T3//////j6/9HZ/AEHcgEEb9LZ+/r7////////////////////////////////
//////////7//+/z/3F+zAAAXwQLcZai3fb4//////////////3+/97l/E9Tmaau4fT3/////+/0/1dd
sAAAV7a/8/H1//7+//////////////////////////////////////////////r8/+jv/46Y3QUUf6Ot
5PX4//////////////3+/9zj+3Z6wLe/7fX4//////D0/212xnaAzerw//z9////////////////////
//////////////////////////////////v8/+/z/+Dm+/D0//z9//////////7+//j6/9Pd+UhLjb/H
9/D0//3+//n7/+nt/+jt//n7////////////////////////////////////////////////////////
//7///7+//7+//7+//////////r8/+7z/83W+ImU2A0UdFNarr/K9env//X4//z9//3+//7/////////
//////////////////////////////////////////////////////////////////7///j6/+Pq/255
xhckjE5XsVVftUlTqwAKeTA9nr3H8+7z//v8////////////////////////////////////////////
//////////////////////////////7+//b4/9Tc+Sc0mRonj8rV/crX/ZSb48rX/brG8wwWgQAEdJei
4efu//n7//7+//z9//z9//z9//z9//3+//////////////////////////////3+//f5/+3y/+nv/+ft
/8vV+io2mImU2M7c/7vG9yIvlQAOfCg4mM3Y/s/c/4aR1AQRfGtzwtni/ebt/9vi/tri/tXd+9Tc+O3x
/vz9//////////////////////////n6/87V+FVftkRPrFlnvSEqjQoUfmJvwWFvvg0TfQQIcxEchwAD
cy89n19rvVVitQwZgwAAaiMrkT9NqTVBoiw3mhQihig1mNLX+fv8//////////////////////////b5
/52l4EFLqoCK03yF0VBctGhyw52o5GVrvQAAaneBzsHM+jA3mhYgiTtIpJOf3ouW2AAAbmh0wbbA8bS+
7qiz5pCb16+56e/z//3+//////////////////////////v8//H1/+vw/+zx/+nv/7/J9YqP3MbP/8LM
+hwqkFZftaCp5EhRrcTQ+9jj/8rW/UJMqn6J0ebt//X3//f5//b4//X3//f5//z9////////////////
//////////7+//z9//3+//////////3+/+7z/6at64iP3aWs7XN8zRIfhyUykp2o5MHM+oKM0xonjY6X
2+jv//v8//////7+//n7//b5//r7//7///////////////////7+//f5/+rw/9Pa9fL0/v7/////////
//v8//H1/+Tr/7i/91liu0NPq0VQrS06m0NNqDdCoYqU1+nv//v8//////////n7/9zi/qSt59ri/fL1
//v8//7///////z9//D0/8rT+h0sjkVQrPD0//////////////////////z9/+7z/8LL9Jqk4aGq6LW/
8c3W9+Xs/vH1//v8//////////////f5/6at5gAAbxIfh6u16+Po/fr7//////b5/6ev5gAIeAAPernC
8fX4//////////3+//v8//z9//////3+//j6//P3//P2//b4//r8//7+//7+//v8//r8//3+//////v8
/+Xr/nuIzwAAbBseg5Sb2fb5//////f5/8DF8pWe3d/n/vT3//39//////v8/+zx/87V9+3x/v3+////
//3+//j6//X4//v8//////////n7/+Dm/snR9fD0//39//z8/fv8/+3y/8LK9aGq4dfd9/n7//////z9
//b5//X4//v8//////////7+/+7z/4aP1gEPet7k/f39//////f5/83U+ZCZ2u3x/v7+//////P3/215
wgAJd7fB8/L1//7+//////3+//j6//f5//r8//7+//////////////////////////////j6/87W/AAA
X2duue3y//7+//////D0/05asBQfidzj/P39//////X4/6Su6AAAXBccgtff/vv8////////////////
//////////////////////////////////////P3/3F8xhYli9Xe/fn6/////////+3y/1pltQAJd9be
/fv8//////z9/+rw/36I0Bknjs/W+vv8////////////////////////////////////////////////
//////f5/8HI7tnf+/X4//7+/////////+/0/3R7xgAAb9ng/Pz9//////////n7/+Ln/dLY+fP2//3+
//////////////////////////////////////////////////////3+//r7//v8//7+////////////
//b4/7/F84eP0e/0//7+//////////7+//z9//v8//3+////////////////////////////////////
//////////////////////////////////////////////////z9//b5//X4//v8////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////w////4
P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA
AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA
AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v//
/////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO
6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f//
/wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA
AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc
skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU
0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq
+ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz
/eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR
p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm
+P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB
AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAABABgAAAAAAAAwAAAAAAAAAAAAAAAA
AAAAAAAA////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////v7//f7//P3//P3//P3/
/f7//v7/////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////v7//P3/
+fv/+fv/+Pr/+fv/+vv//P3//v//////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////f7/+fr/8/b/7PL/5+3/6e/+9Pf/+vv//v7/////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////P3/9/r/6O7/cXe1UVaet7z17fL/+Pr//f3/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////+/z/9Pj/4Oj/NzyCUlOd2dz/6O//9Pf//P3/////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////+vv/8vb/2+P9X2OmREGLnqPd
4+v/8vb/+/z/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////+vv/8fb/
1N35bXK1JSRtbHGz5O7/8fX/+/z/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////+vv/8PX/3Ob/U1eaDwtXjZLT4+z/8fX/+/z/////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////+vv/8fb/2eP+MjR6AAA+c3i34Or/8fX/+/z/////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////+vv/8vb/1d/7MS91AAA1UFSS4On/8vb/+/z/////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////+vv/8fb/2OL+NjZ7AAArX2Ok
4uz/8fX/+/z/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////+vv/8fb/
2eP/LjJ1DAxKfYTE4Or/8fX/+/z//////////////////////////////v7//v7//f7//f7//v7//v//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////+vv/8PX/3OX/gILIR0eVeoHC3eb/8fX/+/z//////////////////////v7//P3/+fv/+Pr/
+Pr/+Pr/+vv//P3//v7/////////////////////////////////////////////////////////////
/////////////////////////////v7//f7//P3/+vv/+vv/+/z//f3//v7/////////////////////
////////////////////////+vv/8PX/2eP9ZWeqHx1obnOz4Or/8fX/+/z//////////////////v7/
+/z/9fj/8vb/8PX/7vT/8fb/9fj/+fr//f7/////////////////////////////////////////////
/////////////////////////////////////////v///P3/+Pr/9fj/9fj/9Pj/9Pf/9vn/+/z//v7/
////////////////////////////////////////+vv/8fb/2eP9ODp9AAA5jZDQ5O7/8PX/+/z/////
/////////v7/+/z/9Pf/7fP/5u//wsz6j5XfuMDx7fL/9vn//P3/////////////////////////////
/////////////////////////////////////////////////////////f7/+Pr/8/b/5+3/2eH/2uP/
5u3/7fP/8/b/+vv//f7/////////////////////////////////////+vv/8PX/3ef/U1ebBgVKio/O
4uz/8fX/+/z//////////v///P3/9fj/7fP/4uv/hIzZHSWPAABmU1i14ub/9/r/+/z/////////////
/////////////////////////////////////////////////////////////////////////P3/9Pf/
7/X/09z/TlSzNzWYj5bh5O7/6/L/8vb/+fv//f7/////////////////////////////////+vv/8fX/
2eP/QUWIEhBZbnSz3uj/8fb/+/z//////////f7/+Pr/7/T/6PH/iI7cAABvAABqAABncXjK6O//9fj/
+/z/////////////////////////////////////////////////////////////////////////////
////////+/z/8/f/2uD/Z27EAABnAABiBgl4jJTd5vD/6O//8vX/+fv//f7/////////////////////
////////+vv/8fb/2OP/Mjd6AQE6ZGup4er/8fX/+/z/////////+vz/8fX/6/T/xM/8ExyJAABwAABu
GySRxc387fT/9ff//P3/////////////////////////////////////////////////////////////
////////////////////////+vz/8/f/1Nr/MzqhAABhAxOBAARyBgp5jpLg5Oz/7PP/9Pf/+vz//v7/
////////////////////////+vv/8fb/2eP/KCtvBwZOjJHS4Or/8fX/+/z//////f7/9/n/7fP/3+j/
UFq3AABtAAZ3BAh6mZ/n5vD/7vP/+Pr//v7/////////////////////////////////////////////
////////////////////////////////////////+/z/9Pj/6e//sbb1KzWcAABwBhaBAAFyAgp6fITR
1d777/T/+Pr//f7/////////////////////////+vv/8PX/3+j/WF2hBglTnaTj5O3/8PX/+/z/////
/P3/9Pf/6vL/k5riAAByAAR0AABrY2vE4ur/6vH/9ff//P3/////////////////////////////////
/////////////////////////////////////////////////////////f3/9/n/7fL/5O3/ytX/RU6w
AABpAA5+AABuAABnhord6e7/+fv//f7/////////////////////////+vv/7/T/3+j/k5jbT1KdgYjJ
3uf+8fX/+/z/////+/z/9fn/4ef/NDqhAABnAABrJjCU0Nn/5/D/8fX/+vv//v7/////////////////
/////////////////////////////////////////////////////////////////////////v7/+/z/
9vn/7vP/6vP/ztb/O0CmAABpAABrQkuoxMn57PH/+Pr//f7/////////////////////////+vv/8PX/
2+X/en/CUFGak5nY3+j/8fX//P3//////P3/9fj/4en/i5DbNT2hIyuTpqzv4uz/7vP/9/n//f7/////
////////////////////////////////////////////////////////////////////////////////
/////////////v7//P3/9vn/7/P/6vL/ytH/X2i9XWi7wsf/6e//8/f/+Pr//v7/////////////////
////////+vv/8PX/3OX/WF2hW1ylvMD+3uf/8PX/+/z//////f7/9vn/7fP/4uj/j5Pgf4LV3+X/6fD/
9Pf//P3/////////////////////////////////////////////////////////////////////////
/////////////////////////////////v///P3/+Pr/8vX/7fP/5+//5u7/6vD/8PT/9vn//P3//v7/
/////////////////////f7/9/n/7fP/0tz9LDJzNjh/nqTk2uT/7fL/9/n//f7//f7/+fv/8/b/7PL/
3eX/zM//5ev/9fj/+fv//v7/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////v///f3/+vv/9/n/9vn/9fj/9vn/
+fr//P3//v7//////////////v///f7/+vv/9vn/7/T/5vD/2Ob/VFubERNdoajk4u//5O7/7vP/9vj/
+fr/+vv/+Pr/9fj/9Pj/9fj/9fj/+Pr//P3/////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////v///v7/
/f7//P3//P3//f3//v7//v///////////////f7/+vz/9vn/8fX/7vT/5O3/3eb/z9n/cHjICxN5d37L
z9n/2eP/5O3/6/L/8PT/9Pf/9/n/+vv/+vv/+/z//P3//f3//v7/////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////P3/+Pr/8/b/7vT/6vL/z9r+jZjeQUeq
IiuQCBN3AAFrBRB8Nj2iUViym6XlydH/4+z/6/L/8PT/9/n/+/z//f7//v//////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////f3/9/n/8fX/6/L/3uf/
mKTkLzibAABoAAB0Fx+HDBh7FSGDAg16AABYAABlCBB/Ji2UhYza1+D/6PL/7fL/9Pf/+vv//f7/////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////v7//P3/9/n/
8PT/7PT/z9j/XmO+AABtAABcMDSXoajsu8X7VV+5hYzblZ/fTVSxFSKMAABkAABnAAN2Qkmpsbrz5e3/
6vH/8fX/+Pr//P3//v//////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////P3/9/n/8PX/7PT/vcn3LTOZAABaAgR1ZWzD0Nf/5vL/1OP/l53lzs3/6fP/4+7/sLzwZ23CBxSD
AABnAABlHiaSmqHo3+j/5+//7/T/9vn//P3//v7/////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////v7/
/v7//v7//v7//f7/+/z/9vj/7vP/7PX/tcLzEBeGAABkPEWlqLPt2eX/4e7/3On/uMX1gofVe3vPhYzY
z93+5/X/4e3/lJ3gHiOPAABtAABqChiEbHLIytD/5/D/7PL/8/f/+Pr/+fr/+Pr/+Pr/+Pr/+Pr/+Pr/
+Pr/+fv/+vv/+/z//f7//v7/////////////////////////////////////////////////////////
/v7//f7/+/z/+fv/9/n/9vj/9fj/9Pf/8fX/7PL/4uv/l6HgDhF7AAN4iZDe0d7/3uz/4vD/w83/VVm3
ICiSAAFyAABlAABwaHTD1N//2un/3er/w838ZW3BEyOJJzKVAQ16NDmfwsn75fD/5u7/7PL/7vP/7fP/
7fP/7fL/7fP/7vP/7/T/8fb/9Pj/9vn/+fr//f3//v//////////////////////////////////////
/////////////v7//P3/+Pr/9Pf/8fX/7vT/7PL/6/L/6fH/5u7/6vX/tsD0CQx4AAFwkZvi7ff/4vD/
4fD/z9j/OkGlAABiAABwBxWAAAt7BBN+P0uofYLUztb/4O7/6fb/6fP/qa7xQkyoBg56AABqMjugx8/+
5fH/4Ov/4On/3uj/3eb/3+j/3uj/1+L/0d3/1d7/3+f/7fL/9vj/+vz//v7/////////////////////
/////////////////////////////f7/+fr/8/f/6/L/2d//v8j6vcf5ucP1wMv8wM3+vMj6PkqoAABo
UF25usP7tsPyvsr6sLrwQ0utAABqAAV1OUameIDRKDWZAAd2GyeOLDecmaHntsL0pbLom6riq7LzUlu0
AANzBhR/AAZ0NT+ja3bBY2i/XGG6UViyWl65XGG7XGC6TVWvQU6pPkalODygqK7p8vb/+vz//v7/////
/////////////////////////////////////////////P3/9/n/7/T/wcj2R0ysExeFERmGDxuIFB6K
FBqICxSEAABsAAByDBiDCRSBBRCADhaFCRODAAh4AxF/AAl4CxeDHSaPAAp6AAN0AA19AAd3CBOBEBqH
BhGBAAh5AABwAAByAAh5BhSCAxWCAABsAABvAABlAABnAABxAABjAABmAABhAABdAABYAABhCAt/q7Lr
8/f/+vv//v7//////////////////////////////////////////////////P3/+fv/3uT/SE2vAABn
CBB/GiCMLzmfLTWcGByJFRyKGCOOMj2gHymRDxiGGyOPLDCXBRF/AAh3BhaCEyKMICqTKC2WNDqfIzCV
Awx6Eh+JHiaPAAR3AAZ5CxSDICWQX2q7Q1CqAA1+AAFxDxuHiZTbVGC4dHnQnabrTVqzY23EUV62Slau
LjaZXWm9sLjz5ez/9vn/+fv//v7//////////////////////////////////////////////////P3/
+Pv/4+n+e4LPfoPVpqv2vsf/zNX/zdb/xtH/v8v8pK7spKfysLb3vcr4ws784ej/hI/YAAZ1AAJzVF25
yM//3Of/5+//i5LcAABpMzyfp6vxoKznlqHhqbbtx9H/8fz/kpvfAABiAABph4zc5PD/2OP/193/3un/
1+D/2OH/1+D/0Nr/zNL/3+j/6/L/7/T/9vn//P3//v//////////////////////////////////////
/////////////f7/+Pr/9Pf/6vD/5u3/3+b/4uv/6PD/5+//5O3/5/P/sL3sXmS7mZzoz9f/3+z/4e//
mKLiEiKKCBF/KTWZr7T06/f/3ev/VF2zChSBipPcz9v+4u7/3ur/3ev/5/X/qrPrISmSDRJ2Xmq/3ur/
4uv/6vH/7fP/7fL/7/T/7vP/7fP/7fP/8PX/8fX/9Pf/+Pr/+/z//v7/////////////////////////
/////////////////////////////v7//P3/+Pr/9vn/9Pf/8vb/8vb/8/b/9Pf/7/T/6/L/tL/ubXLH
en/Ti43gqavy0t3/nafjMj6fJzaaAAV1GyeOYmW7Nz6fAABgNj6i1N//3uz/2uX/3Oj/5PH/wcj7FR2J
AAN0gong0tr/6fH/7/P/9vj/+Pr/+fv/+fv/+Pr/+Pr/+Pr/+fv/+vv//P3//f7//v//////////////
/////////////////////////////////////////////////v7//f7//P3/+/z/+/z/+/z//f3//f7/
+fv/8fX/5Oz/jpbfc3jObnXLcXfOk5rks7b4iY3dR1KvDhuEAABoAABlEBV9U12ytcD13Or/3en/3ej/
1eL/q7fvGR+MKDKZbnnNxc/76PD/8fX/+fr//f7//v///////v7//f7//f3//P3//f3//f7//v//////
/////////////////////////////////////////////////////v7//f7//P3//P3//f7//v7/////
/////////////////f7/9vn/7/T/yNH5lJrleoDVmZ3pmpzpc3nPfoTWf4bYVFy3HSaLZ3PGsrb8v8r8
y9n9q7jre4LRf4fUgIvXAwZ1AABrhYjb0NX/6PH/8PX/+Pr//f7//////////v///f3/+vv/+Pr/9/r/
9/n/+Pr/+/z//f7//v7//////////////////////////////////////v///f7/+/z/+fr/9vj/9/n/
+vz/+vv/+/z//v7//////////////////v7/+vz/8/f/7PL/2uT/t8H1srP6vcH+nKTnSlOxV2C7TVaz
WGS8QUqmSlSuSFOtR1GtbXTKVl23ARB5AAh2AABnd33P3eP/4ur/7/T/9/n//P3//////////////P3/
9/n/8vb/7PH/6fD/7PL/7vP/8vb/9vn/+/z//f7//////////////////////////////v7/+/z/+Pr/
8/b/7/T/8Pb/6vH/3eP97vL++fr//P3//////////////////////f7/+vv/9fj/7/T/5+//z9f+t7v4
uLn9Z2zFLzucFCGIMz6gGCCMAAd4AAl2Dx2EER+GXWK8c3XLKzKXd4LP4er/6/L/8PX/9/n//P3//v//
/////////v7/+fv/8/b/7PP/y9H/i4/erLbt4er/5e3/7fP/8/b/+fv//f3//v7/////////////////
/v7/+/z/9vj/8PT/6/L/3+n/x9H9aHTAZGvG3+b9+Pr/+/z//////////////////////////v7/+/z/
+Pr/8vb/6/H/3OX+wMn4maDmdHrPWGG6T1a1eoHWcHfOTlayUlq1SlKubHjAxMj/0dn/4+v/7PL/8vb/
+Pr//P3//v7//////////////f7/+fr/7vP/xsv5YGXAHymRKjKYYWS9rbLz4u3/6/P/8vb/+fr//f7/
/////////////v//+/z/9vj/7fL/5e3/xs7/Y23BIiiSAABeLTab3+b/9/r/+/z/////////////////
/////////////////f7/+vz/9vj/8PX/6vH/3eb/ydL8xM/6uMPyt733w8j/zNb/1Nz/3OT/4uz/5u7/
7fP/8vb/9vj/+vz//f7//////////////////////f7/+fv/7vP/jpHiAAJ1CxaBER6GAABoFRmGbXbH
0Nf/7PL/9fj//P3//////////////v7/+fv/8/f/4Of/hYvbKDGZAABuAABdAAZyi5La5+7/9vn/+/z/
/////////////////////////////////////v7//P3/+fv/9ff/8vb/7/X/7fP/6/L/5u3/5ez/6fD/
7PP/7/T/8fX/9Pf/9/n/+vv//P3//v7//v///////////////////////v7/+fv/8fb/2eH9fIbQExqH
AABrAAp6AAFyAABwS0+uztX39vn/+vz//////////////f7/+Pr/8ff/qbLpAABrAABhAABwDBWAfobX
5e3/8PX/9vn//f3//////////v///f7/+/z/+vv/+vv/+vz//P3//v7//v///v7//P3/+vz/+Pr/9/n/
9vj/9vj/9vj/9vj/9/n/+fr/+/z//P3//f7//v7//f7//P3/+/z/+vz/+/z//P3//v7//////v7/+/z/
9fj/7/T/5/H/uML1U1e1AAh5AABuAABvMjmdv8bz9vr/+vv//////////////f7/+fv/7/T/iY7aDxSA
GiONa3XHsr7w4Oj/6/H/9Pf/+vz//v7//////v///P3/+Pr/9Pf/8/f/9fj/9fj/9vn/+/z//v7/////
/////////v7//f7//P3/+/z/+/z//P3//f7//v///////////////v7/+/z/9/n/9vn/9vn/9Pj/9vn/
+/z//v7//////f7/+vz/9fj/7/T/6vL/3ef/i5PbGRqJBQl5jJbZ6vH/9Pj/+/z//////////////f7/
+fv/8fT/1Nn9t7/0wcr54er/7fT/8fX/9fj/+vv//f7//////////f3/+Pr/8PT/6/L/3uX/ztb/5Or/
8/f/+Pr//f7//////////////f7/+vz/+Pr/+fv/+fv/+vv//f3//v///////////////P3/9/n/7vL/
193/ztf/5u3/7vP/9Pf/+/z//v7//////v7//P3/+Pr/8fX/7PP/5/D/sLfxoKnk4+r/8vf/9/n//f3/
/////////////v7/+/z/9vn/9Pf/8vb/8fb/8fX/9Pf/+Pr//P3//v7//////////v7/+vv/8vb/5+7/
y9H/WWO9KSmSkZXj6vD/+Pv//P3//////////f7/+Pr/9fj/8vb/6O7/7vP/9fj/+Pr//f7/////////
/v//+vv/8vb/7PP/hYraKiqKlp7i6PD/7fP/9ff/+/z//v7//////////f7/+vv/9ff/8fX/8PX/8vb/
8/f/9vn/+/z//v7//////////////////f7/+/z/+vv/+fr/+fr/+vv//P3//v7/////////////////
/P3/9fj/7PL/1d7/RUysAABhAABlg4ja6/D/+Pr//P3/////////+/z/9fj/6e7/2eD/h4/bnaXg7PH/
9fj/+/z//////////v7/+Pr/8PX/y9X1JDGVAABaERWDoKnp6PH/7vP/9/n//P3//////////////v7/
/P3/+vv/+fv/+fv/+vv//P3//v7//////////////////////////v7//v7//v7//v7//v//////////
/////////////v7/+fv/8PX/7PX/ipPdAABsAABlQ1Cp3Ob/7vP/9/n//f7/////////+fv/9Pj/yNH5
Ule2DBJ8Ljie0df+8fb/+fv//v7//////v7/+Pr/7/X/hY3YAABxAAl7AABuEBaEs7nz6fH/8fX/+vv/
/v7//////////////////v///v7//v7//v7/////////////////////////////////////////////
/////////////////////////////f3/9vn/7PL/0tn/LzidAQFsAAB0iZHb6vP/8PT/+fv//v//////
/v7/+Pr/8vf/r7rqAAV4AABdPUen1N//7PL/9vn//f7//////v7/+fr/7/T/yc75S1G0AABrARKAAABp
Qker0df/7fP/9/n//f7/////////////////////////////////////////////////////////////
/////////////////////////////////////////////P3/9/n/5+7/cXXNAAd2AABuMDebzdT97PL/
9vj//P3//////////v7/9/n/7/X/tL/uFCCLAABqHSqRvcf46fD/9Pf//f3/////////+vv/8vX/6vH/
yM3+JC2XAABtAAV2Agx9q7Ly7vT/9vn//f7/////////////////////////////////////////////
/////////////////////////////////////////////////////////////P3/9/r/4uj/WWO1AAVx
KTaYu8T07fT/8vb/+vv//v7//////////v7/9/n/7vX/vsn1Iy2SAABrAQ99mp/o6PD/9Pf//P3/////
/////P3/9/n/7vP/6fL/s7z2DBB/AABeQ0uttrr56e7/+Pr//f7/////////////////////////////
/////////////////////////////////////////////////////////////////////////////P3/
+fv/4ef6g4zNbXfFw8v27fT/8vb/+Pr//f3//////////////v7/9/n/7vT/yNL7MjucAABtBxF/nKLo
6fH/9Pf//P3//////////v7/+/z/9fj/7fL/6/T/jZXbLzScrrP14en/7fL/+fv//v7/////////////
////////////////////////////////////////////////////////////////////////////////
/////////////f7/+vz/8PP91dr34+f/8vb/8/f/9/r//P3//v///////////////v7/+Pr/8PX/1N3/
QUqmAQRxBQ98m6Dm7PL/9fj//P3//////////////v7/+/z/9ff/8PX/5ez/ytH94ej/8vb/9vj/+/z/
/v7/////////////////////////////////////////////////////////////////////////////
/////////////////////////////v7//P3/+vz/+fv/+Pr/+Pr/+vv//f3//v//////////////////
/v//+fv/9Pf/2+L/SVGtAABsLTaZytL58fX/9/n//f7//////////////////v7/+/z/9/n/9fj/9vn/
9fj/9vj/+vz//f7/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////v7//f7//f3//f3//f3//v7//v//////
////////////////////+/z/9vn/6e//mZ7gTVarr7bp6/H/9fj/+vv//v7/////////////////////
/v7//f7/+/z/+/z/+/z//P3//v7/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////f3/+Pr/9fj/6e7/4+n/8fb/9Pf/+Pr//f3/////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////v7//P3/+fv/+fv/+vv/+Pr/+vv/
/P3//v7/////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////v7//f7/
/f3//P3//f7//v7//v//////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB///////
//AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA
H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A
A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA
////+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A
AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf
AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4
AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A//
///////gD/////////Af//////////////8=
</value>
</data>
</root>

View File

@ -1,757 +0,0 @@
namespace CodeWalker.Project.Panels
{
partial class EditAudioZonePanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
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.label22 = new System.Windows.Forms.Label();
this.UnkBytesTextBox = 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.label20 = new System.Windows.Forms.Label();
this.DependentAmbiencesTextBox = 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.label13 = new System.Windows.Forms.Label();
this.Flags0TextBox = 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.label16 = new System.Windows.Forms.Label();
this.InnerPosTextBox = 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();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(2, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(559, 447);
this.tabControl1.TabIndex = 17;
//
// 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(this.label22);
this.tabPage1.Controls.Add(this.UnkBytesTextBox);
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.label20);
this.tabPage1.Controls.Add(this.DependentAmbiencesTextBox);
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.label13);
this.tabPage1.Controls.Add(this.Flags0TextBox);
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.label16);
this.tabPage1.Controls.Add(this.InnerPosTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(551, 421);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Ambient Zone";
this.tabPage1.UseVisualStyleBackColor = true;
//
// 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.Name = "label22";
this.label22.Size = new System.Drawing.Size(58, 13);
this.label22.TabIndex = 64;
this.label22.Text = "Unk bytes:";
//
// UnkBytesTextBox
//
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);
//
// DeleteButton
//
this.DeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.DeleteButton.Location = new System.Drawing.Point(343, 3);
this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(93, 23);
this.DeleteButton.TabIndex = 81;
this.DeleteButton.Text = "Delete zone";
this.DeleteButton.UseVisualStyleBackColor = true;
this.DeleteButton.Click += new System.EventHandler(this.DeleteButton_Click);
//
// AddToProjectButton
//
this.AddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.AddToProjectButton.Location = new System.Drawing.Point(452, 3);
this.AddToProjectButton.Name = "AddToProjectButton";
this.AddToProjectButton.Size = new System.Drawing.Size(93, 23);
this.AddToProjectButton.TabIndex = 80;
this.AddToProjectButton.Text = "Add to project";
this.AddToProjectButton.UseVisualStyleBackColor = true;
this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click);
//
// label21
//
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.Name = "label21";
this.label21.Size = new System.Drawing.Size(44, 13);
this.label21.TabIndex = 70;
this.label21.Text = "Unk13:";
//
// Unk13TextBox
//
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);
//
// label20
//
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(340, 303);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(193, 13);
this.label20.TabIndex = 78;
this.label20.Text = "Ext params: Name (hash), Value (float)";
//
// DependentAmbiencesTextBox
//
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);
//
// 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, 183);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(46, 13);
this.label19.TabIndex = 76;
this.label19.Text = "Hashes:";
//
// label15
//
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);
//
// 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 = 66;
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 = 67;
this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged);
//
// ShapeComboBox
//
this.ShapeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ShapeComboBox.FormattingEnabled = true;
this.ShapeComboBox.Items.AddRange(new object[] {
"Box",
"Line",
"Sphere"});
this.ShapeComboBox.Location = new System.Drawing.Point(84, 30);
this.ShapeComboBox.Name = "ShapeComboBox";
this.ShapeComboBox.Size = new System.Drawing.Size(151, 21);
this.ShapeComboBox.TabIndex = 33;
this.ShapeComboBox.SelectedIndexChanged += new System.EventHandler(this.ShapeComboBox_SelectedIndexChanged);
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(7, 33);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(41, 13);
this.label23.TabIndex = 32;
this.label23.Text = "Shape:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(7, 9);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(64, 13);
this.label12.TabIndex = 29;
this.label12.Text = "Name hash:";
//
// NameTextBox
//
this.NameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.NameTextBox.Location = new System.Drawing.Point(84, 6);
this.NameTextBox.Name = "NameTextBox";
this.NameTextBox.Size = new System.Drawing.Size(237, 20);
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.Name = "label11";
this.label11.Size = new System.Drawing.Size(75, 13);
this.label11.TabIndex = 46;
this.label11.Text = "Outer position:";
//
// OuterPosTextBox
//
this.OuterPosTextBox.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);
//
// 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.TabIndex = 34;
this.label16.Text = "Inner position:";
//
// InnerPosTextBox
//
this.InnerPosTextBox.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);
//
// GoToButton
//
this.GoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.GoToButton.Location = new System.Drawing.Point(483, 0);
this.GoToButton.Name = "GoToButton";
this.GoToButton.Size = new System.Drawing.Size(68, 23);
this.GoToButton.TabIndex = 31;
this.GoToButton.Text = "Go to";
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);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(562, 450);
this.Controls.Add(this.GoToButton);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "EditAudioZonePanel";
this.Text = "Edit Audio Zone";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
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.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.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.Label label20;
private WinForms.TextBoxFix DependentAmbiencesTextBox;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox Unk13TextBox;
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.Label label24;
private System.Windows.Forms.TextBox Hash0TextBox;
}
}

View File

@ -1,624 +0,0 @@
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
{
public partial class EditAudioZonePanel : ProjectPanel
{
public ProjectForm ProjectForm;
public AudioPlacement CurrentZone { get; set; }
private bool populatingui = false;
public EditAudioZonePanel(ProjectForm owner)
{
ProjectForm = owner;
InitializeComponent();
}
public void SetZone(AudioPlacement zone)
{
CurrentZone = zone;
Tag = zone;
UpdateFormTitle();
UpdateUI();
}
private void UpdateFormTitle()
{
Text = CurrentZone?.NameHash.ToString() ?? "";
}
private void UpdateUI()
{
if (CurrentZone?.AudioZone == null)
{
AddToProjectButton.Enabled = false;
DeleteButton.Enabled = false;
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;
populatingui = false;
}
else
{
AddToProjectButton.Enabled = CurrentZone?.RelFile != null ? !ProjectForm.AudioFileExistsInProject(CurrentZone.RelFile) : false;
DeleteButton.Enabled = !AddToProjectButton.Enabled;
populatingui = true;
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();
StringBuilder sb = new StringBuilder();
if (z.Rules != null)
{
foreach (var hash in z.Rules)
{
sb.AppendLine(hash.ToString());
}
}
HashesTextBox.Text = sb.ToString();
sb.Clear();
if (z.DependentAmbiences != null)
{
foreach (var extparam in z.DependentAmbiences)
{
sb.Append(extparam.Name.ToString());
sb.Append(", ");
sb.Append(FloatUtil.ToString(extparam.Value));
sb.AppendLine();
}
}
DependentAmbiencesTextBox.Text = sb.ToString();
populatingui = false;
if (ProjectForm.WorldForm != null)
{
ProjectForm.WorldForm.SelectObject(CurrentZone);
}
}
}
private void ProjectItemChanged()
{
CurrentZone?.UpdateFromZone();//also update the placement wrapper
if (CurrentZone?.RelFile != null)
{
ProjectForm.SetAudioFileHasChanged(true);
}
}
private void NameTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
uint hash = 0;
string name = NameTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name);
}
//NameHashLabel.Text = "Hash: " + hash.ToString();
if (CurrentZone.AudioZone.NameHash != hash)
{
CurrentZone.AudioZone.Name = NameTextBox.Text;
CurrentZone.AudioZone.NameHash = hash;
ProjectItemChanged();
UpdateFormTitle();
}
}
private void ShapeComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
Dat151ZoneShape shape = Dat151ZoneShape.Box;
if (Enum.TryParse<Dat151ZoneShape>(ShapeComboBox.Text, out shape))
{
if (CurrentZone.AudioZone.Shape != shape)
{
CurrentZone.AudioZone.Shape = shape;
ProjectItemChanged();
}
}
}
private void InnerPosTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var vec = FloatUtil.ParseVector3String(InnerPosTextBox.Text);
if (CurrentZone.AudioZone.PlaybackZonePosition != vec)
{
CurrentZone.AudioZone.PlaybackZonePosition = 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();
}
}
private void OuterPosTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var vec = FloatUtil.ParseVector3String(OuterPosTextBox.Text);
if (CurrentZone.AudioZone.ActivationZonePosition != vec)
{
CurrentZone.AudioZone.ActivationZonePosition = vec;
ProjectItemChanged();
}
}
private void OuterSizeTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var vec = FloatUtil.ParseVector3String(OuterSizeTextBox.Text);
if (CurrentZone.AudioZone.ActivationZoneSize != vec)
{
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)
{
CurrentZone.AudioZone.ActivationZoneAngle = 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)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
uint flags = 0;
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
{
if (CurrentZone.AudioZone.Flags0 != flags)
{
CurrentZone.AudioZone.Flags0 = flags;
ProjectItemChanged();
}
}
}
private void Flags1TextBox_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;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AudioZone.Unk13 != hash)
{
CurrentZone.AudioZone.Unk13 = hash;
ProjectItemChanged();
}
}
private void Hash0TextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var hashstr = Hash0TextBox.Text;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AudioZone.UnkHash0 != hash)
{
CurrentZone.AudioZone.UnkHash0 = hash;
ProjectItemChanged();
}
}
private void SceneTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var hashstr = SceneTextBox.Text;
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
if (CurrentZone.AudioZone.Scene != hash)
{
CurrentZone.AudioZone.Scene = hash;
ProjectItemChanged();
}
}
private void HashesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var hashstrs = HashesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (hashstrs?.Length > 0)
{
var hashlist = new List<MetaHash>();
foreach (var hashstr in hashstrs)
{
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
hashlist.Add(hash);
}
CurrentZone.AudioZone.Rules = hashlist.ToArray();
CurrentZone.AudioZone.RulesCount = (byte)hashlist.Count;
ProjectItemChanged();
}
}
private void DependentAmbiencesTextBox_TextChanged(object sender, EventArgs e)
{
if (populatingui) return;
if (CurrentZone?.AudioZone == null) return;
var paramstrs = DependentAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (paramstrs?.Length > 0)
{
var paramlist = new List<Dat151AmbientZone.DependentAmbience>();
foreach (var paramstr in paramstrs)
{
var paramvals = paramstr.Split(',');
if (paramvals?.Length == 2)
{
var param = new Dat151AmbientZone.DependentAmbience();
var hashstr = paramvals[0].Trim();
var valstr = paramvals[1].Trim();
uint hash = 0;
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
{
hash = JenkHash.GenHash(hashstr);
JenkIndex.Ensure(hashstr);
}
param.Name = hash;
param.Value = FloatUtil.Parse(valstr);
paramlist.Add(param);
}
}
CurrentZone.AudioZone.DependentAmbiences = paramlist.ToArray();
CurrentZone.AudioZone.DependentAmbiencesCount = (uint)paramlist.Count;
ProjectItemChanged();
}
}
private void GoToButton_Click(object sender, EventArgs e)
{
if (CurrentZone == null) return;
if (ProjectForm.WorldForm == null) return;
ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PlaybackZoneSize);
}
private void AddToProjectButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentZone);
ProjectForm.AddAudioFileToProject(CurrentZone.RelFile);
}
private void DeleteButton_Click(object sender, EventArgs e)
{
ProjectForm.SetProjectItem(CurrentZone);
ProjectForm.DeleteAudioZone();
}
}
}

View File

@ -700,7 +700,7 @@ namespace CodeWalker.Project.Panels
}
private void LoadAudioRelTreeNodes(RelFile rel, TreeNode node)
{
if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Zones, Emitters
if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Zones, Rules
node.Nodes.Clear();
@ -709,10 +709,11 @@ namespace CodeWalker.Project.Panels
var zones = new List<Dat151AmbientZone>();
var emitters = new List<Dat151AmbientRule>();
var rules = new List<Dat151AmbientRule>();
var emitters = new List<Dat151StaticEmitter>();
var zonelists = new List<Dat151AmbientZoneList>();
var emitterlists = new List<Dat151StaticEmitterList>();
var interiors = new List<Dat151Interior>();
var interiors = new List<Dat151InteriorSettings>();
var interiorrooms = new List<Dat151InteriorRoom>();
foreach (var reldata in rel.RelDatasSorted)
@ -723,7 +724,11 @@ namespace CodeWalker.Project.Panels
}
if (reldata is Dat151AmbientRule)
{
emitters.Add(reldata as Dat151AmbientRule);
rules.Add(reldata as Dat151AmbientRule);
}
if (reldata is Dat151StaticEmitter)
{
emitters.Add(reldata as Dat151StaticEmitter);
}
if (reldata is Dat151AmbientZoneList)
{
@ -733,9 +738,9 @@ namespace CodeWalker.Project.Panels
{
emitterlists.Add(reldata as Dat151StaticEmitterList);
}
if (reldata is Dat151Interior)
if (reldata is Dat151InteriorSettings)
{
interiors.Add(reldata as Dat151Interior);
interiors.Add(reldata as Dat151InteriorSettings);
}
if (reldata is Dat151InteriorRoom)
{
@ -759,11 +764,24 @@ namespace CodeWalker.Project.Panels
}
}
if (rules.Count > 0)
{
var n = node.Nodes.Add("Ambient Rules (" + rules.Count.ToString() + ")");
n.Name = "AmbientRules";
n.Tag = rel;
for (int i = 0; i < rules.Count; i++)
{
var rule = rules[i];
var tnode = n.Nodes.Add(rule.NameHash.ToString());
tnode.Tag = rule;
}
}
if (emitters.Count > 0)
{
var n = node.Nodes.Add("Ambient Emitters (" + emitters.Count.ToString() + ")");
n.Name = "AmbientEmitters";
var n = node.Nodes.Add("Static Emitters (" + emitters.Count.ToString() + ")");
n.Name = "StaticEmitters";
n.Tag = rel;
for (int i = 0; i < emitters.Count; i++)
@ -791,8 +809,8 @@ namespace CodeWalker.Project.Panels
if (emitterlists.Count > 0)
{
var emitterlistsnode = node.Nodes.Add("Ambient Emitter Lists (" + emitterlists.Count.ToString() + ")");
emitterlistsnode.Name = "AmbientEmitterLists";
var emitterlistsnode = node.Nodes.Add("Static Emitter Lists (" + emitterlists.Count.ToString() + ")");
emitterlistsnode.Name = "StaticEmitterLists";
emitterlistsnode.Tag = rel;
for (int i = 0; i < emitterlists.Count; i++)
{
@ -1482,44 +1500,79 @@ namespace CodeWalker.Project.Panels
{
if (ProjectTreeView.Nodes.Count <= 0) return null;
var projnode = ProjectTreeView.Nodes[0];
var scenariosnode = GetChildTreeNode(projnode, "AudioRels");
if (scenariosnode == null) return null;
for (int i = 0; i < scenariosnode.Nodes.Count; i++)
var relsnode = GetChildTreeNode(projnode, "AudioRels");
if (relsnode == null) return null;
for (int i = 0; i < relsnode.Nodes.Count; i++)
{
var ymtnode = scenariosnode.Nodes[i];
if (ymtnode.Tag == rel) return ymtnode;
var relnode = relsnode.Nodes[i];
if (relnode.Tag == rel) return relnode;
}
return null;
}
public TreeNode FindAudioZoneTreeNode(AudioPlacement zone)
public TreeNode FindAudioAmbientZoneTreeNode(AudioPlacement zone)
{
if (zone == null) return null;
TreeNode relnode = FindAudioRelTreeNode(zone.RelFile);
var zonenode = GetChildTreeNode(relnode, "AmbientZones");
if (zonenode == null) return null;
//zonenode.Tag = zone;
for (int i = 0; i < zonenode.Nodes.Count; i++)
var zonesnode = GetChildTreeNode(relnode, "AmbientZones");
if (zonesnode == null) return null;
for (int i = 0; i < zonesnode.Nodes.Count; i++)
{
TreeNode znode = zonenode.Nodes[i];
if (znode.Tag == zone.AudioZone) return znode;
TreeNode znode = zonesnode.Nodes[i];
if (znode.Tag == zone.AmbientZone) return znode;
}
return zonenode;
return zonesnode;
}
public TreeNode FindAudioEmitterTreeNode(AudioPlacement emitter)
public TreeNode FindAudioAmbientRuleTreeNode(AudioPlacement rule)
{
if (rule == null) return null;
TreeNode relnode = FindAudioRelTreeNode(rule.RelFile);
var rulesnode = GetChildTreeNode(relnode, "AmbientRules");
if (rulesnode == null) return null;
for (int i = 0; i < rulesnode.Nodes.Count; i++)
{
TreeNode rnode = rulesnode.Nodes[i];
if (rnode.Tag == rule.AmbientRule) return rnode;
}
return rulesnode;
}
public TreeNode FindAudioAmbientRuleTreeNode(uint hash)
{
if (ProjectTreeView.Nodes.Count <= 0) return null;
var projnode = ProjectTreeView.Nodes[0];
var relsnode = GetChildTreeNode(projnode, "AudioRels");
if (relsnode == null) return null;
for (int i = 0; i < relsnode.Nodes.Count; i++)
{
var relnode = relsnode.Nodes[i];
var rel = relnode.Tag as RelFile;
if (rel == null) continue;
var rulesnode = GetChildTreeNode(relnode, "AmbientRules");
if (rulesnode == null) continue;
for (int j = 0; j < rulesnode.Nodes.Count; j++)
{
var rnode = rulesnode.Nodes[j];
var rule = rnode.Tag as Dat151AmbientRule;
if (rule == null) continue;
if (rule.NameHash == hash) return rnode;
}
}
return null;
}
public TreeNode FindAudioStaticEmitterTreeNode(AudioPlacement emitter)
{
if (emitter == null) return null;
TreeNode relnode = FindAudioRelTreeNode(emitter.RelFile);
var zonenode = GetChildTreeNode(relnode, "AmbientEmitters");
var zonenode = GetChildTreeNode(relnode, "StaticEmitters");
if (zonenode == null) return null;
//zonenode.Tag = emitter;
for (int i = 0; i < zonenode.Nodes.Count; i++)
{
TreeNode znode = zonenode.Nodes[i];
if (znode.Tag == emitter.AudioEmitter) return znode;
if (znode.Tag == emitter.StaticEmitter) return znode;
}
return zonenode;
}
public TreeNode FindAudioZoneListTreeNode(Dat151AmbientZoneList list)
public TreeNode FindAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list)
{
if (list == null) return null;
TreeNode relnode = FindAudioRelTreeNode(list.Rel);
@ -1532,11 +1585,11 @@ namespace CodeWalker.Project.Panels
}
return null;
}
public TreeNode FindAudioEmitterListTreeNode(Dat151StaticEmitterList list)
public TreeNode FindAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list)
{
if (list == null) return null;
TreeNode relnode = FindAudioRelTreeNode(list.Rel);
var emitterlistsnode = GetChildTreeNode(relnode, "AmbientEmitterLists");
var emitterlistsnode = GetChildTreeNode(relnode, "StaticEmitterLists");
if (emitterlistsnode == null) return null;
for (int i = 0; i < emitterlistsnode.Nodes.Count; i++)
{
@ -1545,7 +1598,7 @@ namespace CodeWalker.Project.Panels
}
return null;
}
public TreeNode FindAudioInteriorTreeNode(Dat151Interior interior)
public TreeNode FindAudioInteriorTreeNode(Dat151InteriorSettings interior)
{
if (interior == null) return null;
TreeNode relnode = FindAudioRelTreeNode(interior.Rel);
@ -1986,9 +2039,9 @@ namespace CodeWalker.Project.Panels
}
}
}
public void TrySelectAudioZoneTreeNode(AudioPlacement zone)
public void TrySelectAudioAmbientZoneTreeNode(AudioPlacement zone)
{
TreeNode tnode = FindAudioZoneTreeNode(zone);
TreeNode tnode = FindAudioAmbientZoneTreeNode(zone);
if (tnode == null)
{
tnode = FindAudioRelTreeNode(zone?.RelFile);
@ -2005,9 +2058,44 @@ namespace CodeWalker.Project.Panels
}
}
}
public void TrySelectAudioEmitterTreeNode(AudioPlacement emitter)
public void TrySelectAudioAmbientRuleTreeNode(AudioPlacement rule)
{
TreeNode tnode = FindAudioEmitterTreeNode(emitter);
TreeNode tnode = FindAudioAmbientRuleTreeNode(rule);
if (tnode == null)
{
tnode = FindAudioRelTreeNode(rule?.RelFile);
}
if (tnode != null)
{
if (ProjectTreeView.SelectedNode == tnode)
{
OnItemSelected?.Invoke(rule);
}
else
{
ProjectTreeView.SelectedNode = tnode;
}
}
}
public void TrySelectAudioAmbientRuleTreeNode(uint hash)
{
//variation for use by the button to select ambient rule from the ambient zone form
var tnode = FindAudioAmbientRuleTreeNode(hash);
if (tnode != null)
{
if (ProjectTreeView.SelectedNode == tnode)
{
OnItemSelected?.Invoke(tnode.Tag);
}
else
{
ProjectTreeView.SelectedNode = tnode;
}
}
}
public void TrySelectAudioStaticEmitterTreeNode(AudioPlacement emitter)
{
TreeNode tnode = FindAudioStaticEmitterTreeNode(emitter);
if (tnode == null)
{
tnode = FindAudioRelTreeNode(emitter?.RelFile);
@ -2024,9 +2112,9 @@ namespace CodeWalker.Project.Panels
}
}
}
public void TrySelectAudioZoneListTreeNode(Dat151AmbientZoneList list)
public void TrySelectAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list)
{
TreeNode tnode = FindAudioZoneListTreeNode(list);
TreeNode tnode = FindAudioAmbientZoneListTreeNode(list);
if (tnode == null)
{
tnode = FindAudioRelTreeNode(list?.Rel);
@ -2043,9 +2131,9 @@ namespace CodeWalker.Project.Panels
}
}
}
public void TrySelectAudioEmitterListTreeNode(Dat151StaticEmitterList list)
public void TrySelectAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list)
{
TreeNode tnode = FindAudioEmitterListTreeNode(list);
TreeNode tnode = FindAudioStaticEmitterListTreeNode(list);
if (tnode == null)
{
tnode = FindAudioRelTreeNode(list?.Rel);
@ -2062,7 +2150,7 @@ namespace CodeWalker.Project.Panels
}
}
}
public void TrySelectAudioInteriorTreeNode(Dat151Interior interior)
public void TrySelectAudioInteriorTreeNode(Dat151InteriorSettings interior)
{
TreeNode tnode = FindAudioInteriorTreeNode(interior);
if (tnode == null)
@ -2265,39 +2353,47 @@ namespace CodeWalker.Project.Panels
tn.Text = node.MedTypeName + ": " + node.StringText;
}
}
public void UpdateAudioZoneTreeNode(AudioPlacement zone)
public void UpdateAudioAmbientZoneTreeNode(AudioPlacement zone)
{
var tn = FindAudioZoneTreeNode(zone);
var tn = FindAudioAmbientZoneTreeNode(zone);
if (tn != null)
{
tn.Text = zone.NameHash.ToString();
}
}
public void UpdateAudioEmitterTreeNode(AudioPlacement emitter)
public void UpdateAudioAmbientRuleTreeNode(AudioPlacement rule)
{
var tn = FindAudioEmitterTreeNode(emitter);
var tn = FindAudioAmbientRuleTreeNode(rule);
if (tn != null)
{
tn.Text = rule.NameHash.ToString();
}
}
public void UpdateAudioStaticEmitterTreeNode(AudioPlacement emitter)
{
var tn = FindAudioStaticEmitterTreeNode(emitter);
if (tn != null)
{
tn.Text = emitter.NameHash.ToString();
}
}
public void UpdateAudioZoneListTreeNode(Dat151AmbientZoneList list)
public void UpdateAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list)
{
var tn = FindAudioZoneListTreeNode(list);
var tn = FindAudioAmbientZoneListTreeNode(list);
if (tn != null)
{
tn.Text = list.NameHash.ToString();
}
}
public void UpdateAudioEmitterListTreeNode(Dat151StaticEmitterList list)
public void UpdateAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list)
{
var tn = FindAudioEmitterListTreeNode(list);
var tn = FindAudioStaticEmitterListTreeNode(list);
if (tn != null)
{
tn.Text = list.NameHash.ToString();
}
}
public void UpdateAudioInteriorTreeNode(Dat151Interior interior)
public void UpdateAudioInteriorTreeNode(Dat151InteriorSettings interior)
{
var tn = FindAudioInteriorTreeNode(interior);
if (tn != null)
@ -2485,9 +2581,9 @@ namespace CodeWalker.Project.Panels
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioZoneTreeNode(AudioPlacement zone)
public void RemoveAudioAmbientZoneTreeNode(AudioPlacement zone)
{
var tn = FindAudioZoneTreeNode(zone);
var tn = FindAudioAmbientZoneTreeNode(zone);
if ((tn != null) && (tn.Parent != null))
{
var zones = new List<Dat151AmbientZone>();
@ -2503,27 +2599,45 @@ namespace CodeWalker.Project.Panels
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioEmitterTreeNode(AudioPlacement emitter)
public void RemoveAudioAmbientRuleTreeNode(AudioPlacement rule)
{
var tn = FindAudioEmitterTreeNode(emitter);
var tn = FindAudioAmbientRuleTreeNode(rule);
if ((tn != null) && (tn.Parent != null))
{
var emitters = new List<Dat151AmbientRule>();
foreach (var reldata in emitter.RelFile.RelDatas)
var rules = new List<Dat151AmbientRule>();
foreach (var reldata in rule.RelFile.RelDatas)
{
if (reldata is Dat151AmbientRule)
{
emitters.Add(reldata as Dat151AmbientRule);
rules.Add(reldata as Dat151AmbientRule);
}
}
tn.Parent.Text = "Ambient Emitters (" + emitters.Count.ToString() + ")";
tn.Parent.Text = "Ambient Rules (" + rules.Count.ToString() + ")";
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioZoneListTreeNode(Dat151AmbientZoneList list)
public void RemoveAudioStaticEmitterTreeNode(AudioPlacement emitter)
{
var tn = FindAudioZoneListTreeNode(list);
var tn = FindAudioStaticEmitterTreeNode(emitter);
if ((tn != null) && (tn.Parent != null))
{
var emitters = new List<Dat151StaticEmitter>();
foreach (var reldata in emitter.RelFile.RelDatas)
{
if (reldata is Dat151StaticEmitter)
{
emitters.Add(reldata as Dat151StaticEmitter);
}
}
tn.Parent.Text = "Static Emitters (" + emitters.Count.ToString() + ")";
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioAmbientZoneListTreeNode(Dat151AmbientZoneList list)
{
var tn = FindAudioAmbientZoneListTreeNode(list);
if ((tn != null) && (tn.Parent != null))
{
var zonelists = new List<Dat151AmbientZoneList>();
@ -2539,9 +2653,9 @@ namespace CodeWalker.Project.Panels
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioEmitterListTreeNode(Dat151StaticEmitterList list)
public void RemoveAudioStaticEmitterListTreeNode(Dat151StaticEmitterList list)
{
var tn = FindAudioEmitterListTreeNode(list);
var tn = FindAudioStaticEmitterListTreeNode(list);
if ((tn != null) && (tn.Parent != null))
{
var emitterlists = new List<Dat151StaticEmitterList>();
@ -2553,21 +2667,21 @@ namespace CodeWalker.Project.Panels
}
}
tn.Parent.Text = "Ambient Emitter Lists (" + emitterlists.Count.ToString() + ")";
tn.Parent.Text = "Static Emitter Lists (" + emitterlists.Count.ToString() + ")";
tn.Parent.Nodes.Remove(tn);
}
}
public void RemoveAudioInteriorTreeNode(Dat151Interior interior)
public void RemoveAudioInteriorTreeNode(Dat151InteriorSettings interior)
{
var tn = FindAudioInteriorTreeNode(interior);
if ((tn != null) && (tn.Parent != null))
{
var interiors = new List<Dat151Interior>();
var interiors = new List<Dat151InteriorSettings>();
foreach (var reldata in interior.Rel.RelDatas)
{
if (reldata is Dat151Interior)
if (reldata is Dat151InteriorSettings)
{
interiors.Add(reldata as Dat151Interior);
interiors.Add(reldata as Dat151InteriorSettings);
}
}

View File

@ -173,8 +173,8 @@
this.AudioMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNameMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator23 = new System.Windows.Forms.ToolStripSeparator();
this.AudioNewAmbientEmitterMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewAmbientEmitterListMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewAmbientRuleMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewStaticEmitterListMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewAmbientZoneMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewAmbientZoneListMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AudioNewInteriorMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -213,6 +213,7 @@
this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
this.AudioNewStaticEmitterMenu = new System.Windows.Forms.ToolStripMenuItem();
this.MainMenu.SuspendLayout();
this.MainToolbar.SuspendLayout();
this.SuspendLayout();
@ -1356,8 +1357,9 @@
this.AudioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AudioNameMenu,
this.toolStripSeparator23,
this.AudioNewAmbientEmitterMenu,
this.AudioNewAmbientEmitterListMenu,
this.AudioNewAmbientRuleMenu,
this.AudioNewStaticEmitterMenu,
this.AudioNewStaticEmitterListMenu,
this.AudioNewAmbientZoneMenu,
this.AudioNewAmbientZoneListMenu,
this.AudioNewInteriorMenu,
@ -1382,21 +1384,21 @@
this.toolStripSeparator23.Name = "toolStripSeparator23";
this.toolStripSeparator23.Size = new System.Drawing.Size(213, 6);
//
// AudioNewAmbientEmitterMenu
// AudioNewAmbientRuleMenu
//
this.AudioNewAmbientEmitterMenu.Enabled = false;
this.AudioNewAmbientEmitterMenu.Name = "AudioNewAmbientEmitterMenu";
this.AudioNewAmbientEmitterMenu.Size = new System.Drawing.Size(216, 22);
this.AudioNewAmbientEmitterMenu.Text = "New Ambient Emitter";
this.AudioNewAmbientEmitterMenu.Click += new System.EventHandler(this.AudioNewAmbientEmitterMenu_Click);
this.AudioNewAmbientRuleMenu.Enabled = false;
this.AudioNewAmbientRuleMenu.Name = "AudioNewAmbientRuleMenu";
this.AudioNewAmbientRuleMenu.Size = new System.Drawing.Size(216, 22);
this.AudioNewAmbientRuleMenu.Text = "New Ambient Rule";
this.AudioNewAmbientRuleMenu.Click += new System.EventHandler(this.AudioNewAmbientRuleMenu_Click);
//
// AudioNewAmbientEmitterListMenu
// AudioNewStaticEmitterListMenu
//
this.AudioNewAmbientEmitterListMenu.Enabled = false;
this.AudioNewAmbientEmitterListMenu.Name = "AudioNewAmbientEmitterListMenu";
this.AudioNewAmbientEmitterListMenu.Size = new System.Drawing.Size(216, 22);
this.AudioNewAmbientEmitterListMenu.Text = "New Ambient Emitter List";
this.AudioNewAmbientEmitterListMenu.Click += new System.EventHandler(this.AudioNewAmbientEmitterListMenu_Click);
this.AudioNewStaticEmitterListMenu.Enabled = false;
this.AudioNewStaticEmitterListMenu.Name = "AudioNewStaticEmitterListMenu";
this.AudioNewStaticEmitterListMenu.Size = new System.Drawing.Size(216, 22);
this.AudioNewStaticEmitterListMenu.Text = "New Static Emitter List";
this.AudioNewStaticEmitterListMenu.Click += new System.EventHandler(this.AudioNewStaticEmitterListMenu_Click);
//
// AudioNewAmbientZoneMenu
//
@ -1698,6 +1700,14 @@
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
//
// AudioNewStaticEmitterMenu
//
this.AudioNewStaticEmitterMenu.Enabled = false;
this.AudioNewStaticEmitterMenu.Name = "AudioNewStaticEmitterMenu";
this.AudioNewStaticEmitterMenu.Size = new System.Drawing.Size(216, 22);
this.AudioNewStaticEmitterMenu.Text = "New Static Emitter";
this.AudioNewStaticEmitterMenu.Click += new System.EventHandler(this.AudioNewStaticEmitterMenu_Click);
//
// ProjectForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1840,8 +1850,8 @@
private System.Windows.Forms.ToolStripMenuItem AudioMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNameMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator23;
private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientEmitterMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientEmitterListMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientRuleMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewStaticEmitterListMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientZoneMenu;
private System.Windows.Forms.ToolStripMenuItem AudioNewAmbientZoneListMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator24;
@ -1907,5 +1917,6 @@
private System.Windows.Forms.ToolStripMenuItem YtdRemoveFromProjectMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator31;
private System.Windows.Forms.ToolStripMenuItem deleteGrassToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem AudioNewStaticEmitterMenu;
}
}

View File

@ -72,11 +72,12 @@ namespace CodeWalker.Project
private MCScenarioChainingEdge CurrentScenarioChainEdge;
private RelFile CurrentAudioFile;
private AudioPlacement CurrentAudioZone;
private AudioPlacement CurrentAudioEmitter;
private Dat151AmbientZoneList CurrentAudioZoneList;
private Dat151StaticEmitterList CurrentAudioEmitterList;
private Dat151Interior CurrentAudioInterior;
private AudioPlacement CurrentAudioAmbientZone;
private AudioPlacement CurrentAudioAmbientRule;
private AudioPlacement CurrentAudioStaticEmitter;
private Dat151AmbientZoneList CurrentAudioAmbientZoneList;
private Dat151StaticEmitterList CurrentAudioStaticEmitterList;
private Dat151InteriorSettings CurrentAudioInterior;
private Dat151InteriorRoom CurrentAudioInteriorRoom;
private YbnFile CurrentYbnFile;
@ -581,33 +582,40 @@ namespace CodeWalker.Project
(panel) => { panel.SetFile(CurrentAudioFile); }, //updateFunc
(panel) => { return panel.CurrentFile == CurrentAudioFile; }); //findFunc
}
public void ShowEditAudioZonePanel(bool promote)
public void ShowEditAudioAmbientZonePanel(bool promote)
{
ShowPanel(promote,
() => { return new EditAudioZonePanel(this); }, //createFunc
(panel) => { panel.SetZone(CurrentAudioZone); }, //updateFunc
(panel) => { return panel.CurrentZone?.AudioZone == CurrentAudioZone?.AudioZone; }); //findFunc
() => { return new EditAudioAmbientZonePanel(this); }, //createFunc
(panel) => { panel.SetZone(CurrentAudioAmbientZone); }, //updateFunc
(panel) => { return panel.CurrentZone?.AmbientZone == CurrentAudioAmbientZone?.AmbientZone; }); //findFunc
}
public void ShowEditAudioEmitterPanel(bool promote)
public void ShowEditAudioAmbientRulePanel(bool promote)
{
ShowPanel(promote,
() => { return new EditAudioEmitterPanel(this); }, //createFunc
(panel) => { panel.SetEmitter(CurrentAudioEmitter); }, //updateFunc
(panel) => { return panel.CurrentEmitter?.AudioEmitter == CurrentAudioEmitter?.AudioEmitter; }); //findFunc
() => { return new EditAudioAmbientRulePanel(this); }, //createFunc
(panel) => { panel.SetRule(CurrentAudioAmbientRule); }, //updateFunc
(panel) => { return panel.CurrentRule?.AmbientRule == CurrentAudioAmbientRule?.AmbientRule; }); //findFunc
}
public void ShowEditAudioZoneListPanel(bool promote)
public void ShowEditAudioStaticEmitterPanel(bool promote)
{
ShowPanel(promote,
() => { return new EditAudioZoneListPanel(this); }, //createFunc
(panel) => { panel.SetZoneList(CurrentAudioZoneList); }, //updateFunc
(panel) => { return panel.CurrentZoneList == CurrentAudioZoneList; }); //findFunc
() => { return new EditAudioStaticEmitterPanel(this); }, //createFunc
(panel) => { panel.SetEmitter(CurrentAudioStaticEmitter); }, //updateFunc
(panel) => { return panel.CurrentEmitter?.StaticEmitter == CurrentAudioStaticEmitter?.StaticEmitter; }); //findFunc
}
public void ShowEditAudioEmitterListPanel(bool promote)
public void ShowEditAudioAmbientZoneListPanel(bool promote)
{
ShowPanel(promote,
() => { return new EditAudioEmitterListPanel(this); }, //createFunc
(panel) => { panel.SetEmitterList(CurrentAudioEmitterList); }, //updateFunc
(panel) => { return panel.CurrentEmitterList == CurrentAudioEmitterList; }); //findFunc
() => { return new EditAudioAmbientZoneListPanel(this); }, //createFunc
(panel) => { panel.SetZoneList(CurrentAudioAmbientZoneList); }, //updateFunc
(panel) => { return panel.CurrentZoneList == CurrentAudioAmbientZoneList; }); //findFunc
}
public void ShowEditAudioStaticEmitterListPanel(bool promote)
{
ShowPanel(promote,
() => { return new EditAudioStaticEmitterListPanel(this); }, //createFunc
(panel) => { panel.SetEmitterList(CurrentAudioStaticEmitterList); }, //updateFunc
(panel) => { return panel.CurrentEmitterList == CurrentAudioStaticEmitterList; }); //findFunc
}
public void ShowEditAudioInteriorPanel(bool promote)
{
@ -745,21 +753,25 @@ namespace CodeWalker.Project
{
ShowEditScenarioYmtPanel(promote);
}
if (CurrentAudioZone != null)
if (CurrentAudioAmbientZone != null)
{
ShowEditAudioZonePanel(promote);
ShowEditAudioAmbientZonePanel(promote);
}
else if (CurrentAudioEmitter != null)
else if (CurrentAudioAmbientRule != null)
{
ShowEditAudioEmitterPanel(promote);
ShowEditAudioAmbientRulePanel(promote);
}
else if (CurrentAudioZoneList != null)
else if (CurrentAudioStaticEmitter != null)
{
ShowEditAudioZoneListPanel(promote);
ShowEditAudioStaticEmitterPanel(promote);
}
else if (CurrentAudioEmitterList != null)
else if (CurrentAudioAmbientZoneList != null)
{
ShowEditAudioEmitterListPanel(promote);
ShowEditAudioAmbientZoneListPanel(promote);
}
else if (CurrentAudioStaticEmitterList != null)
{
ShowEditAudioStaticEmitterListPanel(promote);
}
else if (CurrentAudioInterior != null)
{
@ -855,11 +867,12 @@ namespace CodeWalker.Project
CurrentScenarioNode = item as ScenarioNode;
CurrentScenarioChainEdge = item as MCScenarioChainingEdge;
CurrentAudioFile = item as RelFile;
CurrentAudioZone = item as AudioPlacement;
CurrentAudioEmitter = item as AudioPlacement;
CurrentAudioZoneList = item as Dat151AmbientZoneList;
CurrentAudioEmitterList = item as Dat151StaticEmitterList;
CurrentAudioInterior = item as Dat151Interior;
CurrentAudioAmbientZone = item as AudioPlacement;
CurrentAudioAmbientRule = item as AudioPlacement;
CurrentAudioStaticEmitter = item as AudioPlacement;
CurrentAudioAmbientZoneList = item as Dat151AmbientZoneList;
CurrentAudioStaticEmitterList = item as Dat151StaticEmitterList;
CurrentAudioInterior = item as Dat151InteriorSettings;
CurrentAudioInteriorRoom = item as Dat151InteriorRoom;
CurrentMloRoom = item as MCMloRoomDef;
CurrentMloPortal = item as MCMloPortalDef;
@ -869,14 +882,17 @@ namespace CodeWalker.Project
CurrentYftFile = item as YftFile;
CurrentYtdFile = item as YtdFile;
if (CurrentAudioZone?.AudioZone == null) CurrentAudioZone = null;
if (CurrentAudioEmitter?.AudioEmitter == null) CurrentAudioEmitter = null;
if (CurrentAudioAmbientZone?.AmbientZone == null) CurrentAudioAmbientZone = null;
if (CurrentAudioAmbientRule?.AmbientRule == null) CurrentAudioAmbientRule = null;
if (CurrentAudioStaticEmitter?.StaticEmitter == null) CurrentAudioStaticEmitter = null;
//need to create a temporary AudioPlacement wrapper for these, since AudioPlacements usually come from WorldForm
var daz = item as Dat151AmbientZone;
var dae = item as Dat151AmbientRule;
if (daz != null) CurrentAudioZone = new AudioPlacement(daz.Rel, daz);
if (dae != null) CurrentAudioEmitter = new AudioPlacement(dae.Rel, dae);
var dse = item as Dat151StaticEmitter;
if (daz != null) CurrentAudioAmbientZone = new AudioPlacement(daz.Rel, daz);
if (dae != null) CurrentAudioAmbientRule = new AudioPlacement(dae.Rel, dae);
if (dse != null) CurrentAudioStaticEmitter = new AudioPlacement(dse.Rel, dse);
@ -988,21 +1004,25 @@ namespace CodeWalker.Project
{
CurrentScenario = CurrentScenarioChainEdge.Region?.Ymt;
}
if (CurrentAudioZone != null)
if (CurrentAudioAmbientZone != null)
{
CurrentAudioFile = CurrentAudioZone.RelFile;
CurrentAudioFile = CurrentAudioAmbientZone.RelFile;
}
if (CurrentAudioEmitter != null)
if (CurrentAudioAmbientRule != null)
{
CurrentAudioFile = CurrentAudioEmitter.RelFile;
CurrentAudioFile = CurrentAudioAmbientRule.RelFile;
}
if (CurrentAudioZoneList != null)
if (CurrentAudioStaticEmitter != null)
{
CurrentAudioFile = CurrentAudioZoneList.Rel;
CurrentAudioFile = CurrentAudioStaticEmitter.RelFile;
}
if (CurrentAudioEmitterList != null)
if (CurrentAudioAmbientZoneList != null)
{
CurrentAudioFile = CurrentAudioEmitterList.Rel;
CurrentAudioFile = CurrentAudioAmbientZoneList.Rel;
}
if (CurrentAudioStaticEmitterList != null)
{
CurrentAudioFile = CurrentAudioStaticEmitterList.Rel;
}
if (CurrentAudioInterior != null)
{
@ -1845,8 +1865,9 @@ namespace CodeWalker.Project
else if (sel.NavPortal != null) return NewNavPortal(sel.NavPortal, copyPosition, selectNew);
else if (sel.TrainTrackNode != null) return NewTrainNode(sel.TrainTrackNode, copyPosition, selectNew);
else if (sel.ScenarioNode != null) return NewScenarioNode(sel.ScenarioNode, copyPosition, selectNew);
else if (sel.Audio?.AudioZone != null) return NewAudioZone(sel.Audio, copyPosition, selectNew);
else if (sel.Audio?.AudioEmitter != null) return NewAudioEmitter(sel.Audio, copyPosition, selectNew);
else if (sel.Audio?.AmbientZone != null) return NewAudioAmbientZone(sel.Audio, copyPosition, selectNew);
else if (sel.Audio?.AmbientRule != null) return NewAudioAmbientRule(sel.Audio, copyPosition, selectNew);
else if (sel.Audio?.StaticEmitter != null) return NewAudioStaticEmitter(sel.Audio, copyPosition, selectNew);
return null;
}
public void DeleteObject(MapSelection sel)
@ -1873,8 +1894,9 @@ namespace CodeWalker.Project
else if (sel.NavPortal != null) DeleteNavPortal();
else if (sel.TrainTrackNode != null) DeleteTrainNode();
else if (sel.ScenarioNode != null) DeleteScenarioNode();
else if (sel.Audio?.AudioZone != null) DeleteAudioZone();
else if (sel.Audio?.AudioEmitter != null) DeleteAudioEmitter();
else if (sel.Audio?.AmbientZone != null) DeleteAudioAmbientZone();
else if (sel.Audio?.AmbientRule != null) DeleteAudioAmbientRule();
else if (sel.Audio?.StaticEmitter != null) DeleteAudioStaticEmitter();
}
private void SetObject(ref MapSelection sel)
{
@ -1893,8 +1915,9 @@ namespace CodeWalker.Project
else if (sel.NavPortal != null) SetProjectItem(sel.NavPortal, false);
else if (sel.TrainTrackNode != null) SetProjectItem(sel.TrainTrackNode, false);
else if (sel.ScenarioNode != null) SetProjectItem(sel.ScenarioNode, false);
else if (sel.Audio?.AudioZone != null) SetProjectItem(sel.Audio, false);
else if (sel.Audio?.AudioEmitter != null) SetProjectItem(sel.Audio, false);
else if (sel.Audio?.AmbientZone != null) SetProjectItem(sel.Audio, false);
else if (sel.Audio?.AmbientRule != null) SetProjectItem(sel.Audio, false);
else if (sel.Audio?.StaticEmitter != null) SetProjectItem(sel.Audio, false);
}
@ -6382,13 +6405,17 @@ namespace CodeWalker.Project
}
CurrentAudioFile = rel;
RefreshUI();
if (CurrentAudioZone != null)
if (CurrentAudioAmbientZone != null)
{
ProjectExplorer?.TrySelectAudioZoneTreeNode(CurrentAudioZone);
ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(CurrentAudioAmbientZone);
}
else if (CurrentAudioEmitter != null)
else if (CurrentAudioAmbientRule != null)
{
ProjectExplorer?.TrySelectAudioEmitterTreeNode(CurrentAudioEmitter);
ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(CurrentAudioAmbientRule);
}
else if (CurrentAudioStaticEmitter != null)
{
ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(CurrentAudioStaticEmitter);
}
}
public void RemoveAudioFileFromProject()
@ -6407,13 +6434,13 @@ namespace CodeWalker.Project
return CurrentProjectFile.ContainsAudioRel(rel);
}
public AudioPlacement NewAudioZone(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true)
public AudioPlacement NewAudioAmbientZone(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true)
{
if (CurrentAudioFile == null) return null;
if (copy == null)
{
copy = CurrentAudioZone;
copy = CurrentAudioAmbientZone;
}
bool cp = copyPosition && (copy != null);
@ -6422,33 +6449,36 @@ namespace CodeWalker.Project
//AA800424 box, line
//AA800420 sphere
zone.Flags0 = cp ? copy.AudioZone.Flags0.Value : 0xAA800424;
zone.Flags1 = cp ? copy.AudioZone.Flags1 : 0;
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.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.Rules = cp ? copy.AudioZone.Rules : null;
zone.DependentAmbiencesCount = cp ? copy.AudioZone.DependentAmbiencesCount : 0;
zone.DependentAmbiences = cp ? copy.AudioZone.DependentAmbiences : null;
zone.Name = "zone1";
zone.Flags = cp ? copy.AmbientZone.Flags.Value : 0xAA800424;
zone.Shape = cp ? copy.AmbientZone.Shape : Dat151ZoneShape.Box;
zone.PositioningZoneSize = cp ? copy.AmbientZone.PositioningZoneSize : Vector3.One * 10.0f;
zone.PositioningZoneRotationAngle = (ushort)(cp ? copy.AmbientZone.PositioningZoneRotationAngle : 0);
zone.PositioningZonePostRotationOffset = cp ? copy.AmbientZone.PositioningZonePostRotationOffset : Vector3.Zero;
zone.PositioningZoneSizeScale = cp ? copy.AmbientZone.PositioningZoneSizeScale : new Vector3(1, 1, 1);
zone.ActivationZoneSize = cp ? copy.AmbientZone.ActivationZoneSize : Vector3.One * 15.0f;
zone.ActivationZoneRotationAngle = (ushort)(cp ? copy.AmbientZone.ActivationZoneRotationAngle : 0);
zone.ActivationZonePostRotationOffset = cp ? copy.AmbientZone.ActivationZonePostRotationOffset : Vector3.Zero;
zone.ActivationZoneSizeScale = cp ? copy.AmbientZone.ActivationZoneSizeScale : new Vector3(1, 1, 1);
zone.BuiltUpFactor = cp ? copy.AmbientZone.BuiltUpFactor : 0;
zone.MinPedDensity = cp ? copy.AmbientZone.MinPedDensity : 0;
zone.MaxPedDensity = cp ? copy.AmbientZone.MaxPedDensity : 0;
zone.PedDensityTOD = cp ? copy.AmbientZone.PedDensityTOD : 0;
zone.PedDensityScalar = cp ? copy.AmbientZone.PedDensityScalar : 0;
zone.MaxWindInfluence = cp ? copy.AmbientZone.MaxWindInfluence : 0;
zone.MinWindInfluence = cp ? copy.AmbientZone.MinWindInfluence : 0;
zone.WindElevationSounds = cp ? copy.AmbientZone.WindElevationSounds : 0;
zone.EnvironmentRule = cp ? copy.AmbientZone.EnvironmentRule : 0;
zone.AudioScene = cp ? copy.AmbientZone.AudioScene : 0;
zone.UnderwaterCreakFactor = cp ? copy.AmbientZone.UnderwaterCreakFactor : 0;
zone.PedWallaSettings = cp ? copy.AmbientZone.PedWallaSettings : 0;
zone.RandomisedRadioSettings = cp ? copy.AmbientZone.RandomisedRadioSettings : 0;
zone.NumRulesToPlay = cp ? copy.AmbientZone.NumRulesToPlay : (byte)4;
zone.ZoneWaterCalculation = cp ? copy.AmbientZone.ZoneWaterCalculation : (byte)1;
zone.NumDirAmbiences = cp ? copy.AmbientZone.NumDirAmbiences : (byte)0;
zone.NumRules = cp ? copy.AmbientZone.NumRules : (byte)0;
zone.Rules = cp ? copy.AmbientZone.Rules : null;
zone.DirAmbiences = cp ? copy.AmbientZone.DirAmbiences : null;
zone.Name = "ambientzone1";
zone.NameHash = JenkHash.GenHash(zone.Name);
var ap = new AudioPlacement(CurrentAudioFile, zone);
@ -6467,10 +6497,10 @@ namespace CodeWalker.Project
{
LoadProjectTree();
ProjectExplorer?.TrySelectAudioZoneTreeNode(ap);
CurrentAudioZone = ap;
ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(ap);
CurrentAudioAmbientZone = ap;
ShowEditAudioZonePanel(false);
ShowEditAudioAmbientZonePanel(false);
}
if (WorldForm != null)
@ -6480,12 +6510,12 @@ namespace CodeWalker.Project
return ap;
}
public bool DeleteAudioZone()
public bool DeleteAudioAmbientZone()
{
if (CurrentAudioZone?.RelFile != CurrentAudioFile) return false;
if (CurrentAudioAmbientZone?.RelFile != CurrentAudioFile) return false;
if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete..
if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete..
if (CurrentAudioZone?.AudioZone == null) return false;
if (CurrentAudioAmbientZone?.AmbientZone == null) return false;
//if (MessageBox.Show("Are you sure you want to delete this audio zone?\n" + CurrentAudioZone.GetNameString() + "\n" + CurrentAudioZone.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes)
@ -6498,29 +6528,29 @@ namespace CodeWalker.Project
{
lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering...
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioZone.AudioZone);
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZone.AmbientZone);
WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile);
}
}
else
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioZone.AudioZone);
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZone.AmbientZone);
}
if (!res)
{
MessageBox.Show("Unspecified error occurred when removing the audio zone from the file!");
}
var delzone = CurrentAudioZone;
var delzone = CurrentAudioAmbientZone;
var delrel = CurrentAudioFile;
ProjectExplorer?.RemoveAudioZoneTreeNode(delzone);
ProjectExplorer?.RemoveAudioAmbientZoneTreeNode(delzone);
ProjectExplorer?.SetAudioRelHasChanged(delrel, true);
ClosePanel((EditAudioZonePanel p) => { return p.CurrentZone.AudioZone == delzone.AudioZone; });
ClosePanel((EditAudioAmbientZonePanel p) => { return p.CurrentZone.AmbientZone == delzone.AmbientZone; });
CurrentAudioZone = null;
CurrentAudioAmbientZone = null;
if (WorldForm != null)
{
@ -6529,42 +6559,159 @@ namespace CodeWalker.Project
return true;
}
public bool IsCurrentAudioZone(AudioPlacement zone)
{
return zone == CurrentAudioZone;
}
public AudioPlacement NewAudioEmitter(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true)
public AudioPlacement NewAudioAmbientRule(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true)
{
if (CurrentAudioFile == null) return null;
if (copy == null)
{
copy = CurrentAudioEmitter;
copy = CurrentAudioAmbientRule;
}
bool cp = copyPosition && (copy != null);
var emitter = new Dat151AmbientRule(CurrentAudioFile);
var rule = 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;
rule.DynamicBankID = cp ? copy.AmbientRule.DynamicBankID : 0;
rule.MinDist = cp ? copy.AmbientRule.MinDist : 0.0f;
rule.MaxDist = cp ? copy.AmbientRule.MaxDist : 20.0f;
rule.Weight = cp ? copy.AmbientRule.Weight : 1.0f;
rule.MinTimeMinutes = cp ? copy.AmbientRule.MinTimeMinutes : (ushort)0;
rule.MaxTimeMinutes = cp ? copy.AmbientRule.MaxTimeMinutes : (ushort)1440;
rule.MinRepeatTime = cp ? copy.AmbientRule.MinRepeatTime : (ushort)0;
rule.MinRepeatTimeVariance = cp ? copy.AmbientRule.MinRepeatTimeVariance : (ushort)0;
rule.SpawnHeight = cp ? copy.AmbientRule.SpawnHeight : (byte)0;
rule.ExplicitSpawn = cp ? copy.AmbientRule.ExplicitSpawn : Dat151AmbientRule.ExplicitSpawnType.WorldRelative;
rule.MaxLocalInstances = cp ? copy.AmbientRule.MaxLocalInstances : (byte)1;
rule.MaxGlobalInstances = cp ? copy.AmbientRule.MaxGlobalInstances : (byte)1;
rule.BlockabilityFactor = cp ? copy.AmbientRule.BlockabilityFactor : (byte)100;
rule.MaxPathDepth = cp ? copy.AmbientRule.MaxPathDepth : (byte)3;
emitter.Name = "emitter1";
rule.Name = "ambientrule1";
rule.NameHash = JenkHash.GenHash(rule.Name);
var ap = new AudioPlacement(CurrentAudioFile, rule);
ap.Name = rule.Name;
ap.NameHash = rule.NameHash;
Vector3 pos = cp ? copy.Position : GetSpawnPos(20.0f);
Quaternion ori = cp ? copy.Orientation : Quaternion.Identity;
ap.SetPosition(pos);
ap.SetOrientation(ori);
CurrentAudioFile.AddRelData(rule);
if (selectNew)
{
LoadProjectTree();
ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(ap);
CurrentAudioAmbientRule = ap;
ShowEditAudioAmbientRulePanel(false);
}
if (WorldForm != null)
{
WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile);
}
return ap;
}
public bool DeleteAudioAmbientRule()
{
if (CurrentAudioAmbientRule?.RelFile != CurrentAudioFile) return false;
if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete..
if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete..
if (CurrentAudioAmbientRule?.AmbientRule == null) return false;
//if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioEmitter.GetNameString() + "\n" + CurrentAudioEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes)
//{
// return true;
//}
bool res = false;
if (WorldForm != null)
{
lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering...
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientRule.AmbientRule);
WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile);
}
}
else
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientRule.AmbientRule);
}
if (!res)
{
MessageBox.Show("Unspecified error occurred when removing the audio rule from the file!");
}
var delem = CurrentAudioAmbientRule;
var delrel = CurrentAudioFile;
ProjectExplorer?.RemoveAudioAmbientRuleTreeNode(delem);
ProjectExplorer?.SetAudioRelHasChanged(delrel, true);
CurrentAudioAmbientRule = null;
ClosePanel((EditAudioAmbientRulePanel p) => { return p.CurrentRule.AmbientRule == delem.AmbientRule; });
if (WorldForm != null)
{
WorldForm.SelectItem(null);
}
return true;
}
public AudioPlacement NewAudioStaticEmitter(AudioPlacement copy = null, bool copyPosition = false, bool selectNew = true)
{
if (CurrentAudioFile == null) return null;
if (copy == null)
{
copy = CurrentAudioStaticEmitter;
}
bool cp = copyPosition && (copy != null);
var emitter = new Dat151StaticEmitter(CurrentAudioFile);
emitter.Flags = cp ? copy.StaticEmitter.Flags : 0;
emitter.ChildSound = cp ? copy.StaticEmitter.ChildSound : 0;
emitter.RadioStation = cp ? copy.StaticEmitter.RadioStation : 0;
emitter.MinDistance = cp ? copy.StaticEmitter.MinDistance : 0.0f;
emitter.MaxDistance = cp ? copy.StaticEmitter.MaxDistance : 20.0f;
emitter.EmittedVolume = cp ? copy.StaticEmitter.EmittedVolume : 0;
emitter.LPFCutoff = cp ? copy.StaticEmitter.LPFCutoff : (ushort)0;
emitter.HPFCutoff = cp ? copy.StaticEmitter.HPFCutoff : (ushort)0;
emitter.RolloffFactor = cp ? copy.StaticEmitter.RolloffFactor : (ushort)0;
emitter.Interior = cp ? copy.StaticEmitter.Interior : 0;
emitter.Room = cp ? copy.StaticEmitter.Room : 0;
emitter.RadioStationForScore = cp ? copy.StaticEmitter.RadioStationForScore : 0;
emitter.MaxLeakage = cp ? copy.StaticEmitter.MaxLeakage : 1.0f;
emitter.MinLeakageDistance = cp ? copy.StaticEmitter.MinLeakageDistance : (ushort)0;
emitter.MaxLeakageDistance = cp ? copy.StaticEmitter.MaxLeakageDistance : (ushort)0;
emitter.Alarm = cp ? copy.StaticEmitter.Alarm : 0;
emitter.OnBreakOneShot = cp ? copy.StaticEmitter.OnBreakOneShot : 0;
emitter.MaxPathDepth = cp ? copy.StaticEmitter.MaxPathDepth : (byte)3;
emitter.SmallReverbSend = cp ? copy.StaticEmitter.SmallReverbSend : (byte)0;
emitter.MediumReverbSend = cp ? copy.StaticEmitter.MediumReverbSend : (byte)0;
emitter.LargeReverbSend = cp ? copy.StaticEmitter.LargeReverbSend : (byte)0;
emitter.MinTimeMinutes = cp ? copy.StaticEmitter.MinTimeMinutes : (ushort)0;
emitter.MaxTimeMinutes = cp ? copy.StaticEmitter.MaxTimeMinutes : (ushort)1440;
emitter.BrokenHealth = cp ? copy.StaticEmitter.BrokenHealth : 0.0f;
emitter.UndamagedHealth = cp ? copy.StaticEmitter.UndamagedHealth : 0.0f;
emitter.Name = "staticemitter1";
emitter.NameHash = JenkHash.GenHash(emitter.Name);
var ap = new AudioPlacement(CurrentAudioFile, emitter);
@ -6583,10 +6730,10 @@ namespace CodeWalker.Project
{
LoadProjectTree();
ProjectExplorer?.TrySelectAudioEmitterTreeNode(ap);
CurrentAudioEmitter = ap;
ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(ap);
CurrentAudioStaticEmitter = ap;
ShowEditAudioEmitterPanel(false);
ShowEditAudioStaticEmitterPanel(false);
}
if (WorldForm != null)
@ -6596,15 +6743,15 @@ namespace CodeWalker.Project
return ap;
}
public bool DeleteAudioEmitter()
public bool DeleteAudioStaticEmitter()
{
if (CurrentAudioEmitter?.RelFile != CurrentAudioFile) return false;
if (CurrentAudioStaticEmitter?.RelFile != CurrentAudioFile) return false;
if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete..
if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete..
if (CurrentAudioEmitter?.AudioEmitter == null) return false;
if (CurrentAudioStaticEmitter?.StaticEmitter == null) return false;
//if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioEmitter.GetNameString() + "\n" + CurrentAudioEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes)
//if (MessageBox.Show("Are you sure you want to delete this audio emitter?\n" + CurrentAudioStaticEmitter.GetNameString() + "\n" + CurrentAudioStaticEmitter.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes)
//{
// return true;
//}
@ -6614,29 +6761,29 @@ namespace CodeWalker.Project
{
lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering...
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitter.AudioEmitter);
res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitter.StaticEmitter);
WorldForm.UpdateAudioPlacementGraphics(CurrentAudioFile);
}
}
else
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitter.AudioEmitter);
res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitter.StaticEmitter);
}
if (!res)
{
MessageBox.Show("Unspecified error occurred when removing the audio emitter from the file!");
MessageBox.Show("Unspecified error occurred when removing the static emitter from the file!");
}
var delem = CurrentAudioEmitter;
var delem = CurrentAudioStaticEmitter;
var delrel = CurrentAudioFile;
ProjectExplorer?.RemoveAudioEmitterTreeNode(delem);
ProjectExplorer?.RemoveAudioStaticEmitterTreeNode(delem);
ProjectExplorer?.SetAudioRelHasChanged(delrel, true);
CurrentAudioEmitter = null;
CurrentAudioStaticEmitter = null;
ClosePanel((EditAudioEmitterPanel p) => { return p.CurrentEmitter.AudioEmitter == delem.AudioEmitter; });
ClosePanel((EditAudioStaticEmitterPanel p) => { return p.CurrentEmitter.StaticEmitter == delem.StaticEmitter; });
if (WorldForm != null)
@ -6646,12 +6793,8 @@ namespace CodeWalker.Project
return true;
}
public bool IsCurrentAudioEmitter(AudioPlacement emitter)
{
return emitter == CurrentAudioEmitter;
}
public void NewAudioZoneList()
public void NewAudioAmbientZoneList()
{
if (CurrentAudioFile == null) return;
@ -6665,14 +6808,14 @@ namespace CodeWalker.Project
LoadProjectTree();
ProjectExplorer?.TrySelectAudioZoneListTreeNode(zonelist);
CurrentAudioZoneList = zonelist;
ProjectExplorer?.TrySelectAudioAmbientZoneListTreeNode(zonelist);
CurrentAudioAmbientZoneList = zonelist;
ShowEditAudioZoneListPanel(false);
ShowEditAudioAmbientZoneListPanel(false);
}
public bool DeleteAudioZoneList()
public bool DeleteAudioAmbientZoneList()
{
if (CurrentAudioZoneList?.Rel != CurrentAudioFile) return false;
if (CurrentAudioAmbientZoneList?.Rel != CurrentAudioFile) return false;
if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete..
if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete..
@ -6687,37 +6830,33 @@ namespace CodeWalker.Project
{
lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering...
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioZoneList);
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZoneList);
//WorldForm.SelectItem(null, null, null);
}
}
else
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioZoneList);
res = CurrentAudioFile.RemoveRelData(CurrentAudioAmbientZoneList);
}
if (!res)
{
MessageBox.Show("Unspecified error occurred when removing the audio zone list from the file!");
}
var delzl = CurrentAudioZoneList;
var delzl = CurrentAudioAmbientZoneList;
var delrel = CurrentAudioFile;
ProjectExplorer?.RemoveAudioZoneListTreeNode(delzl);
ProjectExplorer?.RemoveAudioAmbientZoneListTreeNode(delzl);
ProjectExplorer?.SetAudioRelHasChanged(delrel, true);
ClosePanel((EditAudioZoneListPanel p) => { return p.Tag == delzl; });
ClosePanel((EditAudioAmbientZoneListPanel p) => { return p.Tag == delzl; });
CurrentAudioZoneList = null;
CurrentAudioAmbientZoneList = null;
return true;
}
public bool IsCurrentAudioZoneList(Dat151AmbientZoneList list)
{
return list == CurrentAudioZoneList;
}
public void NewAudioEmitterList()
public void NewAudioStaticEmitterList()
{
if (CurrentAudioFile == null) return;
@ -6732,14 +6871,14 @@ namespace CodeWalker.Project
LoadProjectTree();
ProjectExplorer?.TrySelectAudioEmitterListTreeNode(emlist);
CurrentAudioEmitterList = emlist;
ProjectExplorer?.TrySelectAudioStaticEmitterListTreeNode(emlist);
CurrentAudioStaticEmitterList = emlist;
ShowEditAudioEmitterListPanel(false);
ShowEditAudioStaticEmitterListPanel(false);
}
public bool DeleteAudioEmitterList()
public bool DeleteAudioStaticEmitterList()
{
if (CurrentAudioEmitterList?.Rel != CurrentAudioFile) return false;
if (CurrentAudioStaticEmitterList?.Rel != CurrentAudioFile) return false;
if (CurrentAudioFile?.RelDatas == null) return false; //nothing to delete..
if (CurrentAudioFile?.RelDatasSorted == null) return false; //nothing to delete..
@ -6754,48 +6893,44 @@ namespace CodeWalker.Project
{
lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering...
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitterList);
res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitterList);
//WorldForm.SelectItem(null, null, null);
}
}
else
{
res = CurrentAudioFile.RemoveRelData(CurrentAudioEmitterList);
res = CurrentAudioFile.RemoveRelData(CurrentAudioStaticEmitterList);
}
if (!res)
{
MessageBox.Show("Unspecified error occurred when removing the audio emitter list from the file!");
}
var delel = CurrentAudioEmitterList;
var delel = CurrentAudioStaticEmitterList;
var delrel = CurrentAudioFile;
ProjectExplorer?.RemoveAudioEmitterListTreeNode(delel);
ProjectExplorer?.RemoveAudioStaticEmitterListTreeNode(delel);
ProjectExplorer?.SetAudioRelHasChanged(delrel, true);
ClosePanel((EditAudioEmitterListPanel p) => { return p.Tag == delel; });
ClosePanel((EditAudioStaticEmitterListPanel p) => { return p.Tag == delel; });
CurrentAudioEmitterList = null;
CurrentAudioStaticEmitterList = null;
return true;
}
public bool IsCurrentAudioEmitterList(Dat151StaticEmitterList list)
{
return list == CurrentAudioEmitterList;
}
public void NewAudioInterior()
{
if (CurrentAudioFile == null) return;
var interior = new Dat151Interior(CurrentAudioFile);
var interior = new Dat151InteriorSettings(CurrentAudioFile);
interior.Name = "interior1";
interior.NameHash = JenkHash.GenHash(interior.Name);
interior.Flags = 0xAAAAA844;
interior.Walla = 3565506855;
interior.Tunnel = (uint)MetaName.null_sound;
interior.InteriorWallaSoundSet = 3565506855;
interior.InteriorReflections = (uint)MetaName.null_sound;
CurrentAudioFile.AddRelData(interior);
@ -6848,10 +6983,6 @@ namespace CodeWalker.Project
return true;
}
public bool IsCurrentAudioInterior(Dat151Interior interior)
{
return interior == CurrentAudioInterior;
}
public void NewAudioInteriorRoom()
{
@ -6863,9 +6994,9 @@ namespace CodeWalker.Project
room.Name = "room1";
room.NameHash = JenkHash.GenHash(room.Name);
room.Flags0 = 0xAAAAAAAA;
room.Sound = (uint)MetaName.null_sound;
room.SoundSet = 3565506855;//?
room.Flags = 0xAAAAAAAA;
room.RoomToneSound = (uint)MetaName.null_sound;
room.InteriorWallaSoundSet = 3565506855;//?
CurrentAudioFile.AddRelData(room);
@ -6919,10 +7050,6 @@ namespace CodeWalker.Project
return true;
}
public bool IsCurrentAudioInteriorRoom(Dat151InteriorRoom room)
{
return room == CurrentAudioInteriorRoom;
}
@ -7639,13 +7766,17 @@ namespace CodeWalker.Project
}
else if (AudioFileExistsInProject(audiofile))
{
if ((audiopl?.AudioZone != null) && (wasmult || (audiopl != CurrentAudioZone)))
if ((audiopl?.AmbientZone != null) && (wasmult || (audiopl != CurrentAudioAmbientZone)))
{
ProjectExplorer?.TrySelectAudioZoneTreeNode(audiopl);
ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audiopl);
}
if ((audiopl?.AudioEmitter != null) && (wasmult || (audiopl != CurrentAudioEmitter)))
if ((audiopl?.AmbientRule != null) && (wasmult || (audiopl != CurrentAudioAmbientRule)))
{
ProjectExplorer?.TrySelectAudioEmitterTreeNode(audiopl);
ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audiopl);
}
if ((audiopl?.StaticEmitter != null) && (wasmult || (audiopl != CurrentAudioStaticEmitter)))
{
ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audiopl);
}
}
else
@ -7685,10 +7816,11 @@ namespace CodeWalker.Project
CurrentScenarioNode = scenariond;
CurrentScenarioChainEdge = scenarioedge;
CurrentAudioFile = audiofile;
CurrentAudioZone = (audiopl?.AudioZone != null) ? audiopl : null;
CurrentAudioEmitter = (audiopl?.AudioEmitter != null) ? audiopl : null;
CurrentAudioZoneList = null;
CurrentAudioEmitterList = null;
CurrentAudioAmbientZone = (audiopl?.AmbientZone != null) ? audiopl : null;
CurrentAudioAmbientRule = (audiopl?.AmbientRule != null) ? audiopl : null;
CurrentAudioStaticEmitter = (audiopl?.StaticEmitter != null) ? audiopl : null;
CurrentAudioAmbientZoneList = null;
CurrentAudioStaticEmitterList = null;
CurrentYdrFile = null;
CurrentYddFile = null;
CurrentYftFile = null;
@ -8348,37 +8480,54 @@ namespace CodeWalker.Project
{
audio.RelFile.HasChanged = true;
AddAudioFileToProject(audio.RelFile);
if (audio.AudioZone != null)
if (audio.AmbientZone != null)
{
ProjectExplorer?.TrySelectAudioZoneTreeNode(audio);
ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audio);
}
if (audio.AudioEmitter != null)
if (audio.AmbientRule != null)
{
ProjectExplorer?.TrySelectAudioEmitterTreeNode(audio);
ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audio);
}
if (audio.StaticEmitter != null)
{
ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audio);
}
}
if ((audio.AudioZone != null) && (audio != CurrentAudioZone))
if ((audio.AmbientZone != null) && (audio != CurrentAudioAmbientZone))
{
CurrentAudioZone = audio;
ProjectExplorer?.TrySelectAudioZoneTreeNode(audio);
CurrentAudioAmbientZone = audio;
ProjectExplorer?.TrySelectAudioAmbientZoneTreeNode(audio);
}
if ((audio.AudioEmitter != null) && (audio != CurrentAudioEmitter))
if ((audio.AmbientRule != null) && (audio != CurrentAudioAmbientRule))
{
CurrentAudioEmitter = audio;
ProjectExplorer?.TrySelectAudioEmitterTreeNode(audio);
CurrentAudioAmbientRule = audio;
ProjectExplorer?.TrySelectAudioAmbientRuleTreeNode(audio);
}
if (audio == CurrentAudioZone)
if ((audio.StaticEmitter != null) && (audio != CurrentAudioStaticEmitter))
{
ShowEditAudioZonePanel(false);
CurrentAudioStaticEmitter = audio;
ProjectExplorer?.TrySelectAudioStaticEmitterTreeNode(audio);
}
if (audio == CurrentAudioAmbientZone)
{
ShowEditAudioAmbientZonePanel(false);
if (audio.RelFile != null)
{
SetAudioFileHasChanged(true);
}
}
else if (audio == CurrentAudioEmitter)
else if (audio == CurrentAudioAmbientRule)
{
ShowEditAudioEmitterPanel(false);
ShowEditAudioAmbientRulePanel(false);
if (audio.RelFile != null)
{
SetAudioFileHasChanged(true);
}
}
else if (audio == CurrentAudioStaticEmitter)
{
ShowEditAudioStaticEmitterPanel(false);
if (audio.RelFile != null)
{
SetAudioFileHasChanged(true);
@ -9030,8 +9179,9 @@ namespace CodeWalker.Project
bool enable = (CurrentAudioFile != null);
bool inproj = AudioFileExistsInProject(CurrentAudioFile);
AudioNewAmbientEmitterMenu.Enabled = enable && inproj;
AudioNewAmbientEmitterListMenu.Enabled = enable && inproj;
AudioNewAmbientRuleMenu.Enabled = enable && inproj;
AudioNewStaticEmitterMenu.Enabled = enable && inproj;
AudioNewStaticEmitterListMenu.Enabled = enable && inproj;
AudioNewAmbientZoneMenu.Enabled = enable && inproj;
AudioNewAmbientZoneListMenu.Enabled = enable && inproj;
AudioNewInteriorMenu.Enabled = enable && inproj;
@ -9596,21 +9746,25 @@ namespace CodeWalker.Project
RemoveScenarioFromProject();
}
private void AudioNewAmbientEmitterMenu_Click(object sender, EventArgs e)
private void AudioNewAmbientRuleMenu_Click(object sender, EventArgs e)
{
NewAudioEmitter();
NewAudioAmbientRule();
}
private void AudioNewAmbientEmitterListMenu_Click(object sender, EventArgs e)
private void AudioNewStaticEmitterMenu_Click(object sender, EventArgs e)
{
NewAudioEmitterList();
NewAudioStaticEmitter();
}
private void AudioNewStaticEmitterListMenu_Click(object sender, EventArgs e)
{
NewAudioStaticEmitterList();
}
private void AudioNewAmbientZoneMenu_Click(object sender, EventArgs e)
{
NewAudioZone();
NewAudioAmbientZone();
}
private void AudioNewAmbientZoneListMenu_Click(object sender, EventArgs e)
{
NewAudioZoneList();
NewAudioAmbientZoneList();
}
private void AudioNewInteriorMenu_Click(object sender, EventArgs e)
{

View File

@ -938,8 +938,9 @@ namespace CodeWalker
else if (NavPortal != null) return true;
else if (TrainTrackNode != null) return true;
else if (ScenarioNode != null) return true;
else if (Audio?.AudioZone != null) return true;
else if (Audio?.AudioEmitter != null) return true;
else if (Audio?.AmbientZone != null) return true;
else if (Audio?.AmbientRule != null) return true;
else if (Audio?.StaticEmitter != null) return true;
return false;
}
}
@ -1491,8 +1492,9 @@ namespace CodeWalker
else if (NavPortal != null) return NavPortal;
else if (TrainTrackNode != null) return TrainTrackNode;
else if (ScenarioNode != null) return ScenarioNode;
else if (Audio?.AudioZone != null) return Audio;
else if (Audio?.AudioEmitter != null) return Audio;
else if (Audio?.AmbientZone != null) return Audio;
else if (Audio?.AmbientRule != null) return Audio;
else if (Audio?.StaticEmitter != null) return Audio;
return null;
}

View File

@ -5216,7 +5216,7 @@ namespace CodeWalker
case MapSelectionMode.NavMesh: ProjectForm.NewNavPoly(); break; //.NewNavPoint/.NewNavPortal//how to add points/portals? project window
case MapSelectionMode.TrainTrack: ProjectForm.NewTrainNode(); break;
case MapSelectionMode.Scenario: ProjectForm.NewScenarioNode(); break; //how to add different node types? project window
case MapSelectionMode.Audio: ProjectForm.NewAudioZone(); break; //.NewAudioEmitter // how to add emitters as well? project window
case MapSelectionMode.Audio: ProjectForm.NewAudioAmbientZone(); break; //.NewAudioEmitter // how to add emitters as well? project window
}
}
private void CopyItem()
@ -5274,8 +5274,9 @@ namespace CodeWalker
else if (item.NavPortal != null) DeleteNavPortal(item.NavPortal);
else if (item.TrainTrackNode != null) DeleteTrainNode(item.TrainTrackNode);
else if (item.ScenarioNode != null) DeleteScenarioNode(item.ScenarioNode);
else if (item.Audio?.AudioZone != null) DeleteAudioZone(item.Audio);
else if (item.Audio?.AudioEmitter != null) DeleteAudioEmitter(item.Audio);
else if (item.Audio?.AmbientZone != null) DeleteAudioAmbientZone(item.Audio);
else if (item.Audio?.AmbientRule != null) DeleteAudioAmbientRule(item.Audio);
else if (item.Audio?.StaticEmitter != null) DeleteAudioStaticEmitter(item.Audio);
}
private void DeleteEntity(YmapEntityDef ent)
{
@ -5478,30 +5479,45 @@ namespace CodeWalker
SelectItem(null);
}
}
private void DeleteAudioZone(AudioPlacement audio)
private void DeleteAudioAmbientZone(AudioPlacement audio)
{
if (audio == null) return;
//project not open, or zone not selected there, just remove the zone from the rel...
var rel = audio.RelFile;
if (!rel.RemoveRelData(audio.AudioZone))
if (!rel.RemoveRelData(audio.AmbientZone))
{
MessageBox.Show("Unable to remove audio zone. Audio zone editing TODO!");
MessageBox.Show("Unable to remove audio ambient zone.");
}
else
{
SelectItem(null);
}
}
private void DeleteAudioEmitter(AudioPlacement audio)
private void DeleteAudioAmbientRule(AudioPlacement audio)
{
if (audio == null) return;
//project not open, or zone not selected there, just remove the zone from the rel...
//project not open, or rule not selected there, just remove the rule from the rel...
var rel = audio.RelFile;
if (!rel.RemoveRelData(audio.AudioEmitter))
if (!rel.RemoveRelData(audio.AmbientRule))
{
MessageBox.Show("Unable to remove audio emitter. Audio zone editing TODO!");
MessageBox.Show("Unable to remove audio ambient rule.");
}
else
{
SelectItem(null);
}
}
private void DeleteAudioStaticEmitter(AudioPlacement audio)
{
if (audio == null) return;
//project not open, or emitter not selected there, just remove the emitter from the rel...
var rel = audio.RelFile;
if (!rel.RemoveRelData(audio.StaticEmitter))
{
MessageBox.Show("Unable to remove audio static emitter.");
}
else
{