Initial commit, implements Forme

This commit is contained in:
Deukhoofd 2020-05-02 19:54:07 +02:00
commit 35388de524
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
132 changed files with 6586 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
*.dll filter=lfs diff=lfs merge=lfs -text
*.so filter=lfs diff=lfs merge=lfs -text

334
.gitignore vendored Normal file
View File

@ -0,0 +1,334 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/

22
PkmnLibSharp.sln Normal file
View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PkmnLibSharp", "PkmnLibSharp\PkmnLibSharp.csproj", "{4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PkmnLibSharpTests", "PkmnLibSharpTests\PkmnLibSharpTests.csproj", "{0D15FD33-1AEA-44F4-8211-AA8AF97EA534}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CB6DA3C-017B-4AE0-B889-3DFE6B969CD0}.Release|Any CPU.Build.0 = Release|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}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D15FD33-1AEA-44F4-8211-AA8AF97EA534}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum AttackCategory : byte
{
Physical = 0,
Magical = 1,
Status = 2,
}
}

View File

@ -0,0 +1,11 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum AttackLearnMethod : int
{
Unknown = 0,
Level = 1,
}
}

View File

@ -0,0 +1,21 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public 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

@ -0,0 +1,32 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class AttackTurnChoice
{
/// <param name="user">Creature *</param>
/// <param name="attack">LearnedAttack *</param>
/// <param name="sideIndex">unsigned char</param>
/// <param name="targetIndex">unsigned char</param>
/// <returns>AttackTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user, IntPtr attack, byte sideIndex, byte targetIndex);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>LearnedAttack *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>TurnChoiceKind</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetKind")]
internal static extern TurnChoiceKind GetKind(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>Script *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_AttackTurnChoice_GetAttackScript")]
internal static extern IntPtr GetAttackScript(IntPtr p);
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class BaseTurnChoice
{
/// <param name="p">const BaseTurnChoice *</param>
/// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const BaseTurnChoice *</param>
/// <returns>TurnChoiceKind</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetKind")]
internal static extern TurnChoiceKind GetKind(IntPtr p);
/// <param name="p">const BaseTurnChoice *</param>
/// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetUser")]
internal static extern IntPtr GetUser(IntPtr p);
/// <param name="out">signed char&</param>
/// <param name="p">AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetPriority")]
internal static extern byte GetPriority(ref sbyte @out, IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetTargetSideIndex")]
internal static extern byte GetTargetSideIndex(IntPtr p);
/// <param name="p">const AttackTurnChoice *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BaseTurnChoice_GetTargetCreatureIndex")]
internal static extern byte GetTargetCreatureIndex(IntPtr p);
}
}

View File

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

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum BattleItemCategory : byte
{
None = 0,
Healing = 1,
StatusHealing = 2,
CaptureDevice = 3,
MiscBattleItem = 4,
}
}

View File

@ -0,0 +1,50 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class BattleLibrary
{
/// <param name="out">const BattleLibrary *&</param>
/// <param name="staticLib">const DataLibrary *</param>
/// <param name="statCalculator">BattleStatCalculator *</param>
/// <param name="damageLibrary">DamageLibrary *</param>
/// <param name="experienceLibrary">ExperienceLibrary *</param>
/// <param name="scriptResolver">ScriptResolver *</param>
/// <param name="miscLibrary">MiscLibrary *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr staticLib, IntPtr statCalculator, IntPtr damageLibrary, IntPtr experienceLibrary, IntPtr scriptResolver, IntPtr miscLibrary);
/// <param name="p">const BattleLibrary *</param>
/// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const DataLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStaticLib")]
internal static extern IntPtr GetStaticLib(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const BattleStatCalculator *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetStatCalculator")]
internal static extern IntPtr GetStatCalculator(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const DamageLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetDamageLibrary")]
internal static extern IntPtr GetDamageLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const MiscLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetMiscLibrary")]
internal static extern IntPtr GetMiscLibrary(IntPtr p);
/// <param name="p">const BattleLibrary *</param>
/// <returns>const ExperienceLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_BattleLibrary_GetExperienceLibrary")]
internal static extern IntPtr GetExperienceLibrary(IntPtr p);
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,13 @@
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 string GetLastException();
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,58 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class DamageLibrary
{
/// <returns>const DamageLibrary *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">const DamageLibrary *</param>
/// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="out">unsigned int&</param>
/// <param name="p">const DamageLibrary *</param>
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", 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);
/// <param name="out">unsigned char&</param>
/// <param name="p">const DamageLibrary *</param>
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", 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);
/// <param name="out">float&</param>
/// <param name="p">const DamageLibrary *</param>
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param>
/// <returns>float</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetStatModifier")]
internal static extern float GetStatModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
/// <param name="out">float&</param>
/// <param name="p">const DamageLibrary *</param>
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hitIndex">unsigned char</param>
/// <param name="hitData">HitData *</param>
/// <returns>float</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_DamageLibrary_GetDamageModifier")]
internal static extern float GetDamageModifier(ref float @out, IntPtr p, IntPtr attack, IntPtr target, byte hitIndex, IntPtr hitData);
}
}

View File

@ -0,0 +1,10 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DamageSource : byte
{
AttackDamage = 0,
}
}

View File

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

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EffectParameterType : byte
{
None = 0,
Bool = 1,
Int = 2,
Float = 3,
String = 4,
}
}

View File

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

View File

@ -0,0 +1,13 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EventDataKind : byte
{
Damage = 0,
Heal = 1,
Faint = 2,
DisplayText = 3,
}
}

View File

@ -0,0 +1,49 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class ExecutingAttack
{
/// <param name="out">ExecutingAttack *&</param>
/// <param name="targets">const Creature * *</param>
/// <param name="targetCount">long unsigned int</param>
/// <param name="numberHits">unsigned char</param>
/// <param name="user">Creature *</param>
/// <param name="attack">LearnedAttack *</param>
/// <param name="script">Script *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", 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);
/// <param name="p">ExecutingAttack *</param>
/// <returns>void</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="out">HitData *&</param>
/// <param name="p">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hit">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetHitData")]
internal static extern byte GetHitData(ref IntPtr @out, IntPtr p, IntPtr target, byte hit);
/// <param name="p">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <returns>bool</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_IsCreatureTarget")]
internal static extern bool IsCreatureTarget(IntPtr p, IntPtr target);
/// <param name="p">ExecutingAttack *</param>
/// <returns>Creature *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetUser")]
internal static extern IntPtr GetUser(IntPtr p);
/// <param name="p">ExecutingAttack *</param>
/// <returns>LearnedAttack *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExecutingAttack_GetAttack")]
internal static extern IntPtr GetAttack(IntPtr p);
}
}

View File

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

View File

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

View File

@ -0,0 +1,14 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class FleeTurnChoice
{
/// <param name="user">Creature *</param>
/// <returns>FleeTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_FleeTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user);
}
}

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Gender : byte
{
Male = 0,
Female = 1,
Genderless = 2,
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,14 @@
using System;
using System.Runtime.InteropServices;
namespace Creaturelibbattling.Generated
{
internal static class PassTurnChoice
{
/// <param name="user">Creature *</param>
/// <returns>PassTurnChoice *</returns>
[DllImport("CreatureLibBattling", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_PassTurnChoice_Construct")]
internal static extern IntPtr Construct(IntPtr user);
}
}

View File

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

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum ScriptCategory : byte
{
Attack = 0,
Talent = 1,
Status = 2,
Creature = 3,
Battle = 4,
Side = 5,
}
}

View File

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

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Statistic : byte
{
Health = 0,
PhysicalAttack = 1,
PhysicalDefense = 2,
MagicalAttack = 3,
MagicalDefense = 4,
Speed = 5,
}
}

View File

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

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum TurnChoiceKind : byte
{
Pass = 0,
Attack = 1,
Item = 2,
Switch = 3,
Flee = 4,
}
}

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Creaturelibbattling
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public 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

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum AttackCategory : byte
{
Physical = 0,
Magical = 1,
Status = 2,
}
}

View File

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

View File

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

View File

@ -0,0 +1,21 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public 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

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum BattleItemCategory : byte
{
None = 0,
Healing = 1,
StatusHealing = 2,
CaptureDevice = 3,
MiscBattleItem = 4,
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EffectParameterType : byte
{
None = 0,
Bool = 1,
Int = 2,
Float = 3,
String = 4,
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Runtime.InteropServices;
namespace Creatureliblibrary.Generated
{
internal static class ExternGrowthRate
{
/// <param name="out">GrowthRate *&</param>
/// <param name="calcLevel">Function *</param>
/// <param name="calcExperience">Function *</param>
/// <returns>unsigned char</returns>
[DllImport("CreatureLibLibrary", CallingConvention = CallingConvention.Cdecl, EntryPoint= "CreatureLib_ExternGrowthRate_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr calcLevel, IntPtr calcExperience);
}
}

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Gender : byte
{
Male = 0,
Female = 1,
Genderless = 2,
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum ItemCategory : byte
{
MiscItem = 0,
CaptureDevice = 1,
Medicine = 2,
Berry = 3,
MoveLearner = 4,
VariantChanger = 5,
KeyItem = 6,
Mail = 7,
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Statistic : byte
{
Health = 0,
PhysicalAttack = 1,
PhysicalDefense = 2,
MagicalAttack = 3,
MagicalDefense = 4,
Speed = 5,
}
}

View File

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

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Creatureliblibrary
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public 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

@ -0,0 +1,93 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class AngelScriptResolver
{
/// <returns>AngelScriptResolver *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">AngelScriptResolver *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_Destruct")]
internal static extern byte Destruct(IntPtr p);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="lib">BattleLibrary *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_Initialize")]
internal static extern byte Initialize(IntPtr p, IntPtr lib);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="name">const char *</param>
/// <param name="script">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_CreateScript")]
internal static extern byte CreateScript(IntPtr p, string name, string script);
/// <param name="p">AngelScriptResolver *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_FinalizeModule")]
internal static extern byte FinalizeModule(IntPtr p);
/// <param name="out">Script *&</param>
/// <param name="p">AngelScriptResolver *</param>
/// <param name="category">ScriptCategory</param>
/// <param name="scriptName">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_LoadScript")]
internal static extern byte LoadScript(ref IntPtr @out, IntPtr p, ScriptCategory category, string scriptName);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="file">const char *</param>
/// <param name="stripDebugInfo">bool</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_WriteByteCodeToFile")]
internal static extern byte WriteByteCodeToFile(IntPtr p, string file, bool stripDebugInfo);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="file">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_LoadByteCodeFromFile")]
internal static extern byte LoadByteCodeFromFile(IntPtr p, string file);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="stripDebugInfo">bool</param>
/// <param name="size">long unsigned int&</param>
/// <param name="out">unsigned char *&</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_WriteByteCodeToMemory")]
internal static extern byte WriteByteCodeToMemory(IntPtr p, bool stripDebugInfo, ref ulong size, ref IntPtr @out);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="memory">unsigned char *</param>
/// <param name="size">long unsigned int</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_LoadByteCodeFromMemory")]
internal static extern byte LoadByteCodeFromMemory(IntPtr p, IntPtr memory, ulong size);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="typeName">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_RegisterType")]
internal static extern byte RegisterType(IntPtr p, string typeName);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="typeName">const char *</param>
/// <param name="decl">const char *</param>
/// <param name="func">Function *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_RegisterTypeMethod")]
internal static extern byte RegisterTypeMethod(IntPtr p, string typeName, string decl, IntPtr func);
/// <param name="p">AngelScriptResolver *</param>
/// <param name="decl">const char *</param>
/// <param name="func">Function *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_AngelScriptResolver_RegisterGlobalMethod")]
internal static extern byte RegisterGlobalMethod(IntPtr p, string decl, IntPtr func);
}
}

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum AttackCategory : byte
{
Physical = 0,
Magical = 1,
Status = 2,
}
}

View File

@ -0,0 +1,11 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum AttackLearnMethod : int
{
Unknown = 0,
Level = 1,
}
}

View File

@ -0,0 +1,21 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public 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

@ -0,0 +1,41 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class Battle
{
/// <param name="out">Battle *&</param>
/// <param name="library">const BattleLibrary *</param>
/// <param name="parties">const BattleParty * *</param>
/// <param name="partiesCount">long unsigned int</param>
/// <param name="canFlee">bool</param>
/// <param name="numberOfSides">unsigned char</param>
/// <param name="creaturesPerSide">unsigned char</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Battle_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr library, IntPtr parties, ulong partiesCount, bool canFlee, byte numberOfSides, byte creaturesPerSide);
/// <param name="p">Battle *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Battle_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">Battle *</param>
/// <param name="name">const char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Battle_SetWeather")]
internal static extern byte SetWeather(IntPtr p, string name);
/// <param name="p">Battle *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Battle_ClearWeather")]
internal static extern byte ClearWeather(IntPtr p);
/// <param name="p">Battle *</param>
/// <returns>const char *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Battle_GetWeatherName")]
internal static extern string GetWeatherName(IntPtr p);
}
}

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum BattleItemCategory : byte
{
None = 0,
Healing = 1,
StatusHealing = 2,
CaptureDevice = 3,
MiscBattleItem = 4,
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class BattleLibrary
{
/// <param name="out">BattleLibrary *&</param>
/// <param name="staticLib">PokemonLibrary *</param>
/// <param name="statCalculator">StatCalculator *</param>
/// <param name="damageLibrary">DamageLibrary *</param>
/// <param name="experienceLibrary">ExperienceLibrary *</param>
/// <param name="scriptResolver">ScriptResolver *</param>
/// <param name="miscLibrary">MiscLibrary *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_BattleLibrary_Construct")]
internal static extern byte Construct(ref IntPtr @out, IntPtr staticLib, IntPtr statCalculator, IntPtr damageLibrary, IntPtr experienceLibrary, IntPtr scriptResolver, IntPtr miscLibrary);
/// <param name="p">BattleLibrary *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_BattleLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class C
{
/// <returns>const char *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_C_GetLastException")]
internal static extern string GetLastException();
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class DamageLibrary
{
/// <returns>DamageLibrary *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_DamageLibrary_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">DamageLibrary *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_DamageLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
}
}

View File

@ -0,0 +1,10 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DamageSource : byte
{
AttackDamage = 0,
}
}

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EffectParameterType : byte
{
None = 0,
Bool = 1,
Int = 2,
Float = 3,
String = 4,
}
}

View File

@ -0,0 +1,13 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EventDataKind : byte
{
Damage = 0,
Heal = 1,
Faint = 2,
DisplayText = 3,
}
}

View File

@ -0,0 +1,87 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class Evolution
{
/// <param name="time">TimeOfDay</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateTimeEvolution")]
internal static extern IntPtr CreateTimeEvolution(TimeOfDay time, IntPtr into);
/// <param name="item">const Item *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateItemEvolution")]
internal static extern IntPtr CreateItemEvolution(IntPtr item, IntPtr into);
/// <param name="gender">Gender</param>
/// <param name="level">unsigned char</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateGenderBasedEvolution")]
internal static extern IntPtr CreateGenderBasedEvolution(Gender gender, byte level, IntPtr into);
/// <param name="item">const Item *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateItemUseEvolution")]
internal static extern IntPtr CreateItemUseEvolution(IntPtr item, IntPtr into);
/// <param name="item">const Item *</param>
/// <param name="gender">Gender</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateItemUseWithGenderEvolution")]
internal static extern IntPtr CreateItemUseWithGenderEvolution(IntPtr item, Gender gender, IntPtr into);
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateTradeEvolution")]
internal static extern IntPtr CreateTradeEvolution(IntPtr into);
/// <param name="item">const Item *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateTradeWithItemEvolution")]
internal static extern IntPtr CreateTradeWithItemEvolution(IntPtr item, IntPtr into);
/// <param name="traded">const PokemonSpecies *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateTradeWithSpeciesEvolution")]
internal static extern IntPtr CreateTradeWithSpeciesEvolution(IntPtr traded, IntPtr into);
/// <param name="data">const EffectParameter * *</param>
/// <param name="dataLength">long unsigned int</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_CreateCustomEvolution")]
internal static extern IntPtr CreateCustomEvolution(IntPtr data, ulong dataLength, IntPtr into);
/// <param name="data">const EvolutionData *</param>
/// <returns>EvolutionMethod</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_GetMethod")]
internal static extern EvolutionMethod GetMethod(IntPtr data);
/// <param name="data">const EvolutionData *</param>
/// <returns>const PokemonSpecies *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_GetNewSpecies")]
internal static extern IntPtr GetNewSpecies(IntPtr data);
/// <param name="data">const EvolutionData *</param>
/// <returns>long unsigned int</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_GetDataCount")]
internal static extern ulong GetDataCount(IntPtr data);
/// <param name="data">const EvolutionData *</param>
/// <param name="index">long unsigned int</param>
/// <param name="out">const EffectParameter *&</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Evolution_GetData")]
internal static extern byte GetData(IntPtr data, ulong index, ref IntPtr @out);
}
}

View File

@ -0,0 +1,33 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class EvolutionData
{
/// <param name="level">unsigned char</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_EvolutionData_CreateLevelEvolution")]
internal static extern IntPtr CreateLevelEvolution(byte level, IntPtr into);
/// <param name="friendship">unsigned char</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_EvolutionData_CreateFriendshipEvolution")]
internal static extern IntPtr CreateFriendshipEvolution(byte friendship, IntPtr into);
/// <param name="move">const MoveData *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_EvolutionData_CreateKnownMoveEvolution")]
internal static extern IntPtr CreateKnownMoveEvolution(IntPtr move, IntPtr into);
/// <param name="location">const char *</param>
/// <param name="into">const PokemonSpecies *</param>
/// <returns>const EvolutionData *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_EvolutionData_CreateLocationEvolution")]
internal static extern IntPtr CreateLocationEvolution(string location, IntPtr into);
}
}

View File

@ -0,0 +1,22 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum EvolutionMethod : byte
{
Level = 0,
HighFriendship = 1,
TradeWithHeldItem = 10,
TradeWithSpecificPokemon = 11,
Custom = 12,
KnownMove = 2,
LocationBased = 3,
TimeBased = 4,
HoldsItem = 5,
IsGenderAndLevel = 6,
EvolutionItemUse = 7,
EvolutionItemUseWithGender = 8,
Trade = 9,
}
}

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum Gender : byte
{
Male = 0,
Female = 1,
Genderless = 2,
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class GetLastException
{
/// <summary>
///
/// </summary>
/// <returns>const char *</returns>
[DllImport("pkmnLib")]
internal static extern string PkmnLib_GetLastException();
}
}

View File

@ -0,0 +1,30 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class Item
{
/// <param name="name">const char *</param>
/// <param name="category">ItemCategory</param>
/// <param name="battleCategory">BattleItemCategory</param>
/// <param name="price">int</param>
/// <param name="flags">const char * *</param>
/// <param name="flagsCount">long unsigned int</param>
/// <param name="flingPower">unsigned char</param>
/// <returns>Item *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Item_Construct")]
internal static extern IntPtr Construct(string name, ItemCategory category, BattleItemCategory battleCategory, int price, IntPtr flags, ulong flagsCount, byte flingPower);
/// <param name="p">const Item *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Item_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const Item *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Item_GetFlingPower")]
internal static extern byte GetFlingPower(IntPtr p);
}
}

View File

@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum ItemCategory : byte
{
MiscItem = 0,
CaptureDevice = 1,
Medicine = 2,
Berry = 3,
MoveLearner = 4,
VariantChanger = 5,
KeyItem = 6,
Mail = 7,
}
}

View File

@ -0,0 +1,26 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class LibrarySettings
{
/// <param name="maximalLevel">unsigned char</param>
/// <param name="maximalMoves">unsigned char</param>
/// <param name="shinyRate">unsigned short</param>
/// <returns>const LibrarySettings *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_LibrarySettings_Construct")]
internal static extern IntPtr Construct(byte maximalLevel, byte maximalMoves, ushort shinyRate);
/// <param name="p">const LibrarySettings *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_LibrarySettings_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const LibrarySettings *</param>
/// <returns>unsigned short</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_LibrarySettings_GetShinyRate")]
internal static extern ushort GetShinyRate(IntPtr p);
}
}

View File

@ -0,0 +1,14 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum METADATATYPE : int
{
MDT_TYPE = 1,
MDT_FUNC = 2,
MDT_VAR = 3,
MDT_VIRTPROP = 4,
MDT_FUNC_OR_VAR = 5,
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class MiscLibrary
{
/// <returns>MiscLibrary *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_MiscLibrary_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">MiscLibrary *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_MiscLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
}
}

View File

@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum MoveCategory : byte
{
Physical = 0,
Special = 1,
Status = 2,
}
}

View File

@ -0,0 +1,48 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class Nature
{
/// <param name="increasedStat">Statistic</param>
/// <param name="decreasedStat">Statistic</param>
/// <param name="increasedModifier">float</param>
/// <param name="decreasedModifier">float</param>
/// <returns>Nature *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_Construct")]
internal static extern IntPtr Construct(Statistic increasedStat, Statistic decreasedStat, float increasedModifier, float decreasedModifier);
/// <param name="p">const Nature *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const Nature *</param>
/// <returns>float</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_GetIncreaseModifier")]
internal static extern float GetIncreaseModifier(IntPtr p);
/// <param name="p">const Nature *</param>
/// <returns>float</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_GetDecreaseModifier")]
internal static extern float GetDecreaseModifier(IntPtr p);
/// <param name="p">const Nature *</param>
/// <returns>Statistic</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_GetIncreasedStat")]
internal static extern Statistic GetIncreasedStat(IntPtr p);
/// <param name="p">const Nature *</param>
/// <returns>Statistic</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_GetDecreasedStat")]
internal static extern Statistic GetDecreasedStat(IntPtr p);
/// <param name="nature">const Nature *</param>
/// <param name="stat">Statistic</param>
/// <returns>float</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Nature_GetStatModifier")]
internal static extern float GetStatModifier(IntPtr nature, Statistic stat);
}
}

View File

@ -0,0 +1,46 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class NatureLibrary
{
/// <param name="initialCapacity">long unsigned int</param>
/// <returns>NatureLibrary *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_Construct")]
internal static extern IntPtr Construct(ulong initialCapacity);
/// <param name="p">const NatureLibrary *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">NatureLibrary *</param>
/// <param name="name">const char *</param>
/// <param name="nature">const Nature *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_LoadNature")]
internal static extern byte LoadNature(IntPtr p, string name, IntPtr nature);
/// <param name="p">NatureLibrary *</param>
/// <param name="name">const char *</param>
/// <param name="out">const Nature *&</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_GetNatureByName")]
internal static extern byte GetNatureByName(IntPtr p, string name, ref IntPtr @out);
/// <param name="p">NatureLibrary *</param>
/// <param name="rand">Random *</param>
/// <returns>const char *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_GetRandomNatureName")]
internal static extern string GetRandomNatureName(IntPtr p, IntPtr rand);
/// <param name="p">NatureLibrary *</param>
/// <param name="nature">const Nature *</param>
/// <param name="out">const char *&</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_NatureLibrary_GetNatureName")]
internal static extern byte GetNatureName(IntPtr p, IntPtr nature, ref string @out);
}
}

View File

@ -0,0 +1,10 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum PkmnDamageSource : byte
{
Struggle = 1,
}
}

View File

@ -0,0 +1,10 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum PkmnEventDataKind : byte
{
WeatherChange = 4,
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class PkmnScript
{
/// <param name="script">PkmnScript *</param>
/// <param name="attack">ExecutingAttack *</param>
/// <param name="target">Creature *</param>
/// <param name="hit">unsigned char</param>
/// <param name="critStage">unsigned char *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PkmnScript_ModifyCriticalStage")]
internal static extern byte ModifyCriticalStage(IntPtr script, IntPtr attack, IntPtr target, byte hit, IntPtr critStage);
}
}

View File

@ -0,0 +1,10 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum PkmnScriptCategory : byte
{
Weather = 6,
}
}

View File

@ -0,0 +1,67 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class Pokemon
{
/// <param name="library">const BattleLibrary *</param>
/// <param name="species">const PokemonSpecies *</param>
/// <param name="forme">const PokemonForme *</param>
/// <param name="level">unsigned char</param>
/// <param name="experience">unsigned int</param>
/// <param name="uid">unsigned int</param>
/// <param name="gender">Gender</param>
/// <param name="coloring">unsigned char</param>
/// <param name="heldItem">const Item *</param>
/// <param name="nickname">const char *</param>
/// <param name="hiddenAbility">bool</param>
/// <param name="abilityIndex">unsigned char</param>
/// <param name="moves">const LearnedAttack * *</param>
/// <param name="moveCount">long unsigned int</param>
/// <param name="hpIv">unsigned char</param>
/// <param name="attIv">unsigned char</param>
/// <param name="defIv">unsigned char</param>
/// <param name="sAtIv">unsigned char</param>
/// <param name="sDeIv">unsigned char</param>
/// <param name="spIv">unsigned char</param>
/// <param name="hpEv">unsigned char</param>
/// <param name="attEv">unsigned char</param>
/// <param name="defEv">unsigned char</param>
/// <param name="sAtEv">unsigned char</param>
/// <param name="sDeEv">unsigned char</param>
/// <param name="spEv">unsigned char</param>
/// <param name="nature">const Nature *</param>
/// <returns>Pokemon *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_Construct")]
internal static extern IntPtr Construct(IntPtr library, IntPtr species, IntPtr forme, byte level, uint experience, uint uid, Gender gender, byte coloring, IntPtr heldItem, string nickname, bool hiddenAbility, byte abilityIndex, IntPtr moves, ulong moveCount, byte hpIv, byte attIv, byte defIv, byte sAtIv, byte sDeIv, byte spIv, byte hpEv, byte attEv, byte defEv, byte sAtEv, byte sDeEv, byte spEv, IntPtr nature);
/// <param name="p">const Pokemon *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const Pokemon *</param>
/// <returns>bool</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_IsShiny")]
internal static extern bool IsShiny(IntPtr p);
/// <param name="p">const Pokemon *</param>
/// <returns>const Nature *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_GetNature")]
internal static extern IntPtr GetNature(IntPtr p);
/// <param name="p">const Pokemon *</param>
/// <param name="stat">Statistic</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_GetIndividualValue")]
internal static extern byte GetIndividualValue(IntPtr p, Statistic stat);
/// <param name="p">const Pokemon *</param>
/// <param name="stat">Statistic</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_Pokemon_GetEffortValue")]
internal static extern byte GetEffortValue(IntPtr p, Statistic stat);
}
}

View File

@ -0,0 +1,48 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class PokemonSpecies
{
/// <param name="id">unsigned short</param>
/// <param name="name">const char *</param>
/// <param name="defaultForme">const PokemonForme *</param>
/// <param name="genderRatio">float</param>
/// <param name="growthRate">const char *</param>
/// <param name="captureRate">unsigned char</param>
/// <param name="baseHappiness">unsigned char</param>
/// <returns>const PokemonSpecies *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_Construct")]
internal static extern IntPtr Construct(ushort id, string name, IntPtr defaultForme, float genderRatio, string growthRate, byte captureRate, byte baseHappiness);
/// <param name="p">const PokemonSpecies *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_Destruct")]
internal static extern void Destruct(IntPtr p);
/// <param name="p">const PokemonSpecies *</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_GetBaseHappiness")]
internal static extern byte GetBaseHappiness(IntPtr p);
/// <param name="p">PokemonSpecies *</param>
/// <param name="evo">EvolutionData *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_AddEvolution")]
internal static extern void AddEvolution(IntPtr p, IntPtr evo);
/// <param name="p">const PokemonSpecies *</param>
/// <returns>long unsigned int</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_GetEvolutionCount")]
internal static extern ulong GetEvolutionCount(IntPtr p);
/// <param name="p">const PokemonSpecies *</param>
/// <param name="index">long unsigned int</param>
/// <param name="out">const EvolutionData *&</param>
/// <returns>unsigned char</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_PokemonSpecies_GetEvolution")]
internal static extern byte GetEvolution(IntPtr p, ulong index, ref IntPtr @out);
}
}

View File

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace Pkmnlib
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum ScriptCategory : byte
{
Attack = 0,
Talent = 1,
Status = 2,
Creature = 3,
Battle = 4,
Side = 5,
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Runtime.InteropServices;
namespace Pkmnlib.Generated
{
internal static class StatCalculator
{
/// <returns>StatCalculator *</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_StatCalculator_Construct")]
internal static extern IntPtr Construct();
/// <param name="p">StatCalculator *</param>
/// <returns>void</returns>
[DllImport("pkmnLib", CallingConvention = CallingConvention.Cdecl, EntryPoint= "PkmnLib_StatCalculator_Destruct")]
internal static extern void Destruct(IntPtr p);
}
}

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