CreatureLib/CInterface/Battling/ScriptResolver.cpp

21 lines
950 B
C++

#include "../../src/Battling/ScriptHandling/ScriptResolver.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Battling;
export ScriptResolver* CreatureLib_ScriptResolver_Construct() { return new ScriptResolver(); }
export void CreatureLib_ScriptResolver_Destruct(const ScriptResolver* p) { delete p; }
export u8 CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
Try(p->Initialize(library);)
};
export 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 u8 CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
const CreatureLib::Library::Item* item) {
Try(out = p->LoadItemScript(item);)
};