Support for Evolution

This commit is contained in:
Deukhoofd 2020-08-22 13:10:43 +02:00
parent 59b4223d18
commit 2c931bd32c
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
9 changed files with 25 additions and 12 deletions

View File

@ -427,6 +427,10 @@ namespace PkmnLibSharp.Battling
Creaturelib.Generated.Creature.SwapAttack(Ptr, a, b).Assert(); Creaturelib.Generated.Creature.SwapAttack(Ptr, a, b).Assert();
} }
public void Evolve(Species species, Forme forme)
{
Pkmnlib.Generated.Pokemon.Evolve(Ptr, species.Ptr, forme.Ptr).Assert();
}
private Species? _displaySpecies; private Species? _displaySpecies;
private Forme? _displayForme; private Forme? _displayForme;

View File

@ -14,9 +14,5 @@ namespace Creaturelib.Generated
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastExceptionStacktrace")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastExceptionStacktrace")]
internal static extern IntPtr GetLastExceptionStacktrace(); internal static extern IntPtr GetLastExceptionStacktrace();
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_RaiseSignal")]
internal static extern void RaiseSignal();
} }
} }

View File

@ -82,5 +82,11 @@ namespace Creaturelib.Generated
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetAtIndex")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetAtIndex")]
internal static extern byte GetAtIndex(IntPtr p, ulong index, ref IntPtr @out); internal static extern byte GetAtIndex(IntPtr p, ulong index, ref IntPtr @out);
/// <param name="p">const SpeciesLibrary *</param>
/// <param name="id">unsigned short</param>
/// <returns>const CreatureSpecies *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetById")]
internal static extern IntPtr GetById(IntPtr p, ushort id);
} }
} }

View File

@ -111,5 +111,12 @@ namespace Pkmnlib.Generated
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_ChangeFriendship")] [DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_ChangeFriendship")]
internal static extern void ChangeFriendship(IntPtr p, sbyte amount); internal static extern void ChangeFriendship(IntPtr p, sbyte amount);
/// <param name="p">Pokemon *</param>
/// <param name="species">const PokemonSpecies *</param>
/// <param name="forme">const PokemonForme *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_Evolve")]
internal static extern byte Evolve(IntPtr p, IntPtr species, IntPtr forme);
} }
} }

BIN
PkmnLibSharp/Native/libArbutils.so (Stored with Git LFS)

Binary file not shown.

BIN
PkmnLibSharp/Native/libCreatureLib.so (Stored with Git LFS)

Binary file not shown.

BIN
PkmnLibSharp/Native/libpkmnLib.so (Stored with Git LFS)

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long