mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 00:43:00 +08:00
Various rel field name changes
This commit is contained in:
parent
458e9d365e
commit
8765197eda
File diff suppressed because it is too large
Load Diff
@ -128,9 +128,9 @@ namespace CodeWalker.World
|
||||
placement = new AudioPlacement(relfile, reldata as Dat151AmbientZone);
|
||||
if (addtoLists) Zones.Add(placement);
|
||||
}
|
||||
else if (reldata is Dat151AmbientEmitter)
|
||||
else if (reldata is Dat151AmbientRule)
|
||||
{
|
||||
placement = new AudioPlacement(relfile, reldata as Dat151AmbientEmitter);
|
||||
placement = new AudioPlacement(relfile, reldata as Dat151AmbientRule);
|
||||
if (addtoLists) Emitters.Add(placement);
|
||||
}
|
||||
if (placement != null)
|
||||
@ -173,7 +173,7 @@ namespace CodeWalker.World
|
||||
public MetaHash NameHash { get; set; }
|
||||
public RelFile RelFile { get; set; }
|
||||
public Dat151AmbientZone AudioZone { get; set; }
|
||||
public Dat151AmbientEmitter AudioEmitter { get; set; }
|
||||
public Dat151AmbientRule AudioEmitter { get; set; }
|
||||
public Dat151ZoneShape Shape { get; set; }
|
||||
public string ShortTypeName { get; set; }
|
||||
public string FullTypeName { get; set; }
|
||||
@ -204,7 +204,7 @@ namespace CodeWalker.World
|
||||
|
||||
UpdateFromZone();
|
||||
}
|
||||
public AudioPlacement(RelFile rel, Dat151AmbientEmitter emitter)
|
||||
public AudioPlacement(RelFile rel, Dat151AmbientRule emitter)
|
||||
{
|
||||
RelFile = rel;
|
||||
AudioEmitter = emitter;
|
||||
@ -229,29 +229,29 @@ namespace CodeWalker.World
|
||||
switch (zone.Shape)
|
||||
{
|
||||
case Dat151ZoneShape.Box:
|
||||
InnerPos = zone.InnerPos;
|
||||
InnerMax = zone.InnerSize * 0.5f;
|
||||
InnerPos = zone.PlaybackZonePosition;
|
||||
InnerMax = zone.PlaybackZoneSize * 0.5f;
|
||||
InnerMin = -InnerMax;
|
||||
InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.InnerAngle * deg2rad);
|
||||
InnerOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.PlaybackZoneAngle * deg2rad);
|
||||
break;
|
||||
case Dat151ZoneShape.Sphere:
|
||||
InnerPos = zone.InnerPos;
|
||||
InnerPos = zone.PlaybackZonePosition;
|
||||
InnerOri = Quaternion.Identity;
|
||||
InnerRad = zone.InnerSize.X;
|
||||
OuterRad = zone.OuterSize.X;
|
||||
InnerRad = zone.PlaybackZoneSize.X;
|
||||
OuterRad = zone.ActivationZoneSize.X;
|
||||
break;
|
||||
case Dat151ZoneShape.Line:
|
||||
InnerPos = zone.InnerPos;
|
||||
InnerPos = zone.PlaybackZonePosition;
|
||||
InnerMin = new Vector3(-1.0f, -1.0f, 0.0f);
|
||||
InnerMax = new Vector3(1.0f, 1.0f, (zone.InnerSize - zone.InnerPos).Length());
|
||||
InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.InnerPos, zone.InnerSize, Vector3.UnitZ));
|
||||
InnerMax = new Vector3(1.0f, 1.0f, (zone.PlaybackZoneSize - zone.PlaybackZonePosition).Length());
|
||||
InnerOri = Quaternion.Invert(Quaternion.LookAtLH(zone.PlaybackZonePosition, zone.PlaybackZoneSize, Vector3.UnitZ));
|
||||
break;
|
||||
}
|
||||
|
||||
OuterPos = zone.OuterPos;
|
||||
OuterMax = zone.OuterSize * 0.5f;
|
||||
OuterPos = zone.ActivationZonePosition;
|
||||
OuterMax = zone.ActivationZoneSize * 0.5f;
|
||||
OuterMin = -OuterMax;
|
||||
OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.OuterAngle * deg2rad);
|
||||
OuterOri = Quaternion.RotationAxis(Vector3.UnitZ, zone.ActivationZoneAngle * deg2rad);
|
||||
|
||||
bool useouter = ((InnerMax.X == 0) || (InnerMax.Y == 0) || (InnerMax.Z == 0));
|
||||
if (useouter && (zone.Shape != Dat151ZoneShape.Sphere))
|
||||
@ -306,8 +306,8 @@ namespace CodeWalker.World
|
||||
|
||||
if (AudioZone != null)
|
||||
{
|
||||
AudioZone.InnerPos = InnerPos;
|
||||
AudioZone.OuterPos = OuterPos;
|
||||
AudioZone.PlaybackZonePosition = InnerPos;
|
||||
AudioZone.ActivationZonePosition = OuterPos;
|
||||
}
|
||||
if (AudioEmitter != null)
|
||||
{
|
||||
@ -333,8 +333,8 @@ namespace CodeWalker.World
|
||||
OuterOri = Orientation;
|
||||
if (AudioZone != null)
|
||||
{
|
||||
AudioZone.InnerAngle = uangl;
|
||||
AudioZone.OuterAngle = uangl;
|
||||
AudioZone.PlaybackZoneAngle = uangl;
|
||||
AudioZone.ActivationZoneAngle = uangl;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -347,7 +347,7 @@ namespace CodeWalker.World
|
||||
OuterOri = Orientation;
|
||||
if (AudioZone != null)
|
||||
{
|
||||
AudioZone.OuterAngle = uangl;
|
||||
AudioZone.ActivationZoneAngle = uangl;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -355,7 +355,7 @@ namespace CodeWalker.World
|
||||
InnerOri = Orientation;
|
||||
if (AudioZone != null)
|
||||
{
|
||||
AudioZone.InnerAngle = uangl;
|
||||
AudioZone.PlaybackZoneAngle = uangl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace CodeWalker.Project.Panels
|
||||
public partial class EditAudioEmitterListPanel : ProjectPanel
|
||||
{
|
||||
public ProjectForm ProjectForm;
|
||||
public Dat151AmbientEmitterList CurrentEmitterList { get; set; }
|
||||
public Dat151StaticEmitterList CurrentEmitterList { get; set; }
|
||||
|
||||
private bool populatingui = false;
|
||||
|
||||
@ -25,7 +25,7 @@ namespace CodeWalker.Project.Panels
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetEmitterList(Dat151AmbientEmitterList list)
|
||||
public void SetEmitterList(Dat151StaticEmitterList list)
|
||||
{
|
||||
CurrentEmitterList = list;
|
||||
Tag = list;
|
||||
|
@ -557,13 +557,13 @@ namespace CodeWalker.Project.Panels
|
||||
var paramstrs = ExtParamsTextBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (paramstrs?.Length > 0)
|
||||
{
|
||||
var paramlist = new List<Dat151AmbientEmitter.ExtParam>();
|
||||
var paramlist = new List<Dat151AmbientRule.ExtParam>();
|
||||
foreach (var paramstr in paramstrs)
|
||||
{
|
||||
var paramvals = paramstr.Split(',');
|
||||
if (paramvals?.Length == 3)
|
||||
{
|
||||
var param = new Dat151AmbientEmitter.ExtParam();
|
||||
var param = new Dat151AmbientRule.ExtParam();
|
||||
var hashstr = paramvals[0].Trim();
|
||||
var valstr = paramvals[1].Trim();
|
||||
var flgstr = paramvals[2].Trim();
|
||||
@ -593,7 +593,7 @@ namespace CodeWalker.Project.Panels
|
||||
{
|
||||
if (CurrentEmitter == null) return;
|
||||
if (ProjectForm.WorldForm == null) return;
|
||||
ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.InnerSize);
|
||||
ProjectForm.WorldForm.GoToPosition(CurrentEmitter.Position, CurrentEmitter.AudioZone.PlaybackZoneSize);
|
||||
}
|
||||
|
||||
private void AddToProjectButton_Click(object sender, EventArgs e)
|
||||
|
@ -87,18 +87,18 @@ namespace CodeWalker.Project.Panels
|
||||
var z = CurrentZone.AudioZone;
|
||||
NameTextBox.Text = z.NameHash.ToString();
|
||||
ShapeComboBox.Text = z.Shape.ToString();
|
||||
InnerPosTextBox.Text = FloatUtil.GetVector3String(z.InnerPos);
|
||||
InnerSizeTextBox.Text = FloatUtil.GetVector3String(z.InnerSize);
|
||||
InnerAngleTextBox.Text = z.InnerAngle.ToString();
|
||||
InnerVec1TextBox.Text = FloatUtil.GetVector4String(z.InnerVec1);
|
||||
InnerVec2TextBox.Text = FloatUtil.GetVector4String(z.InnerVec2);
|
||||
InnerVec3TextBox.Text = FloatUtil.GetVector3String(z.InnerVec3);
|
||||
OuterPosTextBox.Text = FloatUtil.GetVector3String(z.OuterPos);
|
||||
OuterSizeTextBox.Text = FloatUtil.GetVector3String(z.OuterSize);
|
||||
OuterAngleTextBox.Text = z.OuterAngle.ToString();
|
||||
OuterVec1TextBox.Text = FloatUtil.GetVector4String(z.OuterVec1);
|
||||
OuterVec2TextBox.Text = FloatUtil.GetVector4String(z.OuterVec2);
|
||||
OuterVec3TextBox.Text = FloatUtil.GetVector3String(z.OuterVec3);
|
||||
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);
|
||||
@ -110,9 +110,9 @@ namespace CodeWalker.Project.Panels
|
||||
Hash1TextBox.Text = z.UnkHash1.ToString();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (z.Hashes != null)
|
||||
if (z.Rules != null)
|
||||
{
|
||||
foreach (var hash in z.Hashes)
|
||||
foreach (var hash in z.Rules)
|
||||
{
|
||||
sb.AppendLine(hash.ToString());
|
||||
}
|
||||
@ -204,9 +204,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(InnerPosTextBox.Text);
|
||||
if (CurrentZone.AudioZone.InnerPos != vec)
|
||||
if (CurrentZone.AudioZone.PlaybackZonePosition != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerPos = vec;
|
||||
CurrentZone.AudioZone.PlaybackZonePosition = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
|
||||
@ -227,9 +227,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(InnerSizeTextBox.Text);
|
||||
if (CurrentZone.AudioZone.InnerSize != vec)
|
||||
if (CurrentZone.AudioZone.PlaybackZoneSize != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerSize = vec;
|
||||
CurrentZone.AudioZone.PlaybackZoneSize = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -243,9 +243,9 @@ namespace CodeWalker.Project.Panels
|
||||
uint ang = 0;
|
||||
if (uint.TryParse(InnerAngleTextBox.Text, out ang))
|
||||
{
|
||||
if (CurrentZone.AudioZone.InnerAngle != ang)
|
||||
if (CurrentZone.AudioZone.PlaybackZoneAngle != ang)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerAngle = ang;
|
||||
CurrentZone.AudioZone.PlaybackZoneAngle = ang;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -258,9 +258,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector4String(InnerVec1TextBox.Text);
|
||||
if (CurrentZone.AudioZone.InnerVec1 != vec)
|
||||
if (CurrentZone.AudioZone.PlaybackZoneVec1 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerVec1 = vec;
|
||||
CurrentZone.AudioZone.PlaybackZoneVec1 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -272,9 +272,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector4String(InnerVec2TextBox.Text);
|
||||
if (CurrentZone.AudioZone.InnerVec2 != vec)
|
||||
if (CurrentZone.AudioZone.PlaybackZoneVec2 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerVec2 = vec;
|
||||
CurrentZone.AudioZone.PlaybackZoneVec2 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -286,9 +286,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(InnerVec3TextBox.Text);
|
||||
if (CurrentZone.AudioZone.InnerVec3 != vec)
|
||||
if (CurrentZone.AudioZone.PlaybackZoneVec3 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.InnerVec3 = vec;
|
||||
CurrentZone.AudioZone.PlaybackZoneVec3 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -300,9 +300,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(OuterPosTextBox.Text);
|
||||
if (CurrentZone.AudioZone.OuterPos != vec)
|
||||
if (CurrentZone.AudioZone.ActivationZonePosition != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterPos = vec;
|
||||
CurrentZone.AudioZone.ActivationZonePosition = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -314,9 +314,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(OuterSizeTextBox.Text);
|
||||
if (CurrentZone.AudioZone.OuterSize != vec)
|
||||
if (CurrentZone.AudioZone.ActivationZoneSize != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterSize = vec;
|
||||
CurrentZone.AudioZone.ActivationZoneSize = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -330,9 +330,9 @@ namespace CodeWalker.Project.Panels
|
||||
uint ang = 0;
|
||||
if (uint.TryParse(OuterAngleTextBox.Text, out ang))
|
||||
{
|
||||
if (CurrentZone.AudioZone.OuterAngle != ang)
|
||||
if (CurrentZone.AudioZone.ActivationZoneAngle != ang)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterAngle = ang;
|
||||
CurrentZone.AudioZone.ActivationZoneAngle = ang;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -345,9 +345,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector4String(OuterVec1TextBox.Text);
|
||||
if (CurrentZone.AudioZone.OuterVec1 != vec)
|
||||
if (CurrentZone.AudioZone.ActivationZoneVec1 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterVec1 = vec;
|
||||
CurrentZone.AudioZone.ActivationZoneVec1 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -359,9 +359,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector4String(OuterVec2TextBox.Text);
|
||||
if (CurrentZone.AudioZone.OuterVec2 != vec)
|
||||
if (CurrentZone.AudioZone.ActivationZoneVec2 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterVec2 = vec;
|
||||
CurrentZone.AudioZone.ActivationZoneVec2 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -373,9 +373,9 @@ namespace CodeWalker.Project.Panels
|
||||
if (CurrentZone?.AudioZone == null) return;
|
||||
|
||||
var vec = FloatUtil.ParseVector3String(OuterVec3TextBox.Text);
|
||||
if (CurrentZone.AudioZone.OuterVec3 != vec)
|
||||
if (CurrentZone.AudioZone.ActivationZoneVec3 != vec)
|
||||
{
|
||||
CurrentZone.AudioZone.OuterVec3 = vec;
|
||||
CurrentZone.AudioZone.ActivationZoneVec3 = vec;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -555,8 +555,8 @@ namespace CodeWalker.Project.Panels
|
||||
hashlist.Add(hash);
|
||||
}
|
||||
|
||||
CurrentZone.AudioZone.Hashes = hashlist.ToArray();
|
||||
CurrentZone.AudioZone.HashesCount = (byte)hashlist.Count;
|
||||
CurrentZone.AudioZone.Rules = hashlist.ToArray();
|
||||
CurrentZone.AudioZone.RulesCount = (byte)hashlist.Count;
|
||||
|
||||
ProjectItemChanged();
|
||||
}
|
||||
@ -602,7 +602,7 @@ namespace CodeWalker.Project.Panels
|
||||
{
|
||||
if (CurrentZone == null) return;
|
||||
if (ProjectForm.WorldForm == null) return;
|
||||
ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.InnerSize);
|
||||
ProjectForm.WorldForm.GoToPosition(CurrentZone.Position, CurrentZone.AudioZone.PlaybackZoneSize);
|
||||
}
|
||||
|
||||
private void AddToProjectButton_Click(object sender, EventArgs e)
|
||||
|
@ -620,9 +620,9 @@ namespace CodeWalker.Project.Panels
|
||||
|
||||
|
||||
var zones = new List<Dat151AmbientZone>();
|
||||
var emitters = new List<Dat151AmbientEmitter>();
|
||||
var emitters = new List<Dat151AmbientRule>();
|
||||
var zonelists = new List<Dat151AmbientZoneList>();
|
||||
var emitterlists = new List<Dat151AmbientEmitterList>();
|
||||
var emitterlists = new List<Dat151StaticEmitterList>();
|
||||
var interiors = new List<Dat151Interior>();
|
||||
var interiorrooms = new List<Dat151InteriorRoom>();
|
||||
|
||||
@ -632,17 +632,17 @@ namespace CodeWalker.Project.Panels
|
||||
{
|
||||
zones.Add(reldata as Dat151AmbientZone);
|
||||
}
|
||||
if (reldata is Dat151AmbientEmitter)
|
||||
if (reldata is Dat151AmbientRule)
|
||||
{
|
||||
emitters.Add(reldata as Dat151AmbientEmitter);
|
||||
emitters.Add(reldata as Dat151AmbientRule);
|
||||
}
|
||||
if (reldata is Dat151AmbientZoneList)
|
||||
{
|
||||
zonelists.Add(reldata as Dat151AmbientZoneList);
|
||||
}
|
||||
if (reldata is Dat151AmbientEmitterList)
|
||||
if (reldata is Dat151StaticEmitterList)
|
||||
{
|
||||
emitterlists.Add(reldata as Dat151AmbientEmitterList);
|
||||
emitterlists.Add(reldata as Dat151StaticEmitterList);
|
||||
}
|
||||
if (reldata is Dat151Interior)
|
||||
{
|
||||
@ -1479,7 +1479,7 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public TreeNode FindAudioEmitterListTreeNode(Dat151AmbientEmitterList list)
|
||||
public TreeNode FindAudioEmitterListTreeNode(Dat151StaticEmitterList list)
|
||||
{
|
||||
if (list == null) return null;
|
||||
TreeNode relnode = FindAudioRelTreeNode(list.Rel);
|
||||
@ -1990,7 +1990,7 @@ namespace CodeWalker.Project.Panels
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TrySelectAudioEmitterListTreeNode(Dat151AmbientEmitterList list)
|
||||
public void TrySelectAudioEmitterListTreeNode(Dat151StaticEmitterList list)
|
||||
{
|
||||
TreeNode tnode = FindAudioEmitterListTreeNode(list);
|
||||
if (tnode == null)
|
||||
@ -2210,7 +2210,7 @@ namespace CodeWalker.Project.Panels
|
||||
tn.Text = list.NameHash.ToString();
|
||||
}
|
||||
}
|
||||
public void UpdateAudioEmitterListTreeNode(Dat151AmbientEmitterList list)
|
||||
public void UpdateAudioEmitterListTreeNode(Dat151StaticEmitterList list)
|
||||
{
|
||||
var tn = FindAudioEmitterListTreeNode(list);
|
||||
if (tn != null)
|
||||
@ -2429,12 +2429,12 @@ namespace CodeWalker.Project.Panels
|
||||
var tn = FindAudioEmitterTreeNode(emitter);
|
||||
if ((tn != null) && (tn.Parent != null))
|
||||
{
|
||||
var emitters = new List<Dat151AmbientEmitter>();
|
||||
var emitters = new List<Dat151AmbientRule>();
|
||||
foreach (var reldata in emitter.RelFile.RelDatas)
|
||||
{
|
||||
if (reldata is Dat151AmbientEmitter)
|
||||
if (reldata is Dat151AmbientRule)
|
||||
{
|
||||
emitters.Add(reldata as Dat151AmbientEmitter);
|
||||
emitters.Add(reldata as Dat151AmbientRule);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2460,17 +2460,17 @@ namespace CodeWalker.Project.Panels
|
||||
tn.Parent.Nodes.Remove(tn);
|
||||
}
|
||||
}
|
||||
public void RemoveAudioEmitterListTreeNode(Dat151AmbientEmitterList list)
|
||||
public void RemoveAudioEmitterListTreeNode(Dat151StaticEmitterList list)
|
||||
{
|
||||
var tn = FindAudioEmitterListTreeNode(list);
|
||||
if ((tn != null) && (tn.Parent != null))
|
||||
{
|
||||
var emitterlists = new List<Dat151AmbientEmitterList>();
|
||||
var emitterlists = new List<Dat151StaticEmitterList>();
|
||||
foreach (var reldata in list.Rel.RelDatas)
|
||||
{
|
||||
if (reldata is Dat151AmbientEmitterList)
|
||||
if (reldata is Dat151StaticEmitterList)
|
||||
{
|
||||
emitterlists.Add(reldata as Dat151AmbientEmitterList);
|
||||
emitterlists.Add(reldata as Dat151StaticEmitterList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace CodeWalker.Project
|
||||
private AudioPlacement CurrentAudioZone;
|
||||
private AudioPlacement CurrentAudioEmitter;
|
||||
private Dat151AmbientZoneList CurrentAudioZoneList;
|
||||
private Dat151AmbientEmitterList CurrentAudioEmitterList;
|
||||
private Dat151StaticEmitterList CurrentAudioEmitterList;
|
||||
private Dat151Interior CurrentAudioInterior;
|
||||
private Dat151InteriorRoom CurrentAudioInteriorRoom;
|
||||
|
||||
@ -830,7 +830,7 @@ namespace CodeWalker.Project
|
||||
CurrentAudioZone = item as AudioPlacement;
|
||||
CurrentAudioEmitter = item as AudioPlacement;
|
||||
CurrentAudioZoneList = item as Dat151AmbientZoneList;
|
||||
CurrentAudioEmitterList = item as Dat151AmbientEmitterList;
|
||||
CurrentAudioEmitterList = item as Dat151StaticEmitterList;
|
||||
CurrentAudioInterior = item as Dat151Interior;
|
||||
CurrentAudioInteriorRoom = item as Dat151InteriorRoom;
|
||||
CurrentMloRoom = item as MCMloRoomDef;
|
||||
@ -842,7 +842,7 @@ namespace CodeWalker.Project
|
||||
|
||||
//need to create a temporary AudioPlacement wrapper for these, since AudioPlacements usually come from WorldForm
|
||||
var daz = item as Dat151AmbientZone;
|
||||
var dae = item as Dat151AmbientEmitter;
|
||||
var dae = item as Dat151AmbientRule;
|
||||
if (daz != null) CurrentAudioZone = new AudioPlacement(daz.Rel, daz);
|
||||
if (dae != null) CurrentAudioEmitter = new AudioPlacement(dae.Rel, dae);
|
||||
|
||||
@ -6521,16 +6521,16 @@ namespace CodeWalker.Project
|
||||
zone.Flags1 = cp ? copy.AudioZone.Flags1 : 0;
|
||||
zone.Flags2 = cp ? copy.AudioZone.Flags2 : 0;
|
||||
zone.Shape = cp ? copy.AudioZone.Shape : Dat151ZoneShape.Box;
|
||||
zone.InnerSize = cp ? copy.AudioZone.InnerSize : Vector3.One * 10.0f;
|
||||
zone.InnerAngle = cp ? copy.AudioZone.InnerAngle : 0;
|
||||
zone.InnerVec1 = cp ? copy.AudioZone.InnerVec1 : Vector4.Zero;
|
||||
zone.InnerVec2 = cp ? copy.AudioZone.InnerVec2 : new Vector4(1, 1, 1, 0);
|
||||
zone.InnerVec3 = cp ? copy.AudioZone.InnerVec3 : Vector3.Zero;
|
||||
zone.OuterSize = cp ? copy.AudioZone.OuterSize : Vector3.One * 15.0f;
|
||||
zone.OuterAngle = cp ? copy.AudioZone.OuterAngle : 0;
|
||||
zone.OuterVec1 = cp ? copy.AudioZone.OuterVec1 : Vector4.Zero;
|
||||
zone.OuterVec2 = cp ? copy.AudioZone.OuterVec2 : new Vector4(1, 1, 1, 0);
|
||||
zone.OuterVec3 = cp ? copy.AudioZone.OuterVec3 : Vector3.Zero;
|
||||
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;
|
||||
@ -6539,8 +6539,8 @@ namespace CodeWalker.Project
|
||||
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.HashesCount = cp ? copy.AudioZone.HashesCount: (byte)0;
|
||||
zone.Hashes = cp ? copy.AudioZone.Hashes : null;
|
||||
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.Name = "zone1";
|
||||
@ -6640,7 +6640,7 @@ namespace CodeWalker.Project
|
||||
|
||||
bool cp = copyPosition && (copy != null);
|
||||
|
||||
var emitter = new Dat151AmbientEmitter(CurrentAudioFile);
|
||||
var emitter = new Dat151AmbientRule(CurrentAudioFile);
|
||||
|
||||
emitter.Flags0 = cp ? copy.AudioEmitter.Flags0.Value : 0xAA001100;
|
||||
emitter.Flags5 = cp ? copy.AudioEmitter.Flags5.Value : 0xFFFFFFFF;
|
||||
@ -6819,7 +6819,7 @@ namespace CodeWalker.Project
|
||||
if (CurrentAudioFile == null) return;
|
||||
|
||||
|
||||
var emlist = new Dat151AmbientEmitterList(CurrentAudioFile);
|
||||
var emlist = new Dat151StaticEmitterList(CurrentAudioFile);
|
||||
|
||||
emlist.Name = "emitterlist1";
|
||||
emlist.NameHash = JenkHash.GenHash(emlist.Name);
|
||||
@ -6876,7 +6876,7 @@ namespace CodeWalker.Project
|
||||
|
||||
return true;
|
||||
}
|
||||
public bool IsCurrentAudioEmitterList(Dat151AmbientEmitterList list)
|
||||
public bool IsCurrentAudioEmitterList(Dat151StaticEmitterList list)
|
||||
{
|
||||
return list == CurrentAudioEmitterList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user