mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 20:24:47 +08:00
Audio.rel.xml updates
Updates to the following classes; Dat22Category Dat151AmbientRule Dat151AmbientZone Dat151DependentAmbience Dat151Unk124 Dat15Patch
This commit is contained in:
+20
-20
@@ -70,9 +70,9 @@
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.Unk01TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.Hash2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.CategoryTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.Hash1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ChildSoundTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.InnerRadTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
@@ -160,9 +160,9 @@
|
||||
this.tabPage1.Controls.Add(this.label4);
|
||||
this.tabPage1.Controls.Add(this.Unk01TextBox);
|
||||
this.tabPage1.Controls.Add(this.label3);
|
||||
this.tabPage1.Controls.Add(this.Hash2TextBox);
|
||||
this.tabPage1.Controls.Add(this.CategoryTextBox);
|
||||
this.tabPage1.Controls.Add(this.label2);
|
||||
this.tabPage1.Controls.Add(this.Hash1TextBox);
|
||||
this.tabPage1.Controls.Add(this.ChildSoundTextBox);
|
||||
this.tabPage1.Controls.Add(this.label1);
|
||||
this.tabPage1.Controls.Add(this.InnerRadTextBox);
|
||||
this.tabPage1.Controls.Add(this.label16);
|
||||
@@ -574,15 +574,15 @@
|
||||
this.label3.TabIndex = 39;
|
||||
this.label3.Text = "Hash 2:";
|
||||
//
|
||||
// Hash2TextBox
|
||||
// CategoryTextBox
|
||||
//
|
||||
this.Hash2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.CategoryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Hash2TextBox.Location = new System.Drawing.Point(84, 127);
|
||||
this.Hash2TextBox.Name = "Hash2TextBox";
|
||||
this.Hash2TextBox.Size = new System.Drawing.Size(237, 20);
|
||||
this.Hash2TextBox.TabIndex = 40;
|
||||
this.Hash2TextBox.TextChanged += new System.EventHandler(this.Hash2TextBox_TextChanged);
|
||||
this.CategoryTextBox.Location = new System.Drawing.Point(84, 127);
|
||||
this.CategoryTextBox.Name = "CategoryTextBox";
|
||||
this.CategoryTextBox.Size = new System.Drawing.Size(237, 20);
|
||||
this.CategoryTextBox.TabIndex = 40;
|
||||
this.CategoryTextBox.TextChanged += new System.EventHandler(this.CategoryTextBox_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
@@ -593,15 +593,15 @@
|
||||
this.label2.TabIndex = 37;
|
||||
this.label2.Text = "Hash 1:";
|
||||
//
|
||||
// Hash1TextBox
|
||||
// ChildSoundTextBox
|
||||
//
|
||||
this.Hash1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.ChildSoundTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Hash1TextBox.Location = new System.Drawing.Point(84, 103);
|
||||
this.Hash1TextBox.Name = "Hash1TextBox";
|
||||
this.Hash1TextBox.Size = new System.Drawing.Size(237, 20);
|
||||
this.Hash1TextBox.TabIndex = 38;
|
||||
this.Hash1TextBox.TextChanged += new System.EventHandler(this.Hash1TextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@@ -722,9 +722,9 @@
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox Unk01TextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox Hash2TextBox;
|
||||
private System.Windows.Forms.TextBox CategoryTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox Hash1TextBox;
|
||||
private System.Windows.Forms.TextBox ChildSoundTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox InnerRadTextBox;
|
||||
private System.Windows.Forms.Label label16;
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace CodeWalker.Project.Panels
|
||||
PositionTextBox.Text = string.Empty;
|
||||
InnerRadTextBox.Text = string.Empty;
|
||||
OuterRadTextBox.Text = string.Empty;
|
||||
Hash1TextBox.Text = string.Empty;
|
||||
Hash2TextBox.Text = string.Empty;
|
||||
ChildSoundTextBox.Text = string.Empty;
|
||||
CategoryTextBox.Text = string.Empty;
|
||||
Unk01TextBox.Text = string.Empty;
|
||||
StartTimeUpDown.Value = 0;
|
||||
EndTimeUpDown.Value = 0;
|
||||
@@ -86,8 +86,8 @@ namespace CodeWalker.Project.Panels
|
||||
PositionTextBox.Text = FloatUtil.GetVector3String(e.Position);
|
||||
InnerRadTextBox.Text = FloatUtil.ToString(e.InnerRad);
|
||||
OuterRadTextBox.Text = FloatUtil.ToString(e.OuterRad);
|
||||
Hash1TextBox.Text = e.Hash1.ToString();
|
||||
Hash2TextBox.Text = e.Hash2.ToString();
|
||||
ChildSoundTextBox.Text = e.ChildSound.ToString();
|
||||
CategoryTextBox.Text = e.Category.ToString();
|
||||
Unk01TextBox.Text = FloatUtil.ToString(e.Unk01);
|
||||
StartTimeUpDown.Value = e.StartTime;
|
||||
EndTimeUpDown.Value = e.EndTime;
|
||||
@@ -217,13 +217,13 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void Hash1TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void ChildSoundTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
uint hash = 0;
|
||||
string name = Hash1TextBox.Text;
|
||||
string name = ChildSoundTextBox.Text;
|
||||
if (!uint.TryParse(name, out hash))//don't re-hash hashes
|
||||
{
|
||||
hash = JenkHash.GenHash(name);
|
||||
@@ -231,21 +231,21 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
//HashLabel.Text = "Hash: " + hash.ToString();
|
||||
|
||||
if (CurrentEmitter.AudioEmitter.Hash1 != hash)
|
||||
if (CurrentEmitter.AudioEmitter.ChildSound != hash)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Hash1 = hash;
|
||||
CurrentEmitter.AudioEmitter.ChildSound = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void Hash2TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void CategoryTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentEmitter?.AudioEmitter == null) return;
|
||||
|
||||
uint hash = 0;
|
||||
string name = Hash2TextBox.Text;
|
||||
string name = CategoryTextBox.Text;
|
||||
if (!uint.TryParse(name, out hash))//don't re-hash hashes
|
||||
{
|
||||
hash = JenkHash.GenHash(name);
|
||||
@@ -253,9 +253,9 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
//HashLabel.Text = "Hash: " + hash.ToString();
|
||||
|
||||
if (CurrentEmitter.AudioEmitter.Hash2 != hash)
|
||||
if (CurrentEmitter.AudioEmitter.Category != hash)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Hash2 = hash;
|
||||
CurrentEmitter.AudioEmitter.Category = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
|
||||
+10
-10
@@ -83,7 +83,7 @@
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.Hash0TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label25 = new System.Windows.Forms.Label();
|
||||
this.Hash1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.SceneTextBox = new System.Windows.Forms.TextBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@@ -103,7 +103,7 @@
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.label25);
|
||||
this.tabPage1.Controls.Add(this.Hash1TextBox);
|
||||
this.tabPage1.Controls.Add(this.SceneTextBox);
|
||||
this.tabPage1.Controls.Add(this.label24);
|
||||
this.tabPage1.Controls.Add(this.Hash0TextBox);
|
||||
this.tabPage1.Controls.Add(this.label22);
|
||||
@@ -671,14 +671,14 @@
|
||||
this.label25.TabIndex = 74;
|
||||
this.label25.Text = "Hash 1:";
|
||||
//
|
||||
// Hash1TextBox
|
||||
// SceneTextBox
|
||||
//
|
||||
this.Hash1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Hash1TextBox.Location = new System.Drawing.Point(390, 151);
|
||||
this.Hash1TextBox.Name = "Hash1TextBox";
|
||||
this.Hash1TextBox.Size = new System.Drawing.Size(155, 20);
|
||||
this.Hash1TextBox.TabIndex = 75;
|
||||
this.Hash1TextBox.TextChanged += new System.EventHandler(this.Hash1TextBox_TextChanged);
|
||||
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
|
||||
//
|
||||
@@ -750,7 +750,7 @@
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.TextBox UnkBytesTextBox;
|
||||
private System.Windows.Forms.Label label25;
|
||||
private System.Windows.Forms.TextBox Hash1TextBox;
|
||||
private System.Windows.Forms.TextBox SceneTextBox;
|
||||
private System.Windows.Forms.Label label24;
|
||||
private System.Windows.Forms.TextBox Hash0TextBox;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace CodeWalker.Project.Panels
|
||||
Flags1TextBox.Text = string.Empty;
|
||||
Flags2TextBox.Text = string.Empty;
|
||||
Hash0TextBox.Text = string.Empty;
|
||||
Hash1TextBox.Text = string.Empty;
|
||||
SceneTextBox.Text = string.Empty;
|
||||
HashesTextBox.Text = string.Empty;
|
||||
ExtParamsTextBox.Text = string.Empty;
|
||||
populatingui = false;
|
||||
@@ -107,7 +107,7 @@ namespace CodeWalker.Project.Panels
|
||||
Flags1TextBox.Text = z.Flags1.Hex;
|
||||
Flags2TextBox.Text = z.Flags2.Hex;
|
||||
Hash0TextBox.Text = z.UnkHash0.ToString();
|
||||
Hash1TextBox.Text = z.UnkHash1.ToString();
|
||||
SceneTextBox.Text = z.Scene.ToString();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (z.Rules != null)
|
||||
@@ -124,7 +124,7 @@ namespace CodeWalker.Project.Panels
|
||||
{
|
||||
foreach (var extparam in z.ExtParams)
|
||||
{
|
||||
sb.Append(extparam.Hash.ToString());
|
||||
sb.Append(extparam.Name.ToString());
|
||||
sb.Append(", ");
|
||||
sb.Append(FloatUtil.ToString(extparam.Value));
|
||||
sb.AppendLine();
|
||||
@@ -514,12 +514,12 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
|
||||
private void Hash1TextBox_TextChanged(object sender, EventArgs e)
|
||||
private void SceneTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (populatingui) return;
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var hashstr = Hash1TextBox.Text;
|
||||
var hashstr = SceneTextBox.Text;
|
||||
uint hash = 0;
|
||||
if (!uint.TryParse(hashstr, out hash))//don't re-hash hashes
|
||||
{
|
||||
@@ -527,9 +527,9 @@ namespace CodeWalker.Project.Panels
|
||||
JenkIndex.Ensure(hashstr);
|
||||
}
|
||||
|
||||
if (CurrentZone.AudioZone.UnkHash1 != hash)
|
||||
if (CurrentZone.AudioZone.Scene != hash)
|
||||
{
|
||||
CurrentZone.AudioZone.UnkHash1 = hash;
|
||||
CurrentZone.AudioZone.Scene = hash;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@@ -585,7 +585,7 @@ namespace CodeWalker.Project.Panels
|
||||
hash = JenkHash.GenHash(hashstr);
|
||||
JenkIndex.Ensure(hashstr);
|
||||
}
|
||||
param.Hash = hash;
|
||||
param.Name = hash;
|
||||
param.Value = FloatUtil.Parse(valstr);
|
||||
paramlist.Add(param);
|
||||
}
|
||||
|
||||
@@ -6440,7 +6440,7 @@ namespace CodeWalker.Project
|
||||
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.UnkHash1 = cp ? copy.AudioZone.UnkHash1 : 0;
|
||||
zone.Scene = cp ? copy.AudioZone.Scene : 0;
|
||||
zone.UnkVec3 = cp ? copy.AudioZone.UnkVec3 : new Vector2(-1, 0);
|
||||
zone.Unk14 = cp ? copy.AudioZone.Unk14 : (byte)4;
|
||||
zone.Unk15 = cp ? copy.AudioZone.Unk15 : (byte)1;
|
||||
|
||||
Reference in New Issue
Block a user