This commit is contained in:
Federico Cecchetto
2021-05-29 22:12:43 +02:00
parent dc150bb940
commit 1eacc72295
2 changed files with 24 additions and 39 deletions

22
src/component/gsc.hpp Normal file
View File

@ -0,0 +1,22 @@
#pragma once
namespace gsc
{
using function_args = std::vector<scripting::script_value>;
using builtin_function = void(*)();
using builtin_method = void(*)(game::scr_entref_t);
using script_function = std::function<scripting::script_value(function_args)>;
using script_method = std::function<scripting::script_value(game::scr_entref_t, function_args)>;
namespace function
{
void add(const std::string& name, const script_function& func);
}
namespace method
{
void add(const std::string& name, const script_method& func);
}
}