21 lines
955 B
C++
21 lines
955 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 uint8_t CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
|
|
Try(p->Initialize(library);)
|
|
};
|
|
export uint8_t CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptResolver* p, ScriptCategory category,
|
|
const char* scriptName) {
|
|
Try(out = p->LoadScript(category, ArbUt::StringView(scriptName));)
|
|
};
|
|
|
|
export uint8_t CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
|
|
const CreatureLib::Library::Item* item) {
|
|
Try(out = p->LoadItemScript(item);)
|
|
};
|