mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-05 06:37:29 +08:00
Audio.rel.xml updates (#183)
* Audio.rel.xml updates * Update RelFile.cs * Audioconfig.dat4 changes + fix for config game crash Credits to alexguirre for type & fieldname changes to ERSettings (prev UnkER) and Vector3 (prev Orientation)
This commit is contained in:
parent
5760d56134
commit
023cc1eb47
File diff suppressed because it is too large
Load Diff
@ -113,12 +113,12 @@ namespace CodeWalker.World
|
||||
public Vector3 InnerPos { get; set; }
|
||||
public Vector3 InnerMin { get; set; }
|
||||
public Vector3 InnerMax { get; set; }
|
||||
public float InnerRad { get; set; }
|
||||
public float InnerRadius { get; set; }
|
||||
public Quaternion InnerOri { get; set; }
|
||||
public Vector3 OuterPos { get; set; }
|
||||
public Vector3 OuterMin { get; set; }
|
||||
public Vector3 OuterMax { get; set; }
|
||||
public float OuterRad { get; set; }
|
||||
public float OuterRadius { get; set; }
|
||||
public Quaternion OuterOri { get; set; }
|
||||
public Vector3 Position { get; set; }
|
||||
public Vector3 HitboxMin { get; set; }
|
||||
@ -170,8 +170,8 @@ namespace CodeWalker.World
|
||||
case Dat151ZoneShape.Sphere:
|
||||
InnerPos = zone.PlaybackZonePosition;
|
||||
InnerOri = Quaternion.Identity;
|
||||
InnerRad = zone.PlaybackZoneSize.X;
|
||||
OuterRad = zone.ActivationZoneSize.X;
|
||||
InnerRadius = zone.PlaybackZoneSize.X;
|
||||
OuterRadius = zone.ActivationZoneSize.X;
|
||||
break;
|
||||
case Dat151ZoneShape.Line:
|
||||
InnerPos = zone.PlaybackZonePosition;
|
||||
@ -194,7 +194,7 @@ namespace CodeWalker.World
|
||||
HitboxMin = useouter ? OuterMin : InnerMin;
|
||||
Orientation = useouter ? OuterOri : InnerOri;
|
||||
OrientationInv = Quaternion.Invert(Orientation);
|
||||
HitSphereRad = InnerRad;
|
||||
HitSphereRad = InnerRadius;
|
||||
if (zone.Shape == Dat151ZoneShape.Sphere)
|
||||
{
|
||||
Position = InnerPos;
|
||||
@ -215,16 +215,16 @@ namespace CodeWalker.World
|
||||
OrientationInv = Quaternion.Identity;
|
||||
InnerPos = emitter.Position;
|
||||
OuterPos = InnerPos;
|
||||
InnerRad = emitter.InnerRad;
|
||||
OuterRad = emitter.OuterRad;
|
||||
InnerRadius = emitter.InnerRadius;
|
||||
OuterRadius = emitter.OuterRadius;
|
||||
|
||||
bool useouter = (InnerRad == 0);
|
||||
bool useouter = (InnerRadius == 0);
|
||||
if (useouter)
|
||||
{
|
||||
InnerRad = 1;
|
||||
InnerRadius = 1;
|
||||
}
|
||||
Position = InnerPos;
|
||||
HitSphereRad = InnerRad;// useouter ? OuterRad : InnerRad;
|
||||
HitSphereRad = InnerRadius;// useouter ? OuterRadius : InnerRadius;
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
this.Unk09UpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.Unk07UpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.Unk08UpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.Unk06UpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.FrequencyUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.EndTimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.StartTimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
@ -53,7 +53,7 @@
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.Flags2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.ExtParamsTextBox = new CodeWalker.WinForms.TextBoxFix();
|
||||
this.VariablesTextBox = new CodeWalker.WinForms.TextBoxFix();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
@ -66,7 +66,7 @@
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.OuterRadTextBox = new System.Windows.Forms.TextBox();
|
||||
this.OuterRadiusTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.Unk01TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
@ -74,7 +74,7 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.ChildSoundTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.InnerRadTextBox = new System.Windows.Forms.TextBox();
|
||||
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();
|
||||
@ -89,7 +89,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk06UpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@ -129,7 +129,7 @@
|
||||
this.tabPage1.Controls.Add(this.Unk09UpDown);
|
||||
this.tabPage1.Controls.Add(this.Unk07UpDown);
|
||||
this.tabPage1.Controls.Add(this.Unk08UpDown);
|
||||
this.tabPage1.Controls.Add(this.Unk06UpDown);
|
||||
this.tabPage1.Controls.Add(this.FrequencyUpDown);
|
||||
this.tabPage1.Controls.Add(this.EndTimeUpDown);
|
||||
this.tabPage1.Controls.Add(this.StartTimeUpDown);
|
||||
this.tabPage1.Controls.Add(this.label23);
|
||||
@ -143,7 +143,7 @@
|
||||
this.tabPage1.Controls.Add(this.label21);
|
||||
this.tabPage1.Controls.Add(this.Flags2TextBox);
|
||||
this.tabPage1.Controls.Add(this.label20);
|
||||
this.tabPage1.Controls.Add(this.ExtParamsTextBox);
|
||||
this.tabPage1.Controls.Add(this.VariablesTextBox);
|
||||
this.tabPage1.Controls.Add(this.label15);
|
||||
this.tabPage1.Controls.Add(this.label17);
|
||||
this.tabPage1.Controls.Add(this.label18);
|
||||
@ -156,7 +156,7 @@
|
||||
this.tabPage1.Controls.Add(this.label6);
|
||||
this.tabPage1.Controls.Add(this.label7);
|
||||
this.tabPage1.Controls.Add(this.label10);
|
||||
this.tabPage1.Controls.Add(this.OuterRadTextBox);
|
||||
this.tabPage1.Controls.Add(this.OuterRadiusTextBox);
|
||||
this.tabPage1.Controls.Add(this.label4);
|
||||
this.tabPage1.Controls.Add(this.Unk01TextBox);
|
||||
this.tabPage1.Controls.Add(this.label3);
|
||||
@ -164,7 +164,7 @@
|
||||
this.tabPage1.Controls.Add(this.label2);
|
||||
this.tabPage1.Controls.Add(this.ChildSoundTextBox);
|
||||
this.tabPage1.Controls.Add(this.label1);
|
||||
this.tabPage1.Controls.Add(this.InnerRadTextBox);
|
||||
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);
|
||||
@ -266,18 +266,18 @@
|
||||
this.Unk08UpDown.TabIndex = 53;
|
||||
this.Unk08UpDown.ValueChanged += new System.EventHandler(this.Unk08UpDown_ValueChanged);
|
||||
//
|
||||
// Unk06UpDown
|
||||
// FrequencyUpDown
|
||||
//
|
||||
this.Unk06UpDown.Location = new System.Drawing.Point(84, 227);
|
||||
this.Unk06UpDown.Maximum = new decimal(new int[] {
|
||||
this.FrequencyUpDown.Location = new System.Drawing.Point(84, 227);
|
||||
this.FrequencyUpDown.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.Unk06UpDown.Name = "Unk06UpDown";
|
||||
this.Unk06UpDown.Size = new System.Drawing.Size(102, 20);
|
||||
this.Unk06UpDown.TabIndex = 49;
|
||||
this.Unk06UpDown.ValueChanged += new System.EventHandler(this.Unk06UpDown_ValueChanged);
|
||||
this.FrequencyUpDown.Name = "FrequencyUpDown";
|
||||
this.FrequencyUpDown.Size = new System.Drawing.Size(102, 20);
|
||||
this.FrequencyUpDown.TabIndex = 49;
|
||||
this.FrequencyUpDown.ValueChanged += new System.EventHandler(this.FrequencyUpDown_ValueChanged);
|
||||
//
|
||||
// EndTimeUpDown
|
||||
//
|
||||
@ -413,17 +413,17 @@
|
||||
this.label20.TabIndex = 82;
|
||||
this.label20.Text = "Ext params:\r\nName (hash), Value (float), Flags";
|
||||
//
|
||||
// ExtParamsTextBox
|
||||
// VariablesTextBox
|
||||
//
|
||||
this.ExtParamsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ExtParamsTextBox.Location = new System.Drawing.Point(282, 271);
|
||||
this.ExtParamsTextBox.Multiline = true;
|
||||
this.ExtParamsTextBox.Name = "ExtParamsTextBox";
|
||||
this.ExtParamsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.ExtParamsTextBox.Size = new System.Drawing.Size(262, 140);
|
||||
this.ExtParamsTextBox.TabIndex = 83;
|
||||
this.ExtParamsTextBox.WordWrap = false;
|
||||
this.ExtParamsTextBox.TextChanged += new System.EventHandler(this.ExtParamsTextBox_TextChanged);
|
||||
this.VariablesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.VariablesTextBox.Location = new System.Drawing.Point(282, 271);
|
||||
this.VariablesTextBox.Multiline = true;
|
||||
this.VariablesTextBox.Name = "VariablesTextBox";
|
||||
this.VariablesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.VariablesTextBox.Size = new System.Drawing.Size(262, 140);
|
||||
this.VariablesTextBox.TabIndex = 83;
|
||||
this.VariablesTextBox.WordWrap = false;
|
||||
this.VariablesTextBox.TextChanged += new System.EventHandler(this.VariablesTextBox_TextChanged);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
@ -536,15 +536,15 @@
|
||||
this.label10.TabIndex = 35;
|
||||
this.label10.Text = "Outer radius:";
|
||||
//
|
||||
// OuterRadTextBox
|
||||
// OuterRadiusTextBox
|
||||
//
|
||||
this.OuterRadTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.OuterRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OuterRadTextBox.Location = new System.Drawing.Point(84, 78);
|
||||
this.OuterRadTextBox.Name = "OuterRadTextBox";
|
||||
this.OuterRadTextBox.Size = new System.Drawing.Size(237, 20);
|
||||
this.OuterRadTextBox.TabIndex = 36;
|
||||
this.OuterRadTextBox.TextChanged += new System.EventHandler(this.OuterRadTextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@ -612,15 +612,15 @@
|
||||
this.label1.TabIndex = 33;
|
||||
this.label1.Text = "Inner radius:";
|
||||
//
|
||||
// InnerRadTextBox
|
||||
// InnerRadiusTextBox
|
||||
//
|
||||
this.InnerRadTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.InnerRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.InnerRadTextBox.Location = new System.Drawing.Point(84, 54);
|
||||
this.InnerRadTextBox.Name = "InnerRadTextBox";
|
||||
this.InnerRadTextBox.Size = new System.Drawing.Size(237, 20);
|
||||
this.InnerRadTextBox.TabIndex = 34;
|
||||
this.InnerRadTextBox.TextChanged += new System.EventHandler(this.InnerRadTextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@ -688,7 +688,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk09UpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk07UpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk08UpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Unk06UpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrequencyUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.EndTimeUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.StartTimeUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
@ -705,7 +705,7 @@
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.TextBox Flags2TextBox;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private WinForms.TextBoxFix ExtParamsTextBox;
|
||||
private WinForms.TextBoxFix VariablesTextBox;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.Label label18;
|
||||
@ -718,7 +718,7 @@
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox OuterRadTextBox;
|
||||
private System.Windows.Forms.TextBox OuterRadiusTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox Unk01TextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
@ -726,7 +726,7 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox ChildSoundTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox InnerRadTextBox;
|
||||
private System.Windows.Forms.TextBox InnerRadiusTextBox;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox PositionTextBox;
|
||||
private System.Windows.Forms.Label label23;
|
||||
@ -735,7 +735,7 @@
|
||||
private System.Windows.Forms.TextBox Flags4TextBox;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.TextBox Flags3TextBox;
|
||||
private System.Windows.Forms.NumericUpDown Unk06UpDown;
|
||||
private System.Windows.Forms.NumericUpDown FrequencyUpDown;
|
||||
private System.Windows.Forms.NumericUpDown EndTimeUpDown;
|
||||
private System.Windows.Forms.NumericUpDown StartTimeUpDown;
|
||||
private System.Windows.Forms.NumericUpDown Unk07UpDown;
|
||||
|
@ -51,14 +51,14 @@ namespace CodeWalker.Project.Panels
|
||||
populatingui = true;
|
||||
NameTextBox.Text = string.Empty;
|
||||
PositionTextBox.Text = string.Empty;
|
||||
InnerRadTextBox.Text = string.Empty;
|
||||
OuterRadTextBox.Text = string.Empty;
|
||||
InnerRadiusTextBox.Text = string.Empty;
|
||||
OuterRadiusTextBox.Text = string.Empty;
|
||||
ChildSoundTextBox.Text = string.Empty;
|
||||
CategoryTextBox.Text = string.Empty;
|
||||
Unk01TextBox.Text = string.Empty;
|
||||
StartTimeUpDown.Value = 0;
|
||||
EndTimeUpDown.Value = 0;
|
||||
Unk06UpDown.Value = 0;
|
||||
FrequencyUpDown.Value = 0;
|
||||
Unk07UpDown.Value = 0;
|
||||
Unk08UpDown.Value = 0;
|
||||
Unk09UpDown.Value = 0;
|
||||
@ -72,7 +72,7 @@ namespace CodeWalker.Project.Panels
|
||||
Flags3TextBox.Text = string.Empty;
|
||||
Flags4TextBox.Text = string.Empty;
|
||||
Flags5TextBox.Text = string.Empty;
|
||||
ExtParamsTextBox.Text = string.Empty;
|
||||
VariablesTextBox.Text = string.Empty;
|
||||
populatingui = false;
|
||||
}
|
||||
else
|
||||
@ -84,14 +84,14 @@ namespace CodeWalker.Project.Panels
|
||||
var e = CurrentEmitter.AudioEmitter;
|
||||
NameTextBox.Text = e.NameHash.ToString();
|
||||
PositionTextBox.Text = FloatUtil.GetVector3String(e.Position);
|
||||
InnerRadTextBox.Text = FloatUtil.ToString(e.InnerRad);
|
||||
OuterRadTextBox.Text = FloatUtil.ToString(e.OuterRad);
|
||||
InnerRadiusTextBox.Text = FloatUtil.ToString(e.InnerRadius);
|
||||
OuterRadiusTextBox.Text = FloatUtil.ToString(e.OuterRadius);
|
||||
ChildSoundTextBox.Text = e.ChildSound.ToString();
|
||||
CategoryTextBox.Text = e.Category.ToString();
|
||||
Unk01TextBox.Text = FloatUtil.ToString(e.Unk01);
|
||||
StartTimeUpDown.Value = e.StartTime;
|
||||
EndTimeUpDown.Value = e.EndTime;
|
||||
Unk06UpDown.Value = e.Unk06.Value;
|
||||
FrequencyUpDown.Value = e.Frequency.Value;
|
||||
Unk07UpDown.Value = e.Unk07.Value;
|
||||
Unk08UpDown.Value = e.Unk08.Value;
|
||||
Unk09UpDown.Value = e.Unk09.Value;
|
||||
@ -107,11 +107,11 @@ namespace CodeWalker.Project.Panels
|
||||
Flags5TextBox.Text = e.Flags5.Hex;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (e.ExtParams != null)
|
||||
if (e.Variables != null)
|
||||
{
|
||||
foreach (var extparam in e.ExtParams)
|
||||
foreach (var extparam in e.Variables)
|
||||
{
|
||||
sb.Append(extparam.Hash.ToString());
|
||||
sb.Append(extparam.Name.ToString());
|
||||
sb.Append(", ");
|
||||
sb.Append(FloatUtil.ToString(extparam.Value));
|
||||
sb.Append(", ");
|
||||
@ -119,7 +119,7 @@ namespace CodeWalker.Project.Panels
|
||||
sb.AppendLine();
|
||||
}
|
||||
}
|
||||
ExtParamsTextBox.Text = sb.ToString();
|
||||
VariablesTextBox.Text = sb.ToString();
|
||||
|
||||
populatingui = false;
|
||||
|
||||
@ -189,29 +189,29 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void InnerRadTextBox_TextChanged(object sender, EventArgs e)
|
||||
private void InnerRadiusTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
float rad = FloatUtil.Parse(InnerRadTextBox.Text);
|
||||
if (CurrentEmitter.AudioEmitter.InnerRad != rad)
|
||||
float rad = FloatUtil.Parse(InnerRadiusTextBox.Text);
|
||||
if (CurrentEmitter.AudioEmitter.InnerRadius != rad)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.InnerRad = rad;
|
||||
CurrentEmitter.AudioEmitter.InnerRadius = rad;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void OuterRadTextBox_TextChanged(object sender, EventArgs e)
|
||||
private void OuterRadiusTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
float rad = FloatUtil.Parse(OuterRadTextBox.Text);
|
||||
if (CurrentEmitter.AudioEmitter.OuterRad != rad)
|
||||
float rad = FloatUtil.Parse(OuterRadiusTextBox.Text);
|
||||
if (CurrentEmitter.AudioEmitter.OuterRadius != rad)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.OuterRad = rad;
|
||||
CurrentEmitter.AudioEmitter.OuterRadius = rad;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -303,15 +303,15 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void Unk06UpDown_ValueChanged(object sender, EventArgs e)
|
||||
private void FrequencyUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
ushort unk = (ushort)Unk06UpDown.Value;
|
||||
if (CurrentEmitter.AudioEmitter.Unk06.Value != unk)
|
||||
ushort unk = (ushort)FrequencyUpDown.Value;
|
||||
if (CurrentEmitter.AudioEmitter.Frequency.Value != unk)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Unk06 = unk;
|
||||
CurrentEmitter.AudioEmitter.Frequency = unk;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -517,21 +517,21 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void ExtParamsTextBox_TextChanged(object sender, EventArgs e)
|
||||
private void VariablesTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
var paramstrs = ExtParamsTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var paramstrs = VariablesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (paramstrs?.Length > 0)
|
||||
{
|
||||
var paramlist = new List<Dat151AmbientRule.ExtParam>();
|
||||
var paramlist = new List<Dat151AmbientRule.Variable>();
|
||||
foreach (var paramstr in paramstrs)
|
||||
{
|
||||
var paramvals = paramstr.Split(',');
|
||||
if (paramvals?.Length == 3)
|
||||
{
|
||||
var param = new Dat151AmbientRule.ExtParam();
|
||||
var param = new Dat151AmbientRule.Variable();
|
||||
var hashstr = paramvals[0].Trim();
|
||||
var valstr = paramvals[1].Trim();
|
||||
var flgstr = paramvals[2].Trim();
|
||||
@ -543,15 +543,15 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
uint flags = 0;
|
||||
uint.TryParse(flgstr, out flags);
|
||||
param.Hash = hash;
|
||||
param.Name = hash;
|
||||
param.Value = FloatUtil.Parse(valstr);
|
||||
param.Flags = flags;
|
||||
paramlist.Add(param);
|
||||
}
|
||||
}
|
||||
|
||||
CurrentEmitter.AudioEmitter.ExtParams = paramlist.ToArray();
|
||||
CurrentEmitter.AudioEmitter.ExtParamsCount = (ushort)paramlist.Count;
|
||||
CurrentEmitter.AudioEmitter.Variables = paramlist.ToArray();
|
||||
CurrentEmitter.AudioEmitter.VariablesCount = (ushort)paramlist.Count;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
|
@ -35,11 +35,11 @@
|
||||
this.HashesTextBox = new CodeWalker.WinForms.TextBoxFix();
|
||||
this.DeleteButton = new System.Windows.Forms.Button();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.Flags2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.TunnelTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.Flags1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.WallaTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.Flags0TextBox = new System.Windows.Forms.TextBox();
|
||||
this.FlagsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label12
|
||||
@ -102,15 +102,15 @@
|
||||
this.label21.Name = "label21";
|
||||
this.label21.Size = new System.Drawing.Size(44, 13);
|
||||
this.label21.TabIndex = 13;
|
||||
this.label21.Text = "Flags 2:";
|
||||
this.label21.Text = "Tunnel:";
|
||||
//
|
||||
// Flags2TextBox
|
||||
// TunnelTextBox
|
||||
//
|
||||
this.Flags2TextBox.Location = new System.Drawing.Point(108, 84);
|
||||
this.Flags2TextBox.Name = "Flags2TextBox";
|
||||
this.Flags2TextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.Flags2TextBox.TabIndex = 14;
|
||||
this.Flags2TextBox.TextChanged += new System.EventHandler(this.Flags2TextBox_TextChanged);
|
||||
this.TunnelTextBox.Location = new System.Drawing.Point(108, 84);
|
||||
this.TunnelTextBox.Name = "TunnelTextBox";
|
||||
this.TunnelTextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.TunnelTextBox.TabIndex = 14;
|
||||
this.TunnelTextBox.TextChanged += new System.EventHandler(this.TunnelTextBox_TextChanged);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
@ -119,15 +119,15 @@
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(44, 13);
|
||||
this.label14.TabIndex = 11;
|
||||
this.label14.Text = "Flags 1:";
|
||||
this.label14.Text = "Walla:";
|
||||
//
|
||||
// Flags1TextBox
|
||||
// WallaTextBox
|
||||
//
|
||||
this.Flags1TextBox.Location = new System.Drawing.Point(108, 60);
|
||||
this.Flags1TextBox.Name = "Flags1TextBox";
|
||||
this.Flags1TextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.Flags1TextBox.TabIndex = 12;
|
||||
this.Flags1TextBox.TextChanged += new System.EventHandler(this.Flags1TextBox_TextChanged);
|
||||
this.WallaTextBox.Location = new System.Drawing.Point(108, 60);
|
||||
this.WallaTextBox.Name = "WallaTextBox";
|
||||
this.WallaTextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.WallaTextBox.TabIndex = 12;
|
||||
this.WallaTextBox.TextChanged += new System.EventHandler(this.WallaTextBox_TextChanged);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
@ -136,15 +136,15 @@
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(44, 13);
|
||||
this.label13.TabIndex = 9;
|
||||
this.label13.Text = "Flags 0:";
|
||||
this.label13.Text = "Flags:";
|
||||
//
|
||||
// Flags0TextBox
|
||||
// FlagsTextBox
|
||||
//
|
||||
this.Flags0TextBox.Location = new System.Drawing.Point(108, 36);
|
||||
this.Flags0TextBox.Name = "Flags0TextBox";
|
||||
this.Flags0TextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.Flags0TextBox.TabIndex = 10;
|
||||
this.Flags0TextBox.TextChanged += new System.EventHandler(this.Flags0TextBox_TextChanged);
|
||||
this.FlagsTextBox.Location = new System.Drawing.Point(108, 36);
|
||||
this.FlagsTextBox.Name = "FlagsTextBox";
|
||||
this.FlagsTextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.FlagsTextBox.TabIndex = 10;
|
||||
this.FlagsTextBox.TextChanged += new System.EventHandler(this.FlagsTextBox_TextChanged);
|
||||
//
|
||||
// EditAudioInteriorPanel
|
||||
//
|
||||
@ -153,11 +153,11 @@
|
||||
this.ClientSize = new System.Drawing.Size(562, 450);
|
||||
this.Controls.Add(this.DeleteButton);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.Flags2TextBox);
|
||||
this.Controls.Add(this.TunnelTextBox);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.Flags1TextBox);
|
||||
this.Controls.Add(this.WallaTextBox);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.Flags0TextBox);
|
||||
this.Controls.Add(this.FlagsTextBox);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.NameTextBox);
|
||||
this.Controls.Add(this.label19);
|
||||
@ -178,10 +178,10 @@
|
||||
private WinForms.TextBoxFix HashesTextBox;
|
||||
private System.Windows.Forms.Button DeleteButton;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.TextBox Flags2TextBox;
|
||||
private System.Windows.Forms.TextBox TunnelTextBox;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox Flags1TextBox;
|
||||
private System.Windows.Forms.TextBox WallaTextBox;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox Flags0TextBox;
|
||||
private System.Windows.Forms.TextBox FlagsTextBox;
|
||||
}
|
||||
}
|
@ -49,9 +49,9 @@ namespace CodeWalker.Project.Panels
|
||||
|
||||
populatingui = true;
|
||||
NameTextBox.Text = string.Empty;
|
||||
Flags0TextBox.Text = string.Empty;
|
||||
Flags1TextBox.Text = string.Empty;
|
||||
Flags2TextBox.Text = string.Empty;
|
||||
FlagsTextBox.Text = string.Empty;
|
||||
WallaTextBox.Text = string.Empty;
|
||||
TunnelTextBox.Text = string.Empty;
|
||||
HashesTextBox.Text = string.Empty;
|
||||
populatingui = false;
|
||||
}
|
||||
@ -65,9 +65,9 @@ namespace CodeWalker.Project.Panels
|
||||
|
||||
NameTextBox.Text = ci.NameHash.ToString();
|
||||
|
||||
Flags0TextBox.Text = ci.Unk0.Hex;
|
||||
Flags1TextBox.Text = ci.Unk1.Hex;
|
||||
Flags2TextBox.Text = ci.Unk2.Hex;
|
||||
FlagsTextBox.Text = ci.Flags.Hex;
|
||||
WallaTextBox.Text = ci.Walla.ToString();
|
||||
TunnelTextBox.Text = ci.Tunnel.ToString();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (ci.Rooms != null)
|
||||
@ -120,54 +120,62 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void Flags0TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void FlagsTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentInterior == null) return;
|
||||
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
if (uint.TryParse(FlagsTextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentInterior.Unk0 != flags)
|
||||
if (CurrentInterior.Flags != flags)
|
||||
{
|
||||
CurrentInterior.Unk0 = flags;
|
||||
CurrentInterior.Flags = flags;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Flags1TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void WallaTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentInterior == null) return;
|
||||
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
uint hash = 0;
|
||||
string name = WallaTextBox.Text;
|
||||
if (!uint.TryParse(name, out hash))//don't re-hash hashes
|
||||
{
|
||||
if (CurrentInterior.Unk1 != flags)
|
||||
{
|
||||
CurrentInterior.Unk1 = flags;
|
||||
hash = JenkHash.GenHash(name);
|
||||
JenkIndex.Ensure(name);
|
||||
}
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
if (CurrentInterior.Walla != hash)
|
||||
{
|
||||
CurrentInterior.Walla = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void Flags2TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void TunnelTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentInterior == null) return;
|
||||
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
uint hash = 0;
|
||||
string name = TunnelTextBox.Text;
|
||||
if (!uint.TryParse(name, out hash))//don't re-hash hashes
|
||||
{
|
||||
if (CurrentInterior.Unk2 != flags)
|
||||
{
|
||||
CurrentInterior.Unk2 = flags;
|
||||
hash = JenkHash.GenHash(name);
|
||||
JenkIndex.Ensure(name);
|
||||
}
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
if (CurrentInterior.Tunnel != hash)
|
||||
{
|
||||
CurrentInterior.Tunnel = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,9 +36,9 @@
|
||||
this.DeleteButton = new System.Windows.Forms.Button();
|
||||
this.AddToProjectButton = new System.Windows.Forms.Button();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.Flags2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.Unk13TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.ExtParamsTextBox = new CodeWalker.WinForms.TextBoxFix();
|
||||
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();
|
||||
@ -111,9 +111,9 @@
|
||||
this.tabPage1.Controls.Add(this.DeleteButton);
|
||||
this.tabPage1.Controls.Add(this.AddToProjectButton);
|
||||
this.tabPage1.Controls.Add(this.label21);
|
||||
this.tabPage1.Controls.Add(this.Flags2TextBox);
|
||||
this.tabPage1.Controls.Add(this.Unk13TextBox);
|
||||
this.tabPage1.Controls.Add(this.label20);
|
||||
this.tabPage1.Controls.Add(this.ExtParamsTextBox);
|
||||
this.tabPage1.Controls.Add(this.DependentAmbiencesTextBox);
|
||||
this.tabPage1.Controls.Add(this.label19);
|
||||
this.tabPage1.Controls.Add(this.label15);
|
||||
this.tabPage1.Controls.Add(this.UnkVec3TextBox);
|
||||
@ -211,16 +211,16 @@
|
||||
this.label21.Name = "label21";
|
||||
this.label21.Size = new System.Drawing.Size(44, 13);
|
||||
this.label21.TabIndex = 70;
|
||||
this.label21.Text = "Flags 2:";
|
||||
this.label21.Text = "Unk13:";
|
||||
//
|
||||
// Flags2TextBox
|
||||
// Unk13TextBox
|
||||
//
|
||||
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.Name = "Flags2TextBox";
|
||||
this.Flags2TextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.Flags2TextBox.TabIndex = 71;
|
||||
this.Flags2TextBox.TextChanged += new System.EventHandler(this.Flags2TextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@ -232,17 +232,17 @@
|
||||
this.label20.TabIndex = 78;
|
||||
this.label20.Text = "Ext params: Name (hash), Value (float)";
|
||||
//
|
||||
// ExtParamsTextBox
|
||||
// DependentAmbiencesTextBox
|
||||
//
|
||||
this.ExtParamsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ExtParamsTextBox.Location = new System.Drawing.Point(335, 319);
|
||||
this.ExtParamsTextBox.Multiline = true;
|
||||
this.ExtParamsTextBox.Name = "ExtParamsTextBox";
|
||||
this.ExtParamsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.ExtParamsTextBox.Size = new System.Drawing.Size(209, 92);
|
||||
this.ExtParamsTextBox.TabIndex = 79;
|
||||
this.ExtParamsTextBox.WordWrap = false;
|
||||
this.ExtParamsTextBox.TextChanged += new System.EventHandler(this.ExtParamsTextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@ -741,10 +741,10 @@
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.TextBox UnkVec1TextBox;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private WinForms.TextBoxFix ExtParamsTextBox;
|
||||
private WinForms.TextBoxFix DependentAmbiencesTextBox;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.TextBox Flags2TextBox;
|
||||
private System.Windows.Forms.TextBox Unk13TextBox;
|
||||
private System.Windows.Forms.Button AddToProjectButton;
|
||||
private System.Windows.Forms.Button DeleteButton;
|
||||
private System.Windows.Forms.Label label22;
|
||||
|
@ -71,11 +71,11 @@ namespace CodeWalker.Project.Panels
|
||||
UnkBytesTextBox.Text = string.Empty;
|
||||
Flags0TextBox.Text = string.Empty;
|
||||
Flags1TextBox.Text = string.Empty;
|
||||
Flags2TextBox.Text = string.Empty;
|
||||
Unk13TextBox.Text = string.Empty;
|
||||
Hash0TextBox.Text = string.Empty;
|
||||
SceneTextBox.Text = string.Empty;
|
||||
HashesTextBox.Text = string.Empty;
|
||||
ExtParamsTextBox.Text = string.Empty;
|
||||
DependentAmbiencesTextBox.Text = string.Empty;
|
||||
populatingui = false;
|
||||
}
|
||||
else
|
||||
@ -105,7 +105,7 @@ namespace CodeWalker.Project.Panels
|
||||
UnkBytesTextBox.Text = string.Format("{0}, {1}, {2}", z.Unk14, z.Unk15, z.Unk16);
|
||||
Flags0TextBox.Text = z.Flags0.Hex;
|
||||
Flags1TextBox.Text = z.Flags1.Hex;
|
||||
Flags2TextBox.Text = z.Flags2.Hex;
|
||||
Unk13TextBox.Text = z.Unk13.Hex;
|
||||
Hash0TextBox.Text = z.UnkHash0.ToString();
|
||||
SceneTextBox.Text = z.Scene.ToString();
|
||||
|
||||
@ -120,9 +120,9 @@ namespace CodeWalker.Project.Panels
|
||||
HashesTextBox.Text = sb.ToString();
|
||||
|
||||
sb.Clear();
|
||||
if (z.ExtParams != null)
|
||||
if (z.DependentAmbiences != null)
|
||||
{
|
||||
foreach (var extparam in z.ExtParams)
|
||||
foreach (var extparam in z.DependentAmbiences)
|
||||
{
|
||||
sb.Append(extparam.Name.ToString());
|
||||
sb.Append(", ");
|
||||
@ -130,7 +130,7 @@ namespace CodeWalker.Project.Panels
|
||||
sb.AppendLine();
|
||||
}
|
||||
}
|
||||
ExtParamsTextBox.Text = sb.ToString();
|
||||
DependentAmbiencesTextBox.Text = sb.ToString();
|
||||
|
||||
populatingui = false;
|
||||
|
||||
@ -476,20 +476,24 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void Flags2TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void Unk13TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
var hashstr = Unk13TextBox.Text;
|
||||
uint hash = 0;
|
||||
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
|
||||
{
|
||||
if (CurrentZone.AudioZone.Flags2 != flags)
|
||||
{
|
||||
CurrentZone.AudioZone.Flags2 = flags;
|
||||
hash = JenkHash.GenHash(hashstr);
|
||||
JenkIndex.Ensure(hashstr);
|
||||
}
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
if (CurrentZone.AudioZone.Unk13 != hash)
|
||||
{
|
||||
CurrentZone.AudioZone.Unk13 = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@ -562,21 +566,21 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void ExtParamsTextBox_TextChanged(object sender, EventArgs e)
|
||||
private void DependentAmbiencesTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var paramstrs = ExtParamsTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var paramstrs = DependentAmbiencesTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (paramstrs?.Length > 0)
|
||||
{
|
||||
var paramlist = new List<Dat151AmbientZone.ExtParam>();
|
||||
var paramlist = new List<Dat151AmbientZone.DependentAmbience>();
|
||||
foreach (var paramstr in paramstrs)
|
||||
{
|
||||
var paramvals = paramstr.Split(',');
|
||||
if (paramvals?.Length == 2)
|
||||
{
|
||||
var param = new Dat151AmbientZone.ExtParam();
|
||||
var param = new Dat151AmbientZone.DependentAmbience();
|
||||
var hashstr = paramvals[0].Trim();
|
||||
var valstr = paramvals[1].Trim();
|
||||
uint hash = 0;
|
||||
@ -591,8 +595,8 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
CurrentZone.AudioZone.ExtParams = paramlist.ToArray();
|
||||
CurrentZone.AudioZone.ExtParamsCount = (uint)paramlist.Count;
|
||||
CurrentZone.AudioZone.DependentAmbiences = paramlist.ToArray();
|
||||
CurrentZone.AudioZone.DependentAmbiencesCount = (uint)paramlist.Count;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
|
@ -6413,7 +6413,6 @@ namespace CodeWalker.Project
|
||||
//AA800420 sphere
|
||||
zone.Flags0 = cp ? copy.AudioZone.Flags0.Value : 0xAA800424;
|
||||
zone.Flags1 = cp ? copy.AudioZone.Flags1 : 0;
|
||||
zone.Flags2 = cp ? copy.AudioZone.Flags2 : 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;
|
||||
@ -6430,13 +6429,14 @@ namespace CodeWalker.Project
|
||||
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.ExtParamsCount = cp ? copy.AudioZone.ExtParamsCount : 0;
|
||||
zone.ExtParams = cp ? copy.AudioZone.ExtParams : null;
|
||||
zone.DependentAmbiencesCount = cp ? copy.AudioZone.DependentAmbiencesCount : 0;
|
||||
zone.DependentAmbiences = cp ? copy.AudioZone.DependentAmbiences : null;
|
||||
zone.Name = "zone1";
|
||||
zone.NameHash = JenkHash.GenHash(zone.Name);
|
||||
|
||||
@ -6538,12 +6538,12 @@ namespace CodeWalker.Project
|
||||
|
||||
emitter.Flags0 = cp ? copy.AudioEmitter.Flags0.Value : 0xAA001100;
|
||||
emitter.Flags5 = cp ? copy.AudioEmitter.Flags5.Value : 0xFFFFFFFF;
|
||||
emitter.InnerRad = cp ? copy.AudioEmitter.InnerRad : 0.0f;
|
||||
emitter.OuterRad = cp ? copy.AudioEmitter.OuterRad : 20.0f;
|
||||
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.Unk06 = cp ? copy.AudioEmitter.Unk06.Value : (ushort)0;
|
||||
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;
|
||||
@ -6782,8 +6782,9 @@ namespace CodeWalker.Project
|
||||
|
||||
interior.Name = "interior1";
|
||||
interior.NameHash = JenkHash.GenHash(interior.Name);
|
||||
interior.Unk0 = 0xAAAAA844;
|
||||
interior.Unk1 = 0xD4855127;
|
||||
interior.Flags = 0xAAAAA844;
|
||||
interior.Walla = 3565506855;
|
||||
interior.Tunnel = (uint)MetaName.null_sound;
|
||||
|
||||
CurrentAudioFile.AddRelData(interior);
|
||||
|
||||
|
@ -1017,13 +1017,13 @@ namespace CodeWalker
|
||||
if ((placement.InnerPos != Vector3.Zero) && (placement.OuterPos != Vector3.Zero))
|
||||
{
|
||||
ms.CamRelPos = placement.InnerPos - camera.Position;
|
||||
ms.Radius = placement.InnerRad;
|
||||
ms.Radius = placement.InnerRadius;
|
||||
Renderer.HilightSpheres.Add(ms);
|
||||
|
||||
if (renderaudioouterbounds)
|
||||
{
|
||||
ms.CamRelPos = placement.OuterPos - camera.Position;
|
||||
ms.Radius = placement.OuterRad;
|
||||
ms.Radius = placement.OuterRadius;
|
||||
Renderer.BoundingSpheres.Add(ms);
|
||||
}
|
||||
|
||||
@ -1605,7 +1605,7 @@ namespace CodeWalker
|
||||
mode = BoundsShaderMode.Sphere;
|
||||
MapSphere wsph = new MapSphere();
|
||||
wsph.CamRelPos = au.OuterPos - camera.Position;
|
||||
wsph.Radius = au.OuterRad;
|
||||
wsph.Radius = au.OuterRadius;
|
||||
Renderer.WhiteSpheres.Add(wsph);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user