26 lines
753 B
C#
26 lines
753 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using PkmnLibSharp.FFI;
|
|
using PkmnLibSharp.Utils;
|
|
using Interface = PkmnLibSharp.FFI.StaticData.Libraries.MoveLibrary;
|
|
|
|
namespace PkmnLibSharp.StaticData.Libraries
|
|
{
|
|
public class MoveLibrary : DataLibrary<MoveData>
|
|
{
|
|
protected MoveLibrary(FFIHandle handle) : base(handle)
|
|
{
|
|
}
|
|
|
|
public static MoveLibrary Create(ulong capacity)
|
|
{
|
|
var handle = Interface.move_library_new(capacity);
|
|
return Resolver.Instance.ResolveMoveLibrary(handle.Resolve());
|
|
}
|
|
|
|
protected override void AddNative(string key, MoveData value)
|
|
{
|
|
Interface.move_library_add(Handle, key.ToPtr(), value.Handle);
|
|
}
|
|
}
|
|
} |