CreatureLib/CInterface/Battling/ScriptResolver.cpp

16 lines
725 B
C++
Raw Normal View History

2020-03-04 17:58:05 +00:00
#include "../../src/Battling/ScriptHandling/ScriptResolver.hpp"
#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; }
export uint8_t CreatureLib_ScriptResolver_Initialize(ScriptResolver* p, BattleLibrary* library) {
Try(p->Initialize(library);)
2020-03-04 17:58:05 +00:00
};
export uint8_t CreatureLib_ScriptResolver_LoadScript(Script*& out, ScriptResolver* p, ScriptCategory category,
2020-03-04 17:58:05 +00:00
const char* scriptName) {
2020-05-26 16:31:06 +00:00
Try(out = p->LoadScript(category, ArbUt::CaseInsensitiveConstString(scriptName));)
2020-03-04 17:58:05 +00:00
};