mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-20 17:34:11 -05:00
Cumulative changes from the team. Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com> Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com> Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
15 lines
437 B
C#
15 lines
437 B
C#
using FlatSharp;
|
|
using pkNX.Containers;
|
|
using pkNX.Structures.FlatBuffers;
|
|
using System;
|
|
|
|
namespace pkNX.WinForms;
|
|
|
|
public sealed class FlatBufferSource(IFileInternal rom)
|
|
{
|
|
public T Get<T>(string path) where T : class, IFlatBufferSerializable<T>
|
|
=> Get<T>(rom.GetPackedFile(path));
|
|
public T Get<T>(Memory<byte> data) where T : class, IFlatBufferSerializable<T>
|
|
=> FlatBufferConverter.DeserializeFrom<T>(data);
|
|
}
|