Enable pedantic errors
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,56 +1,56 @@
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../Core.hpp"
|
||||
|
||||
export AngelScriptResolver* PkmnLib_AngelScriptResolver_Construct() { return new AngelScriptResolver(); }
|
||||
export uint8_t PkmnLib_AngelScriptResolver_Destruct(AngelScriptResolver* p) { Try(delete p;) }
|
||||
export_func AngelScriptResolver* PkmnLib_AngelScriptResolver_Construct() { return new AngelScriptResolver(); }
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_Destruct(AngelScriptResolver* p) { Try(delete p;) }
|
||||
|
||||
export uint8_t PkmnLib_AngelScriptResolver_Initialize(AngelScriptResolver* p,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_Initialize(AngelScriptResolver* p,
|
||||
CreatureLib::Battling::BattleLibrary* lib) {
|
||||
Try(p->Initialize(lib);)
|
||||
}
|
||||
|
||||
export uint8_t PkmnLib_AngelScriptResolver_CreateScript(AngelScriptResolver* p, const char* name, const char* script) {
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_CreateScript(AngelScriptResolver* p, const char* name, const char* script) {
|
||||
Try(p->CreateScript(name, script);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_FinalizeModule(AngelScriptResolver* p) { Try(p->FinalizeModule();) }
|
||||
export uint8_t PkmnLib_AngelScriptResolver_LoadScript(CreatureLib::Battling::BattleScript*& out, AngelScriptResolver* p,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_FinalizeModule(AngelScriptResolver* p) { Try(p->FinalizeModule();) }
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_LoadScript(CreatureLib::Battling::BattleScript*& out, AngelScriptResolver* p,
|
||||
void* owner, ScriptCategory category, const char* scriptName) {
|
||||
Try(out = p->LoadScript(owner, category, ArbUt::StringView(scriptName));)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_LoadEvolutionScript(PkmnLib::Battling::EvolutionScript const*& out,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_LoadEvolutionScript(PkmnLib::Battling::EvolutionScript const*& out,
|
||||
AngelScriptResolver* p, const char* scriptName) {
|
||||
Try(
|
||||
auto s = p->LoadEvolutionScript(ArbUt::StringView(scriptName));
|
||||
if (!s.HasValue()) { out = nullptr; } else { out = s.GetValue(); })
|
||||
}
|
||||
|
||||
export uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToFile(AngelScriptResolver* p, const char* file,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToFile(AngelScriptResolver* p, const char* file,
|
||||
bool stripDebugInfo) {
|
||||
Try(p->WriteByteCodeToFile(file, stripDebugInfo);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromFile(AngelScriptResolver* p, const char* file) {
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromFile(AngelScriptResolver* p, const char* file) {
|
||||
Try(p->LoadByteCodeFromFile(file);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToMemory(AngelScriptResolver* p, bool stripDebugInfo,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_WriteByteCodeToMemory(AngelScriptResolver* p, bool stripDebugInfo,
|
||||
size_t& size, uint8_t*& out) {
|
||||
Try(out = p->WriteByteCodeToMemory(size, stripDebugInfo);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromMemory(AngelScriptResolver* p, uint8_t* memory,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_LoadByteCodeFromMemory(AngelScriptResolver* p, uint8_t* memory,
|
||||
size_t size) {
|
||||
Try(p->LoadByteCodeFromMemory(memory, size);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_RegisterType(AngelScriptResolver* p, const char* typeName) {
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_RegisterType(AngelScriptResolver* p, const char* typeName) {
|
||||
Try(p->RegisterType(typeName);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_RegisterTypeMethod(AngelScriptResolver* p, const char* typeName,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_RegisterTypeMethod(AngelScriptResolver* p, const char* typeName,
|
||||
const char* decl, void*(func)(void*)) {
|
||||
Try(p->RegisterTypeMethod(typeName, decl, func);)
|
||||
}
|
||||
export uint8_t PkmnLib_AngelScriptResolver_RegisterGlobalMethod(AngelScriptResolver* p, const char* decl,
|
||||
export_func uint8_t PkmnLib_AngelScriptResolver_RegisterGlobalMethod(AngelScriptResolver* p, const char* decl,
|
||||
void*(func)(void*)) {
|
||||
Try(p->RegisterGlobalMethod(decl, func);)
|
||||
}
|
||||
export void PkmnLib_AngelScriptResolver_DefineWord(AngelScriptResolver* p, const char* word) { p->DefineWord(word); }
|
||||
export_func void PkmnLib_AngelScriptResolver_DefineWord(AngelScriptResolver* p, const char* word) { p->DefineWord(word); }
|
||||
|
||||
#ifdef ANGELSCRIPT_DEBUGGER
|
||||
export void PkmnLib_AngelScriptResolver_AddDebugger(AngelScriptResolver* p, u16 port) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptScript.hpp"
|
||||
#include "../Core.hpp"
|
||||
|
||||
export uint8_t PkmnLib_AngelscriptScript_Destruct(AngelScriptScript* p) { Try(delete p;) }
|
||||
export_func uint8_t PkmnLib_AngelscriptScript_Destruct(AngelScriptScript* p) { Try(delete p;) }
|
||||
Reference in New Issue
Block a user