Use full library names for Unity.

This commit is contained in:
Deukhoofd 2020-10-17 18:16:00 +02:00
parent 0a2ce2d6e4
commit 06e252dbac
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
90 changed files with 584 additions and 570 deletions

View File

@ -11,10 +11,15 @@ namespace PkmnLibSharp.Battling
internal LearnedMove(IntPtr ptr) : base(ptr){}
public LearnedMove(MoveData move, byte maxUses, MoveLearnMethod learnMethod)
{
Initialize(CreatePtr(move, maxUses, learnMethod));
}
protected static IntPtr CreatePtr(MoveData move, byte maxUses, MoveLearnMethod learnMethod)
{
var ptr = IntPtr.Zero;
LearnedAttack.Construct(ref ptr, move.Ptr, maxUses, (AttackLearnMethod) learnMethod).Assert();
Initialize(ptr);
return ptr;
}
public MoveData Move

View File

@ -23,18 +23,28 @@ namespace PkmnLibSharp.Battling
byte abilityIndex,
IReadOnlyCollection<LearnedMove> moves, StatisticSet<byte> ivs, StatisticSet<byte> evs,
Nature nature)
: base(Pkmnlib.Generated.Pokemon.Construct(
library.Ptr, species.Ptr, forme.Ptr, level, experience,
: base(CreatePtr(library, species, forme, level, experience, uid, gender, coloring, heldItem, nickname,
hiddenAbility, abilityIndex, moves, ivs, evs, nature))
{
Library = library;
Initialize();
}
protected static IntPtr CreatePtr(BattleLibrary library, Species species, Forme forme,
byte level, uint experience, uint uid,
Gender gender, byte coloring, Item? heldItem, string? nickname, bool hiddenAbility,
byte abilityIndex,
IReadOnlyCollection<LearnedMove> moves, StatisticSet<byte> ivs, StatisticSet<byte> evs,
Nature nature)
{
return Pkmnlib.Generated.Pokemon.Construct(library.Ptr, species.Ptr, forme.Ptr, level, experience,
uid, (Pkmnlib.Gender) gender, coloring, heldItem?.Ptr ?? IntPtr.Zero, nickname.ToPtr(),
hiddenAbility.ToNative(), abilityIndex,
moves.Select(x => x?.Ptr ?? IntPtr.Zero).ToArray().ArrayPtr(),
(ulong) moves.Count,
ivs.HP, ivs.Attack, ivs.Defense, ivs.SpecialAttack,
ivs.SpecialDefense, ivs.Speed, evs.HP, evs.Attack, evs.Defense,
evs.SpecialAttack, evs.SpecialDefense, evs.Speed, nature.Ptr))
{
Library = library;
Initialize();
evs.SpecialAttack, evs.SpecialDefense, evs.Speed, nature.Ptr);
}
public BattleLibrary Library { get; private set; }
@ -169,14 +179,14 @@ namespace PkmnLibSharp.Battling
return _nickname;
}
}
public ReadOnlyNativePtrArray<LearnedMove?> Moves
public ReadOnlyNativePtrArray<LearnedMove> Moves
{
get
{
if (_moves != null) return _moves;
var movesLength = Creaturelib.Generated.Creature.GetAttacksCount(Ptr);
var movesPtr = Creaturelib.Generated.Creature.GetAttacks(Ptr);
_moves = new ReadOnlyNativePtrArray<LearnedMove?>(movesPtr, (int) movesLength,
_moves = new ReadOnlyNativePtrArray<LearnedMove>(movesPtr, (int) movesLength,
Constructor.GenericType.LearnedMove);
return _moves;
}
@ -443,7 +453,7 @@ namespace PkmnLibSharp.Battling
private Species? _species;
private Forme? _forme;
private string? _nickname;
private ReadOnlyNativePtrArray<LearnedMove?>? _moves;
private ReadOnlyNativePtrArray<LearnedMove>? _moves;
private Nature? _nature;
private Battle? _battle;
private BattleSide? _battleSide;

View File

@ -194,6 +194,7 @@ namespace PkmnLibSharp.Battling
Gender = species.GetRandomGender(random);
}
PopulateUninitialized(species, forme!, random);
return Finalize(species, forme!, heldItem, moves, nature);
}
}

View File

@ -6,7 +6,7 @@ using PkmnLibSharp.Utilities;
namespace PkmnLibSharp.Battling
{
public class PokemonParty : PointerWrapper, IEnumerable<Pokemon>
public class PokemonParty : PointerWrapper, IEnumerable<Pokemon?>
{
private Pokemon?[]? _cache;
private ReadOnlyNativePtrArray<Pokemon>? _party;
@ -28,9 +28,9 @@ namespace PkmnLibSharp.Battling
_cache = Party.ToArray();
}
public virtual Pokemon this[int i] => GetAtIndex((ulong) i);
public virtual Pokemon? this[int i] => GetAtIndex((ulong) i);
public Pokemon GetAtIndex(ulong index)
public Pokemon? GetAtIndex(ulong index)
{
var ptr = IntPtr.Zero;
Creaturelib.Generated.CreatureParty.GetAtIndex(ref ptr, Ptr, index).Assert();
@ -45,10 +45,12 @@ namespace PkmnLibSharp.Battling
_cache[indexB] = temp;
}
public Pokemon SwapInto(ulong indexA, Pokemon pokemon)
public Pokemon? SwapInto(ulong indexA, Pokemon? pokemon)
{
var ptr = IntPtr.Zero;
Creaturelib.Generated.CreatureParty.SwapInto(ref ptr, Ptr, indexA, pokemon.Ptr).Assert();
var pkmnPtr = IntPtr.Zero;
if (pokemon != null) pkmnPtr = pokemon.Ptr;
Creaturelib.Generated.CreatureParty.SwapInto(ref ptr, Ptr, indexA, pkmnPtr).Assert();
_cache![indexA] = pokemon;
if (TryResolvePointer(ptr, out Pokemon? newPokemon))
return newPokemon!;

View File

@ -7,17 +7,13 @@ namespace Arbutils.Generated
internal static class C
{
/// <returns>const char *</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_C_GetLastException")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_C_GetLastException")]
internal static extern IntPtr GetLastException();
/// <param name="callback">Function *</param>
/// <returns>void</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_C_SetSignalCallback")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_C_SetSignalCallback")]
internal static extern void SetSignalCallback(IntPtr callback);
/// <returns>void</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_C_RaiseSignal")]
internal static extern void RaiseSignal();
}
}

View File

@ -7,39 +7,39 @@ namespace Arbutils.Generated
internal static class Random
{
/// <returns>Random *</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Construct")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Construct")]
internal static extern IntPtr Construct();
/// <param name="seed">long unsigned int</param>
/// <returns>Random *</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_ConstructWithSeed")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_ConstructWithSeed")]
internal static extern IntPtr ConstructWithSeed(ulong seed);
/// <param name="p">Random *</param>
/// <returns>void</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Destruct")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">Random *</param>
/// <returns>float</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetFloat")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetFloat")]
internal static extern float GetFloat(IntPtr p);
/// <param name="p">Random *</param>
/// <returns>double</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetDouble")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetDouble")]
internal static extern double GetDouble(IntPtr p);
/// <param name="p">Random *</param>
/// <returns>int</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Get")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_Get")]
internal static extern int Get(IntPtr p);
/// <param name="p">Random *</param>
/// <param name="max">int</param>
/// <param name="out">int &</param>
/// <returns>unsigned char</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetWithMax")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetWithMax")]
internal static extern byte GetWithMax(IntPtr p, int max, ref int @out);
/// <param name="p">Random *</param>
@ -47,19 +47,19 @@ namespace Arbutils.Generated
/// <param name="max">int</param>
/// <param name="out">int &</param>
/// <returns>unsigned char</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetInLimits")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetInLimits")]
internal static extern byte GetInLimits(IntPtr p, int min, int max, ref int @out);
/// <param name="p">Random *</param>
/// <returns>unsigned int</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsigned")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsigned")]
internal static extern uint GetUnsigned(IntPtr p);
/// <param name="p">Random *</param>
/// <param name="max">unsigned int</param>
/// <param name="out">unsigned int &</param>
/// <returns>unsigned char</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsignedWithMax")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsignedWithMax")]
internal static extern byte GetUnsignedWithMax(IntPtr p, uint max, ref uint @out);
/// <param name="p">Random *</param>
@ -67,12 +67,12 @@ namespace Arbutils.Generated
/// <param name="max">unsigned int</param>
/// <param name="out">unsigned int &</param>
/// <returns>unsigned char</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsignedInLimits")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetUnsignedInLimits")]
internal static extern byte GetUnsignedInLimits(IntPtr p, uint min, uint max, ref uint @out);
/// <param name="p">Random *</param>
/// <returns>long unsigned int</returns>
[DllImport("Arbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetSeed")]
[DllImport("libArbutils", CallingConvention = CallingConvention.Cdecl, EntryPoint= "Arbutils_Random_GetSeed")]
internal static extern ulong GetSeed(IntPtr p);
}

View File

@ -22,73 +22,73 @@ namespace Creaturelib.Generated
/// <param name="flags">const char * *</param>
/// <param name="flagsCount">long unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr name, byte type, AttackCategory category, byte power, byte accuracy, byte baseUsage, AttackTarget target, sbyte priority, float effectChance, IntPtr effectName, IntPtr effectParameters, ulong effectParameterCount, IntPtr flags, ulong flagsCount);
/// <param name="p">const AttackData *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>const char *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetName")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetName")]
internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetType")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetType")]
internal static extern byte GetType(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>AttackCategory</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetCategory")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetCategory")]
internal static extern AttackCategory GetCategory(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBasePower")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBasePower")]
internal static extern byte GetBasePower(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetAccuracy")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetAccuracy")]
internal static extern byte GetAccuracy(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBaseUsages")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBaseUsages")]
internal static extern byte GetBaseUsages(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>AttackTarget</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetTarget")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetTarget")]
internal static extern AttackTarget GetTarget(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>signed char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetPriority")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetPriority")]
internal static extern sbyte GetPriority(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasSecondaryEffect")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasSecondaryEffect")]
internal static extern byte HasSecondaryEffect(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>float</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectChance")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectChance")]
internal static extern float GetSecondaryEffectChance(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <returns>const char *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectName")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectName")]
internal static extern IntPtr GetSecondaryEffectName(IntPtr p);
/// <param name="p">const AttackData *</param>
/// <param name="key">const char *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasFlag")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasFlag")]
internal static extern byte HasFlag(IntPtr p, IntPtr key);
}

View File

@ -9,78 +9,78 @@ namespace Creaturelib.Generated
/// <param name="library">AttackLibrary * &</param>
/// <param name="initialCapacity">long unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Construct")]
internal static extern byte Construct(ref IntPtr library, ulong initialCapacity);
/// <param name="p">const AttackLibrary *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">AttackLibrary *</param>
/// <param name="name">const char *</param>
/// <param name="t">AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Insert")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Insert")]
internal static extern byte Insert(IntPtr p, IntPtr name, IntPtr t);
/// <param name="p">AttackLibrary *</param>
/// <param name="hashedKey">unsigned int</param>
/// <param name="t">AttackData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_InsertWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_InsertWithHash")]
internal static extern byte InsertWithHash(IntPtr p, uint hashedKey, IntPtr t);
/// <param name="p">AttackLibrary *</param>
/// <param name="name">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Delete")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Delete")]
internal static extern byte Delete(IntPtr p, IntPtr name);
/// <param name="p">AttackLibrary *</param>
/// <param name="hashedKey">unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_DeleteWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_DeleteWithHash")]
internal static extern byte DeleteWithHash(IntPtr p, uint hashedKey);
/// <param name="p">AttackLibrary *</param>
/// <param name="name">const char *</param>
/// <param name="out">const AttackData * &</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_TryGet")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_TryGet")]
internal static extern byte TryGet(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">AttackLibrary *</param>
/// <param name="hashedKey">unsigned int</param>
/// <param name="out">const AttackData * &</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_TryGetWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_TryGetWithHash")]
internal static extern byte TryGetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">AttackLibrary *</param>
/// <param name="name">const char *</param>
/// <param name="out">const AttackData * &</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Get")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_Get")]
internal static extern byte Get(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">AttackLibrary *</param>
/// <param name="hashedKey">unsigned int</param>
/// <param name="out">const AttackData * &</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetWithHash")]
internal static extern byte GetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">AttackLibrary *</param>
/// <returns>long unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetCount")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetCount")]
internal static extern ulong GetCount(IntPtr p);
/// <param name="p">AttackLibrary *</param>
/// <param name="index">long unsigned int</param>
/// <param name="out">const AttackData * &</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetAtIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackLibrary_GetAtIndex")]
internal static extern byte GetAtIndex(IntPtr p, ulong index, ref IntPtr @out);
}

View File

@ -11,43 +11,43 @@ namespace Creaturelib.Generated
/// <param name="sideIndex">unsigned char</param>
/// <param name="targetIndex">unsigned char</param>
/// <returns>AttackTurnChoice *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user, IntPtr attack, byte sideIndex, byte targetIndex);
/// <param name="p">AttackTurnChoice *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>LearnedAttack *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttack")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>TurnChoiceKind</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetKind")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetKind")]
internal static extern TurnChoiceKind GetKind(IntPtr p);
/// <param name="out">signed char &</param>
/// <param name="p">AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetPriority")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetPriority")]
internal static extern byte GetPriority(ref sbyte @out, IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>Script *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttackScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttackScript")]
internal static extern IntPtr GetAttackScript(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetTargetSideIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetTargetSideIndex")]
internal static extern byte GetTargetSideIndex(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetTargetCreatureIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetTargetCreatureIndex")]
internal static extern byte GetTargetCreatureIndex(IntPtr p);
}

View File

@ -8,12 +8,12 @@ namespace Creaturelib.Generated
{
/// <param name="p">const AttackUseEvent *</param>
/// <returns>const ExecutingAttack *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseEvent_GetAttack")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseEvent_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p);
/// <param name="p">const AttackUseEvent *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseEvent_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseEvent_Destruct")]
internal static extern void Destruct(IntPtr p);
}

View File

@ -8,7 +8,7 @@ namespace Creaturelib.Generated
{
/// <param name="p">const AttackUseHistory *</param>
/// <returns>const ExecutingAttack *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseHistory_GetAttack")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackUseHistory_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p);
}

View File

@ -8,12 +8,12 @@ namespace Creaturelib.Generated
{
/// <param name="p">const BaseTurnChoice *</param>
/// <returns>TurnChoiceKind</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetKind")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetKind")]
internal static extern TurnChoiceKind GetKind(IntPtr p);
/// <param name="p">const BaseTurnChoice *</param>
/// <returns>Creature *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetUser")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetUser")]
internal static extern IntPtr GetUser(IntPtr p);
}

View File

@ -15,68 +15,68 @@ namespace Creaturelib.Generated
/// <param name="creaturesPerSide">unsigned char</param>
/// <param name="randomSeed">long unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr library, IntPtr partyArr, ulong numberOfParties, byte canFlee, byte numberOfSides, byte creaturesPerSide, ulong randomSeed);
/// <param name="p">const Battle *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>const BattleLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLibrary")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLibrary")]
internal static extern IntPtr GetLibrary(IntPtr p);
/// <param name="out">bool &</param>
/// <param name="p">Battle *</param>
/// <param name="turnChoice">BaseTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanUse")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanUse")]
internal static extern byte CanUse(ref byte @out, IntPtr p, IntPtr turnChoice);
/// <param name="out">bool &</param>
/// <param name="p">Battle *</param>
/// <param name="turnChoice">BaseTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TrySetChoice")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TrySetChoice")]
internal static extern byte TrySetChoice(ref byte @out, IntPtr p, IntPtr turnChoice);
/// <param name="p">const Battle *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanFlee")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanFlee")]
internal static extern byte CanFlee(IntPtr p);
/// <param name="p">Battle *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CheckChoicesSetAndRun")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CheckChoicesSetAndRun")]
internal static extern byte CheckChoicesSetAndRun(IntPtr p);
/// <param name="p">Battle *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurn")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurn")]
internal static extern uint GetCurrentTurn(IntPtr p);
/// <param name="p">Battle *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreaturesPerSide")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreaturesPerSide")]
internal static extern uint GetCreaturesPerSide(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>ChoiceQueue *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurnQueue")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurnQueue")]
internal static extern IntPtr GetCurrentTurnQueue(IntPtr p);
/// <param name="p">Battle *</param>
/// <returns>BattleRandom *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetRandom")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetRandom")]
internal static extern IntPtr GetRandom(IntPtr p);
/// <param name="out">bool &</param>
/// <param name="p">const Battle *</param>
/// <param name="c">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CreatureInField")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CreatureInField")]
internal static extern byte CreatureInField(ref byte @out, IntPtr p, IntPtr c);
/// <param name="out">Creature * &</param>
@ -84,14 +84,14 @@ namespace Creaturelib.Generated
/// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreature")]
internal static extern byte GetCreature(ref IntPtr @out, IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param>
/// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ForceRecall")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ForceRecall")]
internal static extern byte ForceRecall(IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param>
@ -99,7 +99,7 @@ namespace Creaturelib.Generated
/// <param name="target">unsigned char</param>
/// <param name="c">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_SwitchCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_SwitchCreature")]
internal static extern byte SwitchCreature(IntPtr p, byte side, byte target, IntPtr c);
/// <param name="out">bool &</param>
@ -107,99 +107,99 @@ namespace Creaturelib.Generated
/// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanSlotBeFilled")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanSlotBeFilled")]
internal static extern byte CanSlotBeFilled(ref byte @out, IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ValidateBattleState")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ValidateBattleState")]
internal static extern byte ValidateBattleState(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasEnded")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasEnded")]
internal static extern byte HasEnded(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasConclusiveResult")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasConclusiveResult")]
internal static extern byte HasConclusiveResult(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetWinningSide")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetWinningSide")]
internal static extern byte GetWinningSide(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>long unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSidesCount")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSidesCount")]
internal static extern ulong GetSidesCount(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>const BattleSide * *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSides")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSides")]
internal static extern IntPtr GetSides(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>long unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetPartiesCount")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetPartiesCount")]
internal static extern ulong GetPartiesCount(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>const BattleParty * *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetParties")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetParties")]
internal static extern IntPtr GetParties(IntPtr p);
/// <param name="p">Battle *</param>
/// <param name="key">const char *</param>
/// <returns>Script *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetVolatileScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetVolatileScript")]
internal static extern IntPtr GetVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param>
/// <param name="key">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScriptByName")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScriptByName")]
internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param>
/// <param name="script">Script *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScript")]
internal static extern byte AddVolatileScript(IntPtr p, IntPtr script);
/// <param name="p">Battle *</param>
/// <param name="key">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScript")]
internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param>
/// <param name="script">Script *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScriptWithScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScriptWithScript")]
internal static extern byte RemoveVolatileScriptWithScript(IntPtr p, IntPtr script);
/// <param name="p">Battle *</param>
/// <param name="key">const char *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasVolatileScript")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasVolatileScript")]
internal static extern byte HasVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param>
/// <param name="func">Function *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RegisterEventListener")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RegisterEventListener")]
internal static extern byte RegisterEventListener(IntPtr p, IntPtr func);
/// <param name="p">Battle *</param>
/// <returns>const HistoryHolder *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetHistory")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetHistory")]
internal static extern IntPtr GetHistory(IntPtr p);
/// <param name="p">const Battle *</param>
/// <returns>long int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLastTurnTimeMicroseconds")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLastTurnTimeMicroseconds")]
internal static extern long GetLastTurnTimeMicroseconds(IntPtr p);
}

View File

@ -14,37 +14,37 @@ namespace Creaturelib.Generated
/// <param name="scriptResolver">ScriptResolver *</param>
/// <param name="miscLibrary">MiscLibrary *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr staticLib, IntPtr statCalculator, IntPtr damageLibrary, IntPtr experienceLibrary, IntPtr scriptResolver, IntPtr miscLibrary);
/// <param name="p">const BattleLibrary *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const DataLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStaticLib")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStaticLib")]
internal static extern IntPtr GetStaticLib(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const BattleStatCalculator *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStatCalculator")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStatCalculator")]
internal static extern IntPtr GetStatCalculator(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const DamageLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetDamageLibrary")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetDamageLibrary")]
internal static extern IntPtr GetDamageLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const MiscLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetMiscLibrary")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetMiscLibrary")]
internal static extern IntPtr GetMiscLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const ExperienceLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetExperienceLibrary")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetExperienceLibrary")]
internal static extern IntPtr GetExperienceLibrary(IntPtr p);
}

View File

@ -11,17 +11,17 @@ namespace Creaturelib.Generated
/// <param name="creatureIndices">unsigned char *</param>
/// <param name="numberOfIndices">long unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr p, IntPtr creatureIndices, ulong numberOfIndices);
/// <param name="p">const BattleParty *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const BattleParty *</param>
/// <returns>CreatureParty *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_GetParty")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_GetParty")]
internal static extern IntPtr GetParty(IntPtr p);
/// <param name="out">bool &</param>
@ -29,12 +29,12 @@ namespace Creaturelib.Generated
/// <param name="side">unsigned char</param>
/// <param name="creature">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_IsResponsibleForIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_IsResponsibleForIndex")]
internal static extern byte IsResponsibleForIndex(ref byte @out, IntPtr p, byte side, byte creature);
/// <param name="p">const BattleParty *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_HasCreaturesNotInField")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_HasCreaturesNotInField")]
internal static extern byte HasCreaturesNotInField(IntPtr p);
}

View File

@ -7,17 +7,17 @@ namespace Creaturelib.Generated
internal static class BattleRandom
{
/// <returns>BattleRandom *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Construct")]
internal static extern IntPtr Construct();
/// <param name="seed">long unsigned int</param>
/// <returns>BattleRandom *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_ConstructWithSeed")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_ConstructWithSeed")]
internal static extern IntPtr ConstructWithSeed(ulong seed);
/// <param name="p">BattleRandom *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="out">bool &</param>
@ -26,30 +26,30 @@ namespace Creaturelib.Generated
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_EffectChance")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_EffectChance")]
internal static extern byte EffectChance(ref byte @out, IntPtr p, float chance, IntPtr attack, IntPtr target);
/// <param name="p">BattleRandom *</param>
/// <returns>int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Get")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_Get")]
internal static extern int Get(IntPtr p);
/// <param name="p">BattleRandom *</param>
/// <param name="max">int</param>
/// <returns>int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetMax")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetMax")]
internal static extern int GetMax(IntPtr p, int max);
/// <param name="p">BattleRandom *</param>
/// <param name="min">int</param>
/// <param name="max">int</param>
/// <returns>int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetMinMax")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetMinMax")]
internal static extern int GetMinMax(IntPtr p, int min, int max);
/// <param name="p">BattleRandom *</param>
/// <returns>long unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetSeed")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleRandom_GetSeed")]
internal static extern ulong GetSeed(IntPtr p);
}

View File

@ -10,81 +10,81 @@ namespace Creaturelib.Generated
/// <param name="battle">Battle *</param>
/// <param name="creaturesPerSide">unsigned char</param>
/// <returns>BattleSide *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_Construct")]
internal static extern IntPtr Construct(byte index, IntPtr battle, byte creaturesPerSide);
/// <param name="p">BattleSide *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">BattleSide *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_AllChoicesSet")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_AllChoicesSet")]
internal static extern byte AllChoicesSet(IntPtr p);
/// <param name="out">bool &</param>
/// <param name="p">BattleSide *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_AllPossibleSlotsFilled")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_AllPossibleSlotsFilled")]
internal static extern byte AllPossibleSlotsFilled(ref byte @out, IntPtr p);
/// <param name="p">BattleSide *</param>
/// <param name="choice">BaseTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_SetChoice")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_SetChoice")]
internal static extern byte SetChoice(IntPtr p, IntPtr choice);
/// <param name="p">BattleSide *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_ResetChoices")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_ResetChoices")]
internal static extern void ResetChoices(IntPtr p);
/// <param name="p">BattleSide *</param>
/// <param name="creature">Creature *</param>
/// <param name="index">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_SetCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_SetCreature")]
internal static extern byte SetCreature(IntPtr p, IntPtr creature, byte index);
/// <param name="out">Creature * &</param>
/// <param name="p">BattleSide *</param>
/// <param name="index">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetCreature")]
internal static extern byte GetCreature(ref IntPtr @out, IntPtr p, byte index);
/// <param name="p">BattleSide *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetSideIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetSideIndex")]
internal static extern byte GetSideIndex(IntPtr p);
/// <param name="out">unsigned char &</param>
/// <param name="p">BattleSide *</param>
/// <param name="c">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetCreatureIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_GetCreatureIndex")]
internal static extern byte GetCreatureIndex(ref byte @out, IntPtr p, IntPtr c);
/// <param name="p">BattleSide *</param>
/// <param name="c">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_MarkSlotAsUnfillable")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_MarkSlotAsUnfillable")]
internal static extern byte MarkSlotAsUnfillable(IntPtr p, IntPtr c);
/// <param name="p">BattleSide *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_IsDefeated")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_IsDefeated")]
internal static extern byte IsDefeated(IntPtr p);
/// <param name="p">BattleSide *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_HasFled")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_HasFled")]
internal static extern byte HasFled(IntPtr p);
/// <param name="p">BattleSide *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_MarkAsFled")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleSide_MarkAsFled")]
internal static extern void MarkAsFled(IntPtr p);
}

View File

@ -7,12 +7,12 @@ namespace Creaturelib.Generated
internal static class BattleStatCalculator
{
/// <returns>const BattleStatCalculator *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">const BattleStatCalculator *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned int &</param>
@ -20,7 +20,7 @@ namespace Creaturelib.Generated
/// <param name="creature">Creature *</param>
/// <param name="stat">Statistic</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_CalculateFlatStat")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_CalculateFlatStat")]
internal static extern byte CalculateFlatStat(ref uint @out, IntPtr p, IntPtr creature, Statistic stat);
/// <param name="out">unsigned int &</param>
@ -28,7 +28,7 @@ namespace Creaturelib.Generated
/// <param name="creature">Creature *</param>
/// <param name="stat">Statistic</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_CalculateBoostedStat")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleStatCalculator_CalculateBoostedStat")]
internal static extern byte CalculateBoostedStat(ref uint @out, IntPtr p, IntPtr creature, Statistic stat);
}

View File

@ -7,11 +7,11 @@ namespace Creaturelib.Generated
internal static class C
{
/// <returns>const char *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastException")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastException")]
internal static extern IntPtr GetLastException();
/// <returns>const char *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastExceptionStacktrace")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastExceptionStacktrace")]
internal static extern IntPtr GetLastExceptionStacktrace();
}

View File

@ -8,17 +8,17 @@ namespace Creaturelib.Generated
{
/// <param name="p">const ChangeSpeciesEvent *</param>
/// <returns>const Creature *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_GetCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_GetCreature")]
internal static extern IntPtr GetCreature(IntPtr p);
/// <param name="p">const ChangeSpeciesEvent *</param>
/// <returns>const CreatureSpecies *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_GetNewSpecies")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_GetNewSpecies")]
internal static extern IntPtr GetNewSpecies(IntPtr p);
/// <param name="p">const ChangeSpeciesEvent *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeSpeciesEvent_Destruct")]
internal static extern void Destruct(IntPtr p);
}

View File

@ -8,17 +8,17 @@ namespace Creaturelib.Generated
{
/// <param name="p">const ChangeVariantEvent *</param>
/// <returns>const Creature *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_GetCreature")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_GetCreature")]
internal static extern IntPtr GetCreature(IntPtr p);
/// <param name="p">const ChangeVariantEvent *</param>
/// <returns>const SpeciesVariant *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_GetNewVariant")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_GetNewVariant")]
internal static extern IntPtr GetNewVariant(IntPtr p);
/// <param name="p">const ChangeVariantEvent *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ChangeVariantEvent_Destruct")]
internal static extern void Destruct(IntPtr p);
}

View File

@ -23,323 +23,323 @@ namespace Creaturelib.Generated
/// <param name="attacksNum">long unsigned int</param>
/// <param name="allowedExperienceGain">bool</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Construct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr library, IntPtr species, IntPtr variant, byte level, uint experience, uint uid, Gender gender, byte coloring, IntPtr heldItem, IntPtr nickname, byte secretTalent, byte talent, IntPtr attacks, ulong attacksNum, byte allowedExperienceGain);
/// <param name="p">const Creature *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Destruct")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Initialize")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Initialize")]
internal static extern byte Initialize(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>const BattleLibrary *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLibrary")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLibrary")]
internal static extern IntPtr GetLibrary(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>const CreatureSpecies *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetSpecies")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetSpecies")]
internal static extern IntPtr GetSpecies(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>const SpeciesVariant *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetVariant")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetVariant")]
internal static extern IntPtr GetVariant(IntPtr p);
/// <param name="p">Creature *</param>
/// <param name="species">const CreatureSpecies *</param>
/// <param name="variant">const SpeciesVariant *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeSpecies")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeSpecies")]
internal static extern byte ChangeSpecies(IntPtr p, IntPtr species, IntPtr variant);
/// <param name="p">Creature *</param>
/// <param name="variant">const SpeciesVariant *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeVariant")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeVariant")]
internal static extern byte ChangeVariant(IntPtr p, IntPtr variant);
/// <param name="p">const Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLevel")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLevel")]
internal static extern byte GetLevel(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")]
internal static extern uint GetExperience(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetUniqueIdentifier")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetUniqueIdentifier")]
internal static extern uint GetUniqueIdentifier(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>Gender</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")]
internal static extern Gender GetGender(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetColoring")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetColoring")]
internal static extern byte GetColoring(IntPtr p);
/// <param name="p">const Creature *</param>
/// <param name="name">const char *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItem")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItem")]
internal static extern byte HasHeldItem(IntPtr p, IntPtr name);
/// <param name="p">const Creature *</param>
/// <param name="hash">unsigned int</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItemWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItemWithHash")]
internal static extern byte HasHeldItemWithHash(IntPtr p, uint hash);
/// <param name="p">const Creature *</param>
/// <returns>const Item *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetHeldItem")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetHeldItem")]
internal static extern IntPtr GetHeldItem(IntPtr p);
/// <param name="p">Creature *</param>
/// <param name="name">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItem")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItem")]
internal static extern byte SetHeldItem(IntPtr p, IntPtr name);
/// <param name="p">Creature *</param>
/// <param name="hash">unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemWithHash")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemWithHash")]
internal static extern byte SetHeldItemWithHash(IntPtr p, uint hash);
/// <param name="p">Creature *</param>
/// <param name="item">const Item *</param>
/// <returns>void</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemFromItem")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemFromItem")]
internal static extern void SetHeldItemFromItem(IntPtr p, IntPtr item);
/// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetCurrentHealth")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetCurrentHealth")]
internal static extern uint GetCurrentHealth(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>Battle *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattle")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattle")]
internal static extern IntPtr GetBattle(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>BattleSide *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattleSide")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattleSide")]
internal static extern IntPtr GetBattleSide(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_IsOnBattleField")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_IsOnBattleField")]
internal static extern byte IsOnBattleField(IntPtr p);
/// <param name="p">Creature *</param>
/// <returns>const char *</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetNickname")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetNickname")]
internal static extern IntPtr GetNickname(IntPtr p);
/// <param name="p">Creature *</param>
/// <param name="type">unsigned char</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasType")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasType")]
internal static extern byte HasType(IntPtr p, byte type);
/// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetMaxHealth")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetMaxHealth")]
internal static extern uint GetMaxHealth(IntPtr p);
/// <param name="p">Creature *</param>
/// <param name="level">signed char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeLevelBy")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeLevelBy")]
internal static extern byte ChangeLevelBy(IntPtr p, sbyte level);
/// <param name="p">Creature *</param>
/// <param name="damage">unsigned int</param>
/// <param name="source">DamageSource</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Damage")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Damage")]
internal static extern byte Damage(IntPtr p, uint damage, DamageSource source);
/// <param name="p">Creature *</param>
/// <param name="health">unsigned int</param>
/// <param name="canRevive">bool</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Heal")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Heal")]
internal static extern byte Heal(IntPtr p, uint health, byte canRevive);
/// <param name="p">Creature *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RestoreAllAttackUses")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RestoreAllAttackUses")]
internal static extern byte RestoreAllAttackUses(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIsSecret")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIsSecret")]
internal static extern byte GetRealTalentIsSecret(IntPtr p);
/// <param name="p">const Creature *</param>
/// <returns>bool</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIndex")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetRealTalentIndex")]
internal static extern byte GetRealTalentIndex(IntPtr p);
/// <param name="p">const Creature *</param>
/// <param name="out">const char * &</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetActiveTalent")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetActiveTalent")]
internal static extern byte GetActiveTalent(IntPtr p, ref IntPtr @out);
/// <param name="p">Creature *</param>
/// <param name="talent">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_OverrideActiveTalent")]
[DllImport("libCreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_OverrideActiveTalent")]
internal static extern byte OverrideActiveTalent(IntPtr p, IntPtr talent);
/// <param name="p">Creature *</param>
/// <param name="experience">unsigned int</param>
/// <returns>unsigned char</returns>