#pragma once #include "game/scripting/array.hpp" #include "game/scripting/execution.hpp" #include "game/scripting/function.hpp" namespace gsc { class function_args { public: function_args(std::vector); unsigned int size() const; std::vector get_raw() const; scripting::value_wrap get(const int index) const; scripting::value_wrap operator[](const int index) const { return this->get(index); } private: std::vector values_; }; using builtin_function = void(*)(); using builtin_method = void(*)(game::scr_entref_t); using script_function = std::function; using script_method = std::function; extern builtin_function func_table[0x1000]; extern builtin_method meth_table[0x1000]; extern const game::dvar_t* developer_script; void scr_error(const char* error, const bool force_print = false); namespace function { void add(const std::string& name, script_function function); } namespace method { void add(const std::string& name, script_method function); } }