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 * ACE.DatLoader/Tests Added cell.dat testing framework. First done EnvCell * ACE.DatLoader ParticileEmitter converted. PositionExtensions removed (via conversion to Position/Frame/Vector3/Quaternion) * ACE.DatLoader: ClothingTable converted and fixed * ACE.DatLoader GeneratorTable converted * ACE.DatLoader: GfxObjDegradeInfo converted * ACE.DatLoader: MotionTable converted * Merge conflicts * Merge Conflicts * More merge conflicts * More conflicts resolved
31 lines
911 B
C#
31 lines
911 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Numerics;
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
{
|
|
public class MotionData : IUnpackable
|
|
{
|
|
public byte Bitfield { get; private set; }
|
|
public byte Bitfield2 { get; private set; }
|
|
public List<AnimData> Anims { get; } = new List<AnimData>();
|
|
public Vector3 Velocity { get; private set; }
|
|
public Vector3 Omega { get; private set; }
|
|
|
|
public void Unpack(BinaryReader reader)
|
|
{
|
|
var numAnims = reader.ReadByte();
|
|
Bitfield = reader.ReadByte();
|
|
Bitfield2 = reader.ReadByte();
|
|
reader.AlignBoundary();
|
|
|
|
Anims.Unpack(reader, numAnims);
|
|
|
|
if ((Bitfield2 & 1) != 0)
|
|
Velocity = reader.ReadVector3();
|
|
|
|
if ((Bitfield2 & 2) != 0)
|
|
Omega = reader.ReadVector3();
|
|
}
|
|
}
|
|
}
|