Cleanup cmake file.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
41b15dc693
commit
dc3630b171
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
#include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp"
|
||||||
#include "../Core.hpp"
|
#include "../Core.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,21 @@
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
# Make warnings trigger errors.
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
|
|
||||||
|
|
||||||
project(pkmnLib)
|
project(pkmnLib)
|
||||||
|
|
||||||
|
# Enable all warnings, and make them error when occurring.
|
||||||
|
add_compile_options(-Wall -Wextra -Werror)
|
||||||
|
# We like new stuff, so set the c++ standard to c++20.
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
if (NOT SCRIPT_PROVIDER)
|
option(WINDOWS "Whether the build target is Windows or not." OFF)
|
||||||
message(WARNING "Script provider was not set, using angelscript as default.")
|
option(SHARED "Whether we should build a shared library, instead of a static one." OFF)
|
||||||
set(SCRIPT_PROVIDER "angelscript")
|
option(TESTS "Whether the test executable should be build as well." OFF)
|
||||||
ADD_DEFINITIONS(-D ANGELSCRIPT=1)
|
option(STATICC "Whether gcc and stdc++ should be linked statically to the library." OFF)
|
||||||
endif()
|
set(SCRIPT_PROVIDER "angelscript" CACHE STRING "Which script provider to use.")
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
SET(CMAKE_SYSTEM_NAME Windows)
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
ADD_DEFINITIONS(-D WINDOWS=1)
|
ADD_DEFINITIONS(-D WINDOWS=1)
|
||||||
endif(WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
message(STATUS "Using:
|
message(STATUS "Using:
|
||||||
\t C ${CMAKE_C_COMPILER}
|
\t C ${CMAKE_C_COMPILER}
|
||||||
|
@ -25,37 +23,20 @@ message(STATUS "Using:
|
||||||
\t CXX ABI ${CMAKE_CXX_COMPILER_ABI}
|
\t CXX ABI ${CMAKE_CXX_COMPILER_ABI}
|
||||||
\t C++ Version ${CMAKE_CXX_STANDARD}")
|
\t C++ Version ${CMAKE_CXX_STANDARD}")
|
||||||
|
|
||||||
|
include(CmakeConanSetup.cmake)
|
||||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
SetupConan()
|
||||||
message(WARNING "The file conanbuildinfo.cmake doesn't exist, running conan install.")
|
|
||||||
string(REPLACE "." ";" VERSION_LIST "${CMAKE_C_COMPILER_VERSION}")
|
|
||||||
list(GET VERSION_LIST 0 VERSION)
|
|
||||||
list(GET VERSION_LIST 1 MINOR)
|
|
||||||
if (NOT MINOR MATCHES 0)
|
|
||||||
SET(VERSION ${VERSION}.${MINOR})
|
|
||||||
endif ()
|
|
||||||
set(CONAN_STATIC_C False)
|
|
||||||
if (STATICC)
|
|
||||||
set(CONAN_STATIC_C True)
|
|
||||||
endif (STATICC)
|
|
||||||
|
|
||||||
if (NOT WINDOWS)
|
|
||||||
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
|
|
||||||
-s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -o *:staticC=${CONAN_STATIC_C} -o AngelScript:link_std_statically=True)
|
|
||||||
else ()
|
|
||||||
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
|
|
||||||
-s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows -o *:staticC=${CONAN_STATIC_C} -o AngelScript:link_std_statically=True)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
||||||
conan_basic_setup()
|
|
||||||
|
|
||||||
message(STATUS "Using Conan Libs:")
|
message(STATUS "Using Conan Libs:")
|
||||||
foreach (_conanLib ${CONAN_LIBS})
|
foreach (_conanLib ${CONAN_LIBS})
|
||||||
message(STATUS "\t ${_conanLib}")
|
message(STATUS "\t ${_conanLib}")
|
||||||
endforeach()
|
endforeach ()
|
||||||
|
|
||||||
|
# Set whether we want a static or shared library.
|
||||||
|
set(LIBTYPE STATIC)
|
||||||
|
if (SHARED)
|
||||||
|
set(LIBTYPE SHARED)
|
||||||
|
endif (SHARED)
|
||||||
|
|
||||||
# Create Core library with files in src/Core
|
|
||||||
SET(FILE_SOURCE
|
SET(FILE_SOURCE
|
||||||
"src/Battling/*.cpp"
|
"src/Battling/*.cpp"
|
||||||
"src/Battling/*.hpp"
|
"src/Battling/*.hpp"
|
||||||
|
@ -78,22 +59,19 @@ if (SCRIPT_PROVIDER STREQUAL "angelscript")
|
||||||
)
|
)
|
||||||
ADD_DEFINITIONS(-D AS_USE_ACCESSORS=1)
|
ADD_DEFINITIONS(-D AS_USE_ACCESSORS=1)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "${FILE_SOURCE}")
|
|
||||||
file(GLOB_RECURSE CORE_SRC_FILES ${FILE_SOURCE})
|
file(GLOB_RECURSE CORE_SRC_FILES ${FILE_SOURCE})
|
||||||
|
add_library(pkmnLib ${LIBTYPE} ${CORE_SRC_FILES})
|
||||||
add_library(pkmnLib SHARED ${CORE_SRC_FILES})
|
|
||||||
|
|
||||||
foreach (_variableName ${CONAN_LIBS})
|
|
||||||
message(STATUS "Lib: ${_variableName}")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
SET(_LINKS CreatureLibLibrary CreatureLibBattling Arbutils)
|
SET(_LINKS CreatureLibLibrary CreatureLibBattling Arbutils)
|
||||||
SET(_TESTLINKS pkmnLib CreatureLibLibrary CreatureLibBattling Arbutils)
|
SET(_TESTLINKS pkmnLib CreatureLibLibrary CreatureLibBattling Arbutils)
|
||||||
|
|
||||||
if (SCRIPT_PROVIDER STREQUAL "angelscript")
|
if (SCRIPT_PROVIDER STREQUAL "angelscript")
|
||||||
SET(_LINKS angelscript ${_LINKS} )
|
message(STATUS "Using Angelscript as script provider.")
|
||||||
SET(_TESTLINKS angelscript ${_TESTLINKS} )
|
ADD_DEFINITIONS(-D ANGELSCRIPT=1)
|
||||||
endif()
|
SET(_LINKS angelscript ${_LINKS})
|
||||||
|
SET(_TESTLINKS angelscript ${_TESTLINKS})
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
message(STATUS "Using Windows build.")
|
message(STATUS "Using Windows build.")
|
||||||
|
@ -104,14 +82,11 @@ endif (WINDOWS)
|
||||||
if (STATICC)
|
if (STATICC)
|
||||||
message(STATUS "Linking C library statically")
|
message(STATUS "Linking C library statically")
|
||||||
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++)
|
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++)
|
||||||
if (NOT DEFINED CONAN_EXPORTED)
|
|
||||||
SET(_TESTLINKS ${_TESTLINKS} -static-libgcc -static-libstdc++)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(pkmnLib PUBLIC ${_LINKS})
|
target_link_libraries(pkmnLib PUBLIC ${_LINKS})
|
||||||
|
|
||||||
if (NOT DEFINED CONAN_EXPORTED)
|
if (TESTS)
|
||||||
# Create Test executable
|
# Create Test executable
|
||||||
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
||||||
add_executable(pkmnLibTests ${TEST_FILES} extern/catch.hpp)
|
add_executable(pkmnLibTests ${TEST_FILES} extern/catch.hpp)
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
function(SetupConan)
|
||||||
|
# If conan isn't set up yet, we need to install the dependencies.
|
||||||
|
if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
|
message(WARNING "The file conanbuildinfo.cmake doesn't exist, running conan install.")
|
||||||
|
|
||||||
|
# If we're linking C statically, we also want to do so for our dependencies.
|
||||||
|
set(CONAN_STATIC_C False)
|
||||||
|
if (STATICC)
|
||||||
|
set(CONAN_STATIC_C True)
|
||||||
|
endif (STATICC)
|
||||||
|
|
||||||
|
if (NOT WINDOWS)
|
||||||
|
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
|
||||||
|
-s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -o *:staticC=${CONAN_STATIC_C} -o AngelScript:link_std_statically=True)
|
||||||
|
else ()
|
||||||
|
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated
|
||||||
|
-s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows -o *:staticC=${CONAN_STATIC_C} -o AngelScript:link_std_statically=True)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
|
conan_basic_setup()
|
||||||
|
endfunction()
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
#ifndef ANGELSCRIPT_H
|
#ifndef ANGELSCRIPT_H
|
||||||
// Avoid having to inform include path if header is already include before
|
// Avoid having to inform include path if header is already include before
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Sometimes it may be desired to use the same method names as used by C++ STL.
|
// Sometimes it may be desired to use the same method names as used by C++ STL.
|
||||||
|
|
|
@ -14,21 +14,21 @@
|
||||||
|
|
||||||
// TODO: Implement flags for turning on/off include directives and conditional programming
|
// TODO: Implement flags for turning on/off include directives and conditional programming
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------
|
//---------------------------
|
||||||
// Declaration
|
// Declaration
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef ANGELSCRIPT_H
|
#ifndef ANGELSCRIPT_H
|
||||||
// Avoid having to inform include path if header is already include before
|
// Avoid having to inform include path if header is already include before
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
||||||
// disable the annoying warnings on MSVC 6
|
// disable the annoying warnings on MSVC 6
|
||||||
#pragma warning (disable:4786)
|
#pragma warning(disable : 4786)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -191,7 +191,7 @@ void CScriptHandle::EnumReferences(asIScriptEngine* inEngine) {
|
||||||
inEngine->GCEnumCallback(m_type);
|
inEngine->GCEnumCallback(m_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptHandle::ReleaseReferences(asIScriptEngine* inEngine) {
|
void CScriptHandle::ReleaseReferences(asIScriptEngine*) {
|
||||||
// Simply clear the content to release the references
|
// Simply clear the content to release the references
|
||||||
Set(0, 0);
|
Set(0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
#ifndef ANGELSCRIPT_H
|
#ifndef ANGELSCRIPT_H
|
||||||
// Avoid having to inform include path if header is already include before
|
// Avoid having to inform include path if header is already include before
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
|
|
||||||
#ifndef ANGELSCRIPT_H
|
#ifndef ANGELSCRIPT_H
|
||||||
// Avoid having to inform include path if header is already include before
|
// Avoid having to inform include path if header is already include before
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
|
|
||||||
#ifndef ANGELSCRIPT_H
|
#ifndef ANGELSCRIPT_H
|
||||||
// Avoid having to inform include path if header is already include before
|
// Avoid having to inform include path if header is already include before
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -18,14 +18,15 @@ uint32_t PkmnLib::Battling::DamageLibrary::GetDamage(CreatureLib::Battling::Exec
|
||||||
return damage;
|
return damage;
|
||||||
}
|
}
|
||||||
uint8_t PkmnLib::Battling::DamageLibrary::GetBasePower(CreatureLib::Battling::ExecutingAttack* attack,
|
uint8_t PkmnLib::Battling::DamageLibrary::GetBasePower(CreatureLib::Battling::ExecutingAttack* attack,
|
||||||
CreatureLib::Battling::Creature* target, uint8_t hitIndex,
|
[[maybe_unused]] CreatureLib::Battling::Creature* target,
|
||||||
const HitData& hitData) const {
|
[[maybe_unused]] uint8_t hitIndex,
|
||||||
|
[[maybe_unused]] const HitData& hitData) const {
|
||||||
auto bp = attack->GetAttack()->GetAttack()->GetBasePower();
|
auto bp = attack->GetAttack()->GetAttack()->GetBasePower();
|
||||||
// HOOK: modify base power.
|
// HOOK: modify base power.
|
||||||
return bp;
|
return bp;
|
||||||
}
|
}
|
||||||
float PkmnLib::Battling::DamageLibrary::GetStatModifier(CreatureLib::Battling::ExecutingAttack* attack,
|
float PkmnLib::Battling::DamageLibrary::GetStatModifier(CreatureLib::Battling::ExecutingAttack* attack,
|
||||||
CreatureLib::Battling::Creature* target, uint8_t hitIndex,
|
CreatureLib::Battling::Creature* target, uint8_t,
|
||||||
const HitData& hitData) const {
|
const HitData& hitData) const {
|
||||||
auto user = attack->GetUser();
|
auto user = attack->GetUser();
|
||||||
// HOOK: allow overriding for which users stat we use.
|
// HOOK: allow overriding for which users stat we use.
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
#define PKMNLIB_PKMNSCRIPT_HPP
|
#define PKMNLIB_PKMNSCRIPT_HPP
|
||||||
#include <CreatureLib/Battling/ScriptHandling/Script.hpp>
|
#include <CreatureLib/Battling/ScriptHandling/Script.hpp>
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
|
|
||||||
namespace PkmnLib::Battling {
|
namespace PkmnLib::Battling {
|
||||||
class PkmnScript : public CreatureLib::Battling::Script {
|
class PkmnScript : public CreatureLib::Battling::Script {
|
||||||
public:
|
public:
|
||||||
|
@ -19,5 +22,6 @@ namespace PkmnLib::Battling {
|
||||||
CreatureLib::Battling::Creature* winningMon, bool* shareExperience){};
|
CreatureLib::Battling::Creature* winningMon, bool* shareExperience){};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
#endif // PKMNLIB_PKMNSCRIPT_HPP
|
#endif // PKMNLIB_PKMNSCRIPT_HPP
|
||||||
|
|
|
@ -115,7 +115,7 @@ void AngelScriptResolver::RegisterTypes() {
|
||||||
BasicScriptClass::Register(_engine);
|
BasicScriptClass::Register(_engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AngelScriptResolver::MessageCallback(const asSMessageInfo* msg, void* param) {
|
void AngelScriptResolver::MessageCallback(const asSMessageInfo* msg, void*) {
|
||||||
const char* type = "ERR ";
|
const char* type = "ERR ";
|
||||||
if (msg->type == asMSGTYPE_WARNING)
|
if (msg->type == asMSGTYPE_WARNING)
|
||||||
type = "WARN";
|
type = "WARN";
|
||||||
|
@ -265,7 +265,7 @@ void AngelScriptResolver::LoadByteCodeFromFile(const char* file) {
|
||||||
// Begin loading the type database
|
// Begin loading the type database
|
||||||
auto types = stream->ReadTypes();
|
auto types = stream->ReadTypes();
|
||||||
|
|
||||||
InitializeByteCode(stream, types);
|
InitializeByteCode(types);
|
||||||
Assert(fclose(rFile) == 0);
|
Assert(fclose(rFile) == 0);
|
||||||
delete stream;
|
delete stream;
|
||||||
}
|
}
|
||||||
|
@ -297,11 +297,10 @@ void AngelScriptResolver::LoadByteCodeFromMemory(uint8_t* byte, size_t size) {
|
||||||
// Begin loading the type database
|
// Begin loading the type database
|
||||||
auto types = stream->ReadTypes();
|
auto types = stream->ReadTypes();
|
||||||
|
|
||||||
InitializeByteCode(stream, types);
|
InitializeByteCode(types);
|
||||||
delete stream;
|
delete stream;
|
||||||
}
|
}
|
||||||
void AngelScriptResolver::InitializeByteCode(
|
void AngelScriptResolver::InitializeByteCode(
|
||||||
asIBinaryStream* stream,
|
|
||||||
const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::StringView, uint32_t>>& types) {
|
const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::StringView, uint32_t>>& types) {
|
||||||
|
|
||||||
auto typeCount = _mainModule->GetObjectTypeCount();
|
auto typeCount = _mainModule->GetObjectTypeCount();
|
||||||
|
|
|
@ -25,8 +25,7 @@ private:
|
||||||
|
|
||||||
void RegisterTypes();
|
void RegisterTypes();
|
||||||
void
|
void
|
||||||
InitializeByteCode(asIBinaryStream* stream,
|
InitializeByteCode(const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::StringView, uint32_t>>& types);
|
||||||
const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::StringView, uint32_t>>& types);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~AngelScriptResolver() override {
|
~AngelScriptResolver() override {
|
||||||
|
@ -64,7 +63,7 @@ public:
|
||||||
int r = _engine->RegisterObjectMethod(type, decl, asFunctionPtr(func), asCALL_CDECL_OBJFIRST);
|
int r = _engine->RegisterObjectMethod(type, decl, asFunctionPtr(func), asCALL_CDECL_OBJFIRST);
|
||||||
Assert(r >= 0);
|
Assert(r >= 0);
|
||||||
}
|
}
|
||||||
void RegisterGlobalMethod(const char* decl, void*(func)(void*)) {
|
void RegisterGlobalMethod(const char*, void*(func)(void*)) {
|
||||||
auto r = _engine->RegisterGlobalFunction("decl", asFunctionPtr(func), asCALL_CDECL);
|
auto r = _engine->RegisterGlobalFunction("decl", asFunctionPtr(func), asCALL_CDECL);
|
||||||
Assert(r >= 0);
|
Assert(r >= 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,12 @@
|
||||||
#include <CreatureLib/Battling/ScriptHandling/Script.hpp>
|
#include <CreatureLib/Battling/ScriptHandling/Script.hpp>
|
||||||
#define ANGELSCRIPT_DLL_LIBRARY_IMPORT
|
#define ANGELSCRIPT_DLL_LIBRARY_IMPORT
|
||||||
#include <CreatureLib/Library/Exceptions/NotImplementedException.hpp>
|
#include <CreatureLib/Library/Exceptions/NotImplementedException.hpp>
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "../../../extern/angelscript_addons/scriptarray/scriptarray.h"
|
#include "../../../extern/angelscript_addons/scriptarray/scriptarray.h"
|
||||||
#include "../../Battling/PkmnScript.hpp"
|
#include "../../Battling/PkmnScript.hpp"
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
#include <Arbutils/Collections/Dictionary.hpp>
|
#include <Arbutils/Collections/Dictionary.hpp>
|
||||||
#include <Arbutils/StringView.hpp>
|
#include <Arbutils/StringView.hpp>
|
||||||
#include <CreatureLib/Library/Exceptions/CreatureException.hpp>
|
#include <CreatureLib/Library/Exceptions/CreatureException.hpp>
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
#ifndef PKMNLIB_CONTEXTPOOL_HPP
|
#ifndef PKMNLIB_CONTEXTPOOL_HPP
|
||||||
#define PKMNLIB_CONTEXTPOOL_HPP
|
#define PKMNLIB_CONTEXTPOOL_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class ContextPool {
|
class ContextPool {
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_BASICSCRIPTCLASS_HPP
|
#ifndef PKMNLIB_BASICSCRIPTCLASS_HPP
|
||||||
#define PKMNLIB_BASICSCRIPTCLASS_HPP
|
#define PKMNLIB_BASICSCRIPTCLASS_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class BasicScriptClass {
|
class BasicScriptClass {
|
||||||
public:
|
public:
|
||||||
static void Register(asIScriptEngine* engine);
|
static void Register(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
#ifndef PKMNLIB_REGISTERBATTLECLASS_HPP
|
#ifndef PKMNLIB_REGISTERBATTLECLASS_HPP
|
||||||
#define PKMNLIB_REGISTERBATTLECLASS_HPP
|
#define PKMNLIB_REGISTERBATTLECLASS_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
class RegisterBattleClass {
|
class RegisterBattleClass {
|
||||||
static void RegisterChoiceQueue(asIScriptEngine* engine);
|
static void RegisterChoiceQueue(asIScriptEngine* engine);
|
||||||
static void RegisterBattle(asIScriptEngine* engine);
|
static void RegisterBattle(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_REGISTERBATTLELIBRARY_HPP
|
#ifndef PKMNLIB_REGISTERBATTLELIBRARY_HPP
|
||||||
#define PKMNLIB_REGISTERBATTLELIBRARY_HPP
|
#define PKMNLIB_REGISTERBATTLELIBRARY_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterBattleLibrary {
|
class RegisterBattleLibrary {
|
||||||
static void RegisterDamageLibrary(asIScriptEngine* engine);
|
static void RegisterDamageLibrary(asIScriptEngine* engine);
|
||||||
static void RegisterLibrary(asIScriptEngine* engine);
|
static void RegisterLibrary(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTEREXECUTINGATTACK_HPP
|
#ifndef PKMNLIB_REGISTEREXECUTINGATTACK_HPP
|
||||||
#define PKMNLIB_REGISTEREXECUTINGATTACK_HPP
|
#define PKMNLIB_REGISTEREXECUTINGATTACK_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterExecutingAttack {
|
class RegisterExecutingAttack {
|
||||||
static void RegisterHitData(asIScriptEngine* engine);
|
static void RegisterHitData(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_REGISTERPOKEMONCLASS_HPP
|
#ifndef PKMNLIB_REGISTERPOKEMONCLASS_HPP
|
||||||
#define PKMNLIB_REGISTERPOKEMONCLASS_HPP
|
#define PKMNLIB_REGISTERPOKEMONCLASS_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterPokemonClass {
|
class RegisterPokemonClass {
|
||||||
static void RegisterDamageSource(asIScriptEngine* engine);
|
static void RegisterDamageSource(asIScriptEngine* engine);
|
||||||
static void RegisterMoveLearnMethod(asIScriptEngine* engine);
|
static void RegisterMoveLearnMethod(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_REGISTERTURNCHOICES_HPP
|
#ifndef PKMNLIB_REGISTERTURNCHOICES_HPP
|
||||||
#define PKMNLIB_REGISTERTURNCHOICES_HPP
|
#define PKMNLIB_REGISTERTURNCHOICES_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterTurnChoices {
|
class RegisterTurnChoices {
|
||||||
static void RegisterTurnChoiceKindEnum(asIScriptEngine* engine);
|
static void RegisterTurnChoiceKindEnum(asIScriptEngine* engine);
|
||||||
static void RegisterBaseTurnChoice(asIScriptEngine* engine);
|
static void RegisterBaseTurnChoice(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_CONSTSTRING_HPP
|
#ifndef PKMNLIB_CONSTSTRING_HPP
|
||||||
#define PKMNLIB_CONSTSTRING_HPP
|
#define PKMNLIB_CONSTSTRING_HPP
|
||||||
#include <Arbutils/Assert.hpp>
|
#include <Arbutils/Assert.hpp>
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class ConstStringRegister {
|
class ConstStringRegister {
|
||||||
public:
|
public:
|
||||||
static void Register(asIScriptEngine* engine);
|
static void Register(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_REGISTEREFFECTPARAMETER_HPP
|
#ifndef PKMNLIB_REGISTEREFFECTPARAMETER_HPP
|
||||||
#define PKMNLIB_REGISTEREFFECTPARAMETER_HPP
|
#define PKMNLIB_REGISTEREFFECTPARAMETER_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterEffectParameter {
|
class RegisterEffectParameter {
|
||||||
public:
|
public:
|
||||||
static void Register(asIScriptEngine* engine);
|
static void Register(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTERGROWTHRATETYPES_HPP
|
#ifndef PKMNLIB_REGISTERGROWTHRATETYPES_HPP
|
||||||
#define PKMNLIB_REGISTERGROWTHRATETYPES_HPP
|
#define PKMNLIB_REGISTERGROWTHRATETYPES_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterGrowthRateTypes {
|
class RegisterGrowthRateTypes {
|
||||||
static void RegisterGrowthRateType(asIScriptEngine* engine);
|
static void RegisterGrowthRateType(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTERITEMTYPES_HPP
|
#ifndef PKMNLIB_REGISTERITEMTYPES_HPP
|
||||||
#define PKMNLIB_REGISTERITEMTYPES_HPP
|
#define PKMNLIB_REGISTERITEMTYPES_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterItemTypes {
|
class RegisterItemTypes {
|
||||||
static void RegisterItemCategoryEnum(asIScriptEngine* engine);
|
static void RegisterItemCategoryEnum(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTERMOVETYPES_HPP
|
#ifndef PKMNLIB_REGISTERMOVETYPES_HPP
|
||||||
#define PKMNLIB_REGISTERMOVETYPES_HPP
|
#define PKMNLIB_REGISTERMOVETYPES_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterMoveTypes {
|
class RegisterMoveTypes {
|
||||||
static void RegisterMoveCategory(asIScriptEngine* engine);
|
static void RegisterMoveCategory(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTERSPECIESTYPES_HPP
|
#ifndef PKMNLIB_REGISTERSPECIESTYPES_HPP
|
||||||
#define PKMNLIB_REGISTERSPECIESTYPES_HPP
|
#define PKMNLIB_REGISTERSPECIESTYPES_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterSpeciesTypes {
|
class RegisterSpeciesTypes {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#ifndef PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
|
#ifndef PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
|
||||||
#define PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
|
#define PKMNLIB_REGISTERSTATICLIBRARYTYPES_HPP
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterStaticLibraryTypes {
|
class RegisterStaticLibraryTypes {
|
||||||
static void RegisterLibrarySettingsType(asIScriptEngine* engine);
|
static void RegisterLibrarySettingsType(asIScriptEngine* engine);
|
||||||
static void RegisterLibraryType(asIScriptEngine* engine);
|
static void RegisterLibraryType(asIScriptEngine* engine);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef PKMNLIB_REGISTERTYPELIBRARY_HPP
|
#ifndef PKMNLIB_REGISTERTYPELIBRARY_HPP
|
||||||
#define PKMNLIB_REGISTERTYPELIBRARY_HPP
|
#define PKMNLIB_REGISTERTYPELIBRARY_HPP
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#include <angelscript.h>
|
#include <angelscript.h>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
class RegisterTypeLibrary {
|
class RegisterTypeLibrary {
|
||||||
static void RegisterTypeLibraryType(asIScriptEngine* engine);
|
static void RegisterTypeLibraryType(asIScriptEngine* engine);
|
||||||
|
|
Loading…
Reference in New Issue