Fixes build failures in Angelscript
This commit is contained in:
parent
e32d655d80
commit
50c58a9fd3
|
@ -22,6 +22,11 @@ static bool HasFlag(const PkmnLib::Library::MoveData* obj, const ArbUt::BasicStr
|
|||
return obj->HasFlag(str);
|
||||
}
|
||||
|
||||
static bool GetMove(const PkmnLib::Library::MoveLibrary* obj, const ArbUt::BasicStringView& str) {
|
||||
return obj->Get(str);
|
||||
}
|
||||
|
||||
|
||||
void RegisterMoveTypes::RegisterMoveType(asIScriptEngine* engine) {
|
||||
int r = engine->RegisterObjectType("MoveData", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
Ensure(r >= 0);
|
||||
|
@ -46,7 +51,7 @@ void RegisterMoveTypes::RegisterMoveLibrary(asIScriptEngine* engine) {
|
|||
int r = engine->RegisterObjectType("MoveLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
Ensure(r >= 0);
|
||||
r = engine->RegisterObjectMethod("MoveLibrary", "const MoveData@ Get(const constString &in name) const",
|
||||
asMETHOD(PkmnLib::Library::MoveLibrary, Get), asCALL_THISCALL);
|
||||
asFUNCTION(GetMove), asCALL_CDECL_OBJFIRST);
|
||||
Ensure(r >= 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
#define AS_CLASS(name, contents) \
|
||||
{ \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
#define AS_CLASS(name, contents) \
|
||||
{ #name, "namespace Pokemon{ [ItemUse effect=" #name "] class " #name " : ItemUseScript { " contents "}}" }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"basic_ownership_test",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "../../../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "../../../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <doctest.h>
|
||||
#include "../../../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||
#include "../../../../src/ScriptResolving/AngelScript/ContextPool.hpp"
|
||||
#include "../../../TestLibrary/TestLibrary.hpp"
|
||||
#include "../../../../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
|
|
Loading…
Reference in New Issue