Added ScriptResolver C Interface.

This commit is contained in:
Deukhoofd 2020-03-04 18:58:05 +01:00
parent 569a12ec82
commit da79d51ad2
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#include "../../src/Battling/ScriptHandling/ScriptResolver.hpp"
#define export extern "C"
using namespace CreatureLib::Battling;
export ScriptResolver* CreatureLib_ScriptResolver_Construct() { return new ScriptResolver(); }
export void CreatureLib_ScriptResolver_Destruct(const ScriptResolver* p) { delete p; }
export void CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
p->Initialize(library);
};
export Script* CreatureLib_ScriptResolver_LoadScript(ScriptResolver* p, ScriptCategory category,
const char* scriptName) {
return p->LoadScript(category, ConstString(scriptName));
};