mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-15 00:44:49 +08:00
Experimental bone animations playing from YCD. Windmills, fans, radars, ufos etc
This commit is contained in:
@@ -550,6 +550,10 @@ namespace CodeWalker.GameFiles
|
||||
private ResourceSystemStructBlock<ushort> Unknown_40h_DataBlock = null;
|
||||
|
||||
|
||||
public Dictionary<ushort, Bone> BonesMap { get; set; }//for convienience finding bones by tag
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reads the data-block from a stream.
|
||||
/// </summary>
|
||||
@@ -611,6 +615,16 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
}
|
||||
|
||||
BonesMap = new Dictionary<ushort, Bone>();
|
||||
if (Bones != null)
|
||||
{
|
||||
for (int i = 0; i < Bones.Count; i++)
|
||||
{
|
||||
var bone = Bones[i];
|
||||
BonesMap[bone.Id] = bone;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -784,6 +798,13 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
private string_r NameBlock = null;
|
||||
|
||||
|
||||
//used by CW for animating skeletons.
|
||||
public Quaternion AnimRotation;
|
||||
public Vector3 AnimTranslation;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reads the data-block from a stream.
|
||||
/// </summary>
|
||||
@@ -819,6 +840,10 @@ namespace CodeWalker.GameFiles
|
||||
this.Name = reader.ReadStringAt(//BlockAt<string_r>(
|
||||
this.NamePointer // offset
|
||||
);
|
||||
|
||||
|
||||
AnimRotation = Rotation;
|
||||
AnimTranslation = Translation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user