mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* ACE.DatLoader.Tests fix for Animation. Also includes some ACE.Entity.Position replacements with ACE.DatLoader.Entity.Frame * ACE.DatLoader Scene converted Also made all the ReadFromDat code more generic/copyable * ACE.DatLoader Palette converted * ACE.DatLoader: PaletteSet converted * ACE.DatLoader: CombatManeuverTable converted * ACE.DatLoader PhysicsScriptTable converted * ACE.DatLoader SpellComponentTable converted * ACE.DatLoader misc cleanups * ACE.DatLoader Surface converted * ACE.DatLoader much more progress
33 lines
1,020 B
C#
33 lines
1,020 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
{
|
|
public class AnimationFrame : IUnpackable
|
|
{
|
|
public List<Frame> Frames { get; } = new List<Frame>();
|
|
public List<AnimationHook> Hooks { get; } = new List<AnimationHook>();
|
|
|
|
/// <summary>
|
|
/// You must use the Unpack(BinaryReader reader, int numParts) method.
|
|
/// </summary>
|
|
/// <exception cref="NotSupportedException">You must use the Unpack(BinaryReader reader, int numParts) method.</exception>
|
|
public void Unpack(BinaryReader reader)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
public void Unpack(BinaryReader reader, uint numParts)
|
|
{
|
|
Frames.Unpack(reader, numParts);
|
|
|
|
uint numHooks = reader.ReadUInt32();
|
|
for (uint i = 0; i < numHooks; i++)
|
|
{
|
|
var hook = AnimationHook.ReadHook(reader);
|
|
Hooks.Add(hook);
|
|
}
|
|
}
|
|
}
|
|
}
|