mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 06:52:55 +08:00
Audio dat progress
This commit is contained in:
parent
3116c049fd
commit
08d1cdcdf3
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
|
||||
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user