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;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func ScriptResolver* CreatureLib_ScriptResolver_Construct() { return new ScriptResolver(); }
|
2020-03-04 17:58:05 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_ScriptResolver_Destruct(const ScriptResolver* p) { delete p; }
|
2020-03-04 17:58:05 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
|
2020-03-25 18:07:36 +00:00
|
|
|
Try(p->Initialize(library);)
|
2020-03-04 17:58:05 +00:00
|
|
|
};
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptResolver* p, void* owner,
|
|
|
|
ScriptCategory category, const char* scriptName) {
|
2022-05-14 14:07:32 +00:00
|
|
|
Try(out = p->LoadScript(owner, category, ArbUt::StringView(scriptName)).TakeOwnership();)
|
2020-03-04 17:58:05 +00:00
|
|
|
};
|
2021-03-07 09:54:42 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
|
|
|
|
const CreatureLib::Library::Item* item) {
|
2022-05-15 08:00:25 +00:00
|
|
|
Try(out = p->LoadItemScript(item);)
|
2021-03-07 09:54:42 +00:00
|
|
|
};
|