diff --git a/CodeWalker.Core/CodeWalker.Core.csproj b/CodeWalker.Core/CodeWalker.Core.csproj index d7e260b..e05d37d 100644 --- a/CodeWalker.Core/CodeWalker.Core.csproj +++ b/CodeWalker.Core/CodeWalker.Core.csproj @@ -8,8 +8,6 @@ - - diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs index ed8825f..76117d8 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs @@ -1,49 +1,10 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SharpDX; using TC = System.ComponentModel.TypeConverterAttribute; using EXP = System.ComponentModel.ExpandableObjectConverter; namespace CodeWalker.GameFiles { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [TC(typeof(EXP))] public struct MetaHash { public uint Hash { get; set; } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs index 184177e..b0a1cde 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaBuilder.cs @@ -3,7 +3,6 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using SharpDX; namespace CodeWalker.GameFiles { diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs index 5e64dce..2a4e2a7 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs @@ -1,8 +1,8 @@ -using SharpDX; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Numerics; using System.Text; using System.Threading.Tasks; using System.Xml; diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs index aa516ca..f74fe19 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.Text.RegularExpressions; using System.Xml; -using SharpDX; + namespace CodeWalker.GameFiles { diff --git a/CodeWalker.Core/GameFiles/Utils/Data.cs b/CodeWalker.Core/GameFiles/Utils/Data.cs index 755f942..bd02cd2 100644 --- a/CodeWalker.Core/GameFiles/Utils/Data.cs +++ b/CodeWalker.Core/GameFiles/Utils/Data.cs @@ -22,13 +22,11 @@ THE SOFTWARE. //shamelessly stolen - - -using SharpDX; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Numerics; using System.Text; using System.Threading.Tasks; @@ -235,9 +233,9 @@ public Vector4 ReadVector4() return v; } - public Matrix ReadMatrix() + public Matrix4x4 ReadMatrix() { - Matrix m = new Matrix(); + Matrix4x4 m = new Matrix4x4(); m.M11 = ReadSingle(); m.M21 = ReadSingle(); m.M31 = ReadSingle(); @@ -456,7 +454,7 @@ public void Write(Vector4 value) Write(value.W); } - public void Write(Matrix value) + public void Write(Matrix4x4 value) { Write(value.M11); Write(value.M21); diff --git a/CodeWalker.Core/Utils/Utils.cs b/CodeWalker.Core/Utils/Utils.cs index a9d6624..923d033 100644 --- a/CodeWalker.Core/Utils/Utils.cs +++ b/CodeWalker.Core/Utils/Utils.cs @@ -4,12 +4,10 @@ using System.Drawing; using System.Globalization; using System.Linq; +using System.Numerics; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; -using SharpDX; -using Color = SharpDX.Color; -using Half = SharpDX.Half; namespace CodeWalker { @@ -164,16 +162,6 @@ public static string GetQuaternionXmlString(Quaternion q) { return string.Format("x=\"{0}\" y=\"{1}\" z=\"{2}\" w=\"{3}\"", ToString(q.X), ToString(q.Y), ToString(q.Z), ToString(q.W)); } - public static string GetHalf2String(Half2 v, string d = ", ") - { - var f = Half.ConvertToFloat(new[] { v.X, v.Y }); - return ToString(f[0]) + d + ToString(f[1]); - } - public static string GetHalf4String(Half4 v, string d = ", ") - { - var f = Half.ConvertToFloat(new[] { v.X, v.Y, v.Z, v.W }); - return ToString(f[0]) + d + ToString(f[1]) + d + ToString(f[2]) + d + ToString(f[3]); - } public static string GetColourString(Color v, string d = ", ") { var c = CultureInfo.InvariantCulture; diff --git a/CodeWalker.Core/Utils/Xml.cs b/CodeWalker.Core/Utils/Xml.cs index ff94d0f..a700cad 100644 --- a/CodeWalker.Core/Utils/Xml.cs +++ b/CodeWalker.Core/Utils/Xml.cs @@ -1,7 +1,8 @@ -using SharpDX; + using System; using System.Collections.Generic; using System.Linq; +using System.Numerics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -510,14 +511,14 @@ public static Vector4[] GetChildRawVector4ArrayNullable(XmlNode node, string nam return ((arr != null) && (arr.Length > 0)) ? arr : null; } - public static Matrix GetMatrix(XmlNode node) + public static Matrix4x4 GetMatrix(XmlNode node) { - if (node == null) return Matrix.Identity; + if (node == null) return Matrix4x4.Identity; var arr = GetRawFloatArray(node); - if ((arr == null) || (arr.Length != 16)) return Matrix.Identity; - return new Matrix(arr); + if ((arr == null) || (arr.Length != 16)) return Matrix4x4.Identity; + return new Matrix4x4(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[8], arr[9], arr[10], arr[11], arr[12], arr[13], arr[14], arr[15]); } - public static Matrix GetChildMatrix(XmlNode node, string name) + public static Matrix4x4 GetChildMatrix(XmlNode node, string name) { var cnode = node.SelectSingleNode(name); return GetMatrix(cnode); diff --git a/RDR2AudioTool/StereoAudioEditingWindow.xaml.cs b/RDR2AudioTool/StereoAudioEditingWindow.xaml.cs index 7f03c37..6336d45 100644 --- a/RDR2AudioTool/StereoAudioEditingWindow.xaml.cs +++ b/RDR2AudioTool/StereoAudioEditingWindow.xaml.cs @@ -2,7 +2,6 @@ using CodeWalker; using CodeWalker.GameFiles; using Microsoft.Win32; -using SharpDX.Win32; using System; using System.Collections.Generic; using System.Drawing;