Audio dat progress

This commit is contained in:
dexyfex 2019-03-12 01:13:04 +11:00
parent 3116c049fd
commit 08d1cdcdf3
3 changed files with 2111 additions and 797 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3477,7 +3477,7 @@ namespace CodeWalker.GameFiles
null_sound = 3817852694, //used in game.dat151.rel
run = 285848937, //used in game.dat151.rel
cop_dispatch_interaction_settings = 778268174, //used in game.dat151.rel

View File

@ -218,6 +218,26 @@ namespace CodeWalker
return GetRawByteArray(cnode);
}
public static float[] GetRawFloatArray(XmlNode node)
{
if (node == null) return new float[0];
var items = new List<float>();
var split = node.InnerText.Split('\n');// Regex.Split(node.InnerText, @"[\s\r\n\t]");
for (int i = 0; i < split.Length; i++)
{
var s = split[i]?.Trim();
if (string.IsNullOrEmpty(s)) continue;
var f = FloatUtil.Parse(s);
items.Add(f);
}
return items.ToArray();
}
public static float[] GetChildRawFloatArray(XmlNode node, string name)
{
var cnode = node.SelectSingleNode(name);
return GetRawFloatArray(cnode);
}
public static Vector2[] GetRawVector2Array(XmlNode node)
{
if (node == null) return new Vector2[0];