mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
Adjust the keyloader
This commit is contained in:
parent
6fe6dfed37
commit
bc808202c7
1 changed files with 24 additions and 1 deletions
|
@ -48,7 +48,7 @@ namespace FirstPlugin
|
|||
return tracks;
|
||||
}
|
||||
|
||||
public static STAnimationTrack[] LoadVectorTrack(Gfbanim.FramedVectorTrack framedTrack)
|
||||
public static STAnimationTrack[] LoadVectorTrack(Gfbanim.FramedVectorTrack16 framedTrack)
|
||||
{
|
||||
ushort[] frames = framedTrack.GetFramesArray();
|
||||
|
||||
|
@ -71,6 +71,29 @@ namespace FirstPlugin
|
|||
return tracks;
|
||||
}
|
||||
|
||||
public static STAnimationTrack[] LoadVectorTrack(Gfbanim.FramedVectorTrack8 framedTrack)
|
||||
{
|
||||
byte[] frames = framedTrack.GetFramesArray();
|
||||
|
||||
STAnimationTrack[] tracks = new STAnimationTrack[3];
|
||||
tracks[0] = new STAnimationTrack(STInterpoaltionType.Linear);
|
||||
tracks[1] = new STAnimationTrack(STInterpoaltionType.Linear);
|
||||
tracks[2] = new STAnimationTrack(STInterpoaltionType.Linear);
|
||||
|
||||
for (int i = 0; i < framedTrack.ValuesLength; i++)
|
||||
{
|
||||
var vec = framedTrack.Values(i).Value;
|
||||
int frame = i;
|
||||
|
||||
if (i < frames?.Length) frame = frames[i];
|
||||
|
||||
tracks[0].KeyFrames.Add(new STKeyFrame(frame, vec.X));
|
||||
tracks[1].KeyFrames.Add(new STKeyFrame(frame, vec.Y));
|
||||
tracks[2].KeyFrames.Add(new STKeyFrame(frame, vec.Z));
|
||||
}
|
||||
return tracks;
|
||||
}
|
||||
|
||||
public static STAnimationTrack LoadBooleanTrack(Gfbanim.DynamicBooleanTrack framedTrack)
|
||||
{
|
||||
STAnimationTrack track = new STAnimationTrack(STInterpoaltionType.Step);
|
||||
|
|
Loading…
Reference in a new issue