CreatureLib/CInterface/Battling/ScriptResolver.cpp

21 lines
985 B
C++

#include "../../src/Battling/ScriptHandling/ScriptResolver.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Battling;
export_func ScriptResolver* CreatureLib_ScriptResolver_Construct() { return new ScriptResolver(); }
export_func void CreatureLib_ScriptResolver_Destruct(const ScriptResolver* p) { delete p; }
export_func u8 CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
Try(p->Initialize(library);)
};
export_func u8 CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptResolver* p, void* owner,
ScriptCategory category, const char* scriptName) {
Try(out = p->LoadScript(owner, category, ArbUt::StringView(scriptName));)
};
export_func u8 CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
const CreatureLib::Library::Item* item) {
Try(out = p->LoadItemScript(item);)
};