ace/Source/ACE.DatLoader/Entity/CVertexArray.cs
Mag-nus 6f446c38fc
ACE.DatLoader More IUnpackable progress (#615)
* 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
2018-02-03 20:41:21 -06:00

27 lines
738 B
C#

using System;
using System.Collections.Generic;
using System.IO;
namespace ACE.DatLoader.Entity
{
/// <summary>
/// This is actually different than just a "VertexArray" class.
/// </summary>
public class CVertexArray : IUnpackable
{
public int VertexType { get; private set; }
public Dictionary<ushort, SWVertex> Vertices { get; } = new Dictionary<ushort, SWVertex>();
public void Unpack(BinaryReader reader)
{
VertexType = reader.ReadInt32();
var numVertices = reader.ReadUInt32();
if (VertexType == 1)
Vertices.Unpack(reader, numVertices);
else
throw new NotImplementedException();
}
}
}