2020-03-04 17:58:05 +00:00
|
|
|
#include "../../src/Battling/ScriptHandling/ScriptResolver.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-04 17:58:05 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
|
|
|
export ScriptResolver* CreatureLib_ScriptResolver_Construct() { return new ScriptResolver(); }
|
|
|
|
|
|
|
|
export void CreatureLib_ScriptResolver_Destruct(const ScriptResolver* p) { delete p; }
|
|
|
|
|
2020-03-25 18:07:36 +00:00
|
|
|
export uint8_t CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
|
|
|
|
Try(p->Initialize(library);)
|
2020-03-04 17:58:05 +00:00
|
|
|
};
|
2021-03-07 09:26:41 +00:00
|
|
|
export uint8_t CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptResolver* p, ScriptCategory category,
|
2020-03-04 17:58:05 +00:00
|
|
|
const char* scriptName) {
|
2020-06-26 15:08:23 +00:00
|
|
|
Try(out = p->LoadScript(category, ArbUt::StringView(scriptName));)
|
2020-03-04 17:58:05 +00:00
|
|
|
};
|
2021-03-07 09:54:42 +00:00
|
|
|
|
|
|
|
export uint8_t CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
|
|
|
|
const char* scriptName) {
|
|
|
|
Try(out = p->LoadItemScript(ArbUt::StringView(scriptName));)
|
|
|
|
};
|