Update to latest CreatureLib, more work on battle tests.

This commit is contained in:
Deukhoofd 2020-07-31 14:19:21 +02:00
parent 283825b355
commit 00c5f51c55
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
113 changed files with 758 additions and 798 deletions

View File

@ -12,7 +12,9 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Debug|Any CPU.Build.0 = Debug|Any CPU {4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Release|Any CPU.ActiveCfg = Debug|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -23,7 +23,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_library != null) return _library; if (_library != null) return _library;
var ptr = Creaturelibbattling.Generated.Battle.GetLibrary(Ptr); var ptr = Creaturelib.Generated.Battle.GetLibrary(Ptr);
if (TryResolvePointer(ptr, out _library)) if (TryResolvePointer(ptr, out _library))
{ {
return _library; return _library;
@ -38,7 +38,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_random != null) return _random; if (_random != null) return _random;
var ptr = Creaturelibbattling.Generated.Battle.GetRandom(Ptr); var ptr = Creaturelib.Generated.Battle.GetRandom(Ptr);
if (TryResolvePointer(ptr, out _random)) if (TryResolvePointer(ptr, out _random))
{ {
return _random; return _random;
@ -48,19 +48,19 @@ namespace PkmnLibSharp.Battling
} }
} }
public bool CanFlee => Creaturelibbattling.Generated.Battle.CanFlee(Ptr) == 1; public bool CanFlee => Creaturelib.Generated.Battle.CanFlee(Ptr) == 1;
public bool HasEnded => Creaturelibbattling.Generated.Battle.HasEnded(Ptr) == 1; public bool HasEnded => Creaturelib.Generated.Battle.HasEnded(Ptr) == 1;
public bool HasConclusiveResult => Creaturelibbattling.Generated.Battle.HasConclusiveResult(Ptr) == 1; public bool HasConclusiveResult => Creaturelib.Generated.Battle.HasConclusiveResult(Ptr) == 1;
public byte WinningSide => Creaturelibbattling.Generated.Battle.GetWinningSide(Ptr); public byte WinningSide => Creaturelib.Generated.Battle.GetWinningSide(Ptr);
public ulong SidesCount => Creaturelibbattling.Generated.Battle.GetSidesCount(Ptr); public ulong SidesCount => Creaturelib.Generated.Battle.GetSidesCount(Ptr);
public ulong PartiesCount => Creaturelibbattling.Generated.Battle.GetPartiesCount(Ptr); public ulong PartiesCount => Creaturelib.Generated.Battle.GetPartiesCount(Ptr);
public ReadOnlyNativePtrArray<BattleSide> Sides public ReadOnlyNativePtrArray<BattleSide> Sides
{ {
get get
{ {
if (_sides != null) return _sides; if (_sides != null) return _sides;
var ptr = Creaturelibbattling.Generated.Battle.GetSides(Ptr); var ptr = Creaturelib.Generated.Battle.GetSides(Ptr);
_sides = new ReadOnlyNativePtrArray<BattleSide>(ptr, (int) SidesCount); _sides = new ReadOnlyNativePtrArray<BattleSide>(ptr, (int) SidesCount);
return _sides; return _sides;
} }
@ -71,7 +71,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_parties != null) return _parties; if (_parties != null) return _parties;
var ptr = Creaturelibbattling.Generated.Battle.GetParties(Ptr); var ptr = Creaturelib.Generated.Battle.GetParties(Ptr);
_parties = new ReadOnlyNativePtrArray<BattleParty>(ptr, (int) PartiesCount); _parties = new ReadOnlyNativePtrArray<BattleParty>(ptr, (int) PartiesCount);
return _parties; return _parties;
} }
@ -83,61 +83,61 @@ namespace PkmnLibSharp.Battling
public bool CanUse(BaseTurnChoice turnChoice) public bool CanUse(BaseTurnChoice turnChoice)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.Battle.CanUse(ref b, Ptr, turnChoice.Ptr).Assert(); Creaturelib.Generated.Battle.CanUse(ref b, Ptr, turnChoice.Ptr).Assert();
return b == 1; return b == 1;
} }
public bool TrySetChoice(BaseTurnChoice turnChoice) public bool TrySetChoice(BaseTurnChoice turnChoice)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.Battle.TrySetChoice(ref b, Ptr, turnChoice.Ptr).Assert(); Creaturelib.Generated.Battle.TrySetChoice(ref b, Ptr, turnChoice.Ptr).Assert();
return b == 1; return b == 1;
} }
public void CheckChoicesSetAndRun() public void CheckChoicesSetAndRun()
{ {
Creaturelibbattling.Generated.Battle.CheckChoicesSetAndRun(Ptr); Creaturelib.Generated.Battle.CheckChoicesSetAndRun(Ptr);
} }
public bool IsPokemonInField(Pokemon pokemon) public bool IsPokemonInField(Pokemon pokemon)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.Battle.CreatureInField(ref b, Ptr, pokemon.Ptr).Assert(); Creaturelib.Generated.Battle.CreatureInField(ref b, Ptr, pokemon.Ptr).Assert();
return b == 1; return b == 1;
} }
public Pokemon GetPokemonInField(byte side, byte index) public Pokemon GetPokemonInField(byte side, byte index)
{ {
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creaturelibbattling.Generated.Battle.GetCreature(ref ptr, Ptr, side, index).Assert(); Creaturelib.Generated.Battle.GetCreature(ref ptr, Ptr, side, index).Assert();
return TryResolvePointer(ptr, out Pokemon pokemon) ? pokemon : new Pokemon(ptr); return TryResolvePointer(ptr, out Pokemon pokemon) ? pokemon : new Pokemon(ptr);
} }
public void ForceRecall(byte side, byte index) public void ForceRecall(byte side, byte index)
{ {
Creaturelibbattling.Generated.Battle.ForceRecall(Ptr, side, index).Assert(); Creaturelib.Generated.Battle.ForceRecall(Ptr, side, index).Assert();
} }
public void SwitchPokemon(byte side, byte index, Pokemon newPokemon) public void SwitchPokemon(byte side, byte index, Pokemon newPokemon)
{ {
Creaturelibbattling.Generated.Battle.SwitchCreature(Ptr, side, index, newPokemon.Ptr).Assert(); Creaturelib.Generated.Battle.SwitchCreature(Ptr, side, index, newPokemon.Ptr).Assert();
} }
public bool CanSlotBeFilled(byte side, byte index) public bool CanSlotBeFilled(byte side, byte index)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.Battle.CanSlotBeFilled(ref b, Ptr, side, index).Assert(); Creaturelib.Generated.Battle.CanSlotBeFilled(ref b, Ptr, side, index).Assert();
return b == 1; return b == 1;
} }
public void ValidateBattleState() public void ValidateBattleState()
{ {
Creaturelibbattling.Generated.Battle.ValidateBattleState(Ptr).Assert(); Creaturelib.Generated.Battle.ValidateBattleState(Ptr).Assert();
} }
public Script GetVolatileScript(string key) public Script GetVolatileScript(string key)
{ {
var ptr = Creaturelibbattling.Generated.Battle.GetVolatileScript(Ptr, key.ToPtr()); var ptr = Creaturelib.Generated.Battle.GetVolatileScript(Ptr, key.ToPtr());
if (TryResolvePointer(ptr, out Script script)) if (TryResolvePointer(ptr, out Script script))
{ {
return script; return script;
@ -148,37 +148,37 @@ namespace PkmnLibSharp.Battling
public void AddVolatileScript(string key) public void AddVolatileScript(string key)
{ {
Creaturelibbattling.Generated.Battle.AddVolatileScriptByName(Ptr, key.ToPtr()).Assert(); Creaturelib.Generated.Battle.AddVolatileScriptByName(Ptr, key.ToPtr()).Assert();
} }
public void AddVolatileScript(Script script) public void AddVolatileScript(Script script)
{ {
Creaturelibbattling.Generated.Battle.AddVolatileScript(Ptr, script.Ptr).Assert(); Creaturelib.Generated.Battle.AddVolatileScript(Ptr, script.Ptr).Assert();
} }
public void RemoveVolatileScript(string key) public void RemoveVolatileScript(string key)
{ {
Creaturelibbattling.Generated.Battle.RemoveVolatileScript(Ptr, key.ToPtr()).Assert(); Creaturelib.Generated.Battle.RemoveVolatileScript(Ptr, key.ToPtr()).Assert();
} }
public void RemoveVolatileScript(Script script) public void RemoveVolatileScript(Script script)
{ {
Creaturelibbattling.Generated.Battle.RemoveVolatileScriptWithScript(Ptr, script.Ptr).Assert(); Creaturelib.Generated.Battle.RemoveVolatileScriptWithScript(Ptr, script.Ptr).Assert();
} }
public bool HasVolatileScript(string key) public bool HasVolatileScript(string key)
{ {
return Creaturelibbattling.Generated.Battle.HasVolatileScript(Ptr, key.ToPtr()) == 1; return Creaturelib.Generated.Battle.HasVolatileScript(Ptr, key.ToPtr()) == 1;
} }
public void RegisterEventListener(BattleEventListener listener) public void RegisterEventListener(BattleEventListener listener)
{ {
Creaturelibbattling.Generated.Battle.RegisterEventListener(Ptr, listener.FunctionPtr).Assert(); Creaturelib.Generated.Battle.RegisterEventListener(Ptr, listener.FunctionPtr).Assert();
} }
public void TriggerEventListener(BattleEvent evt) public void TriggerEventListener(BattleEvent evt)
{ {
Creaturelibbattling.Generated.Battle.TriggerEventListener(Ptr, evt.Ptr).Assert(); Creaturelib.Generated.Battle.TriggerEventListener(Ptr, evt.Ptr).Assert();
} }
public void SetWeather(string weatherName) public void SetWeather(string weatherName)

View File

@ -10,26 +10,40 @@ namespace PkmnLibSharp.Battling
public BattleParty(PokemonParty party, byte[] responsibleIndices) public BattleParty(PokemonParty party, byte[] responsibleIndices)
{ {
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creaturelibbattling.Generated.BattleParty.Construct(ref ptr, party.Ptr, responsibleIndices.ArrayPtr(), Creaturelib.Generated.BattleParty.Construct(ref ptr, party.Ptr, responsibleIndices.ArrayPtr(),
(ulong) responsibleIndices.Length / 2).Assert(); (ulong) responsibleIndices.Length / 2).Assert();
Initialize(ptr); Initialize(ptr);
} }
private PokemonParty _party;
public PokemonParty Party
{
get
{
if (_party != null) return _party;
var ptr = Creaturelib.Generated.BattleParty.GetParty(Ptr);
if (TryResolvePointer(ptr, out _party))
return _party;
_party = new PokemonParty(ptr);
return _party;
}
}
public bool IsResponsibleForIndex(byte side, byte index) public bool IsResponsibleForIndex(byte side, byte index)
{ {
byte result = 0; byte result = 0;
Creaturelibbattling.Generated.BattleParty.IsResponsibleForIndex(ref result, Ptr, side, index).Assert(); Creaturelib.Generated.BattleParty.IsResponsibleForIndex(ref result, Ptr, side, index).Assert();
return result == 1; return result == 1;
} }
public bool HasPokemonNotInField() public bool HasPokemonNotInField()
{ {
return Creaturelibbattling.Generated.BattleParty.HasCreaturesNotInField(Ptr) == 1; return Creaturelib.Generated.BattleParty.HasCreaturesNotInField(Ptr) == 1;
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.BattleParty.Destruct(Ptr); Creaturelib.Generated.BattleParty.Destruct(Ptr);
} }
} }
} }

View File

@ -5,38 +5,38 @@ namespace PkmnLibSharp.Battling
{ {
public class BattleRandom : PointerWrapper public class BattleRandom : PointerWrapper
{ {
public BattleRandom() : base(Creaturelibbattling.Generated.BattleRandom.Construct()) public BattleRandom() : base(Creaturelib.Generated.BattleRandom.Construct())
{} {}
public BattleRandom(ulong seed) : base(Creaturelibbattling.Generated.BattleRandom.ConstructWithSeed(seed)) public BattleRandom(ulong seed) : base(Creaturelib.Generated.BattleRandom.ConstructWithSeed(seed))
{} {}
internal BattleRandom(IntPtr ptr) : base(ptr){} internal BattleRandom(IntPtr ptr) : base(ptr){}
public ulong Seed => Creaturelibbattling.Generated.BattleRandom.GetSeed(Ptr); public ulong Seed => Creaturelib.Generated.BattleRandom.GetSeed(Ptr);
public bool EffectChance(float chance, ExecutingMove move,Pokemon target) public bool EffectChance(float chance, ExecutingMove move,Pokemon target)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.BattleRandom.EffectChance(ref b, Ptr, chance, move.Ptr, target.Ptr); Creaturelib.Generated.BattleRandom.EffectChance(ref b, Ptr, chance, move.Ptr, target.Ptr);
return b == 1; return b == 1;
} }
public int Get() public int Get()
{ {
return Creaturelibbattling.Generated.BattleRandom.Get(Ptr); return Creaturelib.Generated.BattleRandom.Get(Ptr);
} }
public int Get(int max) public int Get(int max)
{ {
return Creaturelibbattling.Generated.BattleRandom.GetMax(Ptr, max); return Creaturelib.Generated.BattleRandom.GetMax(Ptr, max);
} }
public int Get(int min, int max) public int Get(int min, int max)
{ {
return Creaturelibbattling.Generated.BattleRandom.GetMinMax(Ptr, min, max); return Creaturelib.Generated.BattleRandom.GetMinMax(Ptr, min, max);
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.BattleRandom.Destruct(Ptr); Creaturelib.Generated.BattleRandom.Destruct(Ptr);
} }
} }
} }

View File

@ -7,14 +7,14 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
{ {
protected BaseTurnChoice(IntPtr ptr) : base(ptr){} protected BaseTurnChoice(IntPtr ptr) : base(ptr){}
public TurnChoiceKind Kind => (TurnChoiceKind) Creaturelibbattling.Generated.BaseTurnChoice.GetKind(Ptr); public TurnChoiceKind Kind => (TurnChoiceKind) Creaturelib.Generated.BaseTurnChoice.GetKind(Ptr);
public Pokemon User public Pokemon User
{ {
get get
{ {
if (_user != null) return _user; if (_user != null) return _user;
var ptr = Creaturelibbattling.Generated.BaseTurnChoice.GetUser(Ptr); var ptr = Creaturelib.Generated.BaseTurnChoice.GetUser(Ptr);
if (TryResolvePointer(ptr, out _user)) if (TryResolvePointer(ptr, out _user))
return _user; return _user;
_user = new Pokemon(ptr); _user = new Pokemon(ptr);

View File

@ -4,13 +4,13 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
{ {
public class FleeTurnChoice : BaseTurnChoice public class FleeTurnChoice : BaseTurnChoice
{ {
public FleeTurnChoice(Pokemon user) : base(Creaturelibbattling.Generated.FleeTurnChoice.Construct(user.Ptr)) public FleeTurnChoice(Pokemon user) : base(Creaturelib.Generated.FleeTurnChoice.Construct(user.Ptr))
{ {
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.FleeTurnChoice.Destruct(Ptr); Creaturelib.Generated.FleeTurnChoice.Destruct(Ptr);
} }
} }
} }

View File

@ -4,8 +4,8 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
{ {
public class MoveTurnChoice : BaseTurnChoice public class MoveTurnChoice : BaseTurnChoice
{ {
public MoveTurnChoice(Pokemon user, LearnedMove move, byte side, byte index) public MoveTurnChoice(Pokemon user, LearnedMove move, byte targetSide, byte targetIndex)
: base(Creaturelibbattling.Generated.AttackTurnChoice.Construct(user.Ptr, move.Ptr, side, index)) : base(Creaturelib.Generated.AttackTurnChoice.Construct(user.Ptr, move.Ptr, targetSide, targetIndex))
{ {
} }
@ -14,7 +14,7 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
get get
{ {
if (_move != null) return _move; if (_move != null) return _move;
var ptr = Creaturelibbattling.Generated.AttackTurnChoice.GetAttack(Ptr); var ptr = Creaturelib.Generated.AttackTurnChoice.GetAttack(Ptr);
if (TryResolvePointer(ptr, out _move)) if (TryResolvePointer(ptr, out _move))
return _move; return _move;
_move = new LearnedMove(ptr); _move = new LearnedMove(ptr);
@ -27,13 +27,13 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
get get
{ {
sbyte b = 0; sbyte b = 0;
Creaturelibbattling.Generated.AttackTurnChoice.GetPriority(ref b, Ptr).Assert(); Creaturelib.Generated.AttackTurnChoice.GetPriority(ref b, Ptr).Assert();
return b; return b;
} }
} }
public byte TargetSide => Creaturelibbattling.Generated.AttackTurnChoice.GetTargetSideIndex(Ptr); public byte TargetSide => Creaturelib.Generated.AttackTurnChoice.GetTargetSideIndex(Ptr);
public byte TargetIndex => Creaturelibbattling.Generated.AttackTurnChoice.GetTargetCreatureIndex(Ptr); public byte TargetIndex => Creaturelib.Generated.AttackTurnChoice.GetTargetCreatureIndex(Ptr);
// TODO: Move Script getter // TODO: Move Script getter
@ -41,7 +41,7 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.AttackTurnChoice.Destruct(Ptr); Creaturelib.Generated.AttackTurnChoice.Destruct(Ptr);
} }
} }
} }

View File

@ -5,13 +5,13 @@ namespace PkmnLibSharp.Battling.ChoiceTurn
public class SwitchTurnChoice : BaseTurnChoice public class SwitchTurnChoice : BaseTurnChoice
{ {
public SwitchTurnChoice(Pokemon user, Pokemon newPokemon) : base( public SwitchTurnChoice(Pokemon user, Pokemon newPokemon) : base(
Creaturelibbattling.Generated.SwitchTurnChoice.Construct(user.Ptr, newPokemon.Ptr)) Creaturelib.Generated.SwitchTurnChoice.Construct(user.Ptr, newPokemon.Ptr))
{ {
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.SwitchTurnChoice.Destruct(Ptr); Creaturelib.Generated.SwitchTurnChoice.Destruct(Ptr);
} }
} }
} }

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Creaturelibbattling; using Creaturelib;
namespace PkmnLibSharp.Battling.Events namespace PkmnLibSharp.Battling.Events
{ {
@ -29,7 +29,7 @@ namespace PkmnLibSharp.Battling.Events
private static BattleEvent WrapEventPtr(IntPtr ptr) private static BattleEvent WrapEventPtr(IntPtr ptr)
{ {
var evtType = Creaturelibbattling.Generated.EventData.GetKind(ptr); var evtType = Creaturelib.Generated.EventData.GetKind(ptr);
switch (evtType) switch (evtType)
{ {
case EventDataKind.Damage: case EventDataKind.Damage:

View File

@ -1,6 +1,6 @@
using System; using System;
using Creaturelibbattling; using Creaturelib;
using Creaturelibbattling.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Library.Moves; using PkmnLibSharp.Library.Moves;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;
@ -31,10 +31,10 @@ namespace PkmnLibSharp.Battling
} }
} }
public byte MaxUses => Creaturelibbattling.Generated.LearnedAttack.GetMaxUses(Ptr); public byte MaxUses => Creaturelib.Generated.LearnedAttack.GetMaxUses(Ptr);
public byte RemainingUses => Creaturelibbattling.Generated.LearnedAttack.GetRemainingUses(Ptr); public byte RemainingUses => Creaturelib.Generated.LearnedAttack.GetRemainingUses(Ptr);
public MoveLearnMethod LearnMethod => public MoveLearnMethod LearnMethod =>
(MoveLearnMethod) Creaturelibbattling.Generated.LearnedAttack.GetLearnMethod(Ptr); (MoveLearnMethod) Creaturelib.Generated.LearnedAttack.GetLearnMethod(Ptr);
private MoveData _move; private MoveData _move;

View File

@ -17,7 +17,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_static != null) return _static; if (_static != null) return _static;
var ptr = Creaturelibbattling.Generated.BattleLibrary.GetStaticLib(Ptr); var ptr = Creaturelib.Generated.BattleLibrary.GetStaticLib(Ptr);
if (TryResolvePointer(ptr, out _static)) if (TryResolvePointer(ptr, out _static))
return _static; return _static;
_static = new PokemonLibrary(ptr); _static = new PokemonLibrary(ptr);
@ -30,7 +30,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_statCalculator != null) return _statCalculator; if (_statCalculator != null) return _statCalculator;
var ptr = Creaturelibbattling.Generated.BattleLibrary.GetStatCalculator(Ptr); var ptr = Creaturelib.Generated.BattleLibrary.GetStatCalculator(Ptr);
if (TryResolvePointer(ptr, out _statCalculator)) if (TryResolvePointer(ptr, out _statCalculator))
return _statCalculator; return _statCalculator;
_statCalculator = new StatCalculator(ptr); _statCalculator = new StatCalculator(ptr);
@ -43,7 +43,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_damageLibrary != null) return _damageLibrary; if (_damageLibrary != null) return _damageLibrary;
var ptr = Creaturelibbattling.Generated.BattleLibrary.GetDamageLibrary(Ptr); var ptr = Creaturelib.Generated.BattleLibrary.GetDamageLibrary(Ptr);
if (TryResolvePointer(ptr, out _damageLibrary)) if (TryResolvePointer(ptr, out _damageLibrary))
return _damageLibrary; return _damageLibrary;
_damageLibrary = new DamageLibrary(ptr); _damageLibrary = new DamageLibrary(ptr);
@ -56,7 +56,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_miscLibrary != null) return _miscLibrary; if (_miscLibrary != null) return _miscLibrary;
var ptr = Creaturelibbattling.Generated.BattleLibrary.GetMiscLibrary(Ptr); var ptr = Creaturelib.Generated.BattleLibrary.GetMiscLibrary(Ptr);
if (TryResolvePointer(ptr, out _miscLibrary)) if (TryResolvePointer(ptr, out _miscLibrary))
return _miscLibrary; return _miscLibrary;
_miscLibrary = new MiscLibrary(ptr); _miscLibrary = new MiscLibrary(ptr);
@ -69,7 +69,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_experienceLibrary != null) return _experienceLibrary; if (_experienceLibrary != null) return _experienceLibrary;
var ptr = Creaturelibbattling.Generated.BattleLibrary.GetExperienceLibrary(Ptr); var ptr = Creaturelib.Generated.BattleLibrary.GetExperienceLibrary(Ptr);
if (TryResolvePointer(ptr, out _experienceLibrary)) if (TryResolvePointer(ptr, out _experienceLibrary))
return _experienceLibrary; return _experienceLibrary;
_experienceLibrary = new ExperienceLibrary(ptr); _experienceLibrary = new ExperienceLibrary(ptr);

View File

@ -15,7 +15,7 @@ namespace PkmnLibSharp.Battling
public uint GetDamage(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData) public uint GetDamage(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData)
{ {
uint val = 0; uint val = 0;
Creaturelibbattling.Generated.DamageLibrary.GetDamage(ref val, Ptr, attack, target.Ptr, hitIndex, hitData) Creaturelib.Generated.DamageLibrary.GetDamage(ref val, Ptr, attack, target.Ptr, hitIndex, hitData)
.Assert(); .Assert();
return val; return val;
} }
@ -23,7 +23,7 @@ namespace PkmnLibSharp.Battling
public byte GetBasePower(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData) public byte GetBasePower(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData)
{ {
byte val = 0; byte val = 0;
Creaturelibbattling.Generated.DamageLibrary.GetBasePower(ref val, Ptr, attack, target.Ptr, hitIndex, hitData) Creaturelib.Generated.DamageLibrary.GetBasePower(ref val, Ptr, attack, target.Ptr, hitIndex, hitData)
.Assert(); .Assert();
return val; return val;
} }
@ -31,7 +31,7 @@ namespace PkmnLibSharp.Battling
public float GetStatModifier(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData) public float GetStatModifier(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData)
{ {
float val = 0; float val = 0;
Creaturelibbattling.Generated.DamageLibrary.GetStatModifier(ref val, Ptr, attack, target.Ptr, hitIndex, hitData) Creaturelib.Generated.DamageLibrary.GetStatModifier(ref val, Ptr, attack, target.Ptr, hitIndex, hitData)
.Assert(); .Assert();
return val; return val;
} }
@ -39,7 +39,7 @@ namespace PkmnLibSharp.Battling
public float GetDamageModifier(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData) public float GetDamageModifier(IntPtr attack, Pokemon target, byte hitIndex, IntPtr hitData)
{ {
float val = 0; float val = 0;
Creaturelibbattling.Generated.DamageLibrary Creaturelib.Generated.DamageLibrary
.GetDamageModifier(ref val, Ptr, attack, target.Ptr, hitIndex, hitData) .GetDamageModifier(ref val, Ptr, attack, target.Ptr, hitIndex, hitData)
.Assert(); .Assert();
return val; return val;

View File

@ -17,16 +17,16 @@ namespace PkmnLibSharp.Battling
public uint CalculateFlatStat(Pokemon pokemon, Statistic stat) public uint CalculateFlatStat(Pokemon pokemon, Statistic stat)
{ {
uint val = 0; uint val = 0;
Creaturelibbattling.Generated.BattleStatCalculator Creaturelib.Generated.BattleStatCalculator
.CalculateFlatStat(ref val, Ptr, pokemon.Ptr, (Creaturelibbattling.Statistic) stat).Assert(); .CalculateFlatStat(ref val, Ptr, pokemon.Ptr, (Creaturelib.Statistic) stat).Assert();
return val; return val;
} }
public uint CalculateBoostedStat(Pokemon pokemon, Statistic stat) public uint CalculateBoostedStat(Pokemon pokemon, Statistic stat)
{ {
uint val = 0; uint val = 0;
Creaturelibbattling.Generated.BattleStatCalculator Creaturelib.Generated.BattleStatCalculator
.CalculateBoostedStat(ref val, Ptr, pokemon.Ptr, (Creaturelibbattling.Statistic) stat).Assert(); .CalculateBoostedStat(ref val, Ptr, pokemon.Ptr, (Creaturelib.Statistic) stat).Assert();
return val; return val;
} }

View File

@ -15,21 +15,21 @@ namespace PkmnLibSharp.Battling
public bool IsCritical(IntPtr move, Pokemon target, byte hitNumber) public bool IsCritical(IntPtr move, Pokemon target, byte hitNumber)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.MiscLibrary.IsCritical(ref b, Ptr, move, target.Ptr, hitNumber).Assert(); Creaturelib.Generated.MiscLibrary.IsCritical(ref b, Ptr, move, target.Ptr, hitNumber).Assert();
return b == MarshalHelper.True; return b == MarshalHelper.True;
} }
public bool CanFlee(IntPtr switchChoice) public bool CanFlee(IntPtr switchChoice)
{ {
byte b = 0; byte b = 0;
Creaturelibbattling.Generated.MiscLibrary.CanFlee(ref b, Ptr, switchChoice).Assert(); Creaturelib.Generated.MiscLibrary.CanFlee(ref b, Ptr, switchChoice).Assert();
return b == MarshalHelper.True; return b == MarshalHelper.True;
} }
public IntPtr ReplacementAttack(Pokemon user, byte sideTarget, byte creatureTarget) public IntPtr ReplacementAttack(Pokemon user, byte sideTarget, byte creatureTarget)
{ {
var b = IntPtr.Zero; var b = IntPtr.Zero;
Creaturelibbattling.Generated.MiscLibrary.ReplacementAttack(ref b, Ptr, user.Ptr, sideTarget, creatureTarget) Creaturelib.Generated.MiscLibrary.ReplacementAttack(ref b, Ptr, user.Ptr, sideTarget, creatureTarget)
.Assert(); .Assert();
return b; return b;
} }

View File

@ -40,7 +40,7 @@ namespace PkmnLibSharp.Battling
protected internal override void Initialize(IntPtr ptr) protected internal override void Initialize(IntPtr ptr)
{ {
base.Initialize(ptr); base.Initialize(ptr);
Library = new BattleLibrary(Creaturelibbattling.Generated.Creature.GetLibrary(Ptr)); Library = new BattleLibrary(Creaturelib.Generated.Creature.GetLibrary(Ptr));
} }
public BattleLibrary Library { get; private set; } public BattleLibrary Library { get; private set; }
@ -49,7 +49,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_species != null) return _species; if (_species != null) return _species;
var ptr = Creaturelibbattling.Generated.Creature.GetSpecies(Ptr); var ptr = Creaturelib.Generated.Creature.GetSpecies(Ptr);
if (TryResolvePointer(ptr, out _species)) if (TryResolvePointer(ptr, out _species))
return _species; return _species;
_species = new Species(ptr); _species = new Species(ptr);
@ -61,7 +61,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_forme != null) return _forme; if (_forme != null) return _forme;
var ptr = Creaturelibbattling.Generated.Creature.GetVariant(Ptr); var ptr = Creaturelib.Generated.Creature.GetVariant(Ptr);
if (TryResolvePointer(ptr, out _forme)) if (TryResolvePointer(ptr, out _forme))
return _forme; return _forme;
_forme = new Forme(ptr); _forme = new Forme(ptr);
@ -73,54 +73,54 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_displaySpecies != null) return _displaySpecies; if (_displaySpecies != null) return _displaySpecies;
var ptr = Creaturelibbattling.Generated.Creature.GetDisplaySpecies(Ptr); var ptr = Creaturelib.Generated.Creature.GetDisplaySpecies(Ptr);
if (TryResolvePointer(ptr, out _displaySpecies)) if (TryResolvePointer(ptr, out _displaySpecies))
return _displaySpecies; return _displaySpecies;
_displaySpecies = new Species(ptr); _displaySpecies = new Species(ptr);
return _displaySpecies; return _displaySpecies;
} }
set => Creaturelibbattling.Generated.Creature.SetDisplaySpecies(Ptr, value.Ptr); set => Creaturelib.Generated.Creature.SetDisplaySpecies(Ptr, value.Ptr);
} }
public Forme DisplayForme public Forme DisplayForme
{ {
get get
{ {
if (_displayForme != null) return _displayForme; if (_displayForme != null) return _displayForme;
var ptr = Creaturelibbattling.Generated.Creature.GetDisplayVariant(Ptr); var ptr = Creaturelib.Generated.Creature.GetDisplayVariant(Ptr);
if (TryResolvePointer(ptr, out _displayForme)) if (TryResolvePointer(ptr, out _displayForme))
return _displayForme; return _displayForme;
_displayForme = new Forme(ptr); _displayForme = new Forme(ptr);
return _displayForme; return _displayForme;
} }
set => Creaturelibbattling.Generated.Creature.SetDisplayVariant(Ptr, value.Ptr); set => Creaturelib.Generated.Creature.SetDisplayVariant(Ptr, value.Ptr);
} }
public byte Level => Creaturelibbattling.Generated.Creature.GetLevel(Ptr); public byte Level => Creaturelib.Generated.Creature.GetLevel(Ptr);
public uint Experience => Creaturelibbattling.Generated.Creature.GetExperience(Ptr); public uint Experience => Creaturelib.Generated.Creature.GetExperience(Ptr);
public Gender Gender => (Gender) Creaturelibbattling.Generated.Creature.GetGender(Ptr); public Gender Gender => (Gender) Creaturelib.Generated.Creature.GetGender(Ptr);
public byte Coloring => Creaturelibbattling.Generated.Creature.GetColoring(Ptr); public byte Coloring => Creaturelib.Generated.Creature.GetColoring(Ptr);
public bool IsShiny => Pkmnlib.Generated.Pokemon.IsShiny(Ptr) == 1; public bool IsShiny => Pkmnlib.Generated.Pokemon.IsShiny(Ptr) == 1;
public uint CurrentHealth => Creaturelibbattling.Generated.Creature.GetCurrentHealth(Ptr); public uint CurrentHealth => Creaturelib.Generated.Creature.GetCurrentHealth(Ptr);
public uint MaxHealth => Creaturelibbattling.Generated.Creature.GetMaxHealth(Ptr); public uint MaxHealth => Creaturelib.Generated.Creature.GetMaxHealth(Ptr);
public string ActiveAbility public string ActiveAbility
{ {
get get
{ {
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creaturelibbattling.Generated.Creature.GetActiveTalent(Ptr, ref ptr).Assert(); Creaturelib.Generated.Creature.GetActiveTalent(Ptr, ref ptr).Assert();
return ptr.PtrString(); return ptr.PtrString();
} }
} }
// TODO: Change to wrapped // TODO: Change to wrapped
public IntPtr Battle => Creaturelibbattling.Generated.Creature.GetBattle(Ptr); public IntPtr Battle => Creaturelib.Generated.Creature.GetBattle(Ptr);
// TODO: Change to wrapped // TODO: Change to wrapped
public IntPtr BattleSide => Creaturelibbattling.Generated.Creature.GetBattleSide(Ptr); public IntPtr BattleSide => Creaturelib.Generated.Creature.GetBattleSide(Ptr);
public bool IsOnBattleField => Creaturelibbattling.Generated.Creature.IsOnBattleField(Ptr) == 1; public bool IsOnBattleField => Creaturelib.Generated.Creature.IsOnBattleField(Ptr) == 1;
public Item HeldItem public Item HeldItem
{ {
get get
{ {
var ptr = Creaturelibbattling.Generated.Creature.GetHeldItem(Ptr); var ptr = Creaturelib.Generated.Creature.GetHeldItem(Ptr);
if (ptr == IntPtr.Zero) return null; if (ptr == IntPtr.Zero) return null;
if (!TryResolvePointer(ptr, out Item item)) if (!TryResolvePointer(ptr, out Item item))
{ {
@ -129,7 +129,7 @@ namespace PkmnLibSharp.Battling
return item; return item;
} }
set => set =>
Creaturelibbattling.Generated.Creature.SetHeldItemFromItem(Ptr, Creaturelib.Generated.Creature.SetHeldItemFromItem(Ptr,
value?.Ptr ?? IntPtr.Zero); value?.Ptr ?? IntPtr.Zero);
} }
public string Nickname public string Nickname
@ -137,7 +137,7 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_nickname != null) return _nickname; if (_nickname != null) return _nickname;
_nickname = Creaturelibbattling.Generated.Creature.GetNickname(Ptr).PtrString(); _nickname = Creaturelib.Generated.Creature.GetNickname(Ptr).PtrString();
return _nickname; return _nickname;
} }
} }
@ -146,8 +146,8 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_moves != null) return _moves; if (_moves != null) return _moves;
var movesLength = Creaturelibbattling.Generated.Creature.GetAttacksCount(Ptr); var movesLength = Creaturelib.Generated.Creature.GetAttacksCount(Ptr);
var movesPtr = Creaturelibbattling.Generated.Creature.GetAttacks(Ptr); var movesPtr = Creaturelib.Generated.Creature.GetAttacks(Ptr);
_moves = new ReadOnlyNativePtrArray<LearnedMove>(movesPtr, (int) movesLength); _moves = new ReadOnlyNativePtrArray<LearnedMove>(movesPtr, (int) movesLength);
return _moves; return _moves;
} }
@ -211,89 +211,89 @@ namespace PkmnLibSharp.Battling
public void ChangeForme(Forme forme) public void ChangeForme(Forme forme)
{ {
_forme = null; _forme = null;
Creaturelibbattling.Generated.Creature.ChangeVariant(Ptr, forme.Ptr); Creaturelib.Generated.Creature.ChangeVariant(Ptr, forme.Ptr);
} }
public bool HasHeldItem(string itemName) public bool HasHeldItem(string itemName)
{ {
return Creaturelibbattling.Generated.Creature.HasHeldItem(Ptr, itemName.ToPtr()) == 1; return Creaturelib.Generated.Creature.HasHeldItem(Ptr, itemName.ToPtr()) == 1;
} }
public void SetHeldItem(string item) public void SetHeldItem(string item)
{ {
if (string.IsNullOrEmpty(item)) if (string.IsNullOrEmpty(item))
Creaturelibbattling.Generated.Creature.SetHeldItemFromItem(Ptr, IntPtr.Zero); Creaturelib.Generated.Creature.SetHeldItemFromItem(Ptr, IntPtr.Zero);
else else
Creaturelibbattling.Generated.Creature.SetHeldItem(Ptr, item.ToPtr()); Creaturelib.Generated.Creature.SetHeldItem(Ptr, item.ToPtr());
} }
public bool HasType(string type) public bool HasType(string type)
{ {
var typeByte = Library.StaticLibrary.TypeLibrary.GetTypeId(type); var typeByte = Library.StaticLibrary.TypeLibrary.GetTypeId(type);
return Creaturelibbattling.Generated.Creature.HasType(Ptr, typeByte) == 1; return Creaturelib.Generated.Creature.HasType(Ptr, typeByte) == 1;
} }
public void ChangeLevelBy(sbyte amount) public void ChangeLevelBy(sbyte amount)
{ {
Creaturelibbattling.Generated.Creature.ChangeLevelBy(Ptr, amount).Assert(); Creaturelib.Generated.Creature.ChangeLevelBy(Ptr, amount).Assert();
} }
public void AddExperience(uint experience) public void AddExperience(uint experience)
{ {
Creaturelibbattling.Generated.Creature.AddExperience(Ptr, experience).Assert(); Creaturelib.Generated.Creature.AddExperience(Ptr, experience).Assert();
} }
public void Damage(uint damage, DamageSource source) public void Damage(uint damage, DamageSource source)
{ {
Creaturelibbattling.Generated.Creature.Damage(Ptr, damage, (Creaturelibbattling.DamageSource) source); Creaturelib.Generated.Creature.Damage(Ptr, damage, (Creaturelib.DamageSource) source);
} }
public void Heal(uint damage, bool canRevive) public void Heal(uint damage, bool canRevive)
{ {
Creaturelibbattling.Generated.Creature.Heal(Ptr, damage, canRevive.ToNative()); Creaturelib.Generated.Creature.Heal(Ptr, damage, canRevive.ToNative());
} }
public void OverrideActiveAbility(string ability) public void OverrideActiveAbility(string ability)
{ {
Creaturelibbattling.Generated.Creature.OverrideActiveTalent(Ptr, ability.ToPtr()).Assert(); Creaturelib.Generated.Creature.OverrideActiveTalent(Ptr, ability.ToPtr()).Assert();
} }
public void ClearVolatileScripts() public void ClearVolatileScripts()
{ {
Creaturelibbattling.Generated.Creature.ClearVolatileScripts(Ptr).Assert(); Creaturelib.Generated.Creature.ClearVolatileScripts(Ptr).Assert();
} }
public void AddVolatileScript(string scriptName) public void AddVolatileScript(string scriptName)
{ {
Creaturelibbattling.Generated.Creature.AddVolatileScriptByName(Ptr, scriptName.ToPtr()).Assert(); Creaturelib.Generated.Creature.AddVolatileScriptByName(Ptr, scriptName.ToPtr()).Assert();
} }
public void AddVolatileScript(Script script) public void AddVolatileScript(Script script)
{ {
Creaturelibbattling.Generated.Creature.AddVolatileScript(Ptr, script.Ptr).Assert(); Creaturelib.Generated.Creature.AddVolatileScript(Ptr, script.Ptr).Assert();
} }
public void RemoveVolatileScript(string scriptName) public void RemoveVolatileScript(string scriptName)
{ {
Creaturelibbattling.Generated.Creature.RemoveVolatileScriptByName(Ptr, scriptName.ToPtr()).Assert(); Creaturelib.Generated.Creature.RemoveVolatileScriptByName(Ptr, scriptName.ToPtr()).Assert();
} }
public void RemoveVolatileScript(Script script) public void RemoveVolatileScript(Script script)
{ {
Creaturelibbattling.Generated.Creature.RemoveVolatileScript(Ptr, script.Ptr).Assert(); Creaturelib.Generated.Creature.RemoveVolatileScript(Ptr, script.Ptr).Assert();
} }
public bool HasVolatileScript(string scriptName) public bool HasVolatileScript(string scriptName)
{ {
return Creaturelibbattling.Generated.Creature.HasVolatileScript(Ptr, scriptName.ToPtr()) == 1; return Creaturelib.Generated.Creature.HasVolatileScript(Ptr, scriptName.ToPtr()) == 1;
} }
public sbyte GetStatBoost(Statistic stat) public sbyte GetStatBoost(Statistic stat)
{ {
return Creaturelibbattling.Generated.Creature.GetStatBoost(Ptr, (Creaturelibbattling.Statistic) stat); return Creaturelib.Generated.Creature.GetStatBoost(Ptr, (Creaturelib.Statistic) stat);
} }
public void ChangeStatBoost(Statistic stat, sbyte amount) public void ChangeStatBoost(Statistic stat, sbyte amount)
{ {
Creaturelibbattling.Generated.Creature.ChangeStatBoost(Ptr, (Creaturelibbattling.Statistic) stat, amount); Creaturelib.Generated.Creature.ChangeStatBoost(Ptr, (Creaturelib.Statistic) stat, amount);
} }
public uint GetBaseStat(Statistic stat) public uint GetBaseStat(Statistic stat)
{ {
return Creaturelibbattling.Generated.Creature.GetBaseStat(Ptr, (Creaturelibbattling.Statistic) stat); return Creaturelib.Generated.Creature.GetBaseStat(Ptr, (Creaturelib.Statistic) stat);
} }
public uint GetFlatStat(Statistic stat) public uint GetFlatStat(Statistic stat)
{ {
return Creaturelibbattling.Generated.Creature.GetFlatStat(Ptr, (Creaturelibbattling.Statistic) stat); return Creaturelib.Generated.Creature.GetFlatStat(Ptr, (Creaturelib.Statistic) stat);
} }
public uint GetBoostedStat(Statistic stat) public uint GetBoostedStat(Statistic stat)
{ {
return Creaturelibbattling.Generated.Creature.GetBoostedStat(Ptr, (Creaturelibbattling.Statistic) stat); return Creaturelib.Generated.Creature.GetBoostedStat(Ptr, (Creaturelib.Statistic) stat);
} }
public byte GetIndividualValue(Statistic stat) public byte GetIndividualValue(Statistic stat)
{ {

View File

@ -7,28 +7,30 @@ namespace PkmnLibSharp.Battling
{ {
private ReadOnlyNativePtrArray<Pokemon> _party; private ReadOnlyNativePtrArray<Pokemon> _party;
public PokemonParty(ulong size = 6) : base(Creaturelibbattling.Generated.CreatureParty.ConstructWithSize(size)) internal PokemonParty(IntPtr ptr) : base(ptr){}
public PokemonParty(byte size = 6) : base(Creaturelib.Generated.CreatureParty.ConstructWithSize(size))
{} {}
public PokemonParty(Pokemon[] pokemon) : base( public PokemonParty(Pokemon[] pokemon) : base(
Creaturelibbattling.Generated.CreatureParty.ConstructFromArray(pokemon.ArrayPtr(), (ulong) pokemon.Length)) Creaturelib.Generated.CreatureParty.ConstructFromArray(pokemon.ArrayPtr(), (ulong) pokemon.Length))
{} {}
public Pokemon GetAtIndex(ulong index) public Pokemon GetAtIndex(ulong index)
{ {
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creaturelibbattling.Generated.CreatureParty.GetAtIndex(ref ptr, Ptr, index); Creaturelib.Generated.CreatureParty.GetAtIndex(ref ptr, Ptr, index).Assert();
return TryResolvePointer(ptr, out Pokemon pkmn) ? pkmn : new Pokemon(ptr); return TryResolvePointer(ptr, out Pokemon pkmn) ? pkmn : new Pokemon(ptr);
} }
public void Switch(ulong indexA, ulong indexB) public void Switch(ulong indexA, ulong indexB)
{ {
Creaturelibbattling.Generated.CreatureParty.Switch(Ptr, indexA, indexB); Creaturelib.Generated.CreatureParty.Switch(Ptr, indexA, indexB);
} }
public Pokemon SwapInto(ulong indexA, Pokemon pokemon) public Pokemon SwapInto(ulong indexA, Pokemon pokemon)
{ {
var ptr = Creaturelibbattling.Generated.CreatureParty.SwapInto(Ptr, indexA, pokemon.Ptr); var ptr = Creaturelib.Generated.CreatureParty.SwapInto(Ptr, indexA, pokemon.Ptr);
if (TryResolvePointer(ptr, out Pokemon newPokemon)) if (TryResolvePointer(ptr, out Pokemon newPokemon))
{ {
return newPokemon; return newPokemon;
@ -38,7 +40,7 @@ namespace PkmnLibSharp.Battling
public bool HasAvailablePokemon() public bool HasAvailablePokemon()
{ {
return Creaturelibbattling.Generated.CreatureParty.HasAvailableCreatures(Ptr) == 1; return Creaturelib.Generated.CreatureParty.HasAvailableCreatures(Ptr) == 1;
} }
public ReadOnlyNativePtrArray<Pokemon> Party public ReadOnlyNativePtrArray<Pokemon> Party
@ -46,17 +48,17 @@ namespace PkmnLibSharp.Battling
get get
{ {
if (_party != null) return _party; if (_party != null) return _party;
var ptr = Creaturelibbattling.Generated.CreatureParty.GetParty(Ptr); var ptr = Creaturelib.Generated.CreatureParty.GetParty(Ptr);
_party = new ReadOnlyNativePtrArray<Pokemon>(ptr, (int) Length); _party = new ReadOnlyNativePtrArray<Pokemon>(ptr, (int) Length);
return _party; return _party;
} }
} }
public ulong Length => Creaturelibbattling.Generated.CreatureParty.GetLength(Ptr); public ulong Length => Creaturelib.Generated.CreatureParty.GetLength(Ptr);
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creaturelibbattling.Generated.CreatureParty.Destruct(Ptr); Creaturelib.Generated.CreatureParty.Destruct(Ptr);
} }
protected internal override void MarkAsDeleted() protected internal override void MarkAsDeleted()

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum AttackCategory : byte internal enum AttackCategory : byte

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class AttackData internal static class AttackData
{ {
@ -22,73 +22,73 @@ namespace Creatureliblibrary.Generated
/// <param name="flags">const char * *</param> /// <param name="flags">const char * *</param>
/// <param name="flagsCount">long unsigned int</param> /// <param name="flagsCount">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Construct")] [DllImport("CreatureLib", 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); 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> /// <param name="p">const AttackData *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetName")]
internal static extern IntPtr GetName(IntPtr p); internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetType")]
internal static extern byte GetType(IntPtr p); internal static extern byte GetType(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>AttackCategory</returns> /// <returns>AttackCategory</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetCategory")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetCategory")]
internal static extern AttackCategory GetCategory(IntPtr p); internal static extern AttackCategory GetCategory(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBasePower")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBasePower")]
internal static extern byte GetBasePower(IntPtr p); internal static extern byte GetBasePower(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetAccuracy")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetAccuracy")]
internal static extern byte GetAccuracy(IntPtr p); internal static extern byte GetAccuracy(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBaseUsages")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetBaseUsages")]
internal static extern byte GetBaseUsages(IntPtr p); internal static extern byte GetBaseUsages(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>AttackTarget</returns> /// <returns>AttackTarget</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetTarget")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetTarget")]
internal static extern AttackTarget GetTarget(IntPtr p); internal static extern AttackTarget GetTarget(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>signed char</returns> /// <returns>signed char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetPriority")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetPriority")]
internal static extern sbyte GetPriority(IntPtr p); internal static extern sbyte GetPriority(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasSecondaryEffect")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasSecondaryEffect")]
internal static extern byte HasSecondaryEffect(IntPtr p); internal static extern byte HasSecondaryEffect(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>float</returns> /// <returns>float</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectChance")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectChance")]
internal static extern float GetSecondaryEffectChance(IntPtr p); internal static extern float GetSecondaryEffectChance(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_GetSecondaryEffectName")]
internal static extern IntPtr GetSecondaryEffectName(IntPtr p); internal static extern IntPtr GetSecondaryEffectName(IntPtr p);
/// <param name="p">const AttackData *</param> /// <param name="p">const AttackData *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasFlag")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackData_HasFlag")]
internal static extern byte HasFlag(IntPtr p, IntPtr key); internal static extern byte HasFlag(IntPtr p, IntPtr key);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum AttackLearnMethod : int internal enum AttackLearnMethod : int

View File

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

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum AttackTarget : byte internal enum AttackTarget : byte

View File

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

View File

@ -2,18 +2,18 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class BaseTurnChoice internal static class BaseTurnChoice
{ {
/// <param name="p">const BaseTurnChoice *</param> /// <param name="p">const BaseTurnChoice *</param>
/// <returns>TurnChoiceKind</returns> /// <returns>TurnChoiceKind</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetKind")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetKind")]
internal static extern TurnChoiceKind GetKind(IntPtr p); internal static extern TurnChoiceKind GetKind(IntPtr p);
/// <param name="p">const BaseTurnChoice *</param> /// <param name="p">const BaseTurnChoice *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetUser")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetUser")]
internal static extern IntPtr GetUser(IntPtr p); internal static extern IntPtr GetUser(IntPtr p);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class Battle internal static class Battle
{ {
@ -15,58 +15,58 @@ namespace Creaturelibbattling.Generated
/// <param name="creaturesPerSide">unsigned char</param> /// <param name="creaturesPerSide">unsigned char</param>
/// <param name="randomSeed">long unsigned int</param> /// <param name="randomSeed">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Construct")] [DllImport("CreatureLib", 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); 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> /// <param name="p">const Battle *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>const BattleLibrary *</returns> /// <returns>const BattleLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetLibrary")]
internal static extern IntPtr GetLibrary(IntPtr p); internal static extern IntPtr GetLibrary(IntPtr p);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="turnChoice">BaseTurnChoice *</param> /// <param name="turnChoice">BaseTurnChoice *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanUse")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanUse")]
internal static extern byte CanUse(ref byte @out, IntPtr p, IntPtr turnChoice); internal static extern byte CanUse(ref byte @out, IntPtr p, IntPtr turnChoice);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="turnChoice">BaseTurnChoice *</param> /// <param name="turnChoice">BaseTurnChoice *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TrySetChoice")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TrySetChoice")]
internal static extern byte TrySetChoice(ref byte @out, IntPtr p, IntPtr turnChoice); internal static extern byte TrySetChoice(ref byte @out, IntPtr p, IntPtr turnChoice);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanFlee")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanFlee")]
internal static extern byte CanFlee(IntPtr p); internal static extern byte CanFlee(IntPtr p);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CheckChoicesSetAndRun")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CheckChoicesSetAndRun")]
internal static extern byte CheckChoicesSetAndRun(IntPtr p); internal static extern byte CheckChoicesSetAndRun(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>ChoiceQueue *</returns> /// <returns>ChoiceQueue *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurnQueue")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCurrentTurnQueue")]
internal static extern IntPtr GetCurrentTurnQueue(IntPtr p); internal static extern IntPtr GetCurrentTurnQueue(IntPtr p);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <returns>BattleRandom *</returns> /// <returns>BattleRandom *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetRandom")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetRandom")]
internal static extern IntPtr GetRandom(IntPtr p); internal static extern IntPtr GetRandom(IntPtr p);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <param name="c">Creature *</param> /// <param name="c">Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CreatureInField")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CreatureInField")]
internal static extern byte CreatureInField(ref byte @out, IntPtr p, IntPtr c); internal static extern byte CreatureInField(ref byte @out, IntPtr p, IntPtr c);
/// <param name="out">Creature * &</param> /// <param name="out">Creature * &</param>
@ -74,14 +74,14 @@ namespace Creaturelibbattling.Generated
/// <param name="side">unsigned char</param> /// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param> /// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetCreature")]
internal static extern byte GetCreature(ref IntPtr @out, IntPtr p, byte side, byte target); internal static extern byte GetCreature(ref IntPtr @out, IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="side">unsigned char</param> /// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param> /// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ForceRecall")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ForceRecall")]
internal static extern byte ForceRecall(IntPtr p, byte side, byte target); internal static extern byte ForceRecall(IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
@ -89,7 +89,7 @@ namespace Creaturelibbattling.Generated
/// <param name="target">unsigned char</param> /// <param name="target">unsigned char</param>
/// <param name="c">Creature *</param> /// <param name="c">Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_SwitchCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_SwitchCreature")]
internal static extern byte SwitchCreature(IntPtr p, byte side, byte target, IntPtr c); internal static extern byte SwitchCreature(IntPtr p, byte side, byte target, IntPtr c);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
@ -97,95 +97,95 @@ namespace Creaturelibbattling.Generated
/// <param name="side">unsigned char</param> /// <param name="side">unsigned char</param>
/// <param name="target">unsigned char</param> /// <param name="target">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanSlotBeFilled")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_CanSlotBeFilled")]
internal static extern byte CanSlotBeFilled(ref byte @out, IntPtr p, byte side, byte target); internal static extern byte CanSlotBeFilled(ref byte @out, IntPtr p, byte side, byte target);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ValidateBattleState")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_ValidateBattleState")]
internal static extern byte ValidateBattleState(IntPtr p); internal static extern byte ValidateBattleState(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasEnded")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasEnded")]
internal static extern byte HasEnded(IntPtr p); internal static extern byte HasEnded(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasConclusiveResult")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasConclusiveResult")]
internal static extern byte HasConclusiveResult(IntPtr p); internal static extern byte HasConclusiveResult(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetWinningSide")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetWinningSide")]
internal static extern byte GetWinningSide(IntPtr p); internal static extern byte GetWinningSide(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSidesCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSidesCount")]
internal static extern ulong GetSidesCount(IntPtr p); internal static extern ulong GetSidesCount(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>const BattleSide * *</returns> /// <returns>const BattleSide * *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSides")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetSides")]
internal static extern IntPtr GetSides(IntPtr p); internal static extern IntPtr GetSides(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetPartiesCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetPartiesCount")]
internal static extern ulong GetPartiesCount(IntPtr p); internal static extern ulong GetPartiesCount(IntPtr p);
/// <param name="p">const Battle *</param> /// <param name="p">const Battle *</param>
/// <returns>const BattleParty * *</returns> /// <returns>const BattleParty * *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetParties")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetParties")]
internal static extern IntPtr GetParties(IntPtr p); internal static extern IntPtr GetParties(IntPtr p);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>Script *</returns> /// <returns>Script *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_GetVolatileScript")]
internal static extern IntPtr GetVolatileScript(IntPtr p, IntPtr key); internal static extern IntPtr GetVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScriptByName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScriptByName")]
internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr key); internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="script">Script *</param> /// <param name="script">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_AddVolatileScript")]
internal static extern byte AddVolatileScript(IntPtr p, IntPtr script); internal static extern byte AddVolatileScript(IntPtr p, IntPtr script);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScript")]
internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr key); internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="script">Script *</param> /// <param name="script">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScriptWithScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RemoveVolatileScriptWithScript")]
internal static extern byte RemoveVolatileScriptWithScript(IntPtr p, IntPtr script); internal static extern byte RemoveVolatileScriptWithScript(IntPtr p, IntPtr script);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_HasVolatileScript")]
internal static extern byte HasVolatileScript(IntPtr p, IntPtr key); internal static extern byte HasVolatileScript(IntPtr p, IntPtr key);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="func">Function *</param> /// <param name="func">Function *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RegisterEventListener")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_RegisterEventListener")]
internal static extern byte RegisterEventListener(IntPtr p, IntPtr func); internal static extern byte RegisterEventListener(IntPtr p, IntPtr func);
/// <param name="p">Battle *</param> /// <param name="p">Battle *</param>
/// <param name="data">EventData *</param> /// <param name="data">EventData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TriggerEventListener")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Battle_TriggerEventListener")]
internal static extern byte TriggerEventListener(IntPtr p, IntPtr data); internal static extern byte TriggerEventListener(IntPtr p, IntPtr data);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum BattleItemCategory : byte internal enum BattleItemCategory : byte

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class BattleLibrary internal static class BattleLibrary
{ {
@ -14,37 +14,37 @@ namespace Creaturelibbattling.Generated
/// <param name="scriptResolver">ScriptResolver *</param> /// <param name="scriptResolver">ScriptResolver *</param>
/// <param name="miscLibrary">MiscLibrary *</param> /// <param name="miscLibrary">MiscLibrary *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Construct")] [DllImport("CreatureLib", 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); 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> /// <param name="p">const BattleLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const BattleLibrary *</param> /// <param name="p">const BattleLibrary *</param>
/// <returns>const DataLibrary *</returns> /// <returns>const DataLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStaticLib")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStaticLib")]
internal static extern IntPtr GetStaticLib(IntPtr p); internal static extern IntPtr GetStaticLib(IntPtr p);
/// <param name="p">const BattleLibrary *</param> /// <param name="p">const BattleLibrary *</param>
/// <returns>const BattleStatCalculator *</returns> /// <returns>const BattleStatCalculator *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStatCalculator")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStatCalculator")]
internal static extern IntPtr GetStatCalculator(IntPtr p); internal static extern IntPtr GetStatCalculator(IntPtr p);
/// <param name="p">const BattleLibrary *</param> /// <param name="p">const BattleLibrary *</param>
/// <returns>const DamageLibrary *</returns> /// <returns>const DamageLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetDamageLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetDamageLibrary")]
internal static extern IntPtr GetDamageLibrary(IntPtr p); internal static extern IntPtr GetDamageLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param> /// <param name="p">const BattleLibrary *</param>
/// <returns>const MiscLibrary *</returns> /// <returns>const MiscLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetMiscLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetMiscLibrary")]
internal static extern IntPtr GetMiscLibrary(IntPtr p); internal static extern IntPtr GetMiscLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param> /// <param name="p">const BattleLibrary *</param>
/// <returns>const ExperienceLibrary *</returns> /// <returns>const ExperienceLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetExperienceLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetExperienceLibrary")]
internal static extern IntPtr GetExperienceLibrary(IntPtr p); internal static extern IntPtr GetExperienceLibrary(IntPtr p);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class BattleParty internal static class BattleParty
{ {
@ -11,25 +11,30 @@ namespace Creaturelibbattling.Generated
/// <param name="creatureIndices">unsigned char *</param> /// <param name="creatureIndices">unsigned char *</param>
/// <param name="numberOfIndices">long unsigned int</param> /// <param name="numberOfIndices">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr p, IntPtr creatureIndices, ulong numberOfIndices); internal static extern byte Construct(ref IntPtr @out, IntPtr p, IntPtr creatureIndices, ulong numberOfIndices);
/// <param name="p">const BattleParty *</param> /// <param name="p">const BattleParty *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_Destruct")]
internal static extern void Destruct(IntPtr p); 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")]
internal static extern IntPtr GetParty(IntPtr p);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <param name="p">const BattleParty *</param> /// <param name="p">const BattleParty *</param>
/// <param name="side">unsigned char</param> /// <param name="side">unsigned char</param>
/// <param name="creature">unsigned char</param> /// <param name="creature">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_IsResponsibleForIndex")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_IsResponsibleForIndex")]
internal static extern byte IsResponsibleForIndex(ref byte @out, IntPtr p, byte side, byte creature); internal static extern byte IsResponsibleForIndex(ref byte @out, IntPtr p, byte side, byte creature);
/// <param name="p">const BattleParty *</param> /// <param name="p">const BattleParty *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_HasCreaturesNotInField")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleParty_HasCreaturesNotInField")]
internal static extern byte HasCreaturesNotInField(IntPtr p); internal static extern byte HasCreaturesNotInField(IntPtr p);
} }

View File

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

View File

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

View File

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

View File

@ -2,12 +2,12 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class C internal static class C
{ {
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastException")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastException")]
internal static extern IntPtr GetLastException(); internal static extern IntPtr GetLastException();
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class Creature internal static class Creature
{ {
@ -23,260 +23,260 @@ namespace Creaturelibbattling.Generated
/// <param name="attacksNum">long unsigned int</param> /// <param name="attacksNum">long unsigned int</param>
/// <param name="allowedExperienceGain">bool</param> /// <param name="allowedExperienceGain">bool</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Construct")] [DllImport("CreatureLib", 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); 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> /// <param name="p">const Creature *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const BattleLibrary *</returns> /// <returns>const BattleLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLibrary")]
internal static extern IntPtr GetLibrary(IntPtr p); internal static extern IntPtr GetLibrary(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const CreatureSpecies *</returns> /// <returns>const CreatureSpecies *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetSpecies")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetSpecies")]
internal static extern IntPtr GetSpecies(IntPtr p); internal static extern IntPtr GetSpecies(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const SpeciesVariant *</returns> /// <returns>const SpeciesVariant *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetVariant")]
internal static extern IntPtr GetVariant(IntPtr p); internal static extern IntPtr GetVariant(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="variant">const SpeciesVariant *</param> /// <param name="variant">const SpeciesVariant *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeVariant")]
internal static extern byte ChangeVariant(IntPtr p, IntPtr variant); internal static extern byte ChangeVariant(IntPtr p, IntPtr variant);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLevel")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetLevel")]
internal static extern byte GetLevel(IntPtr p); internal static extern byte GetLevel(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetExperience")]
internal static extern uint GetExperience(IntPtr p); internal static extern uint GetExperience(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>Gender</returns> /// <returns>Gender</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetGender")]
internal static extern Gender GetGender(IntPtr p); internal static extern Gender GetGender(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetColoring")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetColoring")]
internal static extern byte GetColoring(IntPtr p); internal static extern byte GetColoring(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItem")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItem")]
internal static extern byte HasHeldItem(IntPtr p, IntPtr name); internal static extern byte HasHeldItem(IntPtr p, IntPtr name);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <param name="hash">unsigned int</param> /// <param name="hash">unsigned int</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItemWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasHeldItemWithHash")]
internal static extern byte HasHeldItemWithHash(IntPtr p, uint hash); internal static extern byte HasHeldItemWithHash(IntPtr p, uint hash);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const Item *</returns> /// <returns>const Item *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetHeldItem")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetHeldItem")]
internal static extern IntPtr GetHeldItem(IntPtr p); internal static extern IntPtr GetHeldItem(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItem")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItem")]
internal static extern byte SetHeldItem(IntPtr p, IntPtr name); internal static extern byte SetHeldItem(IntPtr p, IntPtr name);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="hash">unsigned int</param> /// <param name="hash">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemWithHash")]
internal static extern byte SetHeldItemWithHash(IntPtr p, uint hash); internal static extern byte SetHeldItemWithHash(IntPtr p, uint hash);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="item">const Item *</param> /// <param name="item">const Item *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemFromItem")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetHeldItemFromItem")]
internal static extern void SetHeldItemFromItem(IntPtr p, IntPtr item); internal static extern void SetHeldItemFromItem(IntPtr p, IntPtr item);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetCurrentHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetCurrentHealth")]
internal static extern uint GetCurrentHealth(IntPtr p); internal static extern uint GetCurrentHealth(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>Battle *</returns> /// <returns>Battle *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattle")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattle")]
internal static extern IntPtr GetBattle(IntPtr p); internal static extern IntPtr GetBattle(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>BattleSide *</returns> /// <returns>BattleSide *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattleSide")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBattleSide")]
internal static extern IntPtr GetBattleSide(IntPtr p); internal static extern IntPtr GetBattleSide(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_IsOnBattleField")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_IsOnBattleField")]
internal static extern byte IsOnBattleField(IntPtr p); internal static extern byte IsOnBattleField(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetNickname")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetNickname")]
internal static extern IntPtr GetNickname(IntPtr p); internal static extern IntPtr GetNickname(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="type">unsigned char</param> /// <param name="type">unsigned char</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasType")]
internal static extern byte HasType(IntPtr p, byte type); internal static extern byte HasType(IntPtr p, byte type);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetMaxHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetMaxHealth")]
internal static extern uint GetMaxHealth(IntPtr p); internal static extern uint GetMaxHealth(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="level">signed char</param> /// <param name="level">signed char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeLevelBy")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeLevelBy")]
internal static extern byte ChangeLevelBy(IntPtr p, sbyte level); internal static extern byte ChangeLevelBy(IntPtr p, sbyte level);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="damage">unsigned int</param> /// <param name="damage">unsigned int</param>
/// <param name="source">DamageSource</param> /// <param name="source">DamageSource</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Damage")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Damage")]
internal static extern byte Damage(IntPtr p, uint damage, DamageSource source); internal static extern byte Damage(IntPtr p, uint damage, DamageSource source);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="health">unsigned int</param> /// <param name="health">unsigned int</param>
/// <param name="canRevive">bool</param> /// <param name="canRevive">bool</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Heal")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_Heal")]
internal static extern byte Heal(IntPtr p, uint health, byte canRevive); internal static extern byte Heal(IntPtr p, uint health, byte canRevive);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <param name="out">const char * &</param> /// <param name="out">const char * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetActiveTalent")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetActiveTalent")]
internal static extern byte GetActiveTalent(IntPtr p, ref IntPtr @out); internal static extern byte GetActiveTalent(IntPtr p, ref IntPtr @out);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="talent">const char *</param> /// <param name="talent">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_OverrideActiveTalent")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_OverrideActiveTalent")]
internal static extern byte OverrideActiveTalent(IntPtr p, IntPtr talent); internal static extern byte OverrideActiveTalent(IntPtr p, IntPtr talent);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="experience">unsigned int</param> /// <param name="experience">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddExperience")]
internal static extern byte AddExperience(IntPtr p, uint experience); internal static extern byte AddExperience(IntPtr p, uint experience);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ClearVolatileScripts")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ClearVolatileScripts")]
internal static extern byte ClearVolatileScripts(IntPtr p); internal static extern byte ClearVolatileScripts(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="scriptName">const char *</param> /// <param name="scriptName">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScriptByName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScriptByName")]
internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr scriptName); internal static extern byte AddVolatileScriptByName(IntPtr p, IntPtr scriptName);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="script">Script *</param> /// <param name="script">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_AddVolatileScript")]
internal static extern byte AddVolatileScript(IntPtr p, IntPtr script); internal static extern byte AddVolatileScript(IntPtr p, IntPtr script);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="scriptName">const char *</param> /// <param name="scriptName">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScriptByName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScriptByName")]
internal static extern byte RemoveVolatileScriptByName(IntPtr p, IntPtr scriptName); internal static extern byte RemoveVolatileScriptByName(IntPtr p, IntPtr scriptName);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="script">Script *</param> /// <param name="script">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_RemoveVolatileScript")]
internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr script); internal static extern byte RemoveVolatileScript(IntPtr p, IntPtr script);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="scriptName">const char *</param> /// <param name="scriptName">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasVolatileScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_HasVolatileScript")]
internal static extern byte HasVolatileScript(IntPtr p, IntPtr scriptName); internal static extern byte HasVolatileScript(IntPtr p, IntPtr scriptName);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacksCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacksCount")]
internal static extern ulong GetAttacksCount(IntPtr p); internal static extern ulong GetAttacksCount(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <returns>const LearnedAttack * *</returns> /// <returns>const LearnedAttack * *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacks")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetAttacks")]
internal static extern IntPtr GetAttacks(IntPtr p); internal static extern IntPtr GetAttacks(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const CreatureSpecies *</returns> /// <returns>const CreatureSpecies *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplaySpecies")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplaySpecies")]
internal static extern IntPtr GetDisplaySpecies(IntPtr p); internal static extern IntPtr GetDisplaySpecies(IntPtr p);
/// <param name="p">const Creature *</param> /// <param name="p">const Creature *</param>
/// <returns>const SpeciesVariant *</returns> /// <returns>const SpeciesVariant *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplayVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetDisplayVariant")]
internal static extern IntPtr GetDisplayVariant(IntPtr p); internal static extern IntPtr GetDisplayVariant(IntPtr p);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="species">const CreatureSpecies *</param> /// <param name="species">const CreatureSpecies *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplaySpecies")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplaySpecies")]
internal static extern void SetDisplaySpecies(IntPtr p, IntPtr species); internal static extern void SetDisplaySpecies(IntPtr p, IntPtr species);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="variant">const SpeciesVariant *</param> /// <param name="variant">const SpeciesVariant *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplayVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_SetDisplayVariant")]
internal static extern void SetDisplayVariant(IntPtr p, IntPtr variant); internal static extern void SetDisplayVariant(IntPtr p, IntPtr variant);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <param name="diffAmount">signed char</param> /// <param name="diffAmount">signed char</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeStatBoost")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_ChangeStatBoost")]
internal static extern void ChangeStatBoost(IntPtr p, Statistic stat, sbyte diffAmount); internal static extern void ChangeStatBoost(IntPtr p, Statistic stat, sbyte diffAmount);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetFlatStat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetFlatStat")]
internal static extern uint GetFlatStat(IntPtr p, Statistic stat); internal static extern uint GetFlatStat(IntPtr p, Statistic stat);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBoostedStat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBoostedStat")]
internal static extern uint GetBoostedStat(IntPtr p, Statistic stat); internal static extern uint GetBoostedStat(IntPtr p, Statistic stat);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBaseStat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetBaseStat")]
internal static extern uint GetBaseStat(IntPtr p, Statistic stat); internal static extern uint GetBaseStat(IntPtr p, Statistic stat);
/// <param name="p">Creature *</param> /// <param name="p">Creature *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <returns>signed char</returns> /// <returns>signed char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetStatBoost")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Creature_GetStatBoost")]
internal static extern sbyte GetStatBoost(IntPtr p, Statistic stat); internal static extern sbyte GetStatBoost(IntPtr p, Statistic stat);
} }

View File

@ -2,60 +2,60 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class CreatureParty internal static class CreatureParty
{ {
/// <param name="size">long unsigned int</param> /// <param name="size">long unsigned int</param>
/// <returns>CreatureParty *</returns> /// <returns>CreatureParty *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_ConstructWithSize")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_ConstructWithSize")]
internal static extern IntPtr ConstructWithSize(ulong size); internal static extern IntPtr ConstructWithSize(ulong size);
/// <param name="creatures">Creature * *</param> /// <param name="creatures">Creature * *</param>
/// <param name="size">long unsigned int</param> /// <param name="size">long unsigned int</param>
/// <returns>CreatureParty *</returns> /// <returns>CreatureParty *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_ConstructFromArray")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_ConstructFromArray")]
internal static extern IntPtr ConstructFromArray(IntPtr creatures, ulong size); internal static extern IntPtr ConstructFromArray(IntPtr creatures, ulong size);
/// <param name="p">const CreatureParty *</param> /// <param name="p">const CreatureParty *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">Creature * &</param> /// <param name="out">Creature * &</param>
/// <param name="p">const CreatureParty *</param> /// <param name="p">const CreatureParty *</param>
/// <param name="index">long unsigned int</param> /// <param name="index">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetAtIndex")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetAtIndex")]
internal static extern byte GetAtIndex(ref IntPtr @out, IntPtr p, ulong index); internal static extern byte GetAtIndex(ref IntPtr @out, IntPtr p, ulong index);
/// <param name="p">CreatureParty *</param> /// <param name="p">CreatureParty *</param>
/// <param name="a">long unsigned int</param> /// <param name="a">long unsigned int</param>
/// <param name="b">long unsigned int</param> /// <param name="b">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_Switch")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_Switch")]
internal static extern byte Switch(IntPtr p, ulong a, ulong b); internal static extern byte Switch(IntPtr p, ulong a, ulong b);
/// <param name="p">CreatureParty *</param> /// <param name="p">CreatureParty *</param>
/// <param name="index">long unsigned int</param> /// <param name="index">long unsigned int</param>
/// <param name="creature">Creature *</param> /// <param name="creature">Creature *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_SwapInto")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_SwapInto")]
internal static extern IntPtr SwapInto(IntPtr p, ulong index, IntPtr creature); internal static extern IntPtr SwapInto(IntPtr p, ulong index, IntPtr creature);
/// <param name="p">const CreatureParty *</param> /// <param name="p">const CreatureParty *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_HasAvailableCreatures")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_HasAvailableCreatures")]
internal static extern byte HasAvailableCreatures(IntPtr p); internal static extern byte HasAvailableCreatures(IntPtr p);
/// <param name="p">const CreatureParty *</param> /// <param name="p">const CreatureParty *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetLength")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetLength")]
internal static extern ulong GetLength(IntPtr p); internal static extern ulong GetLength(IntPtr p);
/// <param name="p">CreatureParty *</param> /// <param name="p">CreatureParty *</param>
/// <returns>const Creature * *</returns> /// <returns>const Creature * *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetParty")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureParty_GetParty")]
internal static extern IntPtr GetParty(IntPtr p); internal static extern IntPtr GetParty(IntPtr p);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class CreatureSpecies internal static class CreatureSpecies
{ {
@ -14,90 +14,90 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRate">const char *</param> /// <param name="growthRate">const char *</param>
/// <param name="captureRate">unsigned char</param> /// <param name="captureRate">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_Construct")]
internal static extern byte Construct(ref IntPtr @out, ushort id, IntPtr name, IntPtr defaultVariant, float genderRatio, IntPtr growthRate, byte captureRate); internal static extern byte Construct(ref IntPtr @out, ushort id, IntPtr name, IntPtr defaultVariant, float genderRatio, IntPtr growthRate, byte captureRate);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>unsigned short</returns> /// <returns>unsigned short</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetId")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetId")]
internal static extern ushort GetId(IntPtr p); internal static extern ushort GetId(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>float</returns> /// <returns>float</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetGenderRate")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetGenderRate")]
internal static extern float GetGenderRate(IntPtr p); internal static extern float GetGenderRate(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetCaptureRate")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetCaptureRate")]
internal static extern byte GetCaptureRate(IntPtr p); internal static extern byte GetCaptureRate(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetName")]
internal static extern IntPtr GetName(IntPtr p); internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetGrowthRate")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetGrowthRate")]
internal static extern IntPtr GetGrowthRate(IntPtr p); internal static extern IntPtr GetGrowthRate(IntPtr p);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_HasVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_HasVariant")]
internal static extern byte HasVariant(IntPtr p, IntPtr name); internal static extern byte HasVariant(IntPtr p, IntPtr name);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="hash">unsigned int</param> /// <param name="hash">unsigned int</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_HasVariantWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_HasVariantWithHash")]
internal static extern byte HasVariantWithHash(IntPtr p, uint hash); internal static extern byte HasVariantWithHash(IntPtr p, uint hash);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="out">const SpeciesVariant * &</param> /// <param name="out">const SpeciesVariant * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_TryGetVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_TryGetVariant")]
internal static extern byte TryGetVariant(IntPtr p, IntPtr name, ref IntPtr @out); internal static extern byte TryGetVariant(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="hash">unsigned int</param> /// <param name="hash">unsigned int</param>
/// <param name="out">const SpeciesVariant * &</param> /// <param name="out">const SpeciesVariant * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_TryGetVariantWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_TryGetVariantWithHash")]
internal static extern byte TryGetVariantWithHash(IntPtr p, uint hash, ref IntPtr @out); internal static extern byte TryGetVariantWithHash(IntPtr p, uint hash, ref IntPtr @out);
/// <param name="out">const SpeciesVariant * &</param> /// <param name="out">const SpeciesVariant * &</param>
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetVariant")]
internal static extern byte GetVariant(ref IntPtr @out, IntPtr p, IntPtr name); internal static extern byte GetVariant(ref IntPtr @out, IntPtr p, IntPtr name);
/// <param name="out">const SpeciesVariant * &</param> /// <param name="out">const SpeciesVariant * &</param>
/// <param name="p">const CreatureSpecies *</param> /// <param name="p">const CreatureSpecies *</param>
/// <param name="hash">unsigned int</param> /// <param name="hash">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetVariantWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetVariantWithHash")]
internal static extern byte GetVariantWithHash(ref IntPtr @out, IntPtr p, uint hash); internal static extern byte GetVariantWithHash(ref IntPtr @out, IntPtr p, uint hash);
/// <param name="p">CreatureSpecies *</param> /// <param name="p">CreatureSpecies *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="variant">SpeciesVariant *</param> /// <param name="variant">SpeciesVariant *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_SetVariant")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_SetVariant")]
internal static extern byte SetVariant(IntPtr p, IntPtr name, IntPtr variant); internal static extern byte SetVariant(IntPtr p, IntPtr name, IntPtr variant);
/// <param name="p">CreatureSpecies *</param> /// <param name="p">CreatureSpecies *</param>
/// <param name="random">Random *</param> /// <param name="random">Random *</param>
/// <returns>Gender</returns> /// <returns>Gender</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetRandomGender")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_CreatureSpecies_GetRandomGender")]
internal static extern Gender GetRandomGender(IntPtr p, IntPtr random); internal static extern Gender GetRandomGender(IntPtr p, IntPtr random);
} }

View File

@ -2,28 +2,28 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class DamageEvent internal static class DamageEvent
{ {
/// <param name="p">const DamageEvent *</param> /// <param name="p">const DamageEvent *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetCreature")]
internal static extern IntPtr GetCreature(IntPtr p); internal static extern IntPtr GetCreature(IntPtr p);
/// <param name="p">const DamageEvent *</param> /// <param name="p">const DamageEvent *</param>
/// <returns>DamageSource</returns> /// <returns>DamageSource</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetDamageSource")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetDamageSource")]
internal static extern DamageSource GetDamageSource(IntPtr p); internal static extern DamageSource GetDamageSource(IntPtr p);
/// <param name="p">const DamageEvent *</param> /// <param name="p">const DamageEvent *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetOriginalHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetOriginalHealth")]
internal static extern uint GetOriginalHealth(IntPtr p); internal static extern uint GetOriginalHealth(IntPtr p);
/// <param name="p">const DamageEvent *</param> /// <param name="p">const DamageEvent *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetNewHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageEvent_GetNewHealth")]
internal static extern uint GetNewHealth(IntPtr p); internal static extern uint GetNewHealth(IntPtr p);
} }

View File

@ -2,17 +2,17 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class DamageLibrary internal static class DamageLibrary
{ {
/// <returns>const DamageLibrary *</returns> /// <returns>const DamageLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Construct")]
internal static extern IntPtr Construct(); internal static extern IntPtr Construct();
/// <param name="p">const DamageLibrary *</param> /// <param name="p">const DamageLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned int &</param> /// <param name="out">unsigned int &</param>
@ -22,7 +22,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitIndex">unsigned char</param> /// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param> /// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetDamage")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetDamage")]
internal static extern byte GetDamage(ref uint @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData); internal static extern byte GetDamage(ref uint @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
@ -32,7 +32,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitIndex">unsigned char</param> /// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param> /// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetBasePower")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetBasePower")]
internal static extern byte GetBasePower(ref byte @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData); internal static extern byte GetBasePower(ref byte @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
/// <param name="out">float &</param> /// <param name="out">float &</param>
@ -42,7 +42,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitIndex">unsigned char</param> /// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param> /// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetStatModifier")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetStatModifier")]
internal static extern byte GetStatModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData); internal static extern byte GetStatModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
/// <param name="out">float &</param> /// <param name="out">float &</param>
@ -52,7 +52,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitIndex">unsigned char</param> /// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param> /// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetDamageModifier")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetDamageModifier")]
internal static extern byte GetDamageModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData); internal static extern byte GetDamageModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum DamageSource : byte internal enum DamageSource : byte

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class DataLibrary internal static class DataLibrary
{ {
@ -14,42 +14,42 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRates">GrowthRateLibrary *</param> /// <param name="growthRates">GrowthRateLibrary *</param>
/// <param name="typeLibrary">TypeLibrary *</param> /// <param name="typeLibrary">TypeLibrary *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr settings, IntPtr species, IntPtr attacks, IntPtr items, IntPtr growthRates, IntPtr typeLibrary); internal static extern byte Construct(ref IntPtr @out, IntPtr settings, IntPtr species, IntPtr attacks, IntPtr items, IntPtr growthRates, IntPtr typeLibrary);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const LibrarySettings *</returns> /// <returns>const LibrarySettings *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetSettings")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetSettings")]
internal static extern IntPtr GetSettings(IntPtr p); internal static extern IntPtr GetSettings(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const SpeciesLibrary *</returns> /// <returns>const SpeciesLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetSpeciesLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetSpeciesLibrary")]
internal static extern IntPtr GetSpeciesLibrary(IntPtr p); internal static extern IntPtr GetSpeciesLibrary(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const AttackLibrary *</returns> /// <returns>const AttackLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetAttackLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetAttackLibrary")]
internal static extern IntPtr GetAttackLibrary(IntPtr p); internal static extern IntPtr GetAttackLibrary(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const ItemLibrary *</returns> /// <returns>const ItemLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetItemLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetItemLibrary")]
internal static extern IntPtr GetItemLibrary(IntPtr p); internal static extern IntPtr GetItemLibrary(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const GrowthRateLibrary *</returns> /// <returns>const GrowthRateLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetGrowthRates")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetGrowthRates")]
internal static extern IntPtr GetGrowthRates(IntPtr p); internal static extern IntPtr GetGrowthRates(IntPtr p);
/// <param name="p">const DataLibrary *</param> /// <param name="p">const DataLibrary *</param>
/// <returns>const TypeLibrary *</returns> /// <returns>const TypeLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetTypeLibrary")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DataLibrary_GetTypeLibrary")]
internal static extern IntPtr GetTypeLibrary(IntPtr p); internal static extern IntPtr GetTypeLibrary(IntPtr p);
} }

View File

@ -2,13 +2,13 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class DisplayTextEvent internal static class DisplayTextEvent
{ {
/// <param name="p">const DisplayTextEvent *</param> /// <param name="p">const DisplayTextEvent *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DisplayTextEvent_GetText")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DisplayTextEvent_GetText")]
internal static extern IntPtr GetText(IntPtr p); internal static extern IntPtr GetText(IntPtr p);
} }

View File

@ -2,62 +2,62 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class EffectParameter internal static class EffectParameter
{ {
/// <param name="b">bool</param> /// <param name="b">bool</param>
/// <returns>EffectParameter *</returns> /// <returns>EffectParameter *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromBool")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromBool")]
internal static extern IntPtr FromBool(byte b); internal static extern IntPtr FromBool(byte b);
/// <param name="i">long int</param> /// <param name="i">long int</param>
/// <returns>EffectParameter *</returns> /// <returns>EffectParameter *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromInt")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromInt")]
internal static extern IntPtr FromInt(long i); internal static extern IntPtr FromInt(long i);
/// <param name="f">float</param> /// <param name="f">float</param>
/// <returns>EffectParameter *</returns> /// <returns>EffectParameter *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromFloat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromFloat")]
internal static extern IntPtr FromFloat(float f); internal static extern IntPtr FromFloat(float f);
/// <param name="c">const char *</param> /// <param name="c">const char *</param>
/// <returns>EffectParameter *</returns> /// <returns>EffectParameter *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromString")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_FromString")]
internal static extern IntPtr FromString(IntPtr c); internal static extern IntPtr FromString(IntPtr c);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <returns>EffectParameterType</returns> /// <returns>EffectParameterType</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_GetType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_GetType")]
internal static extern EffectParameterType GetType(IntPtr p); internal static extern EffectParameterType GetType(IntPtr p);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsBool")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsBool")]
internal static extern byte AsBool(IntPtr p, ref byte @out); internal static extern byte AsBool(IntPtr p, ref byte @out);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <param name="out">long int &</param> /// <param name="out">long int &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsInt")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsInt")]
internal static extern byte AsInt(IntPtr p, ref long @out); internal static extern byte AsInt(IntPtr p, ref long @out);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <param name="out">float &</param> /// <param name="out">float &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsFloat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsFloat")]
internal static extern byte AsFloat(IntPtr p, ref float @out); internal static extern byte AsFloat(IntPtr p, ref float @out);
/// <param name="p">const EffectParameter *</param> /// <param name="p">const EffectParameter *</param>
/// <param name="out">const char * &</param> /// <param name="out">const char * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsString")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EffectParameter_AsString")]
internal static extern byte AsString(IntPtr p, ref IntPtr @out); internal static extern byte AsString(IntPtr p, ref IntPtr @out);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum EffectParameterType : byte internal enum EffectParameterType : byte

View File

@ -2,18 +2,18 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class EventData internal static class EventData
{ {
/// <param name="p">const EventData *</param> /// <param name="p">const EventData *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EventData_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EventData_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const EventData *</param> /// <param name="p">const EventData *</param>
/// <returns>EventDataKind</returns> /// <returns>EventDataKind</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EventData_GetKind")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_EventData_GetKind")]
internal static extern EventDataKind GetKind(IntPtr p); internal static extern EventDataKind GetKind(IntPtr p);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum EventDataKind : byte internal enum EventDataKind : byte

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class ExecutingAttack internal static class ExecutingAttack
{ {
@ -14,12 +14,12 @@ namespace Creaturelibbattling.Generated
/// <param name="attack">LearnedAttack *</param> /// <param name="attack">LearnedAttack *</param>
/// <param name="script">Script *</param> /// <param name="script">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr targets, ulong targetCount, byte numberHits, IntPtr user, IntPtr attack, IntPtr script); internal static extern byte Construct(ref IntPtr @out, IntPtr targets, ulong targetCount, byte numberHits, IntPtr user, IntPtr attack, IntPtr script);
/// <param name="p">ExecutingAttack *</param> /// <param name="p">ExecutingAttack *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">HitData * &</param> /// <param name="out">HitData * &</param>
@ -27,23 +27,23 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="hit">unsigned char</param> /// <param name="hit">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetHitData")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetHitData")]
internal static extern byte GetHitData(ref IntPtr @out, IntPtr p, IntPtr target, byte hit); internal static extern byte GetHitData(ref IntPtr @out, IntPtr p, IntPtr target, byte hit);
/// <param name="p">ExecutingAttack *</param> /// <param name="p">ExecutingAttack *</param>
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_IsCreatureTarget")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_IsCreatureTarget")]
internal static extern byte IsCreatureTarget(IntPtr p, IntPtr target); internal static extern byte IsCreatureTarget(IntPtr p, IntPtr target);
/// <param name="p">ExecutingAttack *</param> /// <param name="p">ExecutingAttack *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetUser")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetUser")]
internal static extern IntPtr GetUser(IntPtr p); internal static extern IntPtr GetUser(IntPtr p);
/// <param name="p">ExecutingAttack *</param> /// <param name="p">ExecutingAttack *</param>
/// <returns>LearnedAttack *</returns> /// <returns>LearnedAttack *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p); internal static extern IntPtr GetAttack(IntPtr p);
} }

View File

@ -2,17 +2,17 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class ExperienceLibrary internal static class ExperienceLibrary
{ {
/// <returns>const ExperienceLibrary *</returns> /// <returns>const ExperienceLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_Construct")]
internal static extern IntPtr Construct(); internal static extern IntPtr Construct();
/// <param name="p">const ExperienceLibrary *</param> /// <param name="p">const ExperienceLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const ExperienceLibrary *</param> /// <param name="p">const ExperienceLibrary *</param>
@ -20,7 +20,7 @@ namespace Creaturelibbattling.Generated
/// <param name="opponents">Creature * *</param> /// <param name="opponents">Creature * *</param>
/// <param name="opponentsCount">long unsigned int</param> /// <param name="opponentsCount">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_HandleExperienceGain")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExperienceLibrary_HandleExperienceGain")]
internal static extern byte HandleExperienceGain(IntPtr p, IntPtr faintedMon, IntPtr opponents, ulong opponentsCount); internal static extern byte HandleExperienceGain(IntPtr p, IntPtr faintedMon, IntPtr opponents, ulong opponentsCount);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class ExternGrowthRate internal static class ExternGrowthRate
{ {
@ -10,12 +10,12 @@ namespace Creatureliblibrary.Generated
/// <param name="calcLevel">Function *</param> /// <param name="calcLevel">Function *</param>
/// <param name="calcExperience">Function *</param> /// <param name="calcExperience">Function *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExternGrowthRate_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExternGrowthRate_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr calcLevel, IntPtr calcExperience); internal static extern byte Construct(ref IntPtr @out, IntPtr calcLevel, IntPtr calcExperience);
/// <param name="p">const ExternGrowthRate *</param> /// <param name="p">const ExternGrowthRate *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExternGrowthRate_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExternGrowthRate_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
} }

View File

@ -2,13 +2,13 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class FaintEvent internal static class FaintEvent
{ {
/// <param name="p">const FaintEvent *</param> /// <param name="p">const FaintEvent *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FaintEvent_GetCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FaintEvent_GetCreature")]
internal static extern IntPtr GetCreature(IntPtr p); internal static extern IntPtr GetCreature(IntPtr p);
} }

View File

@ -2,18 +2,18 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class FleeTurnChoice internal static class FleeTurnChoice
{ {
/// <param name="user">Creature *</param> /// <param name="user">Creature *</param>
/// <returns>FleeTurnChoice *</returns> /// <returns>FleeTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FleeTurnChoice_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FleeTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user); internal static extern IntPtr Construct(IntPtr user);
/// <param name="p">AttackTurnChoice *</param> /// <param name="p">AttackTurnChoice *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FleeTurnChoice_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FleeTurnChoice_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum Gender : byte internal enum Gender : byte

View File

@ -2,27 +2,27 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class GrowthRate internal static class GrowthRate
{ {
/// <param name="p">const GrowthRate *</param> /// <param name="p">const GrowthRate *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
/// <param name="p">const GrowthRate *</param> /// <param name="p">const GrowthRate *</param>
/// <param name="experience">unsigned int</param> /// <param name="experience">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_CalculateLevel")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_CalculateLevel")]
internal static extern byte CalculateLevel(ref byte @out, IntPtr p, uint experience); internal static extern byte CalculateLevel(ref byte @out, IntPtr p, uint experience);
/// <param name="out">unsigned int &</param> /// <param name="out">unsigned int &</param>
/// <param name="p">const GrowthRate *</param> /// <param name="p">const GrowthRate *</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_CalculateExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRate_CalculateExperience")]
internal static extern byte CalculateExperience(ref uint @out, IntPtr p, byte level); internal static extern byte CalculateExperience(ref uint @out, IntPtr p, byte level);
} }

View File

@ -2,18 +2,18 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class GrowthRateLibrary internal static class GrowthRateLibrary
{ {
/// <param name="initialCapacity">long unsigned int</param> /// <param name="initialCapacity">long unsigned int</param>
/// <returns>GrowthRateLibrary *</returns> /// <returns>GrowthRateLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_Construct")]
internal static extern IntPtr Construct(ulong initialCapacity); internal static extern IntPtr Construct(ulong initialCapacity);
/// <param name="p">GrowthRateLibrary *</param> /// <param name="p">GrowthRateLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
@ -21,7 +21,7 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRate">const char *</param> /// <param name="growthRate">const char *</param>
/// <param name="experience">unsigned int</param> /// <param name="experience">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateLevel")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateLevel")]
internal static extern byte CalculateLevel(ref byte @out, IntPtr library, IntPtr growthRate, uint experience); internal static extern byte CalculateLevel(ref byte @out, IntPtr library, IntPtr growthRate, uint experience);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
@ -29,7 +29,7 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRateHash">unsigned int</param> /// <param name="growthRateHash">unsigned int</param>
/// <param name="experience">unsigned int</param> /// <param name="experience">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateLevelWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateLevelWithHash")]
internal static extern byte CalculateLevelWithHash(ref byte @out, IntPtr library, uint growthRateHash, uint experience); internal static extern byte CalculateLevelWithHash(ref byte @out, IntPtr library, uint growthRateHash, uint experience);
/// <param name="out">unsigned int &</param> /// <param name="out">unsigned int &</param>
@ -37,7 +37,7 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRate">const char *</param> /// <param name="growthRate">const char *</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateExperience")]
internal static extern byte CalculateExperience(ref uint @out, IntPtr library, IntPtr growthRate, byte level); internal static extern byte CalculateExperience(ref uint @out, IntPtr library, IntPtr growthRate, byte level);
/// <param name="out">unsigned int &</param> /// <param name="out">unsigned int &</param>
@ -45,21 +45,21 @@ namespace Creatureliblibrary.Generated
/// <param name="growthRateHash">unsigned int</param> /// <param name="growthRateHash">unsigned int</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateExperienceWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_CalculateExperienceWithHash")]
internal static extern byte CalculateExperienceWithHash(ref uint @out, IntPtr library, uint growthRateHash, byte level); internal static extern byte CalculateExperienceWithHash(ref uint @out, IntPtr library, uint growthRateHash, byte level);
/// <param name="library">GrowthRateLibrary *</param> /// <param name="library">GrowthRateLibrary *</param>
/// <param name="growthRateName">const char *</param> /// <param name="growthRateName">const char *</param>
/// <param name="growthRate">GrowthRate *</param> /// <param name="growthRate">GrowthRate *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_AddGrowthRate")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_AddGrowthRate")]
internal static extern byte AddGrowthRate(IntPtr library, IntPtr growthRateName, IntPtr growthRate); internal static extern byte AddGrowthRate(IntPtr library, IntPtr growthRateName, IntPtr growthRate);
/// <param name="library">GrowthRateLibrary *</param> /// <param name="library">GrowthRateLibrary *</param>
/// <param name="growthRateHash">unsigned int</param> /// <param name="growthRateHash">unsigned int</param>
/// <param name="growthRate">GrowthRate *</param> /// <param name="growthRate">GrowthRate *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_AddGrowthRateWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_GrowthRateLibrary_AddGrowthRateWithHash")]
internal static extern byte AddGrowthRateWithHash(IntPtr library, uint growthRateHash, IntPtr growthRate); internal static extern byte AddGrowthRateWithHash(IntPtr library, uint growthRateHash, IntPtr growthRate);
} }

View File

@ -2,23 +2,23 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class HealEvent internal static class HealEvent
{ {
/// <param name="p">const HealEvent *</param> /// <param name="p">const HealEvent *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetCreature")]
internal static extern IntPtr GetCreature(IntPtr p); internal static extern IntPtr GetCreature(IntPtr p);
/// <param name="p">const HealEvent *</param> /// <param name="p">const HealEvent *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetOriginalHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetOriginalHealth")]
internal static extern uint GetOriginalHealth(IntPtr p); internal static extern uint GetOriginalHealth(IntPtr p);
/// <param name="p">const HealEvent *</param> /// <param name="p">const HealEvent *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetNewHealth")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HealEvent_GetNewHealth")]
internal static extern uint GetNewHealth(IntPtr p); internal static extern uint GetNewHealth(IntPtr p);
} }

View File

@ -2,63 +2,63 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class HitData internal static class HitData
{ {
/// <param name="p">const HitData *</param> /// <param name="p">const HitData *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_IsCritical")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_IsCritical")]
internal static extern byte IsCritical(IntPtr p); internal static extern byte IsCritical(IntPtr p);
/// <param name="p">const HitData *</param> /// <param name="p">const HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetBasePower")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetBasePower")]
internal static extern byte GetBasePower(IntPtr p); internal static extern byte GetBasePower(IntPtr p);
/// <param name="p">const HitData *</param> /// <param name="p">const HitData *</param>
/// <returns>float</returns> /// <returns>float</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetEffectiveness")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetEffectiveness")]
internal static extern float GetEffectiveness(IntPtr p); internal static extern float GetEffectiveness(IntPtr p);
/// <param name="p">const HitData *</param> /// <param name="p">const HitData *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetDamage")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetDamage")]
internal static extern uint GetDamage(IntPtr p); internal static extern uint GetDamage(IntPtr p);
/// <param name="p">const HitData *</param> /// <param name="p">const HitData *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_GetType")]
internal static extern byte GetType(IntPtr p); internal static extern byte GetType(IntPtr p);
/// <param name="p">HitData *</param> /// <param name="p">HitData *</param>
/// <param name="val">bool</param> /// <param name="val">bool</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetCritical")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetCritical")]
internal static extern void SetCritical(IntPtr p, byte val); internal static extern void SetCritical(IntPtr p, byte val);
/// <param name="p">HitData *</param> /// <param name="p">HitData *</param>
/// <param name="val">unsigned char</param> /// <param name="val">unsigned char</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetBasePower")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetBasePower")]
internal static extern void SetBasePower(IntPtr p, byte val); internal static extern void SetBasePower(IntPtr p, byte val);
/// <param name="p">HitData *</param> /// <param name="p">HitData *</param>
/// <param name="val">float</param> /// <param name="val">float</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetEffectiveness")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetEffectiveness")]
internal static extern void SetEffectiveness(IntPtr p, float val); internal static extern void SetEffectiveness(IntPtr p, float val);
/// <param name="p">HitData *</param> /// <param name="p">HitData *</param>
/// <param name="val">unsigned int</param> /// <param name="val">unsigned int</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetDamage")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetDamage")]
internal static extern void SetDamage(IntPtr p, uint val); internal static extern void SetDamage(IntPtr p, uint val);
/// <param name="p">HitData *</param> /// <param name="p">HitData *</param>
/// <param name="val">unsigned char</param> /// <param name="val">unsigned char</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_HitData_SetType")]
internal static extern void SetType(IntPtr p, byte val); internal static extern void SetType(IntPtr p, byte val);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class Item internal static class Item
{ {
@ -13,38 +13,38 @@ namespace Creatureliblibrary.Generated
/// <param name="flags">const char * *</param> /// <param name="flags">const char * *</param>
/// <param name="flagsCount">long unsigned int</param> /// <param name="flagsCount">long unsigned int</param>
/// <returns>Item *</returns> /// <returns>Item *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_Construct")]
internal static extern IntPtr Construct(IntPtr name, ItemCategory category, BattleItemCategory battleCategory, int price, IntPtr flags, ulong flagsCount); internal static extern IntPtr Construct(IntPtr name, ItemCategory category, BattleItemCategory battleCategory, int price, IntPtr flags, ulong flagsCount);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetName")]
internal static extern IntPtr GetName(IntPtr p); internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <returns>ItemCategory</returns> /// <returns>ItemCategory</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetCategory")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetCategory")]
internal static extern ItemCategory GetCategory(IntPtr p); internal static extern ItemCategory GetCategory(IntPtr p);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <returns>BattleItemCategory</returns> /// <returns>BattleItemCategory</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetBattleCategory")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetBattleCategory")]
internal static extern BattleItemCategory GetBattleCategory(IntPtr p); internal static extern BattleItemCategory GetBattleCategory(IntPtr p);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <returns>int</returns> /// <returns>int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetPrice")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_GetPrice")]
internal static extern int GetPrice(IntPtr p); internal static extern int GetPrice(IntPtr p);
/// <param name="p">const Item *</param> /// <param name="p">const Item *</param>
/// <param name="key">const char *</param> /// <param name="key">const char *</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_HasFlag")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Item_HasFlag")]
internal static extern byte HasFlag(IntPtr p, IntPtr key); internal static extern byte HasFlag(IntPtr p, IntPtr key);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum ItemCategory : byte internal enum ItemCategory : byte

View File

@ -2,77 +2,77 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class ItemLibrary internal static class ItemLibrary
{ {
/// <param name="initialCapacity">long unsigned int</param> /// <param name="initialCapacity">long unsigned int</param>
/// <returns>const ItemLibrary *</returns> /// <returns>const ItemLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Construct")]
internal static extern IntPtr Construct(ulong initialCapacity); internal static extern IntPtr Construct(ulong initialCapacity);
/// <param name="p">const ItemLibrary *</param> /// <param name="p">const ItemLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="t">Item *</param> /// <param name="t">Item *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Insert")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Insert")]
internal static extern byte Insert(IntPtr p, IntPtr name, IntPtr t); internal static extern byte Insert(IntPtr p, IntPtr name, IntPtr t);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="t">Item *</param> /// <param name="t">Item *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_InsertWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_InsertWithHash")]
internal static extern byte InsertWithHash(IntPtr p, uint hashedKey, IntPtr t); internal static extern byte InsertWithHash(IntPtr p, uint hashedKey, IntPtr t);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Delete")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Delete")]
internal static extern byte Delete(IntPtr p, IntPtr name); internal static extern byte Delete(IntPtr p, IntPtr name);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_DeleteWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_DeleteWithHash")]
internal static extern byte DeleteWithHash(IntPtr p, uint hashedKey); internal static extern byte DeleteWithHash(IntPtr p, uint hashedKey);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="out">const Item * &</param> /// <param name="out">const Item * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_TryGet")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_TryGet")]
internal static extern byte TryGet(IntPtr p, IntPtr name, ref IntPtr @out); internal static extern byte TryGet(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="out">const Item * &</param> /// <param name="out">const Item * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_TryGetWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_TryGetWithHash")]
internal static extern byte TryGetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out); internal static extern byte TryGetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="out">const Item * &</param> /// <param name="out">const Item * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Get")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_Get")]
internal static extern byte Get(IntPtr p, IntPtr name, ref IntPtr @out); internal static extern byte Get(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="out">const Item * &</param> /// <param name="out">const Item * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_GetWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_GetWithHash")]
internal static extern byte GetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out); internal static extern byte GetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">ItemLibrary *</param> /// <param name="p">ItemLibrary *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_GetCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ItemLibrary_GetCount")]
internal static extern ulong GetCount(IntPtr p); internal static extern ulong GetCount(IntPtr p);
} }

View File

@ -2,38 +2,38 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class LearnableAttacks internal static class LearnableAttacks
{ {
/// <param name="out">LearnableAttacks * &</param> /// <param name="out">LearnableAttacks * &</param>
/// <param name="levelAttackCapacity">long unsigned int</param> /// <param name="levelAttackCapacity">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_Construct")]
internal static extern byte Construct(ref IntPtr @out, ulong levelAttackCapacity); internal static extern byte Construct(ref IntPtr @out, ulong levelAttackCapacity);
/// <param name="p">LearnableAttacks *</param> /// <param name="p">LearnableAttacks *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">LearnableAttacks *</param> /// <param name="p">LearnableAttacks *</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <param name="attack">const AttackData *</param> /// <param name="attack">const AttackData *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_AddLevelAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_AddLevelAttack")]
internal static extern void AddLevelAttack(IntPtr p, byte level, IntPtr attack); internal static extern void AddLevelAttack(IntPtr p, byte level, IntPtr attack);
/// <param name="p">LearnableAttacks *</param> /// <param name="p">LearnableAttacks *</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <returns>const const AttackData * *</returns> /// <returns>const const AttackData * *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_GetAttacksForLevel")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_GetAttacksForLevel")]
internal static extern IntPtr GetAttacksForLevel(IntPtr p, byte level); internal static extern IntPtr GetAttacksForLevel(IntPtr p, byte level);
/// <param name="p">LearnableAttacks *</param> /// <param name="p">LearnableAttacks *</param>
/// <param name="level">unsigned char</param> /// <param name="level">unsigned char</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_GetAttacksForLevelCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnableAttacks_GetAttacksForLevelCount")]
internal static extern ulong GetAttacksForLevelCount(IntPtr p, byte level); internal static extern ulong GetAttacksForLevelCount(IntPtr p, byte level);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class LearnedAttack internal static class LearnedAttack
{ {
@ -11,55 +11,55 @@ namespace Creaturelibbattling.Generated
/// <param name="maxUses">unsigned char</param> /// <param name="maxUses">unsigned char</param>
/// <param name="learnMethod">AttackLearnMethod</param> /// <param name="learnMethod">AttackLearnMethod</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr attack, byte maxUses, AttackLearnMethod learnMethod); internal static extern byte Construct(ref IntPtr @out, IntPtr attack, byte maxUses, AttackLearnMethod learnMethod);
/// <param name="p">LearnedAttack *</param> /// <param name="p">LearnedAttack *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const LearnedAttack *</param> /// <param name="p">const LearnedAttack *</param>
/// <returns>const AttackData *</returns> /// <returns>const AttackData *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p); internal static extern IntPtr GetAttack(IntPtr p);
/// <param name="p">const LearnedAttack *</param> /// <param name="p">const LearnedAttack *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetMaxUses")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetMaxUses")]
internal static extern byte GetMaxUses(IntPtr p); internal static extern byte GetMaxUses(IntPtr p);
/// <param name="p">const LearnedAttack *</param> /// <param name="p">const LearnedAttack *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetRemainingUses")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetRemainingUses")]
internal static extern byte GetRemainingUses(IntPtr p); internal static extern byte GetRemainingUses(IntPtr p);
/// <param name="p">const LearnedAttack *</param> /// <param name="p">const LearnedAttack *</param>
/// <returns>AttackLearnMethod</returns> /// <returns>AttackLearnMethod</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetLearnMethod")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_GetLearnMethod")]
internal static extern AttackLearnMethod GetLearnMethod(IntPtr p); internal static extern AttackLearnMethod GetLearnMethod(IntPtr p);
/// <param name="p">LearnedAttack *</param> /// <param name="p">LearnedAttack *</param>
/// <param name="uses">unsigned char</param> /// <param name="uses">unsigned char</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_TryUse")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_TryUse")]
internal static extern byte TryUse(IntPtr p, byte uses); internal static extern byte TryUse(IntPtr p, byte uses);
/// <param name="p">LearnedAttack *</param> /// <param name="p">LearnedAttack *</param>
/// <param name="uses">unsigned char</param> /// <param name="uses">unsigned char</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_DecreaseUses")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_DecreaseUses")]
internal static extern void DecreaseUses(IntPtr p, byte uses); internal static extern void DecreaseUses(IntPtr p, byte uses);
/// <param name="p">LearnedAttack *</param> /// <param name="p">LearnedAttack *</param>
/// <param name="uses">unsigned char</param> /// <param name="uses">unsigned char</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_RestoreUses")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_RestoreUses")]
internal static extern void RestoreUses(IntPtr p, byte uses); internal static extern void RestoreUses(IntPtr p, byte uses);
/// <param name="p">LearnedAttack *</param> /// <param name="p">LearnedAttack *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_RestoreAllUses")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LearnedAttack_RestoreAllUses")]
internal static extern void RestoreAllUses(IntPtr p); internal static extern void RestoreAllUses(IntPtr p);
} }

View File

@ -2,29 +2,29 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class LibrarySettings internal static class LibrarySettings
{ {
/// <param name="maximalLevel">unsigned char</param> /// <param name="maximalLevel">unsigned char</param>
/// <param name="maximalMoves">unsigned char</param> /// <param name="maximalMoves">unsigned char</param>
/// <returns>const LibrarySettings *</returns> /// <returns>const LibrarySettings *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_Construct")]
internal static extern IntPtr Construct(byte maximalLevel, byte maximalMoves); internal static extern IntPtr Construct(byte maximalLevel, byte maximalMoves);
/// <param name="p">const LibrarySettings *</param> /// <param name="p">const LibrarySettings *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const LibrarySettings *</param> /// <param name="p">const LibrarySettings *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_GetMaximalLevel")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_GetMaximalLevel")]
internal static extern byte GetMaximalLevel(IntPtr p); internal static extern byte GetMaximalLevel(IntPtr p);
/// <param name="p">const LibrarySettings *</param> /// <param name="p">const LibrarySettings *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_GetMaximalMoves")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LibrarySettings_GetMaximalMoves")]
internal static extern byte GetMaximalMoves(IntPtr p); internal static extern byte GetMaximalMoves(IntPtr p);
} }

View File

@ -2,19 +2,19 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class LookupGrowthRate internal static class LookupGrowthRate
{ {
/// <param name="experiencePerLevel">unsigned int *</param> /// <param name="experiencePerLevel">unsigned int *</param>
/// <param name="count">long unsigned int</param> /// <param name="count">long unsigned int</param>
/// <returns>GrowthRate *</returns> /// <returns>GrowthRate *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LookupGrowthRate_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LookupGrowthRate_Construct")]
internal static extern IntPtr Construct(IntPtr experiencePerLevel, ulong count); internal static extern IntPtr Construct(IntPtr experiencePerLevel, ulong count);
/// <param name="p">const LookupGrowthRate *</param> /// <param name="p">const LookupGrowthRate *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LookupGrowthRate_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_LookupGrowthRate_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
} }

View File

@ -2,17 +2,17 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class MiscLibrary internal static class MiscLibrary
{ {
/// <returns>MiscLibrary *</returns> /// <returns>MiscLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Construct")]
internal static extern IntPtr Construct(); internal static extern IntPtr Construct();
/// <param name="p">const MiscLibrary *</param> /// <param name="p">const MiscLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
@ -21,14 +21,14 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="hit">unsigned char</param> /// <param name="hit">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_IsCritical")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_IsCritical")]
internal static extern byte IsCritical(ref byte @out, IntPtr p, IntPtr attack, IntPtr target, byte hit); internal static extern byte IsCritical(ref byte @out, IntPtr p, IntPtr attack, IntPtr target, byte hit);
/// <param name="out">bool &</param> /// <param name="out">bool &</param>
/// <param name="p">MiscLibrary *</param> /// <param name="p">MiscLibrary *</param>
/// <param name="switchChoice">FleeTurnChoice *</param> /// <param name="switchChoice">FleeTurnChoice *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_CanFlee")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_CanFlee")]
internal static extern byte CanFlee(ref byte @out, IntPtr p, IntPtr switchChoice); internal static extern byte CanFlee(ref byte @out, IntPtr p, IntPtr switchChoice);
/// <param name="out">BaseTurnChoice * &</param> /// <param name="out">BaseTurnChoice * &</param>
@ -37,7 +37,7 @@ namespace Creaturelibbattling.Generated
/// <param name="sideTarget">unsigned char</param> /// <param name="sideTarget">unsigned char</param>
/// <param name="creatureTarget">unsigned char</param> /// <param name="creatureTarget">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_ReplacementAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_MiscLibrary_ReplacementAttack")]
internal static extern byte ReplacementAttack(ref IntPtr @out, IntPtr p, IntPtr user, byte sideTarget, byte creatureTarget); internal static extern byte ReplacementAttack(ref IntPtr @out, IntPtr p, IntPtr user, byte sideTarget, byte creatureTarget);
} }

View File

@ -2,18 +2,18 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class PassTurnChoice internal static class PassTurnChoice
{ {
/// <param name="user">Creature *</param> /// <param name="user">Creature *</param>
/// <returns>PassTurnChoice *</returns> /// <returns>PassTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_PassTurnChoice_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_PassTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user); internal static extern IntPtr Construct(IntPtr user);
/// <param name="p">AttackTurnChoice *</param> /// <param name="p">AttackTurnChoice *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_PassTurnChoice_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_PassTurnChoice_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
} }

View File

@ -2,68 +2,68 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class Script internal static class Script
{ {
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_Stack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_Stack")]
internal static extern byte Stack(IntPtr p); internal static extern byte Stack(IntPtr p);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnRemove")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnRemove")]
internal static extern byte OnRemove(IntPtr p); internal static extern byte OnRemove(IntPtr p);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_GetName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_GetName")]
internal static extern IntPtr GetName(IntPtr p); internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="choice">const BaseTurnChoice *</param> /// <param name="choice">const BaseTurnChoice *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeTurn")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeTurn")]
internal static extern byte OnBeforeTurn(IntPtr p, IntPtr choice); internal static extern byte OnBeforeTurn(IntPtr p, IntPtr choice);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="choice">AttackTurnChoice *</param> /// <param name="choice">AttackTurnChoice *</param>
/// <param name="outAttack">StringView *</param> /// <param name="outAttack">StringView *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttack")]
internal static extern byte ChangeAttack(IntPtr p, IntPtr choice, IntPtr outAttack); internal static extern byte ChangeAttack(IntPtr p, IntPtr choice, IntPtr outAttack);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventAttack")]
internal static extern byte PreventAttack(IntPtr p, IntPtr attack, IntPtr outResult); internal static extern byte PreventAttack(IntPtr p, IntPtr attack, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailAttack")]
internal static extern byte FailAttack(IntPtr p, IntPtr attack, IntPtr outResult); internal static extern byte FailAttack(IntPtr p, IntPtr attack, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_StopBeforeAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_StopBeforeAttack")]
internal static extern byte StopBeforeAttack(IntPtr p, IntPtr attack, IntPtr outResult); internal static extern byte StopBeforeAttack(IntPtr p, IntPtr attack, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnBeforeAttack")]
internal static extern byte OnBeforeAttack(IntPtr p, IntPtr attack); internal static extern byte OnBeforeAttack(IntPtr p, IntPtr attack);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -71,7 +71,7 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailIncomingAttack")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_FailIncomingAttack")]
internal static extern byte FailIncomingAttack(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult); internal static extern byte FailIncomingAttack(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -79,14 +79,14 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_IsInvulnerable")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_IsInvulnerable")]
internal static extern byte IsInvulnerable(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult); internal static extern byte IsInvulnerable(IntPtr p, IntPtr attack, IntPtr target, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAttackMiss")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAttackMiss")]
internal static extern byte OnAttackMiss(IntPtr p, IntPtr attack, IntPtr target); internal static extern byte OnAttackMiss(IntPtr p, IntPtr attack, IntPtr target);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -95,7 +95,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="outType">unsigned char *</param> /// <param name="outType">unsigned char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttackType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeAttackType")]
internal static extern byte ChangeAttackType(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outType); internal static extern byte ChangeAttackType(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outType);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -104,7 +104,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="basePower">unsigned char *</param> /// <param name="basePower">unsigned char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideBasePower")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideBasePower")]
internal static extern byte OverrideBasePower(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr basePower); internal static extern byte OverrideBasePower(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr basePower);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -113,7 +113,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="statsUser">Creature * *</param> /// <param name="statsUser">Creature * *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeDamageStatsUser")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ChangeDamageStatsUser")]
internal static extern byte ChangeDamageStatsUser(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr statsUser); internal static extern byte ChangeDamageStatsUser(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr statsUser);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -122,7 +122,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="bypass">bool *</param> /// <param name="bypass">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassDefensiveStat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassDefensiveStat")]
internal static extern byte BypassDefensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass); internal static extern byte BypassDefensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -131,7 +131,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="bypass">bool *</param> /// <param name="bypass">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassOffensiveStat")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_BypassOffensiveStat")]
internal static extern byte BypassOffensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass); internal static extern byte BypassOffensiveStat(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr bypass);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -140,7 +140,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="modifier">float *</param> /// <param name="modifier">float *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyStatModifier")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyStatModifier")]
internal static extern byte ModifyStatModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier); internal static extern byte ModifyStatModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -149,7 +149,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="modifier">float *</param> /// <param name="modifier">float *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyDamageModifier")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyDamageModifier")]
internal static extern byte ModifyDamageModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier); internal static extern byte ModifyDamageModifier(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr modifier);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -158,7 +158,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="damage">unsigned int *</param> /// <param name="damage">unsigned int *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideDamage")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OverrideDamage")]
internal static extern byte OverrideDamage(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr damage); internal static extern byte OverrideDamage(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr damage);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -167,7 +167,7 @@ namespace Creaturelibbattling.Generated
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSecondaryEffects")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSecondaryEffects")]
internal static extern byte PreventSecondaryEffects(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outResult); internal static extern byte PreventSecondaryEffects(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -175,21 +175,21 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="hitNumber">unsigned char</param> /// <param name="hitNumber">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnSecondaryEffect")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnSecondaryEffect")]
internal static extern byte OnSecondaryEffect(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber); internal static extern byte OnSecondaryEffect(IntPtr p, IntPtr attack, IntPtr target, byte hitNumber);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="attack">ExecutingAttack *</param> /// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAfterHits")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_OnAfterHits")]
internal static extern byte OnAfterHits(IntPtr p, IntPtr attack, IntPtr target); internal static extern byte OnAfterHits(IntPtr p, IntPtr attack, IntPtr target);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
/// <param name="choice">const SwitchTurnChoice *</param> /// <param name="choice">const SwitchTurnChoice *</param>
/// <param name="outResult">bool *</param> /// <param name="outResult">bool *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSelfSwitch")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_PreventSelfSwitch")]
internal static extern byte PreventSelfSwitch(IntPtr p, IntPtr choice, IntPtr outResult); internal static extern byte PreventSelfSwitch(IntPtr p, IntPtr choice, IntPtr outResult);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -197,7 +197,7 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="chance">float *</param> /// <param name="chance">float *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyEffectChance")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyEffectChance")]
internal static extern byte ModifyEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance); internal static extern byte ModifyEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance);
/// <param name="p">Script *</param> /// <param name="p">Script *</param>
@ -205,7 +205,7 @@ namespace Creaturelibbattling.Generated
/// <param name="target">Creature *</param> /// <param name="target">Creature *</param>
/// <param name="chance">float *</param> /// <param name="chance">float *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyIncomingEffectChance")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_Script_ModifyIncomingEffectChance")]
internal static extern byte ModifyIncomingEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance); internal static extern byte ModifyIncomingEffectChance(IntPtr p, IntPtr attack, IntPtr target, IntPtr chance);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum ScriptCategory : byte internal enum ScriptCategory : byte

View File

@ -2,23 +2,23 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class ScriptResolver internal static class ScriptResolver
{ {
/// <returns>ScriptResolver *</returns> /// <returns>ScriptResolver *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Construct")]
internal static extern IntPtr Construct(); internal static extern IntPtr Construct();
/// <param name="p">const ScriptResolver *</param> /// <param name="p">const ScriptResolver *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">ScriptResolver *</param> /// <param name="p">ScriptResolver *</param>
/// <param name="library">BattleLibrary *</param> /// <param name="library">BattleLibrary *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Initialize")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_Initialize")]
internal static extern byte Initialize(IntPtr p, IntPtr library); internal static extern byte Initialize(IntPtr p, IntPtr library);
/// <param name="out">Script * &</param> /// <param name="out">Script * &</param>
@ -26,7 +26,7 @@ namespace Creaturelibbattling.Generated
/// <param name="category">ScriptCategory</param> /// <param name="category">ScriptCategory</param>
/// <param name="scriptName">const char *</param> /// <param name="scriptName">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_LoadScript")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ScriptResolver_LoadScript")]
internal static extern byte LoadScript(ref IntPtr @out, IntPtr p, ScriptCategory category, IntPtr scriptName); internal static extern byte LoadScript(ref IntPtr @out, IntPtr p, ScriptCategory category, IntPtr scriptName);
} }

View File

@ -2,77 +2,77 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class SpeciesLibrary internal static class SpeciesLibrary
{ {
/// <param name="initialCapacity">long unsigned int</param> /// <param name="initialCapacity">long unsigned int</param>
/// <returns>const SpeciesLibrary *</returns> /// <returns>const SpeciesLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Construct")]
internal static extern IntPtr Construct(ulong initialCapacity); internal static extern IntPtr Construct(ulong initialCapacity);
/// <param name="p">const SpeciesLibrary *</param> /// <param name="p">const SpeciesLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="t">CreatureSpecies *</param> /// <param name="t">CreatureSpecies *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Insert")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Insert")]
internal static extern byte Insert(IntPtr p, IntPtr name, IntPtr t); internal static extern byte Insert(IntPtr p, IntPtr name, IntPtr t);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="t">CreatureSpecies *</param> /// <param name="t">CreatureSpecies *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_InsertWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_InsertWithHash")]
internal static extern byte InsertWithHash(IntPtr p, uint hashedKey, IntPtr t); internal static extern byte InsertWithHash(IntPtr p, uint hashedKey, IntPtr t);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Delete")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Delete")]
internal static extern byte Delete(IntPtr p, IntPtr name); internal static extern byte Delete(IntPtr p, IntPtr name);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_DeleteWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_DeleteWithHash")]
internal static extern byte DeleteWithHash(IntPtr p, uint hashedKey); internal static extern byte DeleteWithHash(IntPtr p, uint hashedKey);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="out">const CreatureSpecies * &</param> /// <param name="out">const CreatureSpecies * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_TryGet")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_TryGet")]
internal static extern byte TryGet(IntPtr p, IntPtr name, ref IntPtr @out); internal static extern byte TryGet(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="out">const CreatureSpecies * &</param> /// <param name="out">const CreatureSpecies * &</param>
/// <returns>bool</returns> /// <returns>bool</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_TryGetWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_TryGetWithHash")]
internal static extern byte TryGetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out); internal static extern byte TryGetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="name">const char *</param> /// <param name="name">const char *</param>
/// <param name="out">const CreatureSpecies * &</param> /// <param name="out">const CreatureSpecies * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Get")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_Get")]
internal static extern byte Get(IntPtr p, IntPtr name, ref IntPtr @out); internal static extern byte Get(IntPtr p, IntPtr name, ref IntPtr @out);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <param name="hashedKey">unsigned int</param> /// <param name="hashedKey">unsigned int</param>
/// <param name="out">const CreatureSpecies * &</param> /// <param name="out">const CreatureSpecies * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetWithHash")]
internal static extern byte GetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out); internal static extern byte GetWithHash(IntPtr p, uint hashedKey, ref IntPtr @out);
/// <param name="p">SpeciesLibrary *</param> /// <param name="p">SpeciesLibrary *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesLibrary_GetCount")]
internal static extern ulong GetCount(IntPtr p); internal static extern ulong GetCount(IntPtr p);
} }

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class SpeciesVariant internal static class SpeciesVariant
{ {
@ -24,59 +24,59 @@ namespace Creatureliblibrary.Generated
/// <param name="secretTalentsLength">long unsigned int</param> /// <param name="secretTalentsLength">long unsigned int</param>
/// <param name="attacks">const LearnableAttacks *</param> /// <param name="attacks">const LearnableAttacks *</param>
/// <returns>SpeciesVariant *</returns> /// <returns>SpeciesVariant *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_Construct")]
internal static extern IntPtr Construct(IntPtr name, float height, float weight, uint baseExperience, IntPtr types, ulong typeLength, ushort baseHealth, ushort baseAttack, ushort baseDefense, ushort baseMagicalAttack, ushort baseMagicalDefense, ushort baseSpeed, IntPtr talents, ulong talentsLength, IntPtr secretTalents, ulong secretTalentsLength, IntPtr attacks); internal static extern IntPtr Construct(IntPtr name, float height, float weight, uint baseExperience, IntPtr types, ulong typeLength, ushort baseHealth, ushort baseAttack, ushort baseDefense, ushort baseMagicalAttack, ushort baseMagicalDefense, ushort baseSpeed, IntPtr talents, ulong talentsLength, IntPtr secretTalents, ulong secretTalentsLength, IntPtr attacks);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <returns>const char *</returns> /// <returns>const char *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetName")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetName")]
internal static extern IntPtr GetName(IntPtr p); internal static extern IntPtr GetName(IntPtr p);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>float</returns> /// <returns>float</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetHeight")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetHeight")]
internal static extern float GetHeight(IntPtr p); internal static extern float GetHeight(IntPtr p);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>float</returns> /// <returns>float</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetWeight")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetWeight")]
internal static extern float GetWeight(IntPtr p); internal static extern float GetWeight(IntPtr p);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>unsigned int</returns> /// <returns>unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetBaseExperience")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetBaseExperience")]
internal static extern uint GetBaseExperience(IntPtr p); internal static extern uint GetBaseExperience(IntPtr p);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTypeCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTypeCount")]
internal static extern ulong GetTypeCount(IntPtr p); internal static extern ulong GetTypeCount(IntPtr p);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <param name="index">long unsigned int</param> /// <param name="index">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetType")]
internal static extern byte GetType(IntPtr p, ulong index); internal static extern byte GetType(IntPtr p, ulong index);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <param name="stat">Statistic</param> /// <param name="stat">Statistic</param>
/// <returns>unsigned short</returns> /// <returns>unsigned short</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetStatistic")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetStatistic")]
internal static extern ushort GetStatistic(IntPtr p, Statistic stat); internal static extern ushort GetStatistic(IntPtr p, Statistic stat);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTalentCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTalentCount")]
internal static extern ulong GetTalentCount(IntPtr p); internal static extern ulong GetTalentCount(IntPtr p);
/// <param name="p">const SpeciesVariant *</param> /// <param name="p">const SpeciesVariant *</param>
/// <returns>long unsigned int</returns> /// <returns>long unsigned int</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetSecretTalentCount")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetSecretTalentCount")]
internal static extern ulong GetSecretTalentCount(IntPtr p); internal static extern ulong GetSecretTalentCount(IntPtr p);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
@ -84,18 +84,18 @@ namespace Creatureliblibrary.Generated
/// <param name="index">unsigned char</param> /// <param name="index">unsigned char</param>
/// <param name="out">const char * &</param> /// <param name="out">const char * &</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTalent")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetTalent")]
internal static extern byte GetTalent(IntPtr p, byte secret, byte index, ref IntPtr @out); internal static extern byte GetTalent(IntPtr p, byte secret, byte index, ref IntPtr @out);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <returns>const LearnableAttacks *</returns> /// <returns>const LearnableAttacks *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetLearnableAttacks")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetLearnableAttacks")]
internal static extern IntPtr GetLearnableAttacks(IntPtr p); internal static extern IntPtr GetLearnableAttacks(IntPtr p);
/// <param name="p">SpeciesVariant *</param> /// <param name="p">SpeciesVariant *</param>
/// <param name="rand">Random *</param> /// <param name="rand">Random *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetRandomTalent")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SpeciesVariant_GetRandomTalent")]
internal static extern byte GetRandomTalent(IntPtr p, IntPtr rand); internal static extern byte GetRandomTalent(IntPtr p, IntPtr rand);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum Statistic : byte internal enum Statistic : byte

View File

@ -2,24 +2,24 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated namespace Creaturelib.Generated
{ {
internal static class SwitchTurnChoice internal static class SwitchTurnChoice
{ {
/// <param name="user">Creature *</param> /// <param name="user">Creature *</param>
/// <param name="newCreature">Creature *</param> /// <param name="newCreature">Creature *</param>
/// <returns>SwitchTurnChoice *</returns> /// <returns>SwitchTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user, IntPtr newCreature); internal static extern IntPtr Construct(IntPtr user, IntPtr newCreature);
/// <param name="p">AttackTurnChoice *</param> /// <param name="p">AttackTurnChoice *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="p">const SwitchTurnChoice *</param> /// <param name="p">const SwitchTurnChoice *</param>
/// <returns>Creature *</returns> /// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_GetNewCreature")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_SwitchTurnChoice_GetNewCreature")]
internal static extern IntPtr GetNewCreature(IntPtr p); internal static extern IntPtr GetNewCreature(IntPtr p);
} }

View File

@ -1,7 +1,7 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT // AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling namespace Creaturelib
{ {
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum TurnChoiceKind : byte internal enum TurnChoiceKind : byte

View File

@ -2,46 +2,46 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated namespace Creaturelib.Generated
{ {
internal static class TypeLibrary internal static class TypeLibrary
{ {
/// <param name="initialCapacity">long unsigned int</param> /// <param name="initialCapacity">long unsigned int</param>
/// <returns>TypeLibrary *</returns> /// <returns>TypeLibrary *</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_Construct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_Construct")]
internal static extern IntPtr Construct(ulong initialCapacity); internal static extern IntPtr Construct(ulong initialCapacity);
/// <param name="p">const TypeLibrary *</param> /// <param name="p">const TypeLibrary *</param>
/// <returns>void</returns> /// <returns>void</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_Destruct")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_Destruct")]
internal static extern void Destruct(IntPtr p); internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
/// <param name="p">const TypeLibrary *</param> /// <param name="p">const TypeLibrary *</param>
/// <param name="type">const char *</param> /// <param name="type">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetTypeId")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetTypeId")]
internal static extern byte GetTypeId(ref byte @out, IntPtr p, IntPtr type); internal static extern byte GetTypeId(ref byte @out, IntPtr p, IntPtr type);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
/// <param name="p">const TypeLibrary *</param> /// <param name="p">const TypeLibrary *</param>
/// <param name="type">unsigned int</param> /// <param name="type">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetTypeIdWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetTypeIdWithHash")]
internal static extern byte GetTypeIdWithHash(ref byte @out, IntPtr p, uint type); internal static extern byte GetTypeIdWithHash(ref byte @out, IntPtr p, uint type);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
/// <param name="p">TypeLibrary *</param> /// <param name="p">TypeLibrary *</param>
/// <param name="type">const char *</param> /// <param name="type">const char *</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_RegisterType")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_RegisterType")]
internal static extern byte RegisterType(ref byte @out, IntPtr p, IntPtr type); internal static extern byte RegisterType(ref byte @out, IntPtr p, IntPtr type);
/// <param name="out">unsigned char &</param> /// <param name="out">unsigned char &</param>
/// <param name="p">TypeLibrary *</param> /// <param name="p">TypeLibrary *</param>
/// <param name="type">unsigned int</param> /// <param name="type">unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_RegisterTypeWithHash")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_RegisterTypeWithHash")]
internal static extern byte RegisterTypeWithHash(ref byte @out, IntPtr p, uint type); internal static extern byte RegisterTypeWithHash(ref byte @out, IntPtr p, uint type);
/// <param name="p">TypeLibrary *</param> /// <param name="p">TypeLibrary *</param>
@ -49,7 +49,7 @@ namespace Creatureliblibrary.Generated
/// <param name="defensive">unsigned char</param> /// <param name="defensive">unsigned char</param>
/// <param name="effectiveness">float</param> /// <param name="effectiveness">float</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_SetEffectiveness")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_SetEffectiveness")]
internal static extern byte SetEffectiveness(IntPtr p, byte attacking, byte defensive, float effectiveness); internal static extern byte SetEffectiveness(IntPtr p, byte attacking, byte defensive, float effectiveness);
/// <param name="out">float &</param> /// <param name="out">float &</param>
@ -57,7 +57,7 @@ namespace Creatureliblibrary.Generated
/// <param name="attacking">unsigned char</param> /// <param name="attacking">unsigned char</param>
/// <param name="defensive">unsigned char</param> /// <param name="defensive">unsigned char</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetSingleEffectiveness")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetSingleEffectiveness")]
internal static extern byte GetSingleEffectiveness(ref float @out, IntPtr p, byte attacking, byte defensive); internal static extern byte GetSingleEffectiveness(ref float @out, IntPtr p, byte attacking, byte defensive);
/// <param name="out">float &</param> /// <param name="out">float &</param>
@ -66,7 +66,7 @@ namespace Creatureliblibrary.Generated
/// <param name="defensive">unsigned char *</param> /// <param name="defensive">unsigned char *</param>
/// <param name="defensiveCount">long unsigned int</param> /// <param name="defensiveCount">long unsigned int</param>
/// <returns>unsigned char</returns> /// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetEffectiveness")] [DllImport("CreatureLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_TypeLibrary_GetEffectiveness")]
internal static extern byte GetEffectiveness(ref float @out, IntPtr p, byte attacking, IntPtr defensive, ulong defensiveCount); internal static extern byte GetEffectiveness(ref float @out, IntPtr p, byte attacking, IntPtr defensive, ulong defensiveCount);
} }

View File

@ -1,13 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum AttackCategory : byte
{
Physical = 0,
Magical = 1,
Status = 2,
}
}

View File

@ -1,22 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum AttackTarget : byte
{
Adjacent = 0,
AdjacentAlly = 1,
RandomOpponent = 10,
Self = 11,
AdjacentAllySelf = 2,
AdjacentOpponent = 3,
All = 4,
AllAdjacent = 5,
AllAdjacentOpponent = 6,
AllAlly = 7,
AllOpponent = 8,
Any = 9,
}
}

View File

@ -1,15 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum BattleItemCategory : byte
{
None = 0,
Healing = 1,
StatusHealing = 2,
CaptureDevice = 3,
MiscBattleItem = 4,
}
}

View File

@ -1,14 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class C
{
/// <returns>const char *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_C_GetLastException")]
internal static extern IntPtr GetLastException();
}
}

View File

@ -1,15 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum EffectParameterType : byte
{
None = 0,
Bool = 1,
Int = 2,
Float = 3,
String = 4,
}
}

View File

@ -1,13 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum Gender : byte
{
Male = 0,
Female = 1,
Genderless = 2,
}
}

View File

@ -1,18 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum ItemCategory : byte
{
MiscItem = 0,
CaptureDevice = 1,
Medicine = 2,
Berry = 3,
MoveLearner = 4,
VariantChanger = 5,
KeyItem = 6,
Mail = 7,
}
}

View File

@ -1,16 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum Statistic : byte
{
Health = 0,
PhysicalAttack = 1,
PhysicalDefense = 2,
MagicalAttack = 3,
MagicalDefense = 4,
Speed = 5,
}
}

View File

@ -1,16 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum memory_order : int
{
memory_order_relaxed = 0,
memory_order_consume = 1,
memory_order_acquire = 2,
memory_order_release = 3,
memory_order_acq_rel = 4,
memory_order_seq_cst = 5,
}
}

View File

@ -1,16 +0,0 @@
// AUTOMATICALLY GENERATED, DO NOT EDIT
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal enum memory_order : int
{
memory_order_relaxed = 0,
memory_order_consume = 1,
memory_order_acquire = 2,
memory_order_release = 3,
memory_order_acq_rel = 4,
memory_order_seq_cst = 5,
}
}

View File

@ -15,57 +15,57 @@ namespace PkmnLibSharp.Library
public class EffectParameter : PointerWrapper public class EffectParameter : PointerWrapper
{ {
public EffectParameter(string s) : base(Creatureliblibrary.Generated.EffectParameter.FromString(s.ToPtr())) public EffectParameter(string s) : base(Creaturelib.Generated.EffectParameter.FromString(s.ToPtr()))
{ {
} }
public EffectParameter(bool b) : base(Creatureliblibrary.Generated.EffectParameter.FromBool(b.ToNative())) public EffectParameter(bool b) : base(Creaturelib.Generated.EffectParameter.FromBool(b.ToNative()))
{ {
} }
public EffectParameter(long l) : base(Creatureliblibrary.Generated.EffectParameter.FromInt(l)) public EffectParameter(long l) : base(Creaturelib.Generated.EffectParameter.FromInt(l))
{ {
} }
public EffectParameter(float f) : base(Creatureliblibrary.Generated.EffectParameter.FromFloat(f)) public EffectParameter(float f) : base(Creaturelib.Generated.EffectParameter.FromFloat(f))
{ {
} }
public EffectParameterType ParameterType => public EffectParameterType ParameterType =>
(EffectParameterType) Creatureliblibrary.Generated.EffectParameter.GetType(Ptr); (EffectParameterType) Creaturelib.Generated.EffectParameter.GetType(Ptr);
public bool AsBool() public bool AsBool()
{ {
byte b = 0; byte b = 0;
Creatureliblibrary.Generated.EffectParameter.AsBool(Ptr, ref b).Assert(); Creaturelib.Generated.EffectParameter.AsBool(Ptr, ref b).Assert();
return b == 1; return b == 1;
} }
public long AsInt() public long AsInt()
{ {
long i = 0; long i = 0;
Creatureliblibrary.Generated.EffectParameter.AsInt(Ptr, ref i).Assert(); Creaturelib.Generated.EffectParameter.AsInt(Ptr, ref i).Assert();
return i; return i;
} }
public float AsFloat() public float AsFloat()
{ {
float f = 0; float f = 0;
Creatureliblibrary.Generated.EffectParameter.AsFloat(Ptr, ref f).Assert(); Creaturelib.Generated.EffectParameter.AsFloat(Ptr, ref f).Assert();
return f; return f;
} }
public string AsString() public string AsString()
{ {
var p = IntPtr.Zero; var p = IntPtr.Zero;
Creatureliblibrary.Generated.EffectParameter.AsString(Ptr, ref p).Assert(); Creaturelib.Generated.EffectParameter.AsString(Ptr, ref p).Assert();
return p.PtrString(); return p.PtrString();
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.EffectParameter.Destruct(Ptr); Creaturelib.Generated.EffectParameter.Destruct(Ptr);
} }
} }
} }

View File

@ -1,8 +1,8 @@
using System; using System;
using System.Collections.Immutable; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;
using Random = PkmnLibSharp.Utilities.Random; using Random = PkmnLibSharp.Utilities.Random;
@ -10,11 +10,11 @@ namespace PkmnLibSharp.Library
{ {
public class Forme : PointerWrapper public class Forme : PointerWrapper
{ {
private ImmutableArray<string> _abilities; private ReadOnlyArray<string> _abilities;
private ImmutableArray<string> _hiddenAbilities; private ReadOnlyArray<string> _hiddenAbilities;
private LearnableMoves _moves; private LearnableMoves _moves;
private string _name; private string _name;
private ImmutableArray<byte> _types; private ReadOnlyArray<byte> _types;
internal Forme(IntPtr parent) : base(parent) internal Forme(IntPtr parent) : base(parent)
{ {
@ -25,7 +25,7 @@ namespace PkmnLibSharp.Library
public float Weight => SpeciesVariant.GetWeight(Ptr); public float Weight => SpeciesVariant.GetWeight(Ptr);
public float BaseExperience => SpeciesVariant.GetBaseExperience(Ptr); public float BaseExperience => SpeciesVariant.GetBaseExperience(Ptr);
public ImmutableArray<byte> Types public ReadOnlyArray<byte> Types
{ {
get get
{ {
@ -36,24 +36,24 @@ namespace PkmnLibSharp.Library
var types = new byte[typesCount]; var types = new byte[typesCount];
for (ulong i = 0; i < typesCount; i++) types[i] = SpeciesVariant.GetType(Ptr, i); for (ulong i = 0; i < typesCount; i++) types[i] = SpeciesVariant.GetType(Ptr, i);
_types = types.ToImmutableArray(); _types = types.ToReadOnly();
return _types; return _types;
} }
} }
public uint BaseHealth => SpeciesVariant.GetStatistic(Ptr, (byte) Statistic.Health); public uint BaseHealth => SpeciesVariant.GetStatistic(Ptr, (byte) Statistic.Health);
public uint BaseAttack => SpeciesVariant.GetStatistic(Ptr, (Creatureliblibrary.Statistic) Statistic.Attack); public uint BaseAttack => SpeciesVariant.GetStatistic(Ptr, (Creaturelib.Statistic) Statistic.Attack);
public uint BaseDefense => SpeciesVariant.GetStatistic(Ptr, (Creatureliblibrary.Statistic) Statistic.Defense); public uint BaseDefense => SpeciesVariant.GetStatistic(Ptr, (Creaturelib.Statistic) Statistic.Defense);
public uint BaseSpecialAttack => public uint BaseSpecialAttack =>
SpeciesVariant.GetStatistic(Ptr, (Creatureliblibrary.Statistic) Statistic.SpecialAttack); SpeciesVariant.GetStatistic(Ptr, (Creaturelib.Statistic) Statistic.SpecialAttack);
public uint BaseSpecialDefense => public uint BaseSpecialDefense =>
SpeciesVariant.GetStatistic(Ptr, (Creatureliblibrary.Statistic) Statistic.SpecialDefense); SpeciesVariant.GetStatistic(Ptr, (Creaturelib.Statistic) Statistic.SpecialDefense);
public uint BaseSpeed => SpeciesVariant.GetStatistic(Ptr, (Creatureliblibrary.Statistic) Statistic.Speed); public uint BaseSpeed => SpeciesVariant.GetStatistic(Ptr, (Creaturelib.Statistic) Statistic.Speed);
public ImmutableArray<string> Abilities public ReadOnlyArray<string> Abilities
{ {
get get
{ {
@ -69,12 +69,12 @@ namespace PkmnLibSharp.Library
abilities[i] = s.PtrString(); abilities[i] = s.PtrString();
} }
_abilities = abilities.ToImmutableArray(); _abilities = abilities.ToReadOnly();
return _abilities; return _abilities;
} }
} }
public ImmutableArray<string> HiddenAbilities public ReadOnlyArray<string> HiddenAbilities
{ {
get get
{ {
@ -90,7 +90,7 @@ namespace PkmnLibSharp.Library
abilities[i] = s.PtrString(); abilities[i] = s.PtrString();
} }
_hiddenAbilities = abilities.ToImmutableArray(); _hiddenAbilities = abilities.ToReadOnly();
return _hiddenAbilities; return _hiddenAbilities;
} }
} }
@ -123,7 +123,7 @@ namespace PkmnLibSharp.Library
var hab = hiddenAbilitiesConverted.ArrayPtr(); var hab = hiddenAbilitiesConverted.ArrayPtr();
var ptr = SpeciesVariant.Construct(name.ToPtr(), height, weight, baseExperience, types.ArrayPtr(), var ptr = SpeciesVariant.Construct(name.ToPtr(), height, weight, baseExperience, types.ArrayPtr(),
(ulong) types.Length, baseHealth, baseAttack, baseDefense, baseSpecialAttack, (ulong) types.Length, baseHealth, baseAttack, baseDefense, baseSpecialAttack,
baseSpecialDefense, baseSpeed, (IntPtr) ab, (ulong) abilities.Length, hab, baseSpecialDefense, baseSpeed, ab, (ulong) abilities.Length, hab,
(ulong) hiddenAbilities.Length, moves.Ptr); (ulong) hiddenAbilities.Length, moves.Ptr);
var f = new Forme(ptr); var f = new Forme(ptr);
foreach (var intPtr in abilitiesConverted) foreach (var intPtr in abilitiesConverted)

View File

@ -17,7 +17,7 @@ namespace PkmnLibSharp.Library.GrowthRates
CalculateExperienceDelegate experienceFunc) CalculateExperienceDelegate experienceFunc)
{ {
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creatureliblibrary.Generated.ExternGrowthRate.Construct(ref ptr, Creaturelib.Generated.ExternGrowthRate.Construct(ref ptr,
Marshal.GetFunctionPointerForDelegate(levelFunc), Marshal.GetFunctionPointerForDelegate(levelFunc),
Marshal.GetFunctionPointerForDelegate(experienceFunc) Marshal.GetFunctionPointerForDelegate(experienceFunc)
); );
@ -26,7 +26,7 @@ namespace PkmnLibSharp.Library.GrowthRates
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.ExternGrowthRate.Destruct(Ptr); Creaturelib.Generated.ExternGrowthRate.Destruct(Ptr);
} }
} }
} }

View File

@ -12,14 +12,14 @@ namespace PkmnLibSharp.Library.GrowthRates
public byte CalculateLevel(uint experience) public byte CalculateLevel(uint experience)
{ {
byte b = 0; byte b = 0;
Creatureliblibrary.Generated.GrowthRate.CalculateLevel(ref b, Ptr, experience).Assert(); Creaturelib.Generated.GrowthRate.CalculateLevel(ref b, Ptr, experience).Assert();
return b; return b;
} }
public uint CalculateExperience(byte level) public uint CalculateExperience(byte level)
{ {
uint i = 0; uint i = 0;
Creatureliblibrary.Generated.GrowthRate.CalculateExperience(ref i, Ptr, level).Assert(); Creaturelib.Generated.GrowthRate.CalculateExperience(ref i, Ptr, level).Assert();
return i; return i;
} }
} }

View File

@ -10,33 +10,33 @@ namespace PkmnLibSharp.Library.GrowthRates
} }
public GrowthRateLibrary(ulong initialCapacity) : base( public GrowthRateLibrary(ulong initialCapacity) : base(
Creatureliblibrary.Generated.GrowthRateLibrary.Construct(initialCapacity)) Creaturelib.Generated.GrowthRateLibrary.Construct(initialCapacity))
{ {
} }
public byte CalculateLevel(string growthRateName, uint experience) public byte CalculateLevel(string growthRateName, uint experience)
{ {
byte b = 0; byte b = 0;
Creatureliblibrary.Generated.GrowthRateLibrary.CalculateLevel(ref b, Ptr, growthRateName.ToPtr(), Creaturelib.Generated.GrowthRateLibrary.CalculateLevel(ref b, Ptr, growthRateName.ToPtr(),
experience).Assert(); experience).Assert();
return b; return b;
} }
public uint CalculateExperience(string growthRateName, byte level) public uint CalculateExperience(string growthRateName, byte level)
{ {
uint i = 0; uint i = 0;
Creatureliblibrary.Generated.GrowthRateLibrary.CalculateExperience(ref i, Ptr, growthRateName.ToPtr(), Creaturelib.Generated.GrowthRateLibrary.CalculateExperience(ref i, Ptr, growthRateName.ToPtr(),
level).Assert(); level).Assert();
return i; return i;
} }
public void AddGrowthRate(string name, GrowthRate gr) public void AddGrowthRate(string name, GrowthRate gr)
{ {
Creatureliblibrary.Generated.GrowthRateLibrary.AddGrowthRate(Ptr, name.ToPtr(), gr.Ptr).Assert(); Creaturelib.Generated.GrowthRateLibrary.AddGrowthRate(Ptr, name.ToPtr(), gr.Ptr).Assert();
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.GrowthRateLibrary.Destruct(Ptr); Creaturelib.Generated.GrowthRateLibrary.Destruct(Ptr);
} }
} }
} }

View File

@ -6,14 +6,14 @@ namespace PkmnLibSharp.Library.GrowthRates
public class LookupGrowthRate : GrowthRate public class LookupGrowthRate : GrowthRate
{ {
public LookupGrowthRate(uint[] experiencePerLevel) : base( public LookupGrowthRate(uint[] experiencePerLevel) : base(
Creatureliblibrary.Generated.LookupGrowthRate.Construct(experiencePerLevel.ArrayPtr(), Creaturelib.Generated.LookupGrowthRate.Construct(experiencePerLevel.ArrayPtr(),
(ulong) experiencePerLevel.Length)) (ulong) experiencePerLevel.Length))
{ {
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.LookupGrowthRate.Destruct(Ptr); Creaturelib.Generated.LookupGrowthRate.Destruct(Ptr);
} }
} }
} }

View File

@ -12,18 +12,18 @@ namespace PkmnLibSharp.Library.Items
{ {
} }
public string Name => _name ??= Creatureliblibrary.Generated.Item.GetName(Ptr).PtrString(); public string Name => _name ??= Creaturelib.Generated.Item.GetName(Ptr).PtrString();
public ItemCategory Category => (ItemCategory) Creatureliblibrary.Generated.Item.GetCategory(Ptr); public ItemCategory Category => (ItemCategory) Creaturelib.Generated.Item.GetCategory(Ptr);
public BattleItemCategory BattleCategory => public BattleItemCategory BattleCategory =>
(BattleItemCategory) Creatureliblibrary.Generated.Item.GetBattleCategory(Ptr); (BattleItemCategory) Creaturelib.Generated.Item.GetBattleCategory(Ptr);
public int Price => Creatureliblibrary.Generated.Item.GetPrice(Ptr); public int Price => Creaturelib.Generated.Item.GetPrice(Ptr);
public byte FlingPower => Pkmnlib.Generated.Item.GetFlingPower(Ptr); public byte FlingPower => Pkmnlib.Generated.Item.GetFlingPower(Ptr);
public bool HasFlag(string s) public bool HasFlag(string s)
{ {
return Creatureliblibrary.Generated.Item.HasFlag(Ptr, s.ToPtr()) == MarshalHelper.True; return Creaturelib.Generated.Item.HasFlag(Ptr, s.ToPtr()) == MarshalHelper.True;
} }
public static Item Create(string name, ItemCategory category, BattleItemCategory battleCategory, public static Item Create(string name, ItemCategory category, BattleItemCategory battleCategory,

View File

@ -14,21 +14,21 @@ namespace PkmnLibSharp.Library.Items
} }
public ItemLibrary(ulong initialCapacity) : base( public ItemLibrary(ulong initialCapacity) : base(
Creatureliblibrary.Generated.ItemLibrary.Construct(initialCapacity)) Creaturelib.Generated.ItemLibrary.Construct(initialCapacity))
{ {
} }
public ulong Count => Creatureliblibrary.Generated.ItemLibrary.GetCount(Ptr); public ulong Count => Creaturelib.Generated.ItemLibrary.GetCount(Ptr);
public void Insert(string key, Item item) public void Insert(string key, Item item)
{ {
Creatureliblibrary.Generated.ItemLibrary.Insert(Ptr, key.ToPtr(), item.Ptr).Assert(); Creaturelib.Generated.ItemLibrary.Insert(Ptr, key.ToPtr(), item.Ptr).Assert();
_cache.Add(key, item); _cache.Add(key, item);
} }
public void Delete(string key) public void Delete(string key)
{ {
Creatureliblibrary.Generated.ItemLibrary.Delete(Ptr, key.ToPtr()).Assert(); Creaturelib.Generated.ItemLibrary.Delete(Ptr, key.ToPtr()).Assert();
_cache.Remove(key); _cache.Remove(key);
} }
@ -37,7 +37,7 @@ namespace PkmnLibSharp.Library.Items
if (_cache.TryGetValue(key, out item)) if (_cache.TryGetValue(key, out item))
return true; return true;
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
if (Creatureliblibrary.Generated.ItemLibrary.TryGet(Ptr, key.ToPtr(), ref ptr) != MarshalHelper.True) if (Creaturelib.Generated.ItemLibrary.TryGet(Ptr, key.ToPtr(), ref ptr) != MarshalHelper.True)
return false; return false;
if (TryResolvePointer(ptr, out item)) if (TryResolvePointer(ptr, out item))
{ {
@ -55,7 +55,7 @@ namespace PkmnLibSharp.Library.Items
if (_cache.TryGetValue(key, out var item)) if (_cache.TryGetValue(key, out var item))
return item; return item;
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creatureliblibrary.Generated.ItemLibrary.Get(Ptr, key.ToPtr(), ref ptr).Assert(); Creaturelib.Generated.ItemLibrary.Get(Ptr, key.ToPtr(), ref ptr).Assert();
if (TryResolvePointer(ptr, out item)) if (TryResolvePointer(ptr, out item))
{ {
_cache.Add(key, item); _cache.Add(key, item);
@ -75,7 +75,7 @@ namespace PkmnLibSharp.Library.Items
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.ItemLibrary.Destruct(Ptr); Creaturelib.Generated.ItemLibrary.Destruct(Ptr);
} }
} }
} }

View File

@ -1,5 +1,5 @@
using System; using System;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Library.Moves; using PkmnLibSharp.Library.Moves;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;

View File

@ -5,8 +5,8 @@ namespace PkmnLibSharp.Library
{ {
public class LibrarySettings : PointerWrapper public class LibrarySettings : PointerWrapper
{ {
public byte MaximalLevel => Creatureliblibrary.Generated.LibrarySettings.GetMaximalLevel(Ptr); public byte MaximalLevel => Creaturelib.Generated.LibrarySettings.GetMaximalLevel(Ptr);
public byte MaximalMoves => Creatureliblibrary.Generated.LibrarySettings.GetMaximalMoves(Ptr); public byte MaximalMoves => Creaturelib.Generated.LibrarySettings.GetMaximalMoves(Ptr);
public ushort ShinyRate => Pkmnlib.Generated.LibrarySettings.GetShinyRate(Ptr); public ushort ShinyRate => Pkmnlib.Generated.LibrarySettings.GetShinyRate(Ptr);
internal LibrarySettings() internal LibrarySettings()

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
using Creatureliblibrary; using Creaturelib;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;
namespace PkmnLibSharp.Library.Moves namespace PkmnLibSharp.Library.Moves

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;
namespace PkmnLibSharp.Library.Moves namespace PkmnLibSharp.Library.Moves

View File

@ -1,5 +1,5 @@
using System; using System;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using PkmnLibSharp.Library.Moves; using PkmnLibSharp.Library.Moves;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;
using GrowthRateLibrary = PkmnLibSharp.Library.GrowthRates.GrowthRateLibrary; using GrowthRateLibrary = PkmnLibSharp.Library.GrowthRates.GrowthRateLibrary;

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Creatureliblibrary.Generated; using Creaturelib.Generated;
using Pkmnlib; using Pkmnlib;
using Pkmnlib.Generated; using Pkmnlib.Generated;
using PkmnLibSharp.Utilities; using PkmnLibSharp.Utilities;

View File

@ -7,17 +7,17 @@ namespace PkmnLibSharp.Library
public class SpeciesLibrary : PointerWrapper public class SpeciesLibrary : PointerWrapper
{ {
private readonly Dictionary<string, Species> _cache = new Dictionary<string, Species>(StringComparer.InvariantCultureIgnoreCase); private readonly Dictionary<string, Species> _cache = new Dictionary<string, Species>(StringComparer.InvariantCultureIgnoreCase);
public ulong Count => Creatureliblibrary.Generated.SpeciesLibrary.GetCount(Ptr); public ulong Count => Creaturelib.Generated.SpeciesLibrary.GetCount(Ptr);
public void Insert(string key, Species species) public void Insert(string key, Species species)
{ {
Creatureliblibrary.Generated.SpeciesLibrary.Insert(Ptr, key.ToPtr(), species.Ptr).Assert(); Creaturelib.Generated.SpeciesLibrary.Insert(Ptr, key.ToPtr(), species.Ptr).Assert();
_cache.Add(key, species); _cache.Add(key, species);
} }
public void Delete(string key) public void Delete(string key)
{ {
Creatureliblibrary.Generated.SpeciesLibrary.Delete(Ptr, key.ToPtr()).Assert(); Creaturelib.Generated.SpeciesLibrary.Delete(Ptr, key.ToPtr()).Assert();
_cache.Remove(key); _cache.Remove(key);
} }
@ -26,7 +26,7 @@ namespace PkmnLibSharp.Library
if (_cache.TryGetValue(key, out species)) if (_cache.TryGetValue(key, out species))
return true; return true;
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
if (Creatureliblibrary.Generated.SpeciesLibrary.TryGet(Ptr, key.ToPtr(), ref ptr) != MarshalHelper.True) if (Creaturelib.Generated.SpeciesLibrary.TryGet(Ptr, key.ToPtr(), ref ptr) != MarshalHelper.True)
return false; return false;
if (TryResolvePointer(ptr, out species)) if (TryResolvePointer(ptr, out species))
{ {
@ -43,7 +43,7 @@ namespace PkmnLibSharp.Library
if (_cache.TryGetValue(key, out var species)) if (_cache.TryGetValue(key, out var species))
return species; return species;
var ptr = IntPtr.Zero; var ptr = IntPtr.Zero;
Creatureliblibrary.Generated.SpeciesLibrary.Get(Ptr, key.ToPtr(), ref ptr).Assert(); Creaturelib.Generated.SpeciesLibrary.Get(Ptr, key.ToPtr(), ref ptr).Assert();
if (TryResolvePointer(ptr, out species)) if (TryResolvePointer(ptr, out species))
{ {
_cache.Add(key, species); _cache.Add(key, species);
@ -59,13 +59,13 @@ namespace PkmnLibSharp.Library
} }
public SpeciesLibrary(ulong initialCapacity) : base( public SpeciesLibrary(ulong initialCapacity) : base(
Creatureliblibrary.Generated.SpeciesLibrary.Construct(initialCapacity)) Creaturelib.Generated.SpeciesLibrary.Construct(initialCapacity))
{ {
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.SpeciesLibrary.Destruct(Ptr); Creaturelib.Generated.SpeciesLibrary.Destruct(Ptr);
} }
protected internal override void MarkAsDeleted() protected internal override void MarkAsDeleted()

View File

@ -14,7 +14,7 @@ namespace PkmnLibSharp.Library
} }
public TypeLibrary(ulong initialCapacity) : base( public TypeLibrary(ulong initialCapacity) : base(
Creatureliblibrary.Generated.TypeLibrary.Construct(initialCapacity)) Creaturelib.Generated.TypeLibrary.Construct(initialCapacity))
{ {
} }
@ -22,7 +22,7 @@ namespace PkmnLibSharp.Library
{ {
if (_cache.TryGetValue(typeName, out var b)) if (_cache.TryGetValue(typeName, out var b))
return b; return b;
Creatureliblibrary.Generated.TypeLibrary.GetTypeId(ref b, Ptr, typeName.ToPtr()).Assert(); Creaturelib.Generated.TypeLibrary.GetTypeId(ref b, Ptr, typeName.ToPtr()).Assert();
_cache.Add(typeName, b); _cache.Add(typeName, b);
return b; return b;
} }
@ -30,20 +30,20 @@ namespace PkmnLibSharp.Library
public byte RegisterType(string typeName) public byte RegisterType(string typeName)
{ {
byte b = 0; byte b = 0;
Creatureliblibrary.Generated.TypeLibrary.RegisterType(ref b, Ptr, typeName.ToPtr()).Assert(); Creaturelib.Generated.TypeLibrary.RegisterType(ref b, Ptr, typeName.ToPtr()).Assert();
_cache.Add(typeName, b); _cache.Add(typeName, b);
return b; return b;
} }
public void SetEffectiveness(byte attackingId, byte defensiveId, float effectiveness) public void SetEffectiveness(byte attackingId, byte defensiveId, float effectiveness)
{ {
Creatureliblibrary.Generated.TypeLibrary.SetEffectiveness(Ptr, attackingId, defensiveId, effectiveness); Creaturelib.Generated.TypeLibrary.SetEffectiveness(Ptr, attackingId, defensiveId, effectiveness);
} }
public float GetSingleEffectiveness(byte attackingId, byte defensiveId) public float GetSingleEffectiveness(byte attackingId, byte defensiveId)
{ {
float f = 0; float f = 0;
Creatureliblibrary.Generated.TypeLibrary.GetSingleEffectiveness(ref f, Ptr, attackingId, defensiveId) Creaturelib.Generated.TypeLibrary.GetSingleEffectiveness(ref f, Ptr, attackingId, defensiveId)
.Assert(); .Assert();
return f; return f;
} }
@ -51,14 +51,14 @@ namespace PkmnLibSharp.Library
public float GetEffectiveness(byte attackingId, byte[] defensiveIds) public float GetEffectiveness(byte attackingId, byte[] defensiveIds)
{ {
float f = 0; float f = 0;
Creatureliblibrary.Generated.TypeLibrary.GetEffectiveness(ref f, Ptr, attackingId, defensiveIds.ArrayPtr(), Creaturelib.Generated.TypeLibrary.GetEffectiveness(ref f, Ptr, attackingId, defensiveIds.ArrayPtr(),
(ulong) defensiveIds.Length).Assert(); (ulong) defensiveIds.Length).Assert();
return f; return f;
} }
protected override void DeletePtr() protected override void DeletePtr()
{ {
Creatureliblibrary.Generated.TypeLibrary.Destruct(Ptr); Creaturelib.Generated.TypeLibrary.Destruct(Ptr);
} }
} }
} }

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More