644d94090f
Added support for previewing layout animations. This includes pane SRT, tex SRT, material color (white/black blending), texture patterns, pane visibilty, and vertex colors. Added textbox previewing. The scaling will be off, and more features is planned (caching font data to disk for faster loading, improve rendering, etc). Rotations now render correctly for X/Y axis. Added game window preview. This removes any editor only drawn objects and also fits the layout to the screen (aka root pane) size. Add support for rendering custom blending with layout materials. Add support for loading character icons for mk8d. These are hardcoded and have been manually set. Note these will only load if within the menu.szs.
90 lines
2.2 KiB
C#
90 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Toolbox.Library.Animations
|
|
{
|
|
public enum STInterpoaltionType
|
|
{
|
|
Constant,
|
|
Step,
|
|
Linear,
|
|
Hermite,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents how a track is played after it reaches end frame.
|
|
/// Repeat repeats back from the start.
|
|
/// Mirror goes from the end frame to the start
|
|
/// </summary>
|
|
public enum STLoopMode
|
|
{
|
|
Repeat,
|
|
Mirror,
|
|
Clamp,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents a class for animating a skeleton
|
|
/// </summary>
|
|
public class STAnimation
|
|
{
|
|
/// <summary>
|
|
/// The name of the animation.
|
|
/// </summary>
|
|
public string Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// The frame to start playing the animation.
|
|
/// </summary>
|
|
public float StartFrame { get; set; }
|
|
|
|
/// <summary>
|
|
/// The current frame of the animation.
|
|
/// </summary>
|
|
public float Frame { get; set; }
|
|
|
|
/// <summary>
|
|
/// The total amount of frames to play in the animation.
|
|
/// </summary>
|
|
public float FrameCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the animation will loop or not after
|
|
/// the playback rearches the total frame count.
|
|
/// </summary>
|
|
public bool Loop { get; set; }
|
|
|
|
/// <summary>
|
|
/// The step value when a frame advances.
|
|
/// </summary>
|
|
public float Step { get; set; }
|
|
|
|
/// <summary>
|
|
/// A list of groups that store the animation data.
|
|
/// </summary>
|
|
public List<STAnimGroup> AnimGroups = new List<STAnimGroup>();
|
|
|
|
public void SetFrame(float frame)
|
|
{
|
|
Frame = frame;
|
|
}
|
|
|
|
public virtual void NextFrame()
|
|
{
|
|
if (Frame < StartFrame || Frame > FrameCount) return;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Resets the animation group values
|
|
/// This should clear values from tracks, or reset them to base values.
|
|
/// </summary>
|
|
public virtual void Reset()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|