You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
930 B
C++
36 lines
930 B
C++
#include "ScriptFunctions.hpp"
|
|
#include "API/PublicFnAPI.hpp"
|
|
#include <cstdarg>
|
|
#include <iostream>
|
|
#include <apps/openmw-mp/Player.hpp>
|
|
#include <apps/openmw-mp/Networking.hpp>
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
template<typename... Types>
|
|
constexpr char TypeString<Types...>::value[];
|
|
constexpr ScriptFunctionData ScriptFunctions::functions[];
|
|
constexpr ScriptCallbackData ScriptFunctions::callbacks[];
|
|
|
|
using namespace std;
|
|
|
|
void ScriptFunctions::MakePublic(ScriptFunc _public, const char *name, char ret_type, const char *def) noexcept
|
|
{
|
|
Public::MakePublic(_public, name, ret_type, def);
|
|
}
|
|
|
|
boost::any ScriptFunctions::CallPublic(const char *name, va_list args) noexcept
|
|
{
|
|
vector<boost::any> params;
|
|
|
|
try
|
|
{
|
|
string def = Public::GetDefinition(name);
|
|
Utils::getArguments(params, args, def);
|
|
|
|
return Public::Call(name, params);
|
|
}
|
|
catch (...) {}
|
|
|
|
return 0;
|
|
}
|