mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* GfxObj(0x01) and Environment(0x0D) client_portal.dat Parsing Added * Added Surface 0x08 items
37 lines
1,007 B
C#
37 lines
1,007 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
{
|
|
/// <summary>
|
|
/// This is actually different than just a "VertexArray" class.
|
|
/// </summary>
|
|
public class CVertexArray
|
|
{
|
|
public int VertexType { get; set; }
|
|
public Dictionary<short, SWVertex> Vertices { get; set; } = new Dictionary<short, SWVertex>();
|
|
|
|
public static CVertexArray Read(DatReader datReader)
|
|
{
|
|
CVertexArray obj = new CVertexArray();
|
|
|
|
obj.VertexType = datReader.ReadInt32();
|
|
|
|
uint num_vertices = datReader.ReadUInt32();
|
|
|
|
if (obj.VertexType == 1)
|
|
{
|
|
for (uint i = 0; i < num_vertices; i++)
|
|
{
|
|
short vert_id = datReader.ReadInt16();
|
|
obj.Vertices.Add(vert_id, SWVertex.Read(datReader));
|
|
}
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
}
|
|
}
|