mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 23:24:01 +08:00
Audio dat.rel to XML conversion
This commit is contained in:
@@ -455,7 +455,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags0.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags0 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags0 = flags;
|
||||
|
||||
@@ -472,7 +472,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags1.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags1 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags1 = flags;
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags2.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags2 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags2 = flags;
|
||||
|
||||
@@ -506,7 +506,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags3TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags3.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags3 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags3 = flags;
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags4TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags4.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags4 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags4 = flags;
|
||||
|
||||
@@ -540,7 +540,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags5TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentEmitter.AudioEmitter.Flags5.Value != flags)
|
||||
if (CurrentEmitter.AudioEmitter.Flags5 != flags)
|
||||
{
|
||||
CurrentEmitter.AudioEmitter.Flags5 = flags;
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
|
||||
CurrentEmitter.AudioEmitter.ExtParams = paramlist.ToArray();
|
||||
CurrentEmitter.AudioEmitter.ExtParamCount = (ushort)paramlist.Count;
|
||||
CurrentEmitter.AudioEmitter.ExtParamsCount = (ushort)paramlist.Count;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentInterior.Unk0.Value != flags)
|
||||
if (CurrentInterior.Unk0 != flags)
|
||||
{
|
||||
CurrentInterior.Unk0 = flags;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentInterior.Unk1.Value != flags)
|
||||
if (CurrentInterior.Unk1 != flags)
|
||||
{
|
||||
CurrentInterior.Unk1 = flags;
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentInterior.Unk2.Value != flags)
|
||||
if (CurrentInterior.Unk2 != flags)
|
||||
{
|
||||
CurrentInterior.Unk2 = flags;
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentRoom.Flags0.Value != flags)
|
||||
if (CurrentRoom.Flags0 != flags)
|
||||
{
|
||||
CurrentRoom.Flags0 = flags;
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags0TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentZone.AudioZone.Flags0.Value != flags)
|
||||
if (CurrentZone.AudioZone.Flags0 != flags)
|
||||
{
|
||||
CurrentZone.AudioZone.Flags0 = flags;
|
||||
|
||||
@@ -463,7 +463,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags1TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentZone.AudioZone.Flags1.Value != flags)
|
||||
if (CurrentZone.AudioZone.Flags1 != flags)
|
||||
{
|
||||
CurrentZone.AudioZone.Flags1 = flags;
|
||||
|
||||
@@ -480,7 +480,7 @@ namespace CodeWalker.Project.Panels
|
||||
uint flags = 0;
|
||||
if (uint.TryParse(Flags2TextBox.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out flags))
|
||||
{
|
||||
if (CurrentZone.AudioZone.Flags2.Value != flags)
|
||||
if (CurrentZone.AudioZone.Flags2 != flags)
|
||||
{
|
||||
CurrentZone.AudioZone.Flags2 = flags;
|
||||
|
||||
|
||||
@@ -1577,6 +1577,7 @@ namespace CodeWalker.Project.Panels
|
||||
var tn = FindAudioZoneTreeNode(zone);
|
||||
if (tn != null)
|
||||
{
|
||||
tn.Text = zone.NameHash.ToString();
|
||||
}
|
||||
}
|
||||
public void UpdateAudioEmitterTreeNode(AudioPlacement emitter)
|
||||
@@ -1584,6 +1585,7 @@ namespace CodeWalker.Project.Panels
|
||||
var tn = FindAudioEmitterTreeNode(emitter);
|
||||
if (tn != null)
|
||||
{
|
||||
tn.Text = emitter.NameHash.ToString();
|
||||
}
|
||||
}
|
||||
public void UpdateAudioZoneListTreeNode(Dat151AmbientZoneList list)
|
||||
|
||||
+15
-15
@@ -4575,7 +4575,7 @@ namespace CodeWalker.Project
|
||||
|
||||
//AA800424 box, line
|
||||
//AA800420 sphere
|
||||
zone.Flags0 = cp ? copy.AudioZone.Flags0 : 0xAA800424;
|
||||
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;
|
||||
@@ -4697,23 +4697,23 @@ namespace CodeWalker.Project
|
||||
|
||||
var emitter = new Dat151AmbientEmitter(CurrentAudioFile);
|
||||
|
||||
emitter.Flags0 = cp ? copy.AudioEmitter.Flags0 : 0xAA001100;
|
||||
emitter.Flags5 = cp ? copy.AudioEmitter.Flags5 : 0xFFFFFFFF;
|
||||
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.Unk01 = cp ? copy.AudioEmitter.Unk01 : 1.0f;
|
||||
emitter.Unk02 = cp ? copy.AudioEmitter.Unk02 : 0;
|
||||
emitter.Unk03 = cp ? copy.AudioEmitter.Unk03 : 0;
|
||||
emitter.Unk04 = cp ? copy.AudioEmitter.Unk04 : 160;
|
||||
emitter.Unk05 = cp ? copy.AudioEmitter.Unk05 : 5;
|
||||
emitter.Unk06 = cp ? copy.AudioEmitter.Unk06 : 0;
|
||||
emitter.Unk07 = cp ? copy.AudioEmitter.Unk07 : 0;
|
||||
emitter.Unk08 = cp ? copy.AudioEmitter.Unk08 : 0;
|
||||
emitter.Unk09 = cp ? copy.AudioEmitter.Unk09 : 1;
|
||||
emitter.Unk10 = cp ? copy.AudioEmitter.Unk10 : 1;
|
||||
emitter.Unk11 = cp ? copy.AudioEmitter.Unk11 : 1;
|
||||
emitter.Unk12 = cp ? copy.AudioEmitter.Unk12 : 100;
|
||||
emitter.Unk13 = cp ? copy.AudioEmitter.Unk13 : 3;
|
||||
emitter.Unk02 = cp ? copy.AudioEmitter.Unk02.Value : (byte)0;
|
||||
emitter.Unk03 = cp ? copy.AudioEmitter.Unk03.Value : (byte)0;
|
||||
emitter.Unk04 = cp ? copy.AudioEmitter.Unk04.Value : (byte)160;
|
||||
emitter.Unk05 = cp ? copy.AudioEmitter.Unk05.Value : (byte)5;
|
||||
emitter.Unk06 = cp ? copy.AudioEmitter.Unk06.Value : (ushort)0;
|
||||
emitter.Unk07 = cp ? copy.AudioEmitter.Unk07.Value : (ushort)0;
|
||||
emitter.Unk08 = cp ? copy.AudioEmitter.Unk08.Value : (byte)0;
|
||||
emitter.Unk09 = cp ? copy.AudioEmitter.Unk09.Value : (byte)1;
|
||||
emitter.Unk10 = cp ? copy.AudioEmitter.Unk10.Value : (byte)1;
|
||||
emitter.Unk11 = cp ? copy.AudioEmitter.Unk11.Value : (byte)1;
|
||||
emitter.Unk12 = cp ? copy.AudioEmitter.Unk12.Value : (byte)100;
|
||||
emitter.Unk13 = cp ? copy.AudioEmitter.Unk13.Value : (byte)3;
|
||||
|
||||
|
||||
emitter.Name = "emitter1";
|
||||
|
||||
Reference in New Issue
Block a user