PkmnLibRSharp/PkmnLibRSharp/FFI/StaticData/Species.cs

41 lines
1.9 KiB
C#

using System;
using System.Runtime.InteropServices;
using JetBrains.Annotations;
using PkmnLibSharp.StaticData;
using PkmnLibSharp.Utils;
namespace PkmnLibSharp.FFI.StaticData
{
internal static class Species
{
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern NativeResult<FFIHandleValue> species_new(ushort id, IntPtr name, float genderRate, IntPtr growthRate,
byte captureRate, FFIHandleValue defaultForm, IntPtr flags, ulong flagsLength);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern ushort species_id(FFIHandleValue ptr);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr species_name(FFIHandleValue ptr);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern float species_gender_rate(FFIHandleValue ptr);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr species_growth_rate(FFIHandleValue ptr);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern byte species_capture_rate(FFIHandleValue ptr);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
[MustUseReturnValue]
internal static extern NativeResult species_add_form(FFIHandleValue ptr, IntPtr name, FFIHandleValue form);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern FFIHandleValue species_get_form(FFIHandleValue ptr, IntPtr name);
[DllImport(Data.DllName, CallingConvention = CallingConvention.Cdecl)]
internal static extern Gender species_get_random_gender(FFIHandleValue ptr, ulong seed);
}
}